[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL v2 44/45] fix MSI injection on Xen
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PULL v2 44/45] fix MSI injection on Xen |
Date: |
Fri, 12 Feb 2016 21:55:11 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sat, Feb 06, 2016 at 09:15:13PM +0200, Michael S. Tsirkin wrote:
> From: Stefano Stabellini <address@hidden>
>
> On Xen MSIs can be remapped into pirqs, which are a type of event
> channels. It's mostly for the benefit of PCI passthrough devices, to
> avoid the overhead of interacting with the emulated lapic.
>
> However remapping interrupts and MSIs is also supported for emulated
> devices, such as the e1000 and virtio-net.
>
> When an interrupt or an MSI is remapped into a pirq, masking and
> unmasking is done by masking and unmasking the event channel. The
> masking bit on the PCI config space or MSI-X table should be ignored,
> but it isn't at the moment.
>
> As a consequence emulated devices which use MSI or MSI-X, such as
> virtio-net, don't work properly (the guest doesn't receive any
> notifications). The mechanism was working properly when xen_apic was
> introduced, but I haven't narrowed down which commit in particular is
> causing the regression.
>
> Fix the issue by ignoring the masking bit for MSI and MSI-X which have
> been remapped into pirqs.
>
> Signed-off-by: Stefano Stabellini <address@hidden>
> Reviewed-by: Michael S. Tsirkin <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
> include/hw/xen/xen.h | 1 +
> hw/pci/msi.c | 9 ++++++++-
> hw/pci/msix.c | 12 ++++++++++--
> hw/xen/xen_pt_msi.c | 4 +---
> xen-hvm-stub.c | 5 +++++
> xen-hvm.c | 9 +++++++++
> 6 files changed, 34 insertions(+), 6 deletions(-)
According to my git bisect, this change appears to have broken
the ivshmem test suite:
$ QTEST_QEMU_BINARY='x86_64-softmmu/qemu-system-x86_64' QTEST_QEMU_IMG=qemu-img
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k --verbose
-m slow tests/ivshmem-test
TEST: tests/ivshmem-test... (pid=17294)
/x86_64/ivshmem/single: OK
/x86_64/ivshmem/hotplug: OK
/x86_64/ivshmem/memdev: OK
/x86_64/ivshmem/pair: OK
/x86_64/ivshmem/server-msi: **
ERROR:tests/ivshmem-test.c:358:test_ivshmem_server: assertion failed (ret !=
0): (0 != 0)
FAIL
GTester: last random seed: R02S00888b8a4102476be4f9fec733a717ac
(pid=17328)
/x86_64/ivshmem/server-irq: OK
FAIL: tests/ivshmem-test
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
- [Qemu-devel] [PULL v2 35/45] pc: Move PcGuestInfo.fw_cfg to PCMachineState, (continued)
- [Qemu-devel] [PULL v2 35/45] pc: Move PcGuestInfo.fw_cfg to PCMachineState, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 36/45] pc: Move APIC and NUMA data from PcGuestInfo to PCMachineState, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 37/45] pc: Eliminate PcGuestInfo struct, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 38/45] acpi: take oem_id in build_header(), optionally, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 39/45] acpi: expose oem_id and oem_table_id in build_rsdt(), Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 40/45] acpi: add function to extract oem_id and oem_table_id from the user's SLIC, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 41/45] pc: set the OEM fields in the RSDT and the FADT from the SLIC, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 42/45] dimm: Correct type of MemoryHotplugState->base, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 43/45] intel_iommu: large page support, Michael S. Tsirkin, 2016/02/06
- [Qemu-devel] [PULL v2 44/45] fix MSI injection on Xen, Michael S. Tsirkin, 2016/02/06
- Re: [Qemu-devel] [PULL v2 44/45] fix MSI injection on Xen,
Daniel P. Berrange <=
- [Qemu-devel] [PULL v2 45/45] net: set endianness on all backend devices, Michael S. Tsirkin, 2016/02/06
- Re: [Qemu-devel] [PULL v2 00/45] pc and misc cleanups and fixes, virtio optimizations, Peter Maydell, 2016/02/08