All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com,
	ian.campbell@citrix.com, Wei Liu <wei.liu2@citrix.com>
Subject: Re: [v3 12/13] arm: Allow the user to specify the GIC version
Date: Wed, 1 Jul 2015 15:37:34 +0100	[thread overview]
Message-ID: <5593FB2E.1090609@citrix.com> (raw)
In-Reply-To: <21907.61579.913529.308479@mariner.uk.xensource.com>

On 01/07/15 14:52, Ian Jackson wrote:
> Julien Grall writes ("[v3 12/13] arm: Allow the user to specify the GIC version"):
>> A platform may have a GIC compatible with previous version of the
>> device.
> ...
>> +=item B<gic_version="vN">
>> +
>> +Version of the GIC emulated for the guest. Currently, the following
>> +versions are supported:
> 
> This documentation should say what happens if this is not specified.
> 
> If the default behaviour is not simply `v3' (which I think it isn't)
> then there should be a way to explicitly request it.  That is, there
> should not be a behaviour which is only obtainable by not setting the
> config option.  Instead, there should be a config option value to
> request whatever that behaviour is.  (At the xl layer.)

The enum for the gic_version contains 3 options: v2, v3 and default.
If the parameter is not specified, the default option is chosen.

I will document the default behavior.

> 
> AFIACT the default is "offer the guest the hardware's native version".

This is true when the domain is firstly created. But this will be
confusing if the user decide to migrate the guest to a platform where
the native GIC is different.

This is a valid use-case, though we don't support migration yet, and the
guest will expect to get the same virtual GIC (the IRQ controller driver
can't be changed).

> I think having called this XEN_DOMCTL_CONFIG_GIC_DEFAULT is rather
> odd.  I think "native" would be a better description.

I do agree that XEN_DOMCTL_CONFIG_GIC_DEFAULT is odd. This option should
be renamed to XEN_DOMCTL_CONFIG_GIC_NATIVE as this is the behavior
adopted by the hypervisor.

Although, I think we should not expose the option "native" to the user
but "default" (see why above). When the domain is created, the
hypervisor will update the field in to specify which version is
effectively used (see xen_arch_domain_create).

> It might be better to deal with this default-filling-in by changing
> the value in the domain config struct along with the other setdefault
> type things in libxl_create.c.  If you do that, then saying
> `libxl_domain_create_new', and then looking at the supplied config,
> will give you a config specifying the GIC version explicitly, which I
> think is more correct.

Good idea. We talked about it when the XEN_DOMCTL_CONFIG_* was firstly
introduced late in the release of Xen 4.5 and forgot to revisit it. I
will see to integrate it in this patch series.

-- 
Julien Grall

  reply	other threads:[~2015-07-01 14:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 11:00 [v3 00/13] xen/arm: Add support for GICv2 on GICv3 Julien Grall
2015-07-01 11:01 ` [v3 01/13] xen/arm: Gate GICv3 change with HAS_GICV3 rather than CONFIG_ARM_64 Julien Grall
2015-07-01 11:01 ` [v3] xen: new maintainer for the RTDS scheduler Julien Grall
2015-07-01 11:06   ` Julien Grall
2015-07-01 11:07     ` George Dunlap
2015-07-01 11:01 ` [v3 02/13] xen/arm: gic: Rename make_dt_node into make_hwdom_dt_node Julien Grall
2015-07-01 11:01 ` [v3 03/13] xen/arm: vGIC: Check return of the domain_init callback Julien Grall
2015-07-01 11:01 ` [v3 04/13] xen/arm: gic-v3: Fix the distributor region to 64kB Julien Grall
2015-07-01 11:01 ` [v3 05/13] xen/arm: gic-v3: Use the domain redistributor information to make the DT node Julien Grall
2015-07-01 11:01 ` [v3 06/13] xen/arm: gic-v3: Rework the messages printed at initialization Julien Grall
2015-07-01 11:01 ` [v3 07/13] xen/arm: gic-{v2, hip04}: Remove redundant check in {gicv2, hip04gic}_init Julien Grall
2015-07-01 11:01 ` [v3 08/13] xen/arm: gic-{v2, hip04}: Use SZ_64K rather than our custom value Julien Grall
2015-07-01 11:01 ` [v3 09/13] xen/arm: gic: Allow the base address to be 0 Julien Grall
2015-07-01 11:01 ` [v3 10/13] xen/arm: gic-{v2, hip04}: Remove hbase from the global state Julien Grall
2015-07-01 11:01 ` [v3 11/13] xen/arm: Merge gicv_setup with vgic_domain_init Julien Grall
2015-07-01 11:01 ` [v3 12/13] arm: Allow the user to specify the GIC version Julien Grall
2015-07-01 13:52   ` Ian Jackson
2015-07-01 14:37     ` Julien Grall [this message]
2015-07-01 14:50       ` Ian Campbell
2015-07-01 15:09         ` Julien Grall
2015-07-01 11:01 ` [v3 13/13] xen/arm: gic-v3: Add support of vGICv2 when available Julien Grall
2015-07-02 10:37 ` [v3 00/13] xen/arm: Add support for GICv2 on GICv3 Julien Grall
2015-07-03 10:33   ` Ian Campbell
2015-07-03 10:40     ` Julien Grall

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=5593FB2E.1090609@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.