Skip to content

Commit baf68a0

Browse files
committed
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/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent b41f863 commit baf68a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/lapic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ bool __kvm_apic_update_irr(unsigned long *pir, void *regs, int *max_irr)
678678
if (!pir_vals[i])
679679
continue;
680680

681-
pir_vals[i] = xchg(&pir[i], 0);
681+
pir_vals[i] = arch_xchg(&pir[i], 0);
682682
}
683683

684684
for (i = vec = 0; i <= 7; i++, vec += 32) {

0 commit comments

Comments
 (0)