To be queued in vpci_vcpu. This will be required for SR-IOV support, which uses a single control register bit to toggle memory decoding for all the virtual functions.
No functional change expected. Signed-off-by: Roger Pau Monné <[email protected]> Reviewed-by: Wei Liu <[email protected]> --- Cc: Andrew Cooper <[email protected]> Cc: George Dunlap <[email protected]> Cc: Ian Jackson <[email protected]> Cc: Jan Beulich <[email protected]> Cc: Julien Grall <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: Tim Deegan <[email protected]> Cc: Wei Liu <[email protected]> --- xen/drivers/vpci/header.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c index 17a9dbb0bf..2e78f8d4a6 100644 --- a/xen/drivers/vpci/header.c +++ b/xen/drivers/vpci/header.c @@ -184,7 +184,19 @@ static void defer_map(struct domain *d, struct pci_dev *pdev, * started for the same device if the domain is not well-behaved. */ curr->vpci.pdev = pdev; - curr->vpci.mem = mem; + if ( !curr->vpci.mem ) + curr->vpci.mem = mem; + else + { + int rc = rangeset_merge(curr->vpci.mem, mem); + + if ( rc ) + gprintk(XENLOG_WARNING, + "%04x:%02x:%02x.%u: unable to %smap memory region: %d\n", + pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), + PCI_FUNC(pdev->devfn), map ? "" : "un", rc); + rangeset_destroy(mem); + } curr->vpci.map = map; curr->vpci.rom_only = rom_only; } -- 2.17.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
