From: Igor Mammedov Date: Tue, 27 Mar 2012 17:31:08 +0000 (+0200) Subject: xen: only check xen_platform_pci_unplug if hvm X-Git-Tag: v2.6.39-400.9.0~543^2~17^2~14 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=006f13d4e1b2ed43bf9f94370f4e5c36d5a9f10e;p=users%2Fjedix%2Flinux-maple.git xen: only check xen_platform_pci_unplug if hvm commit b9136d207f08 xen: initialize platform-pci even if xen_emul_unplug=never breaks blkfront/netfront by not loading them because of xen_platform_pci_unplug=0 and it is never set for PV guest. [upstream git commit e95ae5a] Signed-off-by: Andrew Jones Signed-off-by: Igor Mammedov Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8e036d129484..5d1e89c8b9fb 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1475,7 +1475,7 @@ static int __init xlblk_init(void) if (!xen_domain()) return -ENODEV; - if (!xen_platform_pci_unplug) + if (xen_hvm_domain() && !xen_platform_pci_unplug) return -ENODEV; if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) { diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index b96b9f0590c5..bf0b20a0e4d9 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1890,7 +1890,7 @@ static int __init netif_init(void) if (xen_initial_domain()) return 0; - if (!xen_platform_pci_unplug) + if (xen_hvm_domain() && !xen_platform_pci_unplug) return -ENODEV; printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");