[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/4] xen: Fix PV-on-HVM



On Wed, May 16, 2012 at 11:19:53AM +0100, Stefano Stabellini wrote:
> On Wed, 16 May 2012, Paolo Bonzini wrote:
> > Il 16/05/2012 10:13, Michael S. Tsirkin ha scritto:
> > > On Wed, May 16, 2012 at 10:06:25AM +0200, Paolo Bonzini wrote:
> > >> On Xen the PV drivers can ask the firmware to surprise-remove the
> > >> emulated NICs.
> > > 
> > > So driver tells firmware (meaning acpi? how?) that it's ok
> > > to do surprize removal?
> > 
> > It writes something to some I/O port, and then QEMU surprise-removes the
> > NICs.
> 
> Yes, writing to a static I/O port provided by the Xen platform PCI
> device, see hw/xen_platform.c:platform_fixed_ioport_writew.
> 
> The guest can ask to unplug emulated NICs and disks this way.
> Surprise-removal is OK in these cases.

Confused.
Don't you want to just remove the device on unplug?
In fact the equivalent of guest calling _EJ0?

> > >> Of course it has to do it early enough so that the guest
> > >> doesn't crash.
> > > 
> > > What does early enough mean and how do we ensure that?
> > 
> > Early enough means that the I/O port is written very early in the boot
> > process, even before the PCI bus is scanned by the OS.
> > 
> > You don't ensure it, it's up to the OS.  The OS knows whether its
> > drivers can cope properly with surprise removal.  If they can, in
> > principle it could write the magic value whenever it wants to.
> 
> Right, it is up to the OS, in general before the PCI bus is scanned.
> In Linux we do it from hypervisor_x86->init_platform.

So early on boot you decide you want PV and so you unplug all emulated
devices?


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.