[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 07/13] msix: fix msix_vector_masked
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PULL 07/13] msix: fix msix_vector_masked |
Date: |
Fri, 19 Feb 2016 12:18:59 +0000 |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Fri, 19 Feb 2016, Michael S. Tsirkin wrote:
> commit 428c3ece97179557f2753071fb0ca97a03437267 ("fix MSI injection on Xen")
> inadvertently enabled the xen-specific logic unconditionally.
> Limit it to only when xen is enabled.
> Additionally, msix data should be read with pci_get_log
> since the format is pci little-endian.
>
> Reported-by: "Daniel P. Berrange" <address@hidden>
> Cc: Stefano Stabellini <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
the follow up patch is missing from the pull request:
http://marc.info/?l=xen-devel&m=145553838801725&w=2
> hw/pci/msix.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pci/msix.c b/hw/pci/msix.c
> index eb4ef11..537fdba 100644
> --- a/hw/pci/msix.c
> +++ b/hw/pci/msix.c
> @@ -80,10 +80,10 @@ static void msix_clr_pending(PCIDevice *dev, int vector)
> static bool msix_vector_masked(PCIDevice *dev, unsigned int vector, bool
> fmask)
> {
> unsigned offset = vector * PCI_MSIX_ENTRY_SIZE;
> - uint32_t *data = (uint32_t *)&dev->msix_table[offset +
> PCI_MSIX_ENTRY_DATA];
> + 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_is_pirq_msi(*data)) {
> + if (xen_enabled() && xen_is_pirq_msi(pci_get_long(data))) {
> return false;
> }
> return fmask || dev->msix_table[offset + PCI_MSIX_ENTRY_VECTOR_CTRL] &
> --
> MST
>
- [Qemu-devel] [PULL 00/13] vhost, virtio, pci, pxe, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 01/13] virtio-net: use the backend cross-endian capabilities, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 02/13] vhost-net: revert support of cross-endian vnet headers, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 03/13] virtio: move cross-endian helper to vhost, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 05/13] vhost: simplify vhost_needs_vring_endian(), Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 04/13] vhost: move virtio 1.0 check to cross-endian helper, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 06/13] virtio: optimize virtio_access_is_big_endian() for little-endian targets, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 07/13] msix: fix msix_vector_masked, Michael S. Tsirkin, 2016/02/19
- Re: [Qemu-devel] [PULL 07/13] msix: fix msix_vector_masked,
Stefano Stabellini <=
- [Qemu-devel] [PULL 08/13] tests: add pxe e1000 and virtio-pci tests, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 09/13] dec: convert to realize(), Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 10/13] change type of pci_bridge_initfn() to void, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 11/13] rules: filter out irrelevant files, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 12/13] vhost-user interrupt management fixes, Michael S. Tsirkin, 2016/02/19
- [Qemu-devel] [PULL 13/13] tests/vhost-user-bridge: add scattering of incoming packets, Michael S. Tsirkin, 2016/02/19
- Re: [Qemu-devel] [PULL 00/13] vhost, virtio, pci, pxe, Peter Maydell, 2016/02/19