kernel_optimize_test/arch
Paolo Bonzini 309a31127b KVM: x86: accept userspace interrupt only if no event is injected
commit fa7a549d321a4189677b0cea86e58d9db7977f7b upstream.

Once an exception has been injected, any side effects related to
the exception (such as setting CR2 or DR6) have been taked place.
Therefore, once KVM sets the VM-entry interruption information
field or the AMD EVENTINJ field, the next VM-entry must deliver that
exception.

Pending interrupts are processed after injected exceptions, so
in theory it would not be a problem to use KVM_INTERRUPT when
an injected exception is present.  However, DOSEMU is using
run->ready_for_interrupt_injection to detect interrupt windows
and then using KVM_SET_SREGS/KVM_SET_REGS to inject the
interrupt manually.  For this to work, the interrupt window
must be delayed after the completion of the previous event
injection.

Cc: stable@vger.kernel.org
Reported-by: Stas Sergeev <stsp2@yandex.ru>
Tested-by: Stas Sergeev <stsp2@yandex.ru>
Fixes: 71cc849b70 ("KVM: x86: Fix split-irqchip vs interrupt injection window request")
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-12 13:22:17 +02:00
..
alpha alpha: register early reserved memory in memblock 2021-08-04 12:46:40 +02:00
arc
arm ARM: omap2+: hwmod: fix potential NULL pointer access 2021-08-12 13:22:17 +02:00
arm64 arm64: stacktrace: avoid tracing arch_stack_walk() 2021-08-12 13:22:12 +02:00
c6x
csky
h8300
hexagon
ia64 mm/page_alloc: fix memory map initialization for descending nodes 2021-07-25 14:36:18 +02:00
m68k
microblaze
mips MIPS: Malta: Do not byte-swap accesses to the CBUS UART 2021-08-12 13:22:15 +02:00
nds32 nds32: fix up stack guard gap 2021-07-28 14:35:46 +02:00
nios2
openrisc
parisc
powerpc powerpc/pseries: Fix regression while building external modules 2021-08-04 12:46:45 +02:00
riscv bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-08-04 12:46:44 +02:00
s390 bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-08-04 12:46:44 +02:00
sh
sparc bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-08-04 12:46:44 +02:00
um
x86 KVM: x86: accept userspace interrupt only if no event is injected 2021-08-12 13:22:17 +02:00
xtensa
.gitignore
Kconfig