linux/arch/x86/kvm/vmx
Sean Christopherson 9bcac97dc4 KVM: x86: Reset IRTE to host control if *new* route isn't postable
Restore an IRTE back to host control (remapped or posted MSI mode) if the
*new* GSI route prevents posting the IRQ directly to a vCPU, regardless of
the GSI routing type.  Updating the IRTE if and only if the new GSI is an
MSI results in KVM leaving an IRTE posting to a vCPU.

The dangling IRTE can result in interrupts being incorrectly delivered to
the guest, and in the worst case scenario can result in use-after-free,
e.g. if the VM is torn down, but the underlying host IRQ isn't freed.

Fixes: efc644048e ("KVM: x86: Update IRTE for posted-interrupts")
Fixes: 411b44ba80 ("svm: Implements update_pi_irte hook to setup posted interrupt")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250404193923.1413163-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-04-24 09:52:31 -04:00
..
capabilities.h KVM VMX: Move MSR_IA32_VMX_MISC bit defines to asm/vmx.h 2024-08-22 11:25:53 -07:00
hyperv.c KVM: x86: drop x86.h include from cpuid.h 2024-11-01 09:22:23 -07:00
hyperv.h KVM: x86: Replace (almost) all guest CPUID feature queries with cpu_caps 2024-12-18 14:20:15 -08:00
hyperv_evmcs.c KVM: VMX: Split off hyperv_evmcs.{ch} 2023-12-07 09:34:19 -08:00
hyperv_evmcs.h hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
main.c KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop 2025-02-12 08:59:38 -08:00
nested.c ARM: 2025-03-25 14:22:07 -07:00
nested.h KVM: nVMX: Allow the caller to provide instruction length on nested VM-Exit 2025-02-24 09:01:07 -08:00
pmu_intel.c KVM: x86: Replace (almost) all guest CPUID feature queries with cpu_caps 2024-12-18 14:20:15 -08:00
posted_intr.c KVM: x86: Reset IRTE to host control if *new* route isn't postable 2025-04-24 09:52:31 -04:00
posted_intr.h KVM: VMX: don't include '<linux/find.h>' directly 2024-12-22 12:04:57 -05:00
run_flags.h KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH 2024-02-19 16:31:54 -08:00
sgx.c KVM: x86: Replace (almost) all guest CPUID feature queries with cpu_caps 2024-12-18 14:20:15 -08:00
sgx.h
vmcs.h KVM: VMX: Introduce test mode related to EPT violation VE 2024-04-19 12:15:21 -04:00
vmcs12.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00
vmcs12.h KVM: nVMX: Update VMCS12_REVISION comment to state it should never change 2024-06-28 08:55:00 -07:00
vmcs_shadow_fields.h
vmenter.S x86/bhi: Mitigate KVM by default 2024-04-08 19:27:06 +02:00
vmx.c ARM: 2025-03-25 14:22:07 -07:00
vmx.h KVM: x86: Snapshot the host's DEBUGCTL in common x86 2025-02-28 09:17:45 -08:00
vmx_onhyperv.c KVM: VMX: Split off vmx_onhyperv.{ch} from hyperv.{ch} 2023-12-07 09:34:06 -08:00
vmx_onhyperv.h hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-01-10 00:54:21 +00:00
vmx_ops.h KVM: VMX: Use named operands in inline asm 2025-03-04 11:21:39 +01:00
x86_ops.h KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop 2025-02-12 08:59:38 -08:00