At 11:37 -0400 on 25 Sep (1348573069), Cutter 409 wrote:> I''m having a really hard time trying to accomplish something that
seems
> generally simple. I want to single step some code in an SVM guest.
> 
> My current method essentially does the following:
> 
> From a domctl:
>    * Pause the target VCPU
>    * vmcb_set_exception_intercepts(vmcb,
> vmcb_get_exception_intercepts(vmcb) | (1U << TRAP_debug) );
>    * v->arch.guest_context.user_regs.rflags |= X86_EFLAGS_TF;
>    * I''ve also tried vmcb->rflags |= X86_EFLAGS_TF;
>    * Unpause the VCPU
> 
> But the VMEXIT_EXCEPTION_DB case doesn''t ever seem to get called.
Is there
> something I''m missing here?
Hard to tell without seeing your patch.  Did you see the code in
svm_do_resume that clears TRAP_debug from the intercept mask if it
doesn''t think there''s a debugger attached?
Have you considered using the existing debugger_attached mechanism
rather than adding your own?
Tim
> I''ve also tried setting both versions of rflags in svm_do_resume()
but it
> doesn''t make a difference.The guest doesn''t crash either,
so I''m assuming
> TF is just not getting set.
> 
> Any thoughts would be greatly appreciated.
> 
> Thanks!
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel