]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
PCI/passthrough: don't discard Dom0 provided information
authorJan Beulich <jbeulich@suse.com>
Wed, 7 Feb 2018 15:30:24 +0000 (16:30 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Feb 2018 15:30:24 +0000 (16:30 +0100)
Instead of giving, to subsequent code, the appearance of there not
having been any "info" data provided, adjust the conditional guarding
SR-IOV handling.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/drivers/passthrough/pci.c

index 469dfc6c3d3e851174f65683b8000ea06430d80b..2b976ade62e1be97effb9e6f329e18c623d391fc 100644 (file)
@@ -629,10 +629,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
     else if ( info->is_extfn )
         pdev_type = "extended function";
     else
-    {
-        info = NULL;
         pdev_type = "device";
-    }
 
     ret = xsm_resource_plug_pci(XSM_PRIV, (seg << 16) | (bus << 8) | devfn);
     if ( ret )
@@ -660,7 +657,8 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
         if ( pdev->info.is_virtfn )
             pdev->info.is_extfn = pf_is_extfn;
     }
-    else if ( !pdev->vf_rlen[0] )
+
+    if ( !pdev->info.is_virtfn && !pdev->vf_rlen[0] )
     {
         unsigned int pos = pci_find_ext_capability(seg, bus, devfn,
                                                    PCI_EXT_CAP_ID_SRIOV);