[PATCH 3/4] xen/arm: Check if the platform is not using ACPI before initializing Dom0less

Julien Grall posted 4 patches 5 years, 4 months ago
Maintainers: Ian Jackson <iwj@xenproject.org>, Wei Liu <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>, Julien Grall <julien@xen.org>, Andrew Cooper <andrew.cooper3@citrix.com>, George Dunlap <george.dunlap@citrix.com>, Stefano Stabellini <sstabellini@kernel.org>, Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>, Jan Beulich <jbeulich@suse.com>
There is a newer version of this series
[PATCH 3/4] xen/arm: Check if the platform is not using ACPI before initializing Dom0less
Posted by Julien Grall 5 years, 4 months ago
From: Julien Grall <jgrall@amazon.com>

Dom0less requires a device-tree. However, since commit 6e3e77120378
"xen/arm: setup: Relocate the Device-Tree later on in the boot", the
device-tree will not get unflatten when using ACPI.

This will lead to a crash during boot.

Given the complexity to setup dom0less with ACPI (for instance how to
assign device?), we should skip any code related to Dom0less when using
ACPI.

Signed-off-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index f16b33fa87a2..35e5bee04efa 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -987,7 +987,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     system_state = SYS_STATE_active;
 
-    create_domUs();
+    if ( acpi_disabled )
+        create_domUs();
 
     domain_unpause_by_systemcontroller(dom0);
 
-- 
2.17.1


Re: [PATCH 3/4] xen/arm: Check if the platform is not using ACPI before initializing Dom0less
Posted by Rahul Singh 5 years, 4 months ago
Hello	

> On 26 Sep 2020, at 9:55 pm, Julien Grall <julien@xen.org> wrote:
> 
> From: Julien Grall <jgrall@amazon.com>
> 
> Dom0less requires a device-tree. However, since commit 6e3e77120378
> "xen/arm: setup: Relocate the Device-Tree later on in the boot", the
> device-tree will not get unflatten when using ACPI.
> 
> This will lead to a crash during boot.
> 
> Given the complexity to setup dom0less with ACPI (for instance how to
> assign device?), we should skip any code related to Dom0less when using
> ACPI.
> 
> Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>
> ---
> xen/arch/arm/setup.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index f16b33fa87a2..35e5bee04efa 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -987,7 +987,8 @@ void __init start_xen(unsigned long boot_phys_offset,
> 
>     system_state = SYS_STATE_active;
> 
> -    create_domUs();
> +    if ( acpi_disabled )
> +        create_domUs();
> 
>     domain_unpause_by_systemcontroller(dom0);
> 
> -- 
> 2.17.1
> 
> 

Regards,
Rahul


Re: [PATCH 3/4] xen/arm: Check if the platform is not using ACPI before initializing Dom0less
Posted by Stefano Stabellini 5 years, 4 months ago
On Sat, 26 Sep 2020, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
> 
> Dom0less requires a device-tree. However, since commit 6e3e77120378
> "xen/arm: setup: Relocate the Device-Tree later on in the boot", the
> device-tree will not get unflatten when using ACPI.
> 
> This will lead to a crash during boot.
> 
> Given the complexity to setup dom0less with ACPI (for instance how to
> assign device?), we should skip any code related to Dom0less when using
> ACPI.

Yeah...

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> Signed-off-by: Julien Grall <jgrall@amazon.com>
> ---
>  xen/arch/arm/setup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
> index f16b33fa87a2..35e5bee04efa 100644
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -987,7 +987,8 @@ void __init start_xen(unsigned long boot_phys_offset,
>  
>      system_state = SYS_STATE_active;
>  
> -    create_domUs();
> +    if ( acpi_disabled )
> +        create_domUs();
>  
>      domain_unpause_by_systemcontroller(dom0);
>  
> -- 
> 2.17.1
>