From: Olaf Hering Subject: [PATCH v2] unmodified_drivers: enable unplug per default Date: Fri, 30 Aug 2013 14:59:36 +0200 Message-ID: <1377867576-10356-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Olaf Hering , jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org 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 --- 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)