* [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose
[not found] <1639080336-26573-1-git-send-email-olekstysh@gmail.com>
@ 2021-12-09 20:05 ` Oleksandr Tyshchenko
2021-12-10 9:09 ` Julien Grall
0 siblings, 1 reply; 7+ messages in thread
From: Oleksandr Tyshchenko @ 2021-12-09 20:05 UTC (permalink / raw)
To: xen-devel, devicetree, linux-kernel, Rob Herring
Cc: Oleksandr Tyshchenko, Stefano Stabellini, Julien Grall
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Xen on Arm has gained new support recently to calculate and report
extended regions (unused address space) safe to use for external
mappings. These regions are reported via "reg" property under
"hypervisor" node in the guest device-tree. As region 0 is reserved
for grant table space (always present), the indexes for extended
regions are 1...N.
No device-tree bindings update is needed (except clarifying the text)
as guest infers the presence of extended regions from the number
of regions in "reg" property.
While at it, remove the following sentence:
"This property is unnecessary when booting Dom0 using ACPI."
for "reg" and "interrupts" properties as the initialization is not
done via device-tree "hypervisor" node in that case anyway.
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes V2 -> V3:
- new patch
Changes V3 -> V4:
- add Stefano's R-b and Rob's A-b
- remove sentence about ACPI for "reg" and "interrupts"
properties
---
Documentation/devicetree/bindings/arm/xen.txt | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt
index db5c56d..61d77ac 100644
--- a/Documentation/devicetree/bindings/arm/xen.txt
+++ b/Documentation/devicetree/bindings/arm/xen.txt
@@ -7,15 +7,17 @@ the following properties:
compatible = "xen,xen-<version>", "xen,xen";
where <version> is the version of the Xen ABI of the platform.
-- reg: specifies the base physical address and size of a region in
- memory where the grant table should be mapped to, using an
- HYPERVISOR_memory_op hypercall. The memory region is large enough to map
- the whole grant table (it is larger or equal to gnttab_max_grant_frames()).
- This property is unnecessary when booting Dom0 using ACPI.
+- reg: specifies the base physical address and size of the regions in memory
+ where the special resources should be mapped to, using an HYPERVISOR_memory_op
+ hypercall.
+ Region 0 is reserved for mapping grant table, it must be always present.
+ The memory region is large enough to map the whole grant table (it is larger
+ or equal to gnttab_max_grant_frames()).
+ Regions 1...N are extended regions (unused address space) for mapping foreign
+ GFNs and grants, they might be absent if there is nothing to expose.
- interrupts: the interrupt used by Xen to inject event notifications.
A GIC node is also required.
- This property is unnecessary when booting Dom0 using ACPI.
To support UEFI on Xen ARM virtual platforms, Xen populates the FDT "uefi" node
under /hypervisor with following parameters:
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose
2021-12-09 20:05 ` [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose Oleksandr Tyshchenko
@ 2021-12-10 9:09 ` Julien Grall
2021-12-10 9:33 ` Oleksandr
0 siblings, 1 reply; 7+ messages in thread
From: Julien Grall @ 2021-12-10 9:09 UTC (permalink / raw)
To: Oleksandr Tyshchenko, xen-devel, devicetree, linux-kernel,
Rob Herring
Cc: Oleksandr Tyshchenko, Stefano Stabellini
Hi Oleksandr,
On 09/12/2021 20:05, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>
> Xen on Arm has gained new support recently to calculate and report
> extended regions (unused address space) safe to use for external
> mappings. These regions are reported via "reg" property under
> "hypervisor" node in the guest device-tree. As region 0 is reserved
> for grant table space (always present), the indexes for extended
> regions are 1...N.
>
> No device-tree bindings update is needed (except clarifying the text)
> as guest infers the presence of extended regions from the number
> of regions in "reg" property.
>
> While at it, remove the following sentence:
> "This property is unnecessary when booting Dom0 using ACPI."
> for "reg" and "interrupts" properties as the initialization is not
> done via device-tree "hypervisor" node in that case anyway.
You sent a similar patch for Xen and have already commented there [1] .
In short, the OS will be using the node to discover whether it is
running on Xen for both ACPI and DT. The hypervisor node also contain
the UEFI information for dom0.
Cheers,
[1]
https://lore.kernel.org/xen-devel/9602b019-6c20-cdc7-23f3-9e4f8fd720f6@xen.org/T/#t
--
Julien Grall
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose
2021-12-10 9:09 ` Julien Grall
@ 2021-12-10 9:33 ` Oleksandr
2021-12-10 11:36 ` Oleksandr Tyshchenko
0 siblings, 1 reply; 7+ messages in thread
From: Oleksandr @ 2021-12-10 9:33 UTC (permalink / raw)
To: Julien Grall
Cc: xen-devel, devicetree, linux-kernel, Rob Herring,
Oleksandr Tyshchenko, Stefano Stabellini
On 10.12.21 11:09, Julien Grall wrote:
> Hi Oleksandr,
Hi Julien
>
> On 09/12/2021 20:05, Oleksandr Tyshchenko wrote:
>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>>
>> Xen on Arm has gained new support recently to calculate and report
>> extended regions (unused address space) safe to use for external
>> mappings. These regions are reported via "reg" property under
>> "hypervisor" node in the guest device-tree. As region 0 is reserved
>> for grant table space (always present), the indexes for extended
>> regions are 1...N.
>>
>> No device-tree bindings update is needed (except clarifying the text)
>> as guest infers the presence of extended regions from the number
>> of regions in "reg" property.
>>
>> While at it, remove the following sentence:
>> "This property is unnecessary when booting Dom0 using ACPI."
>> for "reg" and "interrupts" properties as the initialization is not
>> done via device-tree "hypervisor" node in that case anyway.
> You sent a similar patch for Xen and have already commented there [1]
> . In short, the OS will be using the node to discover whether it is
> running on Xen for both ACPI and DT. The hypervisor node also contain
> the UEFI information for dom0.
I agree with your comments. The sentence should remain in this case.
Thank you for pointing this out.
>
>
> Cheers,
>
> [1]
> https://lore.kernel.org/xen-devel/9602b019-6c20-cdc7-23f3-9e4f8fd720f6@xen.org/T/#t
>
--
Regards,
Oleksandr Tyshchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose
2021-12-10 9:33 ` Oleksandr
@ 2021-12-10 11:36 ` Oleksandr Tyshchenko
2021-12-10 13:54 ` Bertrand Marquis
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Oleksandr Tyshchenko @ 2021-12-10 11:36 UTC (permalink / raw)
To: xen-devel, devicetree, linux-kernel, Rob Herring
Cc: Oleksandr Tyshchenko, Stefano Stabellini, Julien Grall
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Xen on Arm has gained new support recently to calculate and report
extended regions (unused address space) safe to use for external
mappings. These regions are reported via "reg" property under
"hypervisor" node in the guest device-tree. As region 0 is reserved
for grant table space (always present), the indexes for extended
regions are 1...N.
No device-tree bindings update is needed (except clarifying the text)
as guest infers the presence of extended regions from the number
of regions in "reg" property.
Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
---
Changes V2 -> V3:
- new patch
Changes V3 -> V4:
- add Stefano's R-b and Rob's A-b
- remove sentence about ACPI for "reg" and "interrupts"
properties
Changes V4 -> V4.1
- bring the mentioning of ACPI back which, as was pointed out by Julien,
fits in the context:
https://lore.kernel.org/xen-devel/9602b019-6c20-cdc7-23f3-9e4f8fd720f6@xen.org/T/#t
so technically restore V3 state
- remove Stefano's R-b and Rob's A-b as I am not 100% sure they are
happy with that
---
Documentation/devicetree/bindings/arm/xen.txt | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt
index db5c56d..156fe10b 100644
--- a/Documentation/devicetree/bindings/arm/xen.txt
+++ b/Documentation/devicetree/bindings/arm/xen.txt
@@ -7,10 +7,14 @@ the following properties:
compatible = "xen,xen-<version>", "xen,xen";
where <version> is the version of the Xen ABI of the platform.
-- reg: specifies the base physical address and size of a region in
- memory where the grant table should be mapped to, using an
- HYPERVISOR_memory_op hypercall. The memory region is large enough to map
- the whole grant table (it is larger or equal to gnttab_max_grant_frames()).
+- reg: specifies the base physical address and size of the regions in memory
+ where the special resources should be mapped to, using an HYPERVISOR_memory_op
+ hypercall.
+ Region 0 is reserved for mapping grant table, it must be always present.
+ The memory region is large enough to map the whole grant table (it is larger
+ or equal to gnttab_max_grant_frames()).
+ Regions 1...N are extended regions (unused address space) for mapping foreign
+ GFNs and grants, they might be absent if there is nothing to expose.
This property is unnecessary when booting Dom0 using ACPI.
- interrupts: the interrupt used by Xen to inject event notifications.
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose
2021-12-10 11:36 ` Oleksandr Tyshchenko
@ 2021-12-10 13:54 ` Bertrand Marquis
2021-12-10 16:41 ` Rob Herring
2021-12-16 21:51 ` Stefano Stabellini
2 siblings, 0 replies; 7+ messages in thread
From: Bertrand Marquis @ 2021-12-10 13:54 UTC (permalink / raw)
To: Oleksandr Tyshchenko
Cc: Xen-devel, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Rob Herring, Oleksandr Tyshchenko,
Stefano Stabellini, Julien Grall
Hi Oleksandr,
> On 10 Dec 2021, at 11:36, Oleksandr Tyshchenko <olekstysh@gmail.com> wrote:
>
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>
> Xen on Arm has gained new support recently to calculate and report
> extended regions (unused address space) safe to use for external
> mappings. These regions are reported via "reg" property under
> "hypervisor" node in the guest device-tree. As region 0 is reserved
> for grant table space (always present), the indexes for extended
> regions are 1...N.
>
> No device-tree bindings update is needed (except clarifying the text)
> as guest infers the presence of extended regions from the number
> of regions in "reg" property.
>
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Cheers
Bertrand
> ---
> Changes V2 -> V3:
> - new patch
>
> Changes V3 -> V4:
> - add Stefano's R-b and Rob's A-b
> - remove sentence about ACPI for "reg" and "interrupts"
> properties
>
> Changes V4 -> V4.1
> - bring the mentioning of ACPI back which, as was pointed out by Julien,
> fits in the context:
> https://lore.kernel.org/xen-devel/9602b019-6c20-cdc7-23f3-9e4f8fd720f6@xen.org/T/#t
> so technically restore V3 state
> - remove Stefano's R-b and Rob's A-b as I am not 100% sure they are
> happy with that
> ---
> Documentation/devicetree/bindings/arm/xen.txt | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt
> index db5c56d..156fe10b 100644
> --- a/Documentation/devicetree/bindings/arm/xen.txt
> +++ b/Documentation/devicetree/bindings/arm/xen.txt
> @@ -7,10 +7,14 @@ the following properties:
> compatible = "xen,xen-<version>", "xen,xen";
> where <version> is the version of the Xen ABI of the platform.
>
> -- reg: specifies the base physical address and size of a region in
> - memory where the grant table should be mapped to, using an
> - HYPERVISOR_memory_op hypercall. The memory region is large enough to map
> - the whole grant table (it is larger or equal to gnttab_max_grant_frames()).
> +- reg: specifies the base physical address and size of the regions in memory
> + where the special resources should be mapped to, using an HYPERVISOR_memory_op
> + hypercall.
> + Region 0 is reserved for mapping grant table, it must be always present.
> + The memory region is large enough to map the whole grant table (it is larger
> + or equal to gnttab_max_grant_frames()).
> + Regions 1...N are extended regions (unused address space) for mapping foreign
> + GFNs and grants, they might be absent if there is nothing to expose.
> This property is unnecessary when booting Dom0 using ACPI.
>
> - interrupts: the interrupt used by Xen to inject event notifications.
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose
2021-12-10 11:36 ` Oleksandr Tyshchenko
2021-12-10 13:54 ` Bertrand Marquis
@ 2021-12-10 16:41 ` Rob Herring
2021-12-16 21:51 ` Stefano Stabellini
2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2021-12-10 16:41 UTC (permalink / raw)
To: Oleksandr Tyshchenko
Cc: devicetree, Oleksandr Tyshchenko, Rob Herring, xen-devel,
Julien Grall, Stefano Stabellini, linux-kernel
On Fri, 10 Dec 2021 13:36:41 +0200, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>
> Xen on Arm has gained new support recently to calculate and report
> extended regions (unused address space) safe to use for external
> mappings. These regions are reported via "reg" property under
> "hypervisor" node in the guest device-tree. As region 0 is reserved
> for grant table space (always present), the indexes for extended
> regions are 1...N.
>
> No device-tree bindings update is needed (except clarifying the text)
> as guest infers the presence of extended regions from the number
> of regions in "reg" property.
>
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> ---
> Changes V2 -> V3:
> - new patch
>
> Changes V3 -> V4:
> - add Stefano's R-b and Rob's A-b
> - remove sentence about ACPI for "reg" and "interrupts"
> properties
>
> Changes V4 -> V4.1
> - bring the mentioning of ACPI back which, as was pointed out by Julien,
> fits in the context:
> https://lore.kernel.org/xen-devel/9602b019-6c20-cdc7-23f3-9e4f8fd720f6@xen.org/T/#t
> so technically restore V3 state
> - remove Stefano's R-b and Rob's A-b as I am not 100% sure they are
> happy with that
> ---
> Documentation/devicetree/bindings/arm/xen.txt | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose
2021-12-10 11:36 ` Oleksandr Tyshchenko
2021-12-10 13:54 ` Bertrand Marquis
2021-12-10 16:41 ` Rob Herring
@ 2021-12-16 21:51 ` Stefano Stabellini
2 siblings, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2021-12-16 21:51 UTC (permalink / raw)
To: Oleksandr Tyshchenko
Cc: xen-devel, devicetree, linux-kernel, Rob Herring,
Oleksandr Tyshchenko, Stefano Stabellini, Julien Grall
On Fri, 10 Dec 2021, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>
> Xen on Arm has gained new support recently to calculate and report
> extended regions (unused address space) safe to use for external
> mappings. These regions are reported via "reg" property under
> "hypervisor" node in the guest device-tree. As region 0 is reserved
> for grant table space (always present), the indexes for extended
> regions are 1...N.
>
> No device-tree bindings update is needed (except clarifying the text)
> as guest infers the presence of extended regions from the number
> of regions in "reg" property.
>
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> ---
> Changes V2 -> V3:
> - new patch
>
> Changes V3 -> V4:
> - add Stefano's R-b and Rob's A-b
> - remove sentence about ACPI for "reg" and "interrupts"
> properties
>
> Changes V4 -> V4.1
> - bring the mentioning of ACPI back which, as was pointed out by Julien,
> fits in the context:
> https://lore.kernel.org/xen-devel/9602b019-6c20-cdc7-23f3-9e4f8fd720f6@xen.org/T/#t
> so technically restore V3 state
> - remove Stefano's R-b and Rob's A-b as I am not 100% sure they are
> happy with that
> ---
> Documentation/devicetree/bindings/arm/xen.txt | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/xen.txt b/Documentation/devicetree/bindings/arm/xen.txt
> index db5c56d..156fe10b 100644
> --- a/Documentation/devicetree/bindings/arm/xen.txt
> +++ b/Documentation/devicetree/bindings/arm/xen.txt
> @@ -7,10 +7,14 @@ the following properties:
> compatible = "xen,xen-<version>", "xen,xen";
> where <version> is the version of the Xen ABI of the platform.
>
> -- reg: specifies the base physical address and size of a region in
> - memory where the grant table should be mapped to, using an
> - HYPERVISOR_memory_op hypercall. The memory region is large enough to map
> - the whole grant table (it is larger or equal to gnttab_max_grant_frames()).
> +- reg: specifies the base physical address and size of the regions in memory
> + where the special resources should be mapped to, using an HYPERVISOR_memory_op
> + hypercall.
> + Region 0 is reserved for mapping grant table, it must be always present.
> + The memory region is large enough to map the whole grant table (it is larger
> + or equal to gnttab_max_grant_frames()).
> + Regions 1...N are extended regions (unused address space) for mapping foreign
> + GFNs and grants, they might be absent if there is nothing to expose.
> This property is unnecessary when booting Dom0 using ACPI.
>
> - interrupts: the interrupt used by Xen to inject event notifications.
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-16 21:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1639080336-26573-1-git-send-email-olekstysh@gmail.com>
2021-12-09 20:05 ` [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose Oleksandr Tyshchenko
2021-12-10 9:09 ` Julien Grall
2021-12-10 9:33 ` Oleksandr
2021-12-10 11:36 ` Oleksandr Tyshchenko
2021-12-10 13:54 ` Bertrand Marquis
2021-12-10 16:41 ` Rob Herring
2021-12-16 21:51 ` Stefano Stabellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).