Skip to content

Commit ce9d54f

Browse files
committed
KVM: VMX: WARN if VT-d Posted IRQs aren't possible when starting IRQ bypass
WARN if KVM attempts to "start" IRQ bypass when VT-d Posted IRQs are disabled, to make it obvious that the logic is a sanity check, and so that a bug related to nr_possible_bypass_irqs is more like to cause noisy failures, e.g. so that KVM doesn't silently fail to wake blocking vCPUs. Link: https://lore.kernel.org/r/20250611224604.313496-56-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 77e1b83 commit ce9d54f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/vmx/posted_intr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ bool pi_has_pending_interrupt(struct kvm_vcpu *vcpu)
296296
*/
297297
void vmx_pi_start_bypass(struct kvm *kvm)
298298
{
299-
if (!kvm_arch_has_irq_bypass())
299+
if (WARN_ON_ONCE(!vmx_can_use_vtd_pi(kvm)))
300300
return;
301301

302302
kvm_make_all_cpus_request(kvm, KVM_REQ_UNBLOCK);

0 commit comments

Comments
 (0)