mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen/vpci: fix backport of 53859596c0
Commit53859596c0depends on the behavioral change introduced inee2eb6849dthat inverted the initialization of the MSI-X and header vPCI handlers.53859596c0requires the header to be initialized before MSI-X. Change the order of initialization and adjust init_msix() to carve holes for the MSI-X tables if necessary, since it will now run after the BARs have been possibly mapped into the domain p2m. Fixes:50b649c742("vpci/msix: improve handling of bogus MSI-X capabilities") Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
5177ae0672
commit
8a62bb04e2
2 files changed
+8
-3
No files matched your search
@@ -1016,7 +1016,7 @@ static int cf_check init_header(struct pci_dev *pdev)
|
||||
pci_conf_write16(pdev->sbdf, PCI_COMMAND, cmd);
|
||||
return rc;
|
||||
}
|
||||
REGISTER_VPCI_INIT(init_header, VPCI_PRIORITY_MIDDLE);
|
||||
REGISTER_VPCI_INIT(init_header, VPCI_PRIORITY_HIGH);
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||
@@ -790,9 +790,14 @@ static int cf_check init_msix(struct pci_dev *pdev)
|
||||
pdev->vpci->msix = msix;
|
||||
list_add(&msix->next, &d->arch.hvm.msix_tables);
|
||||
|
||||
return 0;
|
||||
/*
|
||||
* vPCI header initialization will have mapped the whole BAR into the
|
||||
* p2m, as MSI-X capability was not yet initialized. Crave a hole for
|
||||
* the MSI-X table here, so that Xen can trap accesses.
|
||||
*/
|
||||
return vpci_make_msix_hole(pdev);
|
||||
}
|
||||
REGISTER_VPCI_INIT(init_msix, VPCI_PRIORITY_HIGH);
|
||||
REGISTER_VPCI_INIT(init_msix, VPCI_PRIORITY_MIDDLE);
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
||||