All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>,
	Julien Grall <julien.grall@citrix.com>
Cc: xen-devel@lists.xenproject.org, tim@xen.org,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	stefano.stabellini@citrix.com, Wei Liu <wei.liu2@citrix.com>
Subject: Re: [RFC 21/22] arm: Allow the user to specify the GIC version
Date: Fri, 5 Jun 2015 17:00:04 +0100	[thread overview]
Message-ID: <5571C784.5030406@citrix.com> (raw)
In-Reply-To: <1433508170.7108.270.camel@citrix.com>

On 05/06/15 13:42, Ian Campbell wrote:
> On Fri, 2015-05-08 at 14:29 +0100, Julien Grall wrote:
>> A platform may have a GIC compatible with previous version of the
>> device.
>>
>> This is allow to virtualize an unmodified OS on new hardware if the GIC
>> is compatible with older version.
>>
>> When a guest is created, the vGIC will emulate same version as the
>> hardware. Although, the user can specify in the configuration file the
>> preferred version (currently on GICv2 and GICv3 are supported).
>>
>> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>> Cc: Wei Liu <wei.liu2@citrix.com>
>>
>> ---
>>
>>     The hypervisor will check if the GIC is able to virtualize the
>>     version specified by the user (via the DOMCTL createdomain).
>>     If it's not compatible an error will be send on the Xen console
>>     which will make the error not obvious for user.
>>
>>     I'm wondering if we should expose to the toolstack the vGIC versions
>>     supported via a mecanism similar to xen_get_caps?
> 
> There may even be room in xencaps, although it isn't very scalable.
> 
> Another option might be to overwrite bad fields in the config struct
> with some sentinel to indicate they weren't usable. Not sure I like that
> though.

What about extending XENVER_get_features?

>>     I didn't add the documention because I wasn't sure in which section
>>     I should put it in the xl man.
> 
> Probably needs a new ARCHITECTURE: ARM section, and I bet a lot of stuff
> could move to ARCH: X86 (you don't have to do all that though).
> 
>> @@ -387,7 +393,9 @@ libxl_domain_build_info = Struct("domain_build_info",[
>>      ("blkdev_start",    string),
>>  
>>      ("vnuma_nodes", Array(libxl_vnode_info, "num_vnuma_nodes")),
>> -    
>> +
>> +    ("gic_version", libxl_gic_version),
> 
> For historical reasons the domain config is rather x86 centric. Fixing
> that is hard without breaking the API, but I think we should at least
> think about putting new arch specific stuff in a per-arch location.

Good idea.

> Just wrapping this in a struct named arm would be an ok start, we can
> add x86 when the next thing which should live there comes along.
> 
> I think having the fields always present, even for builds on arches
> where they don't make sense is ok, the alternative is to extend the IDL
> language to allow things to be made arch specific and generate suitable
> ifdefs...

I can give a look to see how hard it is to do it. Parameter such device
tree could go there too.

> 
> 
>> +
>>      ("device_model_version", libxl_device_model_version),
>>      ("device_model_stubdomain", libxl_defbool),
>>      # if you set device_model you must set device_model_version too
>> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
>> index 648ca08..b033c0b 100644
>> --- a/tools/libxl/xl_cmdimpl.c
>> +++ b/tools/libxl/xl_cmdimpl.c
>> @@ -1298,6 +1298,18 @@ static void parse_config_data(const char *config_source,
>>          !xlu_cfg_get_string (config, "cpus_soft", &buf, 0))
>>          parse_vcpu_affinity(b_info, cpus, buf, num_cpus, false);
>>  
>> +    if (!xlu_cfg_get_string (config, "gic_version", &buf, 1)) {
> 
> Could we just make this an integer?

I choose the string solution over integer to not rule out the
possibility to expose to the user a specific extension of the GICvn
(such as V2M or ITS).

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-06-05 16:00 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 13:29 [RFC 00/22] xen/arm: Add support for GICv2 on GICv3 Julien Grall
2015-05-08 13:29 ` [RFC 01/22] xen/arm: vGIC: Export vgic_vN ops rather than add an indirection Julien Grall
2015-06-05 12:08   ` Ian Campbell
2015-05-08 13:29 ` [RFC 02/22] xen/arm: vGIC: Check return of the domain_init callback Julien Grall
2015-06-05 12:08   ` Ian Campbell
2015-05-08 13:29 ` [RFC 03/22] xen/arm: gic-v3: Fix the distributor region to 64kB Julien Grall
2015-06-05 12:14   ` Ian Campbell
2015-06-05 12:56     ` Julien Grall
2015-06-05 13:29       ` Ian Campbell
2015-06-05 14:11         ` Julien Grall
2015-05-08 13:29 ` [RFC 04/22] xen/arm: gic-v3: Use the domain redistributor information to make the DT node Julien Grall
2015-06-05 12:15   ` Ian Campbell
2015-06-05 13:15     ` Julien Grall
2015-05-08 13:29 ` [RFC 05/22] xen/arm: gic-v3: Rework the print message at initialization Julien Grall
2015-06-05 12:18   ` Ian Campbell
2015-06-05 15:13     ` Julien Grall
2015-05-08 13:29 ` [RFC 06/22] xen/arm: gic-v2: Remove redundant check in gicv2_init Julien Grall
2015-06-05 12:18   ` Ian Campbell
2015-05-08 13:29 ` [RFC 07/22] xen/arm: gic-v2: Use SZ_64K rather than our custom value Julien Grall
2015-06-05 12:20   ` Ian Campbell
2015-05-08 13:29 ` [RFC 08/22] xen/arm: gic-v2: Use SZ_4K rather than PAGE_SIZE Julien Grall
2015-06-05 12:23   ` Ian Campbell
2015-06-05 15:23     ` Julien Grall
2015-05-08 13:29 ` [RFC 09/22] xen/arm: gic-v2: Allow the base address to be 0 Julien Grall
2015-06-05 12:24   ` Ian Campbell
2015-05-08 13:29 ` [RFC 10/22] xen/arm: gic-v2: Remove hbase from the global state Julien Grall
2015-06-05 12:24   ` Ian Campbell
2015-05-08 13:29 ` [RFC 11/22] xen/arm: gic-hip04: Remove redundant check in hip04gic_init Julien Grall
2015-06-05 12:24   ` Ian Campbell
2015-06-05 12:26     ` Ian Campbell
2015-06-05 15:29       ` Julien Grall
2015-06-05 15:40         ` Ian Campbell
2015-05-08 13:29 ` [RFC 12/22] xen/arm: gic-hip04: Use SZ_64K rather than a custom operation Julien Grall
2015-05-08 13:29 ` [RFC 13/22] xen/arm: gic-hip04: Use SZ_4K rather than PAGE_SIZE Julien Grall
2015-05-08 13:29 ` [RFC 14/22] xen/arm: gic-hip04: Allow the base address to be 0 Julien Grall
2015-05-08 13:29 ` [RFC 15/22] xen/arm: gic-hip04: Remove hbase from the global state Julien Grall
2015-05-08 13:29 ` [RFC 16/22] xen/arm: gic-v2: Move GICD, GICC and GICV base address in gic_info Julien Grall
2015-06-05 12:33   ` Ian Campbell
2015-05-08 13:29 ` [RFC 17/22] xen/arm: gic-hip04: " Julien Grall
2015-05-08 13:29 ` [RFC 18/22] xen/arm: gic-v3: Move Distributor and Re-Distributors info " Julien Grall
2015-05-08 13:29 ` [RFC 19/22] xen/arm: Merge gicv_setup with vgic_domain_init Julien Grall
2015-06-05 12:34   ` Ian Campbell
2015-05-08 13:29 ` [RFC 20/22] xen/arm: gic: Expose the vGIC versions suported by GIC Julien Grall
2015-05-08 13:48   ` Julien Grall
2015-06-05 12:35   ` Ian Campbell
2015-06-05 17:59     ` Julien Grall
2015-06-08 10:01       ` Ian Campbell
2015-05-08 13:29 ` [RFC 21/22] arm: Allow the user to specify the GIC version Julien Grall
2015-06-05 12:42   ` Ian Campbell
2015-06-05 16:00     ` Julien Grall [this message]
2015-06-05 16:40       ` Ian Campbell
2015-05-08 13:29 ` [RFC 22/22] xen/arm: gic-v3: Add support of vGICv2 when available Julien Grall
2015-06-05 12:48   ` Ian Campbell
2015-06-05 16:35     ` Julien Grall
2015-06-08 10:01       ` Ian Campbell
2015-06-25 15:38         ` Julien Grall
2015-05-13 12:41 ` [RFC 00/22] xen/arm: Add support for GICv2 on GICv3 Chen Baozi

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=5571C784.5030406@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --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.