diff options
| author | Sean Christopherson <[email protected]> | 2025-04-04 19:38:17 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2025-04-24 13:52:31 +0000 |
| commit | 9bcac97dc42d2f4da8229d18feb0fe2b1ce523a2 (patch) | |
| tree | 9daad67ecaeb1e2ca1a4d04083d24cbe4d2f03be /scripts/gcc-plugins/randomize_layout_plugin.c | |
| parent | KVM: SVM: Allocate IR data using atomic allocation (diff) | |
| download | kernel-9bcac97dc42d2f4da8229d18feb0fe2b1ce523a2.tar.gz kernel-9bcac97dc42d2f4da8229d18feb0fe2b1ce523a2.zip | |
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: efc644048ecd ("KVM: x86: Update IRTE for posted-interrupts")
Fixes: 411b44ba80ab ("svm: Implements update_pi_irte hook to setup posted interrupt")
Cc: [email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions
