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: Device model architecture (Was Re: [Xen-devel] Re: Are linker script

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Arun Sharma" <arun.sharma@xxxxxxxxx>
Subject: RE: Device model architecture (Was Re: [Xen-devel] Re: Are linker scripts needed?)
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Wed, 25 May 2005 02:24:14 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 25 May 2005 01:23:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVgnhPhVvKjXRVrTn+dVukn+G30zwAKTwmg
Thread-topic: Device model architecture (Was Re: [Xen-devel] Re: Are linker scripts needed?)
 
> > Ian Pratt wrote:
> >> I'd be inclined to move to a model where we execute the device 
> >> emulation in the root (monitor) VMCS, using the same protection 
> >> mechanism we use for para-virtualized guests e.g. segmentation for 
> >> x86, paging for x86_64. The device emulation should should 
> work like 
> >> a normal front-end driver, connecting via a device channel to a 
> >> normal backend.
> >
> > It sounded like you were proposing linking the device 
> models against 
> > Xen.
> 
> No, Ian is suggesting running them in 'paravirtualised mode': 
> probably in ring 3 of the root VMCS. So there will be three 
> contexts that a VMCS domain runs:
>   1. Full-virt context (guest VMCS, rings 0-3)
>   2. Hypervisor context (root VMS, ring 0)
>   3. Paravirt driver context (root VMCS, rings 1-3)

Exactly.

> > - why is this better than running the device models inside the VMX 
> > domain? Do you expect switching to the helper domain to be 
> faster than 
> > a  vmx world switch?
> 
> Depends on whether you can make the CPU do a direct switch, 
> or if you need to 'bounce' through root VMCS (taking an extra 
> cr3 switch).

The 'monitor_table' will also be the (single) pagetable for device
emulator and Xen.

There should be no need for extra cr3 switches (other than that incurred
by the vmexit).

When switching between the vmcs guest and the minios, we just need to
switch new values into the guest_table variable and the shadow_mode
variable and then all the Xen logic will do the right thing. (no cr3
flush in incurred)

> > - what's the advantage of running minios vs xenolinux in the helper 
> > domain?
> 
> Full xenolinux is totally unnecessary. We just want enough 
> support services to run the device emulator and front-end 
> driver stub. We're best building those from scratch -- it'll 
> look nothing like an operating system.

It'll be very simple and very little code -- just a few entry points,
support functions for printk etc. It's not even clear we need a memory
allocator. 

> > I think we all agree that:
> >
> > - It'd be good to make the device models "embeddable" so 
> that it could 
> > be moved closer to the domain it's servicing. This is where 
> the bulk 
> > of the work is, regardless of which model we end up choosing.
> >
> > - Make sure that there is a unified way to manage the 
> resources given 
> > to the VMX domain (including the device models)
> 
> Yes, agreed.

I think my proposal will work well :-)


Ian

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

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