WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Hypercalls in Intel-VT

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Hypercalls in Intel-VT
From: "Ashish Bijlani" <ashish.bijlani@xxxxxxxxx>
Date: Mon, 29 Oct 2007 04:36:03 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 29 Oct 2007 01:36:48 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=hHSEngWxllaHG+MJ3HgxaD1QorrmEUW9xeANwBF1eC4=; b=SWW8YKE/5JmVj+b0Cd8bHtD7ul9W5W3vyfYeOY+1uWtipqk/FhEmDMB3Rjh8FvlxoYVL8RBBNR4JGfXozmVKH/a+s7rQmTHHUWJ5JTOeIk3IOfXCNSdczGgatw4W+oBho/OqOG+dslf07fkrb9aB7OvNa5ChOWru1Pw54kfGxl4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Y/vKnFDR69/0mmJR6NWl/M8Ysc5FxaMaIg0REPypnlrASian7UogiFw8IT5Yl8cDvAfxRzJeZB4muAcPLrwmhWFvMZnEkf8RX5wlNQW9jglwXV2T/zDxM6HGtWSGwik7q54+blOGauDd/RNtJ1fn3h05Um1CyRRlLLYyIn5j06E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C34B46BA.178D9%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <ec55b17e0710290059l4fb9cceaxf57877e50f46a50b@xxxxxxxxxxxxxx> <C34B46BA.178D9%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
so is xen currently mapped in the first  64MB of every guest hvm? also, does xen use different GDT for itself or it uses some slots in the GDT of every guest hvm? if you could you guide me to some pointers which mention xen's implementation for intel-vt, that will be really helpful. thanks.

On 10/29/07, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> wrote:
The way that PV and HVM guests work is very different. Many of the tricks necessary for hosting PV guests, such as stealing address space for the hypervisor, are not necessary for HVM guests.

 -- Keir

On 29/10/07 07:59, "Ashish Bijlani" <ashish.bijlani@xxxxxxxxx> wrote:

if a VM's context is saved to and xen's context is loaded from VMCS upon every VMexit call in VT, the why is xen mapped in the first 64MB region of every guest VM? As far as I know, TLB will also be flushed when xen's context is loaded from VMCS host area.

On 10/26/07, Mark Williamson <mark.williamson@xxxxxxxxxxxx   <mailto:mark.williamson@xxxxxxxxxxxx> > wrote:
> 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
may know more.

> how
> does transition happen from root VMX mode to non-root VMX mode? I mean does
> 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 the
> guest  VM? thanks.

Well, the hardware probably does something equivalent to this.  But (as far as
I know) that's not how it looks to software: from the software's point of
view you are just doing a VMEXIT from non-root mode to root mode.  Root mode
effectively has a different set of control registers / datastructures to
non-root mode.  So software doesn't have to worry so much about the data
structures involved.  I don't *think* the software even has to save / restore
the guest registers (unless it wants to modify them).

Regarding the TLB flush, again, the hardware quite possibly does that.  But
I'm not aware of anything in the VMX spec that exposes this detail, so Intel
could easily tag the TLB entries as root / non-root to avoid flushing on a
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 < mark.williamson@xxxxxxxxxxxx <mailto:mark.williamson@xxxxxxxxxxxx> > 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 < eddie.dong@xxxxxxxxx> 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=0, 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@xxxxxxxxxxxxxxxxxxx [mailto:
> > > > xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] *On Behalf Of *Ashish Bijlani
> > > > *Sent:* 2007年10月26日 9:14
> > > > *To:* xen-devel@xxxxxxxxxxxxxxxxxxx
> > > > *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 < dexuan.cui@xxxxxxxxx <mailto:dexuan.cui@xxxxxxxxx> > wrote:
> > > > > > From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> > > > > > [mailto: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx <mailto: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx> ]
> > > > >
> > > > > On Behalf Of Ashish Bijlani
> > > > >
> > > > > > Sent: 2007年10月26日 8:20
> > > > > > To: xen-devel@xxxxxxxxxxxxxxxxxxx
> > > > > > 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!



--
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!



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>