mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
vpci/header: cope with devices not having vpci allocated
When traversing the list of pci devices assigned to a domain cope with
some of them not having the vpci struct allocated. It should be
possible for the hardware domain to have read-only devices assigned
that are not handled by vPCI, such support will be added by further
patches.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: ee045f3a4a
master date: 2023-05-26 09:18:37 +0200
This commit is contained in:
1 parent
c9c8b20ebc
commit
c15221e45c
1 file changed
+8
@@ -269,6 +269,14 @@ static int modify_bars(const struct pci_dev *pdev, uint16_t cmd, bool rom_only)
|
||||
*/
|
||||
for_each_pdev ( pdev->domain, tmp )
|
||||
{
|
||||
if ( !tmp->vpci )
|
||||
/*
|
||||
* For the hardware domain it's possible to have devices assigned
|
||||
* to it that are not handled by vPCI, either because those are
|
||||
* read-only devices, or because vPCI setup has failed.
|
||||
*/
|
||||
continue;
|
||||
|
||||
if ( tmp == pdev )
|
||||
{
|
||||
/*
|
||||
|
||||