Skip to content

Commit aeeb4c7

Browse files
committed
KVM: x86: Drop semi-arbitrary restrictions on IPI type in fastpath
Drop the restrictions on fastpath IPIs only working for fixed IRQs with a physical destination now that the fastpath is explicitly limited to "fast" delivery. Limiting delivery to a single physical APIC ID guarantees only one vCPU will receive the event, but that isn't necessary "fast", e.g. if the targeted vCPU is the last of 4096 vCPUs. And logical destination mode or shorthand (to self) can also be fast, e.g. if only a few vCPUs are being targeted. Lastly, there's nothing inherently slow about delivering an NMI, INIT, SIPI, SMI, etc., i.e. there's no reason to artificially limit fastpath delivery to fixed vector IRQs. Link: https://lore.kernel.org/r/20250805190526.1453366-5-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 7774143 commit aeeb4c7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,13 +2146,7 @@ static int handle_fastpath_set_x2apic_icr_irqoff(struct kvm_vcpu *vcpu, u64 data
21462146
if (!lapic_in_kernel(vcpu) || !apic_x2apic_mode(vcpu->arch.apic))
21472147
return 1;
21482148

2149-
if (((data & APIC_SHORT_MASK) == APIC_DEST_NOSHORT) &&
2150-
((data & APIC_DEST_MASK) == APIC_DEST_PHYSICAL) &&
2151-
((data & APIC_MODE_MASK) == APIC_DM_FIXED) &&
2152-
((u32)(data >> 32) != X2APIC_BROADCAST))
2153-
return kvm_x2apic_icr_write_fast(vcpu->arch.apic, data);
2154-
2155-
return 1;
2149+
return kvm_x2apic_icr_write_fast(vcpu->arch.apic, data);
21562150
}
21572151

21582152
static int handle_fastpath_set_tscdeadline(struct kvm_vcpu *vcpu, u64 data)

0 commit comments

Comments
 (0)