[RFC PATCH 2/4] xen/arm: Move make_hypervisor_node()

Koichiro Den posted 4 patches 4 months, 1 week ago
There is a newer version of this series
[RFC PATCH 2/4] xen/arm: Move make_hypervisor_node()
Posted by Koichiro Den 4 months, 1 week ago
Even though make_hypervisor_node() does not rely on the /reserved-memory
instantiation when calling find_unused_regions() (the wrapper introduced
in the previous commit), the next but one commit will use it for PV time
shared regions, in addition to the existing extended regions.

Move it as a prerequisite for the commit after next.

No functional changes intended.

Signed-off-by: Koichiro Den <den@valinux.co.jp>
---
 xen/arch/arm/domain_build.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 9d44b6fa9470..967ca6f375ca 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1725,14 +1725,6 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
          */
         evtchn_allocate(d);
 
-        /*
-         * The hypervisor node should always be created after all nodes
-         * from the host DT have been parsed.
-         */
-        res = make_hypervisor_node(d, kinfo, addrcells, sizecells);
-        if ( res )
-            return res;
-
         res = make_psci_node(kinfo->fdt);
         if ( res )
             return res;
@@ -1763,6 +1755,14 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
             if ( res )
                 return res;
         }
+
+        /*
+         * The hypervisor node should always be created after all nodes
+         * from the host DT have been parsed.
+         */
+        res = make_hypervisor_node(d, kinfo, addrcells, sizecells);
+        if ( res )
+            return res;
     }
 
     res = fdt_end_node(kinfo->fdt);
-- 
2.48.1
Re: [RFC PATCH 2/4] xen/arm: Move make_hypervisor_node()
Posted by Orzel, Michal 4 months, 1 week ago

On 21/06/2025 17:11, Koichiro Den wrote:
> Even though make_hypervisor_node() does not rely on the /reserved-memory
> instantiation when calling find_unused_regions() (the wrapper introduced
> in the previous commit), the next but one commit will use it for PV time
Unless for specific reasons, you should not rely on which commit gets committed
first. Hypothetically there could be a different patch committed between this
and the next one in your series. That's why it's not a good practice to mention
order of commits in the commit message.

> shared regions, in addition to the existing extended regions.
> 
> Move it as a prerequisite for the commit after next.
This one is particularly not useful.

> 
> No functional changes intended.
> 
> Signed-off-by: Koichiro Den <den@valinux.co.jp>

Other than that, LGTM.

~Michal
Re: [RFC PATCH 2/4] xen/arm: Move make_hypervisor_node()
Posted by Koichiro Den 4 months ago
On Mon, Jun 23, 2025 at 03:40:24PM +0200, Orzel, Michal wrote:
> 
> 
> On 21/06/2025 17:11, Koichiro Den wrote:
> > Even though make_hypervisor_node() does not rely on the /reserved-memory
> > instantiation when calling find_unused_regions() (the wrapper introduced
> > in the previous commit), the next but one commit will use it for PV time
> Unless for specific reasons, you should not rely on which commit gets committed
> first. Hypothetically there could be a different patch committed between this
> and the next one in your series. That's why it's not a good practice to mention
> order of commits in the commit message.

That makes sense. I'll rewrite the commit messages in v2.
Thank you for the review.

> 
> > shared regions, in addition to the existing extended regions.
> > 
> > Move it as a prerequisite for the commit after next.
> This one is particularly not useful.
> 
> > 
> > No functional changes intended.
> > 
> > Signed-off-by: Koichiro Den <den@valinux.co.jp>
> 
> Other than that, LGTM.
> 
> ~Michal
>