All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Fedin <p.fedin@samsung.com>
To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Cc: Marc Zyngier <marc.zyngier@arm.com>
Subject: [PATCH v4 3/3] Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP
Date: Mon, 17 Aug 2015 12:43:40 +0300	[thread overview]
Message-ID: <cb1a3f2cce3fc7a1240281822cef9e5ff87f2e2c.1439804074.git.p.fedin@samsung.com> (raw)
In-Reply-To: <cover.1439804074.git.p.fedin@samsung.com>
In-Reply-To: <cover.1439804074.git.p.fedin@samsung.com>

Now at least ARM is able to determine whether the machine has
virtualization support for irqchip or not at runtime. Obviously,
irqfd requires irqchip.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
---
 virt/kvm/kvm_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 9097741..7b49618 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2478,12 +2478,13 @@ static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg)
 #ifdef CONFIG_HAVE_KVM_MSI
 	case KVM_CAP_SIGNAL_MSI:
 #endif
+	case KVM_CAP_CHECK_EXTENSION_VM:
+		return 1;
 #ifdef CONFIG_HAVE_KVM_IRQFD
 	case KVM_CAP_IRQFD:
 	case KVM_CAP_IRQFD_RESAMPLE:
+		return kvm_vm_ioctl_check_extension(kvm, KVM_CAP_IRQCHIP);
 #endif
-	case KVM_CAP_CHECK_EXTENSION_VM:
-		return 1;
 #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING
 	case KVM_CAP_IRQ_ROUTING:
 		return KVM_MAX_IRQ_ROUTES;
-- 
2.4.4

  parent reply	other threads:[~2015-08-17  9:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  9:43 [PATCH v4 0/3] KVM: arm/arm64: Allow to use KVM without in-kernel irqchip Pavel Fedin
2015-08-17  9:43 ` [PATCH v4 1/3] Fix NULL pointer dereference if KVM is used " Pavel Fedin
2015-08-17  9:43 ` [PATCH v4 2/3] Detect vGIC presence at runtime Pavel Fedin
2015-08-17  9:43 ` Pavel Fedin [this message]
2015-08-31 11:24 ` [PATCH v4 0/3] KVM: arm/arm64: Allow to use KVM without in-kernel irqchip Pavel Fedin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb1a3f2cce3fc7a1240281822cef9e5ff87f2e2c.1439804074.git.p.fedin@samsung.com \
    --to=p.fedin@samsung.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=marc.zyngier@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.