diff options
author | 2025-04-01 09:34:46 -0700 | |
---|---|---|
committer | 2025-04-24 11:19:40 -0700 | |
commit | baf68a0e3bd624bc300381a757f660451483fb7f (patch) | |
tree | a7bb28b45913f24ba02aa0dfc73abc3dea7dc735 | |
parent | KVM: VMX: Isolate pure loads from atomic XCHG when processing PIR (diff) | |
download | linux-rng-baf68a0e3bd624bc300381a757f660451483fb7f.tar.xz linux-rng-baf68a0e3bd624bc300381a757f660451483fb7f.zip |
KVM: VMX: Use arch_xchg() when processing PIR to avoid instrumentation
Use arch_xchg() when moving IRQs from the PIR to the vIRR, purely to avoid
instrumentation so that KVM is compatible with the needs of posted MSI.
This will allow extracting the core PIR logic to common code and sharing
it between KVM and posted MSI handling.
Link: https://lore.kernel.org/r/20250401163447.846608-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
-rw-r--r-- | arch/x86/kvm/lapic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index bc56775426c9..70ad5f0942e2 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -678,7 +678,7 @@ bool __kvm_apic_update_irr(unsigned long *pir, void *regs, int *max_irr) if (!pir_vals[i]) continue; - pir_vals[i] = xchg(&pir[i], 0); + pir_vals[i] = arch_xchg(&pir[i], 0); } for (i = vec = 0; i <= 7; i++, vec += 32) { |