qemu/target/i386
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
..
hvf i386: hvf: Fix smp boot hangs 2019-02-05 16:50:21 +01:00
arch_dump.c dump: add kernel_gs_base to QEMU CPU state 2018-07-16 16:13:34 +02:00
arch_memory_mapping.c
bpt_helper.c
cc_helper_template.h
cc_helper.c
cpu-qom.h
cpu.c qapi: make query-cpu-definitions depend on specific targets 2019-02-18 14:44:05 +01:00
cpu.h Revert "i386: Add CPUID bit for PCONFIG" 2019-02-05 16:50:17 +01:00
excp_helper.c target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK 2018-10-02 19:09:12 +02:00
fpu_helper.c
gdbstub.c gdbstub: Fix i386/x86_64 machine description and add control registers 2019-02-05 16:50:18 +01:00
hax-all.c target: hax: fix errors in comment 2018-12-11 18:28:47 +01:00
hax-i386.h hax: Support for Linux hosts 2019-01-11 13:57:24 +01:00
hax-interface.h
hax-mem.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
hax-posix.c hax: Support for Linux hosts 2019-01-11 13:57:24 +01:00
hax-posix.h hax: Support for Linux hosts 2019-01-11 13:57:24 +01:00
hax-windows.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
hax-windows.h
helper.c icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 09:05:22 +10:00
helper.h
hyperv-proto.h x86: hv_evmcs CPU flag support 2018-11-06 21:35:04 +01:00
hyperv-stub.c hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
hyperv.c hyperv: process POST_MESSAGE hypercall 2018-10-19 13:44:14 +02:00
hyperv.h hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
int_helper.c
kvm_i386.h hyperv: ensure VP index equal to QEMU cpu_index 2018-07-16 16:58:16 +02:00
kvm-stub.c hyperv: ensure VP index equal to QEMU cpu_index 2018-07-16 16:58:16 +02:00
kvm.c i386/kvm: ignore masked irqs when update msi routes 2019-02-21 12:28:41 -05:00
machine.c hyperv: qom-ify SynIC 2018-10-19 13:44:14 +02:00
Makefile.objs hax: Support for Linux hosts 2019-01-11 13:57:24 +01:00
mem_helper.c target/i386: Convert to HAVE_CMPXCHG128 2018-10-18 19:46:53 -07:00
misc_helper.c i386: implement MSR_SMI_COUNT for TCG 2018-07-30 14:00:11 +02:00
monitor.c i386/monitor.c: make addresses canonical for "info mem" and "info tlb" 2018-07-02 15:41:18 +02:00
mpx_helper.c
ops_sse_header.h
ops_sse.h
seg_helper.c target/i386: Clear RF on SYSCALL instruction 2018-11-06 21:35:05 +01:00
sev_i386.h qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386 2019-02-18 14:44:04 +01:00
sev-stub.c sev/i386: add sev_get_capabilities() 2018-03-13 17:36:06 +01:00
sev.c Clean up includes 2018-12-20 10:29:08 +01:00
shift_helper_template.h
smm_helper.c i386: implement MSR_SMI_COUNT for TCG 2018-07-30 14:00:11 +02:00
svm_helper.c target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK 2018-10-02 19:09:12 +02:00
svm.h target-i386: Add NPT support 2018-07-02 15:41:18 +02:00
TODO
trace-events sev/i386: finalize the SEV guest launch flow 2018-03-13 17:36:05 +01:00
translate.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
whp-dispatch.h Clean up includes 2018-12-20 10:29:08 +01:00
whpx-all.c WHPX: register for unrecognized MSR exits 2018-06-28 19:05:36 +02:00
xsave_helper.c