xen: xen_is_pirq_msi only when xen_enabled()
PATCH 1/1 xen: xen_is_pirq_msi only when xen_enabled()
Only return true from xen_is_pirq_msi when Xen is enabled: the function should never identify an MSI as Xen pirq when not running on Xen.
--- hw/pci/msix.c | 2 +- xen-hvm.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
hw/pci/msix.c +1 -1
@@ -83,7 +83,7 @@ static bool msix_vector_masked(PCIDevice *dev, unsigned int vector, bool fmask)uint8_t *data = &dev->msix_table[offset +PCI_MSIX_ENTRY_DATA ];/* MSIs on Xen can be remapped into pirqs. In those cases, masking * and unmasking go through the PV evtchn path. */ -if (xen_enabled () &&xen_is_pirq_msi (pci_get_long (data))) { +if (xen_is_pirq_msi (pci_get_long (data))) {return false; } return fmask || dev->msix_table[offset + PCI_MSIX_ENTRY_VECTOR_CTRL] &
xen-hvm.c +2 -1
@@ -151,7 +151,8 @@ int xen_is_pirq_msi(uint32_t msi_data)/* If vector is 0, the msi is remapped into a pirq, passed as * dest_id. */ -return ((msi_data &MSI_DATA_VECTOR_MASK ) >>MSI_DATA_VECTOR_SHIFT ) ==0 ; +return xen_enabled () && + ((msi_data &MSI_DATA_VECTOR_MASK ) >>MSI_DATA_VECTOR_SHIFT ) ==0 ; }void xen_hvm_inject_msi (uint64_t addr,uint32_t data)
Signature · 1 line
1.7.10.4
Quoted 2 lines · Stefano Stabellini
Only return true from
xen_is_pirq_msiwhen Xen is enabled: the function should never identify an MSI as Xen pirq when not running on Xen.
Is this supposed to fix ivshmem-test with SPEED=slow?
Quoted 2 lines · Stefano Stabellini
Only return true from
xen_is_pirq_msiwhen Xen is enabled: the function should never identify an MSI as Xen pirq when not running on Xen.
Is this supposed to fix ivshmem-test with SPEED=slow?
Quoted 8 lines · Markus Armbruster
Quoted 2 lines · Stefano Stabellini
Only return true from
xen_is_pirq_msiwhen Xen is enabled: the function should never identify an MSI as Xen pirq when not running on Xen.Is this supposed to fix ivshmem-test with SPEED=slow?
From the thread I think that the following
http://marc.info/?l=qemu-devel&m=145538967606777
should be the fix.
Quoted 8 lines · Markus Armbruster
Quoted 2 lines · Stefano Stabellini
Only return true from
xen_is_pirq_msiwhen Xen is enabled: the function should never identify an MSI as Xen pirq when not running on Xen.Is this supposed to fix ivshmem-test with SPEED=slow?
From the thread I think that the following
http://marc.info/?l=qemu-devel&m=145538967606777
should be the fix.