All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Fedin <p.fedin@samsung.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Shlomo Pongratz <shlomopongratz@gmail.com>,
	Shlomo Pongratz <shlomo.pongratz@huawei.com>,
	Eric Auger <eric.auger@linaro.org>
Subject: [Qemu-devel] [PATCH v12 3/5] arm_kvm: Do not assume particular GIC type in kvm_arch_irqchip_create()
Date: Wed, 26 Aug 2015 13:28:15 +0300	[thread overview]
Message-ID: <081cbf8aed49fa483439bfd629f7c26fe62973bf.1440584396.git.p.fedin@samsung.com> (raw)
In-Reply-To: <cover.1440584396.git.p.fedin@samsung.com>
In-Reply-To: <cover.1440584396.git.p.fedin@samsung.com>

This allows to use different GIC types from v2. There are no kernels which
could advertise KVM_CAP_DEVICE_CTRL without the actual ability to create
GIC with it.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Eric Auger <eric.auger@linaro.org>
Tested-by: Ashok kumar <ashoks@broadcom.com>
---
 target-arm/kvm.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/target-arm/kvm.c b/target-arm/kvm.c
index b278542..22383c5 100644
--- a/target-arm/kvm.c
+++ b/target-arm/kvm.c
@@ -585,18 +585,10 @@ void kvm_arch_init_irq_routing(KVMState *s)
 
 int kvm_arch_irqchip_create(KVMState *s)
 {
-    int ret;
-
     /* If we can create the VGIC using the newer device control API, we
      * let the device do this when it initializes itself, otherwise we
      * fall back to the old API */
-
-    ret = kvm_create_device(s, KVM_DEV_TYPE_ARM_VGIC_V2, true);
-    if (ret == 0) {
-        return 1;
-    }
-
-    return 0;
+    return kvm_check_extension(s, KVM_CAP_DEVICE_CTRL);
 }
 
 int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
-- 
1.9.5.msysgit.0

  parent reply	other threads:[~2015-08-26 10:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 10:28 [Qemu-devel] [PATCH v12 0/5] vGICv3 support Pavel Fedin
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 1/5] hw/intc: Implement GIC-500 base class Pavel Fedin
2015-09-03 14:22   ` Peter Maydell
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 2/5] intc/gic: Extract some reusable vGIC code Pavel Fedin
2015-09-03 14:59   ` Peter Maydell
2015-09-04  6:54     ` Pavel Fedin
2015-09-04  8:47       ` Peter Maydell
2015-08-26 10:28 ` Pavel Fedin [this message]
2015-09-03 15:10   ` [Qemu-devel] [PATCH v12 3/5] arm_kvm: Do not assume particular GIC type in kvm_arch_irqchip_create() Peter Maydell
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 4/5] hw/intc: Initial implementation of vGICv3 Pavel Fedin
2015-08-26 10:28 ` [Qemu-devel] [PATCH v12 5/5] hw/arm/virt: Add gic-version option to virt machine Pavel Fedin
2015-09-03 17:08   ` Peter Maydell
2015-09-04  7:26     ` Pavel Fedin
2015-09-04  8:52       ` Peter Maydell
2015-09-04 15:06       ` Diana Craciun
2015-09-04 15:53         ` Pavel Fedin
2015-09-04 14:18     ` Pavel Fedin
2015-09-04 14:25       ` Peter Maydell
2015-09-04 14:53         ` Pavel Fedin
2015-09-08  8:18     ` 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=081cbf8aed49fa483439bfd629f7c26fe62973bf.1440584396.git.p.fedin@samsung.com \
    --to=p.fedin@samsung.com \
    --cc=eric.auger@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shlomo.pongratz@huawei.com \
    --cc=shlomopongratz@gmail.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.