qemu-patch-raspberry4/include
Radim Krčmář fb506e701e intel_iommu: reject broken EIM
Cluster x2APIC cannot work without KVM's x2apic API when the maximal
APIC ID is greater than 8 and only KVM's LAPIC can support x2APIC, so we
forbid other APICs and also the old KVM case with less than 9, to
simplify the code.

There is no point in enabling EIM in forbidden APICs, so we keep it
enabled only for the KVM APIC;  unconditionally, because making the
option depend on KVM version would be a maintanance burden.

Old QEMUs would enable eim whenever intremap was on, which would trick
guests into thinking that they can enable cluster x2APIC even if any
interrupt destination would get clamped to 8 bits.
Depending on your configuration, QEMU could notice that the destination
LAPIC is not present and report it with a very non-obvious:

  KVM: injection failed, MSI lost (Operation not permitted)

Or the guest could say something about unexpected interrupts, because
clamping leads to aliasing so interrupts were being delivered to
incorrect VCPUs.

KVM_X2APIC_API is the feature that allows us to enable EIM for KVM.

QEMU 2.7 allowed EIM whenever interrupt remapping was enabled.  In order
to keep backward compatibility, we again allow guests to misbehave in
non-obvious ways, and make it the default for old machine types.

A user can enable the buggy mode it with "x-buggy-eim=on".

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2016-10-17 15:44:49 -02:00
..
block async: add aio_bh_schedule_oneshot 2016-10-07 13:34:07 +02:00
crypto crypto: use correct derived key size when timing pbkdf 2016-09-19 16:30:45 +01:00
disas disas: Fix ATTRIBUTE_UNUSED define clash with ALSA headers 2016-07-19 16:40:39 +01:00
exec RAMBlocks: Store page size 2016-10-13 17:23:53 +02:00
fpu fpu: add mechanism to check for invalid long double formats 2016-09-15 12:43:18 +01:00
hw intel_iommu: reject broken EIM 2016-10-17 15:44:49 -02:00
io Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration migrate: move max-bandwidth and downtime-limit to migrate_set_parameter 2016-10-13 17:23:53 +02:00
monitor monitor: fix crash when leaving qemu with spice audio 2016-08-08 14:16:11 +02:00
net Remove unused function declarations 2016-09-15 15:32:22 +03:00
qapi qapi: Support unregistering QMP commands 2016-09-19 17:32:21 +02:00
qemu -----BEGIN PGP SIGNATURE----- 2016-10-12 11:05:21 +01:00
qom trace: dynamically allocate trace_dstate in CPUState 2016-10-12 09:54:52 +02:00
standard-headers linux-headers: update 2016-09-05 15:15:16 +02:00
sysemu Revert "char: use a fixed idx for child muxed chr" 2016-10-13 13:56:31 +01:00
ui spice/gl: render DisplaySurface via opengl 2016-09-28 12:49:36 +02:00
elf.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
glib-compat.h glib-compat: add g_(s)list_free_full() 2016-09-08 17:57:32 +04:00
qemu-common.h Update ancient copyright string in -version output 2016-08-11 16:24:53 +01:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00
trace.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00