[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230724111236.76570-1-likexu@tencent.com>
Date: Mon, 24 Jul 2023 19:12:36 +0800
From: Like Xu <like.xu.linux@...il.com>
To: Alex Williamson <alex.williamson@...hat.com>,
Sean Christopherson <seanjc@...gle.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] KVM: x86/irq: Conditionally register IRQ bypass consumer again
From: Like Xu <likexu@...cent.com>
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.
Cc: Alex Williamson <alex.williamson@...hat.com>
Reported-by: Yong He <alexyonghe@...cent.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217379
Signed-off-by: Like Xu <likexu@...cent.com>
---
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a6b9bea62fb8..8b68a5cb3123 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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,
--
2.41.0
Powered by blists - more mailing lists