Skip to contentSkip to conversation

KVM: x86/irq: Conditionally register IRQ bypass consumer again

PATCH Applied Like Xu 2 participants 2 messages Jul 24, 2023 – Jul 29, 2023

Subsystems (3)
lore
Share & tools
lore

Like Xu

author
#0 lore raw

PATCH 1/1 KVM: x86/irq: Conditionally register IRQ bypass consumer again

From: Like Xu <[email protected]>

As commit 14717e203186 ("kvm: Conditionally register IRQ bypass consumer"):
"if we don't support a mechanism for bypassing IRQs, don't register as a consumer. This eliminates meaningless dev_info()s when the connect fails between producer and consumer", such as on Linux hosts where enable_apicv or posted-interrupts capability is unsupported or globally disabled.

---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/x86.c +1 -1
index a6b9bea62fb8..8b68a5cb3123 100644
@@ -13185,7 +13185,7 @@ EXPORT_SYMBOL_GPL(kvm_arch_has_noncoherent_dma);
 
 bool kvm_arch_has_irq_bypass(void)
 {
-	return true;
+	return enable_apicv && irq_remapping_cap(IRQ_POSTING_CAP);
 }
 
 int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *cons,
Signature · 1 line
2.41.0
maintainer Applied
#1 lore raw

Queued, thanks. I tweaked the commit message to explain that originally commit 14717e203186 disabled registration of the consumer on AMD machines.

Paolo