All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Will Deacon <will.deacon@arm.com>,
	Andre Przywara <andre.przywara@arm.com>
Cc: "penberg@kernel.org" <penberg@kernel.org>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 11/11] kvmtool: add command line parameter to instantiate a vGICv3
Date: Mon, 26 Jan 2015 11:43:46 +0000	[thread overview]
Message-ID: <54C62872.3020001@arm.com> (raw)
In-Reply-To: <20150126113049.GF15598@arm.com>

Hi Will,

On 26/01/15 11:30, Will Deacon wrote:
> 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 <andre.przywara@arm.com>
>> ---
>>  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.

Well, you could have a guest kernel < 3.17, which does not have GICv3
support. In general I consider GICv2 better tested, so I reckon that
people will only want to use GICv3 emulation if there is a need for it
(non-compat GICv3 host or more than 8 VCPUs in the guest). That probably
changes over time, but for the time being I'd better keep the default at
GICv2 emulation.

Having said that, there could be a fallback in case GICv2 emulation is
not available. Let me take a look at that.
Also thinking about the future (ITS emulation) I found that I'd like to
replace this option with something more generic like --irqchip=.

Cheers,
Andre.

  reply	other threads:[~2015-01-26 11:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 16:34 [PATCH 00/11] kvmtool: Support new VGIC kernel features Andre Przywara
2015-01-23 16:35 ` [PATCH 01/11] kvmtool: add new VGIC_GRP definition (pulled from 3.19-rc1) Andre Przywara
2015-01-23 16:35 ` [PATCH 02/11] kvmtool: AArch64: Reserve two 64k pages for GIC CPU interface Andre Przywara
2015-01-23 16:35 ` [PATCH 03/11] kvmtool: AArch{32,64}: use KVM_CREATE_DEVICE & co to instanciate the GIC Andre Przywara
2015-01-26 11:26   ` Will Deacon
2015-01-26 12:06     ` Andre Przywara
2015-01-23 16:35 ` [PATCH 04/11] kvmtool: irq: add irq__get_nr_allocated_lines Andre Przywara
2015-01-23 16:35 ` [PATCH 05/11] kvmtool: AArch{32,64}: dynamically configure the number of GIC interrupts Andre Przywara
2015-01-23 16:35 ` [PATCH 06/11] kvmtool: finish VGIC initialisation explicitly Andre Przywara
2015-01-23 16:35 ` [PATCH 07/11] kvmtool: prepare for instantiating different IRQ chip devices Andre Przywara
2015-01-23 16:35 ` [PATCH 08/11] kvmtool: public header definitions from GICv3 emulation patch series Andre Przywara
2015-01-23 16:35 ` [PATCH 09/11] kvmtool: add required GICv3 defines also to ARM Andre Przywara
2015-01-23 16:35 ` [PATCH 10/11] kvmtool: add support for supplying GICv3 redistributor addresses Andre Przywara
2015-01-23 16:35 ` [PATCH 11/11] kvmtool: add command line parameter to instantiate a vGICv3 Andre Przywara
2015-01-26 11:30   ` Will Deacon
2015-01-26 11:43     ` Andre Przywara [this message]
2015-01-26 11:52       ` Marc Zyngier

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=54C62872.3020001@arm.com \
    --to=andre.przywara@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=penberg@kernel.org \
    --cc=will.deacon@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.