From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH 11/11] kvmtool: add command line parameter to instantiate a vGICv3 Date: Mon, 26 Jan 2015 11:30:49 +0000 Message-ID: <20150126113049.GF15598@arm.com> References: <1422030910-17881-1-git-send-email-andre.przywara@arm.com> <1422030910-17881-12-git-send-email-andre.przywara@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "penberg@kernel.org" , "kvm@vger.kernel.org" , "kvmarm@lists.cs.columbia.edu" , Marc Zyngier To: Andre Przywara Return-path: Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:42994 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753132AbbAZLbA (ORCPT ); Mon, 26 Jan 2015 06:31:00 -0500 Content-Disposition: inline In-Reply-To: <1422030910-17881-12-git-send-email-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jan 23, 2015 at 04:35:10PM +0000, Andre Przywara wrote: > Add the command line parameter "--gicv3" to request GICv3 emulation > in the kernel. Connect that to the already existing GICv3 code. > > Signed-off-by: Andre Przywara > --- > tools/kvm/arm/aarch64/arm-cpu.c | 5 ++++- > .../kvm/arm/aarch64/include/kvm/kvm-config-arch.h | 4 +++- > tools/kvm/arm/gic.c | 14 ++++++++++++++ > tools/kvm/arm/include/arm-common/kvm-config-arch.h | 1 + > tools/kvm/arm/kvm-cpu.c | 2 +- > tools/kvm/arm/kvm.c | 3 ++- > 6 files changed, 25 insertions(+), 4 deletions(-) > > diff --git a/tools/kvm/arm/aarch64/arm-cpu.c b/tools/kvm/arm/aarch64/arm-cpu.c > index a70d6bb..46d6d6a 100644 > --- a/tools/kvm/arm/aarch64/arm-cpu.c > +++ b/tools/kvm/arm/aarch64/arm-cpu.c > @@ -12,7 +12,10 @@ > static void generate_fdt_nodes(void *fdt, struct kvm *kvm, u32 gic_phandle) > { > int timer_interrupts[4] = {13, 14, 11, 10}; > - gic__generate_fdt_nodes(fdt, gic_phandle, KVM_DEV_TYPE_ARM_VGIC_V2); > + gic__generate_fdt_nodes(fdt, gic_phandle, > + kvm->cfg.arch.gicv3 ? > + KVM_DEV_TYPE_ARM_VGIC_V3 : > + KVM_DEV_TYPE_ARM_VGIC_V2); > timer__generate_fdt_nodes(fdt, kvm, timer_interrupts); > } > > diff --git a/tools/kvm/arm/aarch64/include/kvm/kvm-config-arch.h b/tools/kvm/arm/aarch64/include/kvm/kvm-config-arch.h > index 89860ae..106e52f 100644 > --- a/tools/kvm/arm/aarch64/include/kvm/kvm-config-arch.h > +++ b/tools/kvm/arm/aarch64/include/kvm/kvm-config-arch.h > @@ -3,7 +3,9 @@ > > #define ARM_OPT_ARCH_RUN(cfg) \ > OPT_BOOLEAN('\0', "aarch32", &(cfg)->aarch32_guest, \ > - "Run AArch32 guest"), > + "Run AArch32 guest"), \ > + OPT_BOOLEAN('\0', "gicv3", &(cfg)->gicv3, \ > + "Use a GICv3 interrupt controller in the guest"), On a GICv3-capable system, why would I *not* want to enable this option? In other words, could we make this the default behaviour on systems that support it, and if you need an override then it should be something like --force-gicv2. Or am I missing a key piece of the puzzle? Will