lijiandm
2008-Oct-29 01:32 UTC
[Xen-devel] exception handler caused by context switching and setting trap flag
hello: I have two trivial question. In dom0,which exception handler is used to handle VMexit caused by context switching in domU? If I want to replace the handler ,what should I do? Thanks. JianLi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Paul Samon
2008-Oct-29 01:49 UTC
Re: [Xen-devel] exception handler caused by context switching and setting trap flag
HVM guest''s VMexit is handled by Xen itself (see xen/arch/x86/hvm/vmx/entry.S: vmx_asm_vmexit_handler if you''re using an Intel VT-capable host) , not Dom0 (a PV guest) at all. vcpu context switch itself doesn''t cause VMexit. -- Paul S. On Wed, Oct 29, 2008 at 9:32 AM, lijiandm <lijiandm@163.com> wrote:> > hello: > I have two trivial question. > In dom0,which exception handler is used to handle VMexit caused > by context switching in domU? > If I want to replace the handler ,what should I do? > Thanks. > JianLi >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Paul Samon
2008-Oct-29 03:27 UTC
Re: Re: Re: Re: [Xen-devel] exception handler caused by context switching and setting trap flag
You're welcome. BTW, in the case of EPT/NPT, HVM guest's writng to CR3 would not incur VMexit or something. -- Paul S. 2008/10/29 lijiandm <lijiandm@163.com>> Thank you very very very much!!! > > > > > 在2008-10-29,"Paul Samon" <paul.samon@gmail.com> 写道: > > (Here we don't consider EPT) > When HVM guest (for Intel, namely VMX guest) tried to write_to_cr3, a > VMexit will occur (search for EXIT_REASON_CR_ACCESS in Xen code) > > 2008/10/29 lijiandm <lijiandm@163.com> > >> Yes,I mean change the context in CR3,process switched in and out by OS. >> In another word,I want to capture the behavior caused by the MOV to CR3. >> >> Thanks,wait for your reply. >> >> >> 在2008-10-29,"Paul Samon" <paul.samon@gmail.com> 写道: >> >> > the exception handler used to handle the context switch in HVM guest >> What context switch? process context switch? >> On Xen, the process context switch inside HVM guest functions in exactly >> the same way as it does on bare metal. >> >> 2008/10/29 lijiandm <lijiandm@163.com> >> >>> Yes, I use an Intel VT-capable host. >>> But my problem is I want to find out the exception handler used to >>> handle the context switch in HVM guest.Is there such a exception handler? >>> And if I want to replace it ,what should I do? >>> Thanks. >>> JianLi. >>> >>> >>> >>> 在2008-10-29,"Paul Samon" <paul.samon@gmail.com> 写道: >>> >>> HVM guest's VMexit is handled by Xen itself (see >>> xen/arch/x86/hvm/vmx/entry.S: vmx_asm_vmexit_handler if you're using an >>> Intel VT-capable host) , not Dom0 (a PV guest) at all. >>> >>> vcpu context switch itself doesn't cause VMexit. >>> >>> >>> -- Paul S. >>> >>> On Wed, Oct 29, 2008 at 9:32 AM, lijiandm <lijiandm@163.com> wrote: >>> >>>> >>>> hello: >>>> I have two trivial question. >>>> In dom0,which exception handler is used to handle VMexit caused >>>> by context switching in domU? >>>> If I want to replace the handler ,what should I do? >>>> Thanks. >>>> JianLi >>>> >>>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel