qemu-devel
[Top][All Lists]
Advanced

[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 :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]