[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: KVM: x86/irq: Conditionally register IRQ bypass consumer again
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2023-07-30 19:43:56
Message-ID: git-mailbomb-linux-master-5e1fe4a21c0c2a69419d97d62d3213e8f843920d () kernel ! org
[Download RAW message or body]
Commit: 5e1fe4a21c0c2a69419d97d62d3213e8f843920d
Parent: fd1815ea709e414f83a06e4cf13ade4a49dd0fda
Refname: refs/heads/master
Web: https://git.kernel.org/torvalds/c/5e1fe4a21c0c2a69419d97d62d3213e8f843920d
Author: Like Xu <likexu@tencent.com>
AuthorDate: Mon Jul 24 19:12:36 2023 +0800
Committer: Paolo Bonzini <pbonzini@redhat.com>
CommitDate: Sat Jul 29 11:05:26 2023 -0400
KVM: x86/irq: Conditionally register IRQ bypass consumer again
As was attempted commit 14717e203186 ("kvm: Conditionally register IRQ
bypass consumer"): "if we don't support a mechanism for bypassing IRQs,
don't register as a consumer. Initially this applied to AMD processors,
but when AVIC support was implemented for assigned devices,
kvm_arch_has_irq_bypass() was always returning true.
We can still skip registering the consumer where enable_apicv
or posted-interrupts capability is unsupported or globally disabled.
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@redhat.com>
Reported-by: Yong He <alexyonghe@tencent.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217379
Signed-off-by: Like Xu <likexu@tencent.com>
Message-Id: <20230724111236.76570-1-likexu@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.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 00b87fcf6da4a..43e0c51da65e9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -13189,7 +13189,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,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic