From: Steven Noonan <[email protected]> This function should only be used for the hardware domain, because it compares addresses against the host e820 map.
Signed-off-by: Steven Noonan <[email protected]> Signed-off-by: Ariadne Conill <[email protected]> --- xen/drivers/vpci/header.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c index 852dfd8ae3..1f930b2a1f 100644 --- a/xen/drivers/vpci/header.c +++ b/xen/drivers/vpci/header.c @@ -394,13 +394,15 @@ static int modify_bars(const struct pci_dev *pdev, uint16_t cmd, bool rom_only) } } - rc = pci_sanitize_bar_memory(bar->mem); - if ( rc ) - { - gprintk(XENLOG_WARNING, - "%pp: failed to sanitize BAR#%u memory: %d\n", - &pdev->sbdf, i, rc); - return rc; + if (is_hardware_domain(pdev->domain)) { + rc = pci_sanitize_bar_memory(mem); + if ( rc ) + { + gprintk(XENLOG_WARNING, + "%pp: failed to sanitize BAR#%u memory: %d\n", + &pdev->sbdf, i, rc); + return rc; + } } } -- 2.53.0
