Olaf Hering
2013-Aug-30 12:59 UTC
[PATCH v2] unmodified_drivers: enable unplug per default
Since xen-3.3 an official unplug protocol for emulated hardware is available in the toolstack. The pvops kernel does the unplug per default, so it is safe to do it also in the drivers for forward ported xenlinux. Currently its required to load xen-platform-pci with the module parameter dev_unplug=all, which is cumbersome. Signed-off-by: Olaf Hering <olaf@aepfle.de> --- unmodified_drivers/linux-2.6/platform-pci/platform-pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c index cfd0536..db8fa66 100644 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c @@ -66,7 +66,7 @@ MODULE_LICENSE("GPL"); static char *dev_unplug; module_param(dev_unplug, charp, 0644); MODULE_PARM_DESC(dev_unplug, "Emulated devices to unplug: " - "[all,][ide-disks,][aux-ide-disks,][nics]\n"); + "[all,][ide-disks,][aux-ide-disks,][nics] (default is ''all'')\n"); struct pci_dev *xen_platform_pdev; @@ -290,6 +290,10 @@ static int check_platform_magic(struct device *dev, long ioaddr, long iolen) short magic, unplug = 0; char protocol, *p, *q, *err; + /* Unconditionally unplug everything */ + if (!dev_unplug) + unplug = UNPLUG_ALL; + for (p = dev_unplug; p; p = q) { q = strchr(dev_unplug, '',''); if (q)
Ian Campbell
2013-Sep-09 13:05 UTC
Re: [PATCH v2] unmodified_drivers: enable unplug per default
On Fri, 2013-08-30 at 14:59 +0200, Olaf Hering wrote:> Since xen-3.3 an official unplug protocol for emulated hardware is > available in the toolstack. The pvops kernel does the unplug per > default, so it is safe to do it also in the drivers for forward ported > xenlinux. > Currently its required to load xen-platform-pci with the module > parameter dev_unplug=all, which is cumbersome.Not sure who is supposed to review/ack/nack this change. Wouldn''t you want to add a way to stop the unplug? As it stands I think you can request it do less, but not nothing.> > Signed-off-by: Olaf Hering <olaf@aepfle.de> > --- > unmodified_drivers/linux-2.6/platform-pci/platform-pci.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c > index cfd0536..db8fa66 100644 > --- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c > +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c > @@ -66,7 +66,7 @@ MODULE_LICENSE("GPL"); > static char *dev_unplug; > module_param(dev_unplug, charp, 0644); > MODULE_PARM_DESC(dev_unplug, "Emulated devices to unplug: " > - "[all,][ide-disks,][aux-ide-disks,][nics]\n"); > + "[all,][ide-disks,][aux-ide-disks,][nics] (default is ''all'')\n"); > > struct pci_dev *xen_platform_pdev; > > @@ -290,6 +290,10 @@ static int check_platform_magic(struct device *dev, long ioaddr, long iolen) > short magic, unplug = 0; > char protocol, *p, *q, *err; > > + /* Unconditionally unplug everything */ > + if (!dev_unplug) > + unplug = UNPLUG_ALL; > + > for (p = dev_unplug; p; p = q) { > q = strchr(dev_unplug, '',''); > if (q) > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
Jan Beulich
2013-Sep-09 13:29 UTC
Re: [PATCH v2] unmodified_drivers: enable unplug per default
>>> On 09.09.13 at 15:05, Ian Campbell <Ian.Campbell@citrix.com> wrote: > On Fri, 2013-08-30 at 14:59 +0200, Olaf Hering wrote: >> Since xen-3.3 an official unplug protocol for emulated hardware is >> available in the toolstack. The pvops kernel does the unplug per >> default, so it is safe to do it also in the drivers for forward ported >> xenlinux. >> Currently its required to load xen-platform-pci with the module >> parameter dev_unplug=all, which is cumbersome. > > Not sure who is supposed to review/ack/nack this change.Me. I was merely giving it some time to see whether someone else had an opinion.> Wouldn't you want to add a way to stop the unplug? As it stands I think > you can request it do less, but not nothing.And voilĂ - good point. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Olaf Hering
2013-Sep-18 13:37 UTC
Re: [PATCH v2] unmodified_drivers: enable unplug per default
On Mon, Sep 09, Ian Campbell wrote:> On Fri, 2013-08-30 at 14:59 +0200, Olaf Hering wrote: > > Since xen-3.3 an official unplug protocol for emulated hardware is > > available in the toolstack. The pvops kernel does the unplug per > > default, so it is safe to do it also in the drivers for forward ported > > xenlinux. > > Currently its required to load xen-platform-pci with the module > > parameter dev_unplug=all, which is cumbersome. > > Not sure who is supposed to review/ack/nack this change. > > Wouldn''t you want to add a way to stop the unplug? As it stands I think > you can request it do less, but not nothing.I think adding a new dev_unplug=never case would fix this case. I will send another version of this patch. Olaf