diff mbox

[v6,21/36] ARM: GICv3: prepare for virtual ITS subnodes

Message ID 20170407173307.9788-22-andre.przywara@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andre Przywara April 7, 2017, 5:32 p.m. UTC
When creating the device tree for a domain using an emulated GICv3,
we will later need to add the respective ITS subnodes as well.
Prepare a stub function to be later filled with the actual code.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 xen/arch/arm/gic-v3.c            | 4 +++-
 xen/include/asm-arm/gic_v3_its.h | 8 ++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

Comments

Julien Grall April 7, 2017, 10:59 p.m. UTC | #1
Hi Andre,

On 07/04/2017 18:32, Andre Przywara wrote:
> When creating the device tree for a domain using an emulated GICv3,
> we will later need to add the respective ITS subnodes as well.
> Prepare a stub function to be later filled with the actual code.

make_hwdom_dt_node will only create DT node for the hardware domain. The 
guest DTs will be created by the toolstack.

Please update the commit message accordingly.

>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  xen/arch/arm/gic-v3.c            | 4 +++-
>  xen/include/asm-arm/gic_v3_its.h | 8 ++++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
> index 54fbb19..2fbcf52 100644
> --- a/xen/arch/arm/gic-v3.c
> +++ b/xen/arch/arm/gic-v3.c
> @@ -1172,8 +1172,10 @@ static int gicv3_make_hwdom_dt_node(const struct domain *d,
>
>      res = fdt_property(fdt, "reg", new_cells, len);
>      xfree(new_cells);
> +    if ( res )
> +        return res;
>
> -    return res;
> +    return gicv3_its_make_dt_nodes(NULL, d, gic, fdt);

I said no to the NULL and explained why on v5. Please address all the 
comments.

Also this should be name gicv3_its_make_hwdom_dt_nodes.

>  }
>
>  static const hw_irq_controller gicv3_host_irq_type = {
> diff --git a/xen/include/asm-arm/gic_v3_its.h b/xen/include/asm-arm/gic_v3_its.h
> index 7470779..09c7117 100644
> --- a/xen/include/asm-arm/gic_v3_its.h
> +++ b/xen/include/asm-arm/gic_v3_its.h
> @@ -220,6 +220,14 @@ static inline void vgic_v3_its_free_domain(struct domain *d)
>
>  #endif /* CONFIG_HAS_ITS */
>
> +static inline int gicv3_its_make_dt_nodes(struct list_head *its_list,
> +                                          const struct domain *d,
> +                                          const struct dt_device_node *gic,
> +                                          void *fdt)
> +{
> +    return 0;
> +}
> +
>  #endif
>
>  /*
>

Cheers,
Andre Przywara April 7, 2017, 11:06 p.m. UTC | #2
On 07/04/17 23:59, Julien Grall wrote:
> Hi Andre,
> 
> On 07/04/2017 18:32, Andre Przywara wrote:
>> When creating the device tree for a domain using an emulated GICv3,
>> we will later need to add the respective ITS subnodes as well.
>> Prepare a stub function to be later filled with the actual code.
> 
> make_hwdom_dt_node will only create DT node for the hardware domain. The
> guest DTs will be created by the toolstack.
> 
> Please update the commit message accordingly.
> 
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  xen/arch/arm/gic-v3.c            | 4 +++-
>>  xen/include/asm-arm/gic_v3_its.h | 8 ++++++++
>>  2 files changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
>> index 54fbb19..2fbcf52 100644
>> --- a/xen/arch/arm/gic-v3.c
>> +++ b/xen/arch/arm/gic-v3.c
>> @@ -1172,8 +1172,10 @@ static int gicv3_make_hwdom_dt_node(const
>> struct domain *d,
>>
>>      res = fdt_property(fdt, "reg", new_cells, len);
>>      xfree(new_cells);
>> +    if ( res )
>> +        return res;
>>
>> -    return res;
>> +    return gicv3_its_make_dt_nodes(NULL, d, gic, fdt);
> 
> I said no to the NULL and explained why on v5. Please address all the
> comments.

Yeah, sorry, I didn't change much in the later patches, especially not
on the ITS command emulation, so please save your time and skip those.
The only changes worth looking at in v6 is the locking in the MMIO
emulation in patches 22/36 and 24/36.

Cheers,
Andre.

> 
> Also this should be name gicv3_its_make_hwdom_dt_nodes.
> 
>>  }
>>
>>  static const hw_irq_controller gicv3_host_irq_type = {
>> diff --git a/xen/include/asm-arm/gic_v3_its.h
>> b/xen/include/asm-arm/gic_v3_its.h
>> index 7470779..09c7117 100644
>> --- a/xen/include/asm-arm/gic_v3_its.h
>> +++ b/xen/include/asm-arm/gic_v3_its.h
>> @@ -220,6 +220,14 @@ static inline void vgic_v3_its_free_domain(struct
>> domain *d)
>>
>>  #endif /* CONFIG_HAS_ITS */
>>
>> +static inline int gicv3_its_make_dt_nodes(struct list_head *its_list,
>> +                                          const struct domain *d,
>> +                                          const struct dt_device_node
>> *gic,
>> +                                          void *fdt)
>> +{
>> +    return 0;
>> +}
>> +
>>  #endif
>>
>>  /*
>>
> 
> Cheers,
>
Julien Grall April 7, 2017, 11:12 p.m. UTC | #3
On 08/04/2017 00:06, André Przywara wrote:
> On 07/04/17 23:59, Julien Grall wrote:
>> Hi Andre,
>>
>> On 07/04/2017 18:32, Andre Przywara wrote:
>>> When creating the device tree for a domain using an emulated GICv3,
>>> we will later need to add the respective ITS subnodes as well.
>>> Prepare a stub function to be later filled with the actual code.
>>
>> make_hwdom_dt_node will only create DT node for the hardware domain. The
>> guest DTs will be created by the toolstack.
>>
>> Please update the commit message accordingly.
>>
>>>
>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>> ---
>>>  xen/arch/arm/gic-v3.c            | 4 +++-
>>>  xen/include/asm-arm/gic_v3_its.h | 8 ++++++++
>>>  2 files changed, 11 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
>>> index 54fbb19..2fbcf52 100644
>>> --- a/xen/arch/arm/gic-v3.c
>>> +++ b/xen/arch/arm/gic-v3.c
>>> @@ -1172,8 +1172,10 @@ static int gicv3_make_hwdom_dt_node(const
>>> struct domain *d,
>>>
>>>      res = fdt_property(fdt, "reg", new_cells, len);
>>>      xfree(new_cells);
>>> +    if ( res )
>>> +        return res;
>>>
>>> -    return res;
>>> +    return gicv3_its_make_dt_nodes(NULL, d, gic, fdt);
>>
>> I said no to the NULL and explained why on v5. Please address all the
>> comments.
>
> Yeah, sorry, I didn't change much in the later patches, especially not
> on the ITS command emulation, so please save your time and skip those.
> The only changes worth looking at in v6 is the locking in the MMIO
> emulation in patches 22/36 and 24/36.

Can you give a range of patches I should skip?

Cheers,
Andre Przywara April 7, 2017, 11:23 p.m. UTC | #4
On 08/04/17 00:12, Julien Grall wrote:
> 
> 
> On 08/04/2017 00:06, André Przywara wrote:
>> On 07/04/17 23:59, Julien Grall wrote:
>>> Hi Andre,
>>>
>>> On 07/04/2017 18:32, Andre Przywara wrote:
>>>> When creating the device tree for a domain using an emulated GICv3,
>>>> we will later need to add the respective ITS subnodes as well.
>>>> Prepare a stub function to be later filled with the actual code.
>>>
>>> make_hwdom_dt_node will only create DT node for the hardware domain. The
>>> guest DTs will be created by the toolstack.
>>>
>>> Please update the commit message accordingly.
>>>
>>>>
>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>>> ---
>>>>  xen/arch/arm/gic-v3.c            | 4 +++-
>>>>  xen/include/asm-arm/gic_v3_its.h | 8 ++++++++
>>>>  2 files changed, 11 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
>>>> index 54fbb19..2fbcf52 100644
>>>> --- a/xen/arch/arm/gic-v3.c
>>>> +++ b/xen/arch/arm/gic-v3.c
>>>> @@ -1172,8 +1172,10 @@ static int gicv3_make_hwdom_dt_node(const
>>>> struct domain *d,
>>>>
>>>>      res = fdt_property(fdt, "reg", new_cells, len);
>>>>      xfree(new_cells);
>>>> +    if ( res )
>>>> +        return res;
>>>>
>>>> -    return res;
>>>> +    return gicv3_its_make_dt_nodes(NULL, d, gic, fdt);
>>>
>>> I said no to the NULL and explained why on v5. Please address all the
>>> comments.
>>
>> Yeah, sorry, I didn't change much in the later patches, especially not
>> on the ITS command emulation, so please save your time and skip those.
>> The only changes worth looking at in v6 is the locking in the MMIO
>> emulation in patches 22/36 and 24/36.
> 
> Can you give a range of patches I should skip?

You can safely skip patches 25/36 till 34/36, probably even the last
two. Patch 23/36 has been removed in v7.

Thanks!
andre.
diff mbox

Patch

diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index 54fbb19..2fbcf52 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -1172,8 +1172,10 @@  static int gicv3_make_hwdom_dt_node(const struct domain *d,
 
     res = fdt_property(fdt, "reg", new_cells, len);
     xfree(new_cells);
+    if ( res )
+        return res;
 
-    return res;
+    return gicv3_its_make_dt_nodes(NULL, d, gic, fdt);
 }
 
 static const hw_irq_controller gicv3_host_irq_type = {
diff --git a/xen/include/asm-arm/gic_v3_its.h b/xen/include/asm-arm/gic_v3_its.h
index 7470779..09c7117 100644
--- a/xen/include/asm-arm/gic_v3_its.h
+++ b/xen/include/asm-arm/gic_v3_its.h
@@ -220,6 +220,14 @@  static inline void vgic_v3_its_free_domain(struct domain *d)
 
 #endif /* CONFIG_HAS_ITS */
 
+static inline int gicv3_its_make_dt_nodes(struct list_head *its_list,
+                                          const struct domain *d,
+                                          const struct dt_device_node *gic,
+                                          void *fdt)
+{
+    return 0;
+}
+
 #endif
 
 /*