All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com
Subject: Re: [PATCH v2 12/15] xen/arm: gic: Store the necessary HW information per vGIC ...
Date: Tue, 30 Jun 2015 14:38:18 +0100	[thread overview]
Message-ID: <55929BCA.1060107@citrix.com> (raw)
In-Reply-To: <1435668976.21469.138.camel@citrix.com>

Hi Ian,

On 30/06/15 13:56, Ian Campbell wrote:
> On Fri, 2015-06-26 at 10:34 +0100, Julien Grall wrote:
>> ... in order to decouple the vGIC driver from the GIC driver.
>>
>> Each vGIC HW structure contains a boolean to indicate if the current GIC is
>> able to support this specific version of virtual GIC.
>>
>> Helpers have been introduced in order to help the GIC to setup correctly
>> the vGIC. The GIC will have to call them to announce the support of this
>> specific version.
>>
> 
> "...to help the GIC correctly setup the vGIC"
> 
> "...to announce support for this specific version"
> 
> 
>> Also drop fields that become unecessary in each global state.
> 
> "unnecessary"

I will fix it in the next version.

>> @@ -228,6 +232,55 @@ static inline int vgic_allocate_spi(struct domain *d)
>>  
>>  extern void vgic_free_virq(struct domain *d, unsigned int virq);
>>  
>> +struct vgic_v2_hw_config
>> +{
>> +    bool_t enabled;
>> +    /* Distributor interface address */
>> +    paddr_t dbase;
>> +    /* CPU interface address */
>> +    paddr_t cbase;
>> +    /* Virtual CPU interface address */
>> +    paddr_t vbase;
>> +};
>> +
>> +extern struct vgic_v2_hw_config vgic_v2_hw;
> 
> My inclination is to call this either vgic_v2_hwdom(_config) (since it
> is vgic config for the hw dom) or to call it gic_v2_hw_config (since it
> contains config info of the physical gic which we happen to be going to
> use for vgic).
> 
> I think given the expected usage the former makes more sense.

I think that the 2 names don't work for the usage of the structure:
	- vgic_v2_hwdom: vbase is used to map the guest CPU interface into the
virtual CPU interface
	- gic_v2_hw_config: it gives the impression to be physical GIC specific
rather the virtual GIC.

I would prefer to stick in vgic_v2_hw_config which show that we use it
for the virtual GIC.

>> +
>> +static inline void vgic_v2_setup_hw(paddr_t dbase, paddr_t cbase,
>> +                                    paddr_t vbase)
>> +{
>> +    vgic_v2_hw.enabled = 1;
>> +    vgic_v2_hw.dbase = dbase;
>> +    vgic_v2_hw.cbase = cbase;
>> +    vgic_v2_hw.vbase = vbase;
>> +}
> 
> If you were to move this out of line into vgic-v2.c would that mean that
> vgic_v2_hw_config etc could be static to that file?

No, we have to access the field enabled in domain_vgic_init to verify
the GIC is supporting the version of the vGIC.

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-06-30 13:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26  9:34 [PATCH v2 00/15] xen/arm: Add support for GICv2 on GICv3 Julien Grall
2015-06-26  9:34 ` [PATCH v2 01/15] xen/arm: Gate GICv3 change with HAS_GICV3 rather than CONFIG_ARM_64 Julien Grall
2015-06-30 12:41   ` Ian Campbell
2015-06-26  9:34 ` [PATCH v2 02/15] xen/arm: gic: Rename the callback make_dt_node in make_hwdom_dt_node Julien Grall
2015-06-30 12:43   ` Ian Campbell
2015-06-26  9:34 ` [PATCH v2 03/15] xen/arm: vGIC: Export vgic_vN ops rather than add an indirection Julien Grall
2015-06-30 12:45   ` Ian Campbell
2015-06-30 13:24     ` Julien Grall
2015-06-26  9:34 ` [PATCH v2 04/15] xen/arm: vGIC: Check return of the domain_init callback Julien Grall
2015-06-26  9:34 ` [PATCH v2 05/15] xen/arm: gic-v3: Fix the distributor region to 64kB Julien Grall
2015-06-26  9:34 ` [PATCH v2 06/15] xen/arm: gic-v3: Use the domain redistributor information to make the DT node Julien Grall
2015-06-30 12:46   ` Ian Campbell
2015-06-26  9:34 ` [PATCH v2 07/15] xen/arm: gic-v3: Rework the print message at initialization Julien Grall
2015-06-30 12:49   ` Ian Campbell
2015-06-26  9:34 ` [PATCH v2 08/15] xen/arm: gic-{v2, hip04}: Remove redundant check in {gicv2, hip04gic}_init Julien Grall
2015-06-26  9:34 ` [PATCH v2 09/15] xen/arm: gic-{v2, hip04}: Use SZ_64K rather than our custom value Julien Grall
2015-06-26  9:34 ` [PATCH v2 10/15] xen/arm: gic: Allow the base address to be 0 Julien Grall
2015-06-26  9:34 ` [PATCH v2 11/15] xen/arm: gic-{v2, hip04}: Remove hbase from the global state Julien Grall
2015-06-26  9:34 ` [PATCH v2 12/15] xen/arm: gic: Store the necessary HW information per vGIC Julien Grall
2015-06-30 12:56   ` Ian Campbell
2015-06-30 13:38     ` Julien Grall [this message]
2015-06-30 14:00       ` Ian Campbell
2015-06-30 14:11         ` Julien Grall
2015-06-30 14:18           ` Ian Campbell
2015-06-26  9:34 ` [PATCH v2 13/15] xen/arm: Merge gicv_setup with vgic_domain_init Julien Grall
2015-06-30 12:59   ` Ian Campbell
2015-06-30 13:51     ` Julien Grall
2015-06-30 13:56       ` Ian Campbell
2015-06-26  9:34 ` [PATCH v2 14/15] arm: Allow the user to specify the GIC version Julien Grall
2015-06-30 13:06   ` Ian Campbell
2015-06-30 14:23     ` Julien Grall
2015-06-26  9:34 ` [PATCH v2 15/15] xen/arm: gic-v3: Add support of vGICv2 when available Julien Grall
2015-06-30 13:16   ` Ian Campbell
2015-06-30 17:29     ` Julien Grall
2015-07-01  8:12       ` Ian Campbell
2015-07-01 10:21         ` Julien Grall
2015-06-30  8:05 ` [PATCH v2 00/15] 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=55929BCA.1060107@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@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.