Skip to contentSkip to conversation

xen: only check xen_platform_pci_unplug if hvm

PATCH In review Igor Mammedov 2 participants 2 messages Mar 27, 2012

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/block/xen-blkfront.c |    2 +-
 drivers/net/xen-netfront.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/xen-blkfront.c +1 -1
index d5e1ab9..98cbeba 100644
@@ -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)) {
drivers/net/xen-netfront.c +1 -1
index 663b32c..0ebbb19 100644
@@ -1965,7 +1965,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");
Signature · 1 line
1.7.5
#1 lore raw
Quoted 5 lines · Igor Mammedov

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.

Looks good to me.

If the networking/block maintainers don't object I can push this out to Linus when rc1 comes out.

Quoted 42 lines
---
 drivers/block/xen-blkfront.c |    2 +-
 drivers/net/xen-netfront.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/xen-blkfront.c +1 -1
index d5e1ab9..98cbeba 100644
@@ -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)) {
drivers/net/xen-netfront.c +1 -1
index 663b32c..0ebbb19 100644
@@ -1965,7 +1965,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");
Signature · 7 lines
1.7.5


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel