linux_dsm_epyc7002/arch
Paolo Bonzini 7e5f1cdbda 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>
2024-07-05 18:52:31 +02:00
..
alpha alpha: register early reserved memory in memblock 2024-07-05 18:03:15 +02:00
arc sched/core: Initialize the idle task with preemption disabled 2021-07-14 16:55:50 +02:00
arm ARM: omap2+: hwmod: fix potential NULL pointer access 2024-07-05 18:52:30 +02:00
arm64 arm64: stacktrace: avoid tracing arch_stack_walk() 2024-07-05 18:52:28 +02:00
c6x arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
csky csky: syscache: Fixup duplicate cache flush 2021-07-14 16:56:52 +02:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-17 11:02:28 +01:00
hexagon hexagon: use common DISCARDS macro 2021-07-20 16:05:53 +02:00
ia64 mm/page_alloc: fix memory map initialization for descending nodes 2021-07-25 14:36:18 +02:00
m68k m68k: atari: Fix ATARI_KBD_CORE kconfig unmet dependency warning 2021-07-14 16:56:05 +02:00
microblaze init: add dsm gpl source 2024-07-05 18:00:04 +02:00
mips MIPS: Malta: Do not byte-swap accesses to the CBUS UART 2024-07-05 18:52:29 +02:00
nds32 nds32: fix up stack guard gap 2021-07-28 14:35:46 +02:00
nios2 nios2: fixed broken sys_clone syscall 2021-03-04 11:38:16 +01:00
openrisc sched/core: Initialize the idle task with preemption disabled 2021-07-14 16:55:50 +02:00
parisc sched/core: Initialize the idle task with preemption disabled 2021-07-14 16:55:50 +02:00
powerpc powerpc/pseries: Fix regression while building external modules 2024-07-05 18:06:20 +02:00
riscv init: add dsm gpl source 2024-07-05 18:00:04 +02:00
s390 init: add dsm gpl source 2024-07-05 18:00:04 +02:00
sh sched/core: Initialize the idle task with preemption disabled 2021-07-14 16:55:50 +02:00
sparc init: add dsm gpl source 2024-07-05 18:00:04 +02:00
um um: fix error return code in winch_tramp() 2021-07-20 16:05:51 +02:00
x86 KVM: x86: accept userspace interrupt only if no event is injected 2024-07-05 18:52:31 +02:00
xtensa init: add dsm gpl source 2024-07-05 18:00:04 +02:00
.gitignore
Kconfig fanotify: Fix sys_fanotify_mark() on native x86-32 2021-01-17 14:16:59 +01:00