mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
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>
This commit is contained in:
parent
7774143400
commit
aeeb4c7fff
|
|
@ -2146,13 +2146,7 @@ static int handle_fastpath_set_x2apic_icr_irqoff(struct kvm_vcpu *vcpu, u64 data
|
|||
if (!lapic_in_kernel(vcpu) || !apic_x2apic_mode(vcpu->arch.apic))
|
||||
return 1;
|
||||
|
||||
if (((data & APIC_SHORT_MASK) == APIC_DEST_NOSHORT) &&
|
||||
((data & APIC_DEST_MASK) == APIC_DEST_PHYSICAL) &&
|
||||
((data & APIC_MODE_MASK) == APIC_DM_FIXED) &&
|
||||
((u32)(data >> 32) != X2APIC_BROADCAST))
|
||||
return kvm_x2apic_icr_write_fast(vcpu->arch.apic, data);
|
||||
|
||||
return 1;
|
||||
return kvm_x2apic_icr_write_fast(vcpu->arch.apic, data);
|
||||
}
|
||||
|
||||
static int handle_fastpath_set_tscdeadline(struct kvm_vcpu *vcpu, u64 data)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user