OpenCloudOS-Kernel/arch
Sean Christopherson 43e73206cf KVM: nVMX: Check for pending posted interrupts when looking for nested events
[ Upstream commit 27c4fa42b11af780d49ce704f7fa67b3c2544df4 ]

Check for pending (and notified!) posted interrupts when checking if L2
has a pending wake event, as fully posted/notified virtual interrupt is a
valid wake event for HLT.

Note that KVM must check vmx->nested.pi_pending to avoid prematurely
waking L2, e.g. even if KVM sees a non-zero PID.PIR and PID.0N=1, the
virtual interrupt won't actually be recognized until a notification IRQ is
received by the vCPU or the vCPU does (nested) VM-Enter.

Fixes: 26844fee6a ("KVM: x86: never write to memory from kvm_vcpu_check_block()")
Cc: stable@vger.kernel.org
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Reported-by: Jim Mattson <jmattson@google.com>
Closes: https://lore.kernel.org/all/20231207010302.2240506-1-jmattson@google.com
Link: https://lore.kernel.org/r/20240607172609.3205077-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-11 12:47:15 +02:00
..
alpha vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:32:33 +02:00
arm ARM: spitz: fix GPIO assignment for backlight 2024-08-03 08:53:34 +02:00
arm64 arm64: dts: qcom: sdm845: Disable SS instance in Parkmode for USB 2024-08-11 12:47:12 +02:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:34:02 +02:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:34:02 +02:00
ia64 vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
loongarch LoongArch: Check TIF_LOAD_WATCH to enable user space watchpoint 2024-08-03 08:54:11 +02:00
m68k m68k: amiga: Turn off Warp1260 interrupts during boot 2024-08-03 08:54:17 +02:00
microblaze microblaze: Remove early printk call from cpuinfo-static.c 2024-06-12 11:12:23 +02:00
mips MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later 2024-08-03 08:54:37 +02:00
nios2 mm: Introduce flush_cache_vmap_early() 2024-02-16 19:10:52 +01:00
openrisc openrisc: traps: Don't send signals to kernel mode threads 2024-06-12 11:11:42 +02:00
parisc parisc: Fix warning at drivers/pci/msi/msi.h:121 2024-08-03 08:54:21 +02:00
powerpc powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap() 2024-08-03 08:54:38 +02:00
riscv riscv: stacktrace: fix usage of ftrace_graph_ret_addr() 2024-07-25 09:50:55 +02:00
s390 s390/cpum_cf: Fix endless loop in CF_DIAG event stop 2024-08-03 08:54:41 +02:00
sh sh: rework sync_file_range ABI 2024-07-05 09:34:02 +02:00
sparc sparc64: Fix incorrect function signature and add prototype for prom_cif_init 2024-08-03 08:53:55 +02:00
um um: time-travel: fix signal blocking race/hang 2024-08-03 08:54:35 +02:00
x86 KVM: nVMX: Check for pending posted interrupts when looking for nested events 2024-08-11 12:47:15 +02:00
xtensa xtensa: fix MAKE_PC_FROM_RA second argument 2024-05-17 12:02:32 +02:00
.gitignore
Kconfig Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default" 2024-06-27 13:49:15 +02:00