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] xen_emul_unplug on xen 4.1, HVM guest 2.6.38

To: Alex Bligh <alex@xxxxxxxxxxx>
Subject: Re: [Xen-devel] xen_emul_unplug on xen 4.1, HVM guest 2.6.38
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 26 Oct 2011 15:56:44 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Wed, 26 Oct 2011 07:57:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <F1E068D49F012116597572D1@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <0050AA2F452257584F0AAA0B@xxxxxxxxxxxx> <20111026134942.GB31609@xxxxxxxxxxxxxxxxxxx> <20111026141233.GJ12984@xxxxxxxxxxx> <F1E068D49F012116597572D1@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2011-10-26 at 15:47 +0100, Alex Bligh wrote:
> Pasi, Conrad,
> 
> --On 26 October 2011 17:12:33 +0300 Pasi Kärkkäinen <pasik@xxxxxx> wrote:
> 
> > On Wed, Oct 26, 2011 at 09:49:42AM -0400, Konrad Rzeszutek Wilk wrote:
> >> On Wed, Oct 26, 2011 at 02:17:25PM +0100, Alex Bligh wrote:
> >> > I am running Xen 4 and want users to be able to install arbitrary HVM
> >> > images. We want both PV and emulated drivers to appear. The reason
> >> > for this is for compatibility with images that were prepared for
> >> > Xen 3.3, which assume emulated devices exist at boot time (particularly
> >> > for running the boot loader).
> >> >
> >> > If I do not specify on the boot line xen_emul_unplug=never, then
> >> > under some guest OS's (e.g. Ubuntu Natty (2.6.38)), the domU kernel
> >> > unplugs the non-PV devices, which is undesirable in my application.
> >> >
> >> > I cannot arbitrarily change the kernel command line because it is
> >> > in effect set by the user's image.
> >> >
> >> > Therefore what I need to do is prevent Xen4 offering the facility
> >> > to unplug the devices in the first place. Setting "(unpluggable 0)"
> >> > in the config for the emulated NICs and disks does not appear
> >> > to prevent them getting unplugged; what may be happening is that
> >> > domU tries to unplug them (but fails) but still doesn't use them.
> >> > Is there a way to signal from dom0 that the kernel really shouldn't
> >> > unplug this stuff.
> >>
> >> xen_pci_platform=0 in your guest config should do it.
> >>
> >
> > It's actually called:
> > xen_platform_pci=0
> 
> Thanks. Just to confirm, that will still allow HVM PV drivers to
> operate (as well)?

No, this will disable PV drivers.

The decision to unplug is a kernel side decision and in PVHVM Linux
kernels is not currently possible to have both types of devices by
default due to the risk of dataloss if the guest is not correctly
configured (i.e. the kernel can't tell if it is mounting the same
filesystem via two paths). The xen_emul_unplug option is the current way
you can override this once you have confirmed that your guest
configuration is not dangerous. I'm afraid this necessarily involves
guest config and guest admin interaction.

In principal we might be able to extend the unplug protocol (which would
involve patches to qemu, the kernel(s) and the toolstack) to allow
devices to be marked as being not necessary to unplug. Someone would
have to send patches though and it would be opening up a way for people
to lose data so we'd need to be careful.

I'm sure that the unplug protocol is documented somewhere in the source
tree but I can't for the life of me find it :-(

Ian.



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