]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
xen: only check xen_platform_pci_unplug if hvm
authorIgor Mammedov <imammedo@redhat.com>
Tue, 27 Mar 2012 17:31:08 +0000 (19:31 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 6 Apr 2012 16:12:52 +0000 (12:12 -0400)
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.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkfront.c
drivers/net/xen-netfront.c

index 4276ab035e006a80cd0283a5f591a03f4de4b289..19b6005a323edb87eef360d367e3c8e73ec86811 100644 (file)
@@ -1452,7 +1452,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)) {
index 8cc0914b9f9210eb96fe5f1c115ceb59e9d70cd1..ccba19c72a364159db09dfa8368eb5a3770ecfd2 100644 (file)
@@ -1957,7 +1957,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");