* [Qemu-devel] [PATCH] xen: xen_is_pirq_msi only when xen_enabled()
@ 2016-02-15 12:11 Stefano Stabellini
2016-02-15 14:15 ` Markus Armbruster
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Stabellini @ 2016-02-15 12:11 UTC (permalink / raw)
To: qemu-devel; +Cc: xen-devel, mst, stefano.stabellini
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.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: mst@redhat.com
CC: berrange@redhat.com
CC: xen-devel@lists.xen.org
---
hw/pci/msix.c | 2 +-
xen-hvm.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 537fdba..fc03b35 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -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] &
diff --git a/xen-hvm.c b/xen-hvm.c
index 039680a..991f6b7 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -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)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] xen: xen_is_pirq_msi only when xen_enabled()
2016-02-15 12:11 [Qemu-devel] [PATCH] xen: xen_is_pirq_msi only when xen_enabled() Stefano Stabellini
@ 2016-02-15 14:15 ` Markus Armbruster
2016-02-15 16:32 ` Stefano Stabellini
0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2016-02-15 14:15 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: mst, qemu-devel, xen-devel
Stefano Stabellini <stefano.stabellini@eu.citrix.com> writes:
> 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.
Is this supposed to fix ivshmem-test with SPEED=slow?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] xen: xen_is_pirq_msi only when xen_enabled()
2016-02-15 14:15 ` Markus Armbruster
@ 2016-02-15 16:32 ` Stefano Stabellini
0 siblings, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2016-02-15 16:32 UTC (permalink / raw)
To: Markus Armbruster; +Cc: xen-devel, mst, qemu-devel, Stefano Stabellini
On Mon, 15 Feb 2016, Markus Armbruster wrote:
> Stefano Stabellini <stefano.stabellini@eu.citrix.com> writes:
>
> > 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.
>
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-15 16:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 12:11 [Qemu-devel] [PATCH] xen: xen_is_pirq_msi only when xen_enabled() Stefano Stabellini
2016-02-15 14:15 ` Markus Armbruster
2016-02-15 16:32 ` Stefano Stabellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).