tinnycloud
2011-Feb-18 09:10 UTC
[Xen-devel] Could some help to explain code under /xen/arch/x86/hvm
Hi: I am trying to understand more Xen code. Regards to /xen/arch/x86/hvm, I would like to know what is the code for? What is it try to emulate, it looks like has relation with IO, what is the logic? Many thanks. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
George Dunlap
2011-Feb-18 10:28 UTC
Re: [Xen-devel] Could some help to explain code under /xen/arch/x86/hvm
As the name suggests, it contains code related to hardware-assisted virtualizaton (HVM). hvm/vmx/* have to do specifically with Intel''s HVM tecnology, and hvm/svm/* have to do with AMD''s HVM technology. Overall activities: * Dealing with virtualizing privileged instructions (pagetables, CR3, LDTs IDTs, traps, interrupts, &c) * Serving as an interface to pagetable functionality, either using HAP (hardware-assisted paging) or shadow pagetables * Dealing with device IO: PIO and MMIO. Most of these are passed back to qemu, but some are handled in the hypervisor. * Implementing in-hypervisor devices The instruction emulation routines are abstracted such that they can be shared between shadow pagetable code and MMIO/PIO. Hopefully that gives you an idea as you explore on your own. :-) -George On Fri, Feb 18, 2011 at 9:10 AM, tinnycloud <tinnycloud@hotmail.com> wrote:> Hi: > > I am trying to understand more Xen code. > > Regards to /xen/arch/x86/hvm, I would like to know what is the code > for? > > What is it try to emulate, it looks like has relation with IO, what is > the logic? > > Many thanks. > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
MaoXiaoyun
2011-Feb-22 05:11 UTC
RE: [Xen-devel] Could some help to explain code under /xen/arch/x86/hvm
Thanks George. Well. What is EXIT_REASON_EPT_VIOLATION for in hvm_vmx_exit_reason_name? Is it refer to guest page fault?> Date: Fri, 18 Feb 2011 10:28:41 +0000 > Subject: Re: [Xen-devel] Could some help to explain code under /xen/arch/x86/hvm > From: George.Dunlap@eu.citrix.com > To: tinnycloud@hotmail.com > CC: xen-devel@lists.xensource.com > > As the name suggests, it contains code related to hardware-assisted > virtualizaton (HVM). hvm/vmx/* have to do specifically with Intel''s > HVM tecnology, and hvm/svm/* have to do with AMD''s HVM technology. > Overall activities: > * Dealing with virtualizing privileged instructions (pagetables, CR3, > LDTs IDTs, traps, interrupts, &c) > * Serving as an interface to pagetable functionality, either using HAP > (hardware-assisted paging) or shadow pagetables > * Dealing with device IO: PIO and MMIO. Most of these are passed back > to qemu, but some are handled in the hypervisor. > * Implementing in-hypervisor devices > > The instruction emulation routines are abstracted such that they can > be shared between shadow pagetable code and MMIO/PIO. > > Hopefully that gives you an idea as you explore on your own. :-) > > -George > > On Fri, Feb 18, 2011 at 9:10 AM, tinnycloud <tinnycloud@hotmail.com> wrote: > > Hi: > > > > I am trying to understand more Xen code. > > > > Regards to /xen/arch/x86/hvm, I would like to know what is the code > > for? > > > > What is it try to emulate, it looks like has relation with IO, what is > > the logic? > > > > Many thanks. > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Feb-22 09:15 UTC
RE: [Xen-devel] Could some help to explain code under /xen/arch/x86/hvm
On Tue, 2011-02-22 at 05:11 +0000, MaoXiaoyun wrote:> What is EXIT_REASON_EPT_VIOLATION for in hvm_vmx_exit_reason_name? > Is it refer to guest page fault?You need to consult the hardware documentation for this sort of information. In the Intel case you need the "Intel® 64 and IA-32 Architectures Software Developer''s Manuals": http://www.intel.com/products/processor/manuals/ For VMX you want volume 3 (AKA system programming guide), which comes in two parts. For AMD you want "AMD64 Architecture Programmer''s Manual": http://developer.amd.com/documentation/guides/pages/default.aspx I think SVM is in volume 2. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel