linux/arch/x86/kvm
Sean Christopherson 83c98007d9 KVM: nVMX: Ensure vCPU honors event request if posting nested IRQ fails
Add a memory barrier between writing vcpu->requests and reading
vcpu->guest_mode to ensure the read is ordered after the write when
(potentially) delivering an IRQ to L2 via nested posted interrupt.  If
the request were to be completed after reading vcpu->mode, it would be
possible for the target vCPU to enter the guest without posting the
interrupt and without handling the event request.

Note, the barrier is only for documentation since atomic operations are
serializing on x86.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: 6b6977117f ("KVM: nVMX: Fix races when sending nested PI while dest enters/leaves L2")
Fixes: 705699a139 ("KVM: nVMX: Enable nested posted interrupt processing")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20211208015236.1616697-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-09 09:30:46 -05:00
..
mmu KVM: X86: Rename gpte_is_8_bytes to has_4_byte_gpte and invert the direction 2021-12-08 04:25:13 -05:00
svm KVM: X86: Remove mmu parameter from load_pdptrs() 2021-12-08 04:25:14 -05:00
vmx KVM: nVMX: Ensure vCPU honors event request if posting nested IRQ fails 2021-12-09 09:30:46 -05:00
cpuid.c KVM: x86/svm: Add module param to control PMU virtualization 2021-12-08 04:24:58 -05:00
cpuid.h KVM: x86: Move reverse CPUID helpers to separate header file 2021-04-26 05:27:13 -04:00
debugfs.c KVM: Keep memslots in tree-based structures instead of array-based ones 2021-12-08 04:24:34 -05:00
emulate.c KVM/arm64 updates for Linux 5.16 2021-10-31 02:28:48 -04:00
fpu.h KVM: x86: Move FPU register accessors into fpu.h 2021-06-17 13:09:24 -04:00
hyperv.c KVM: nVMX: Implement Enlightened MSR Bitmap feature 2021-12-08 09:06:05 -05:00
hyperv.h KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor 2021-09-22 10:33:11 -04:00
i8254.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
i8254.h
i8259.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
ioapic.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
ioapic.h x86/kvm: remove unused ack_notifier callbacks 2021-11-18 07:05:57 -05:00
irq_comm.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
irq.c KVM: x86/xen: Add event channel interrupt vector upcall 2021-02-04 14:19:39 +00:00
irq.h x86/kvm: remove unused ack_notifier callbacks 2021-11-18 07:05:57 -05:00
Kconfig KVM: Use interval tree to do fast hva lookup in memslots 2021-12-08 04:24:32 -05:00
kvm_cache_regs.h KVM: X86: Remove kvm_register_clear_available() 2021-12-08 04:25:03 -05:00
kvm_emulate.h KVM: x86: Drop "pre_" from enter/leave_smm() helpers 2021-06-17 13:09:35 -04:00
kvm_onhyperv.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00
kvm_onhyperv.h KVM: x86: hyper-v: Move the remote TLB flush logic out of vmx 2021-06-17 13:09:36 -04:00
lapic.c KVM: x86: add a tracepoint for APICv/AVIC interrupt delivery 2021-12-09 09:07:39 -05:00
lapic.h KVM: x86: Rename kvm_lapic_enable_pv_eoi() 2021-11-11 10:56:22 -05:00
Makefile KVM: stats: Add fd-based API to read binary stats data 2021-06-24 11:47:57 -04:00
mmu.h KVM: X86: Add parameter huge_page_level to kvm_init_shadow_ept_mmu() 2021-12-08 04:25:12 -05:00
mtrr.c KVM: x86: Add helper to consolidate "raw" reserved GPA mask calculations 2021-02-04 09:27:30 -05:00
pmu.c kvm: x86: Convert return type of *is_valid_rdpmc_ecx() to bool 2021-11-11 10:56:19 -05:00
pmu.h kvm: x86: Convert return type of *is_valid_rdpmc_ecx() to bool 2021-11-11 10:56:19 -05:00
reverse_cpuid.h KVM: SEV: Mask CPUID[0x8000001F].eax according to supported features 2021-04-26 05:27:15 -04:00
trace.h KVM: x86: add a tracepoint for APICv/AVIC interrupt delivery 2021-12-09 09:07:39 -05:00
tss.h
x86.c KVM: x86: add a tracepoint for APICv/AVIC interrupt delivery 2021-12-09 09:07:39 -05:00
x86.h KVM: nVMX: Abide to KVM_REQ_TLB_FLUSH_GUEST request on nested vmentry/vmexit 2021-11-26 07:07:49 -05:00
xen.c KVM: x86: Assume a 64-bit hypercall for guests with protected state 2021-11-18 02:12:13 -05:00
xen.h KVM: xen: do not use struct gfn_to_hva_cache 2021-08-05 03:31:40 -04:00