qemu-e2k/target
Peter Xu 558e8c6139 i386/kvm: ignore masked irqs when update msi routes
When we are with intel-iommu device and with IR on, KVM will register
an IEC notifier to detect interrupt updates from the guest and we'll
kick off kvm_update_msi_routes_all() when it happens to make sure
kernel IRQ cache is matching the latest.

Though, kvm_update_msi_routes_all() is buggy in that it ignored the
mask bit of either MSI/MSIX messages and it tries to translate the
message even if the corresponding message was already masked by the
guest driver (hence the MSI/MSIX message will be invalid).

Without this patch, we can receive an error message when we reboot a
guest with both an assigned vfio-pci device and intel-iommu enabled:

  qemu-system-x86_64: vtd_interrupt_remap_msi: MSI address low 32 bit invalid: 0x0

The error does not affect functionality of the guest since when we
failed to translate we'll just silently continue (which makes sense
since crashing the VM for this seems even worse), but still it's
better to fix it up.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20190116030815.27273-5-peterx@redhat.com>
[PMD: this patch was first (incorrectly) introduced as a56de056c9]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190212140621.17009-4-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
2019-02-21 12:28:41 -05:00
..
alpha avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
arm qapi: make query-cpu-definitions depend on specific targets 2019-02-18 14:44:05 +01:00
cris avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
hppa target/hppa: fix dcor instruction 2019-02-12 08:59:21 -08:00
i386 i386/kvm: ignore masked irqs when update msi routes 2019-02-21 12:28:41 -05:00
lm32 tcg-next queue 2018-06-04 11:28:31 +01:00
m68k target/m68k: Fix LGPL information in the file headers 2019-01-30 14:20:13 +01:00
microblaze target/microblaze: Add props enabling exceptions on failed bus accesses 2019-01-22 03:17:34 -08:00
mips target/mips: introduce MTTCG-enabled builds 2019-02-14 17:47:28 +01:00
moxie target/moxie: Fix LGPL information in the file headers 2019-02-06 15:46:11 +01:00
nios2 tcg-next queue 2018-06-04 11:28:31 +01:00
openrisc target/openrisc: Fix LGPL version number 2019-01-30 11:01:36 +01:00
ppc ppc patch queue 2019-02-19 2019-02-18 16:20:13 +00:00
riscv target/riscv: fix counter-enable checks in ctr() 2019-02-11 15:56:22 -08:00
s390x QAPI patches for 2019-02-18 2019-02-18 14:23:13 +00:00
sh4 sh4: fix use_icount with linux-user 2018-08-20 00:11:06 +02:00
sparc qdev-props: remove errp from GlobalProperty 2019-01-07 16:18:42 +04:00
tilegx avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
tricore target/tricore: Fix LGPL version number 2019-01-30 11:01:46 +01:00
unicore32 target/unicore32: remove tlb_flush from uc32_init_fn 2018-10-18 18:58:10 -07:00
xtensa target/xtensa: add test_mmuhifi_c3 core 2019-01-28 11:55:20 -08:00