From: Mark Williamson Subject: Re: Hypercalls in Intel-VT Date: Sat, 27 Oct 2007 02:55:21 +0100 Message-ID: <200710270255.21955.mark.williamson@cl.cam.ac.uk> References: <200710261707.32584.mark.williamson@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ashish Bijlani Cc: xen-devel@lists.xensource.com, "Dong, Eddie" List-Id: xen-devel@lists.xenproject.org > thanks for your answers. really appreciate your help. however, i've some > more doubts and would appreciate if you could answer the following: We're now getting a bit outside my understanding of VMX, but the other guys= =20 may know more. > how=20 > does transition happen from root VMX mode to non-root VMX mode? I mean do= es > it load Xen's CS, DS from the GDT or does it switch GDT to load Xen's GDT? > Also, does it do TLB flush, provided Xen is mapped in the first 64MB of t= he > guest VM? thanks. Well, the hardware probably does something equivalent to this. But (as far= as=20 I know) that's not how it looks to software: from the software's point of=20 view you are just doing a VMEXIT from non-root mode to root mode. Root mod= e=20 effectively has a different set of control registers / datastructures to=20 non-root mode. So software doesn't have to worry so much about the data=20 structures involved. I don't *think* the software even has to save / resto= re=20 the guest registers (unless it wants to modify them). Regarding the TLB flush, again, the hardware quite possibly does that. But= =20 I'm not aware of anything in the VMX spec that exposes this detail, so Inte= l=20 could easily tag the TLB entries as root / non-root to avoid flushing on a= =20 VMEXIT / VMENTER. For all I know, they may do this already! Eddie, did I get that about right? :-) Cheers, Mark > > On 10/26/07, Mark Williamson wrote: > > > that means dom0 doesn't make trap to ring 0 root VMX mode for > > > privileged operations like updating cr3? > > > > Dom0 always runs paravirtualised, it can't be an HVM domain. So it just > > uses > > the normal paravirtualised interface, regardless of whether VMX is > > available > > in the hardware. > > > > Cheers, > > Mark > > > > > On 10/26/07, Dong, Eddie wrote: > > > > DOm0 works in ring 1 root VMX mode. Anyway can switch from ring 1 = to > > > > ring 0 can be used for accessing privileged resource such as INT xx, > > > > or > > > > > > thru exception like I/O. > > > > > > > > But HVM works in non root VMX mode though ring=3D0, so you need to > > > > switch > > > > > > from non root VMX mode to root VMX mode to access privileged > > > > resource. > > > > VM > > > > > > Exit is the only way to do this. > > > > > > > > ------------------------------ > > > > *From:* xen-devel-bounces@lists.xensource.com [mailto: > > > > xen-devel-bounces@lists.xensource.com] *On Behalf Of *Ashish Bijlani > > > > *Sent:* 2007=E5=B9=B410=E6=9C=8826=E6=97=A5 9:14 > > > > *To:* xen-devel@lists.xensource.com > > > > *Subject:* Re: [Xen-devel] Hypercalls in Intel-VT > > > > > > > > how does dom0 on intel-vt gets privileges to access the hardware > > > > devices? > > > > > > i mean does it get these privileges through superpages? > > > > > > > > On 10/25/07, Cui, Dexuan wrote: > > > > > > From: xen-devel-bounces@lists.xensource.com > > > > > > [mailto:xen-devel-bounces@lists.xensource.com] > > > > > > > > > > On Behalf Of Ashish Bijlani > > > > > > > > > > > Sent: 2007=E5=B9=B410=E6=9C=8826=E6=97=A5 8:20 > > > > > > To: xen-devel@lists.xensource.com > > > > > > Subject: Re: [Xen-devel] Hypercalls in Intel-VT > > > > > > > > > > > > > > > > > > could there be a way to make a transition into xen without a > > > > vmexit > > > > > > > upon executing an iret inside a guest os krnl? > > > > > I think we are talking about VMX guest -- the answer it NO... For > > > > an > > > > > > > VMX guest to return to Xen, a VMexit is a must. You can refert to > > > > Intel > > > > > > > Software Developer Manual 3B for details. > > > > > > > > > > -- Dexuan > > > > -- > > Dave: Just a question. What use is a unicyle with no seat? And no > > pedals! Mark: To answer a question with a question: What use is a > > skateboard? Dave: Skateboards have wheels. > > Mark: My wheel has a wheel! =2D-=20 Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel!