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] context switch and hypervisor

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] context switch and hypervisor
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Mon, 18 Sep 2006 14:37:55 +0100
Cc: Chris Zhang <abnamro.chris@xxxxxxxxx>
Delivery-date: Mon, 18 Sep 2006 06:37:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <e2845f300609142311o45e05fddh19a513357b21aca8@xxxxxxxxxxxxxx>
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: <e2845f300609142311o45e05fddh19a513357b21aca8@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
> I have been reading some papers from Xen and other sources, there are just
> a couple of questions that I found hard to understand.

Nice one - the papers provide good background.

Other projects you might want to read about:
* Denali (paravirtualisation for lightweight guests)
* uDenali [micro Denali] (Denali with enhanced virtual device stuff, 
migration, etc)
* Disco and Cellular Disco (more traditional VMMs for large systems)
* VMware have a few papers on their architecture

> Why is Xen hypervisor better than a traditional hypervisor? With a
> traditional hypervisor, during a context switch, the hypervisor stores the
> states of a guest OS then goes to the next OS, upon coming back to the
> first OS it restores the hardware states then passes it on to the first OS.
> Does Xen pretty much do the same thing except it provides an API to the OS,
> and the reason/benefit of having such an API is to reduce the time for a
> TLB flush?
>
> Can someone please explain this to me in detail?

Having the explicit API avoids having to emulate the hardware precisely.  Not 
having to do this enables the hypervisor to be simpler, which is good 
(although we can emulate platform hardware anyhow for fully-virtualised 
guests).  Importantly it also enables us to avoid certain performance 
difficulties.  For instance, a couple of significant ones:

* Guests can access the real page tables (with appropriate security 
restrictions), which avoids the overheads in memory and CPU time of 
maintaining "shadow page tables" in the hypervisor
* x86 includes some really annoying features for virtualisation.  For instance 
there are some instructions that *need* to be trapped and emulated in order 
to provide correct semantics, but they aren't capable of producing a trap, so 
there's not a straightforward way of catching them.
* we don't have to emulate real hardware devices, we can use idealised devices 
which are optimised for the virtualised environment and provide good 
performance (nb. other solutions such as VMware also provide the option of 
using optimised drivers in some situations, e.g. for fast network)

Cheers,
Mark

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

<Prev in Thread] Current Thread [Next in Thread>