Skip to content

Commit

Permalink
xen: only check xen_platform_pci_unplug if hvm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Igor Mammedov authored and Konrad Rzeszutek Wilk committed Apr 6, 2012
1 parent df7a3ee commit e95ae5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit e95ae5a

Please sign in to comment.