Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-16 Thread Julien Grall
Hi, On 16/11/2021 15:08, Ian Jackson wrote: Luca Fancellu writes ("Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64"): On 15 Nov 2021, at 22:00, Stefano Stabellini wrote: On Mon, 15 Nov 2021, Julien Grall wrote: That would indeed be better. I'd like this patch to be merged

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-16 Thread Jan Beulich
On 16.11.2021 16:08, Ian Jackson wrote: > Luca Fancellu writes ("Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64"): >>> On 15 Nov 2021, at 22:00, Stefano Stabellini wrote: >>> On Mon, 15 Nov 2021, Julien Grall wrote: >>>> That would indeed be bette

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-16 Thread Ian Jackson
Luca Fancellu writes ("Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64"): > > On 15 Nov 2021, at 22:00, Stefano Stabellini wrote: > > On Mon, 15 Nov 2021, Julien Grall wrote: > >> That would indeed be better. I'd like this patch to be merged in 4.16. &

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-16 Thread Luca Fancellu
> On 15 Nov 2021, at 22:00, Stefano Stabellini wrote: > > +Ian > > On Mon, 15 Nov 2021, Julien Grall wrote: >> Hi Luca, >> >> On 10/11/2021 14:02, Luca Fancellu wrote: >>> >>> On 10 Nov 2021, at 13:36, Julien Grall wrote: Hi Luca, On 10/11/2021 13:05, Luca Fance

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-15 Thread Stefano Stabellini
+Ian On Mon, 15 Nov 2021, Julien Grall wrote: > Hi Luca, > > On 10/11/2021 14:02, Luca Fancellu wrote: > > > > > > > On 10 Nov 2021, at 13:36, Julien Grall wrote: > > > > > > Hi Luca, > > > > > > On 10/11/2021 13:05, Luca Fancellu wrote: > > > > I thought having the EFI_FILE_HANDLE global in

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-15 Thread Julien Grall
Hi Luca, On 10/11/2021 14:02, Luca Fancellu wrote: On 10 Nov 2021, at 13:36, Julien Grall wrote: Hi Luca, On 10/11/2021 13:05, Luca Fancellu wrote: I thought having the EFI_FILE_HANDLE global in efi-boot.h was a “no go”, but if it’s not then instead of calling get_parent_handle in efi_ch

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-10 Thread Luca Fancellu
> On 10 Nov 2021, at 13:36, Julien Grall wrote: > > Hi Luca, > > On 10/11/2021 13:05, Luca Fancellu wrote: >> I thought having the EFI_FILE_HANDLE global in efi-boot.h was a “no go”, but >> if it’s not then instead of >> calling get_parent_handle in efi_check_dt_boot (that is the main issue

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-10 Thread Julien Grall
Hi Luca, On 10/11/2021 13:05, Luca Fancellu wrote: I thought having the EFI_FILE_HANDLE global in efi-boot.h was a “no go”, but if it’s not then instead of calling get_parent_handle in efi_check_dt_boot (that is the main issue with EDK2+Grub2), we can do something like this: fs_dir_handle is

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-10 Thread Luca Fancellu
> On 9 Nov 2021, at 21:52, Stefano Stabellini wrote: > > On Tue, 9 Nov 2021, Jan Beulich wrote: >> On 09.11.2021 03:11, Stefano Stabellini wrote: >>> On Mon, 8 Nov 2021, Jan Beulich wrote: On 05.11.2021 16:33, Stefano Stabellini wrote: > My main concern is performance and resource uti

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-09 Thread Jan Beulich
On 09.11.2021 22:52, Stefano Stabellini wrote: > @@ -862,6 +856,7 @@ static int __init efi_check_dt_boot(EFI_LOADED_IMAGE > *loaded_image) > { > int chosen, node, addr_len, size_len; > unsigned int i = 0, modules_found = 0; > +CHAR16 *fname; > > /* Check for the chosen node i

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-09 Thread Julien Grall
Hi Stefano, On 09/11/2021 21:52, Stefano Stabellini wrote: On Tue, 9 Nov 2021, Jan Beulich wrote: On 09.11.2021 03:11, Stefano Stabellini wrote: On Mon, 8 Nov 2021, Jan Beulich wrote: On 05.11.2021 16:33, Stefano Stabellini wrote: My main concern is performance and resource utilization. With

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-09 Thread Stefano Stabellini
On Tue, 9 Nov 2021, Jan Beulich wrote: > On 09.11.2021 03:11, Stefano Stabellini wrote: > > On Mon, 8 Nov 2021, Jan Beulich wrote: > >> On 05.11.2021 16:33, Stefano Stabellini wrote: > >>> My main concern is performance and resource utilization. With v3 of the > >>> patch get_parent_handle will get

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-09 Thread Jan Beulich
On 09.11.2021 10:23, Luca Fancellu wrote: >> On 9 Nov 2021, at 02:11, Stefano Stabellini wrote: >> Should we have a global variable to keep the dir_handle open during >> dom0less module loading? > > I thought about a solution for that, here the changes, please not that I’ve > just built them, no

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-09 Thread Jan Beulich
On 09.11.2021 03:11, Stefano Stabellini wrote: > On Mon, 8 Nov 2021, Jan Beulich wrote: >> On 05.11.2021 16:33, Stefano Stabellini wrote: >>> My main concern is performance and resource utilization. With v3 of the >>> patch get_parent_handle will get called for every module to be loaded. >>> With d

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-09 Thread Luca Fancellu
> On 9 Nov 2021, at 02:11, Stefano Stabellini wrote: > > On Mon, 8 Nov 2021, Jan Beulich wrote: >> On 05.11.2021 16:33, Stefano Stabellini wrote: >>> On Fri, 5 Nov 2021, Jan Beulich wrote: On 04.11.2021 22:50, Stefano Stabellini wrote: > On Thu, 4 Nov 2021, Luca Fancellu wrote: >>

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-08 Thread Stefano Stabellini
On Mon, 8 Nov 2021, Jan Beulich wrote: > On 05.11.2021 16:33, Stefano Stabellini wrote: > > On Fri, 5 Nov 2021, Jan Beulich wrote: > >> On 04.11.2021 22:50, Stefano Stabellini wrote: > >>> On Thu, 4 Nov 2021, Luca Fancellu wrote: > > On 4 Nov 2021, at 21:35, Stefano Stabellini > > wrote:

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-07 Thread Jan Beulich
On 05.11.2021 16:33, Stefano Stabellini wrote: > On Fri, 5 Nov 2021, Jan Beulich wrote: >> On 04.11.2021 22:50, Stefano Stabellini wrote: >>> On Thu, 4 Nov 2021, Luca Fancellu wrote: > On 4 Nov 2021, at 21:35, Stefano Stabellini > wrote: > On Thu, 4 Nov 2021, Luca Fancellu wrote:

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-05 Thread Stefano Stabellini
On Fri, 5 Nov 2021, Jan Beulich wrote: > On 04.11.2021 22:50, Stefano Stabellini wrote: > > On Thu, 4 Nov 2021, Luca Fancellu wrote: > >>> On 4 Nov 2021, at 21:35, Stefano Stabellini > >>> wrote: > >>> On Thu, 4 Nov 2021, Luca Fancellu wrote: > > On 4 Nov 2021, at 20:56, Stefano Stabellini

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-05 Thread Jan Beulich
On 04.11.2021 22:50, Stefano Stabellini wrote: > On Thu, 4 Nov 2021, Luca Fancellu wrote: >>> On 4 Nov 2021, at 21:35, Stefano Stabellini wrote: >>> On Thu, 4 Nov 2021, Luca Fancellu wrote: > On 4 Nov 2021, at 20:56, Stefano Stabellini > wrote: > @@ -851,10 +853,14 @@ static int __in

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-05 Thread Jan Beulich
On 04.11.2021 22:43, Luca Fancellu wrote: > > >> On 4 Nov 2021, at 21:35, Stefano Stabellini wrote: >> >> On Thu, 4 Nov 2021, Luca Fancellu wrote: On 4 Nov 2021, at 20:56, Stefano Stabellini wrote: On Thu, 4 Nov 2021, Jan Beulich wrote: > On 04.11.2021 15:12, Luca Fancellu wr

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-05 Thread Jan Beulich
On 04.11.2021 21:56, Stefano Stabellini wrote: > On Thu, 4 Nov 2021, Jan Beulich wrote: >> On 04.11.2021 15:12, Luca Fancellu wrote: >>> --- a/xen/common/efi/boot.c >>> +++ b/xen/common/efi/boot.c >>> @@ -449,6 +449,15 @@ static EFI_FILE_HANDLE __init >>> get_parent_handle(EFI_LOADED_IMAGE *loaded

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Stefano Stabellini
On Thu, 4 Nov 2021, Luca Fancellu wrote: > > On 4 Nov 2021, at 21:35, Stefano Stabellini wrote: > > > > On Thu, 4 Nov 2021, Luca Fancellu wrote: > >>> On 4 Nov 2021, at 20:56, Stefano Stabellini > >>> wrote: > >>> > >>> On Thu, 4 Nov 2021, Jan Beulich wrote: > On 04.11.2021 15:12, Luca Fa

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Luca Fancellu
> On 4 Nov 2021, at 21:35, Stefano Stabellini wrote: > > On Thu, 4 Nov 2021, Luca Fancellu wrote: >>> On 4 Nov 2021, at 20:56, Stefano Stabellini wrote: >>> >>> On Thu, 4 Nov 2021, Jan Beulich wrote: On 04.11.2021 15:12, Luca Fancellu wrote: > --- a/xen/common/efi/boot.c > +++ b

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Stefano Stabellini
On Thu, 4 Nov 2021, Luca Fancellu wrote: > > On 4 Nov 2021, at 20:56, Stefano Stabellini wrote: > > > > On Thu, 4 Nov 2021, Jan Beulich wrote: > >> On 04.11.2021 15:12, Luca Fancellu wrote: > >>> --- a/xen/common/efi/boot.c > >>> +++ b/xen/common/efi/boot.c > >>> @@ -449,6 +449,15 @@ static EFI_F

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Luca Fancellu
> On 4 Nov 2021, at 20:56, Stefano Stabellini wrote: > > On Thu, 4 Nov 2021, Jan Beulich wrote: >> On 04.11.2021 15:12, Luca Fancellu wrote: >>> --- a/xen/common/efi/boot.c >>> +++ b/xen/common/efi/boot.c >>> @@ -449,6 +449,15 @@ static EFI_FILE_HANDLE __init >>> get_parent_handle(EFI_LOADED_

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Stefano Stabellini
On Thu, 4 Nov 2021, Jan Beulich wrote: > On 04.11.2021 15:12, Luca Fancellu wrote: > > --- a/xen/common/efi/boot.c > > +++ b/xen/common/efi/boot.c > > @@ -449,6 +449,15 @@ static EFI_FILE_HANDLE __init > > get_parent_handle(EFI_LOADED_IMAGE *loaded_image, > > CHAR16 *pathend, *ptr; > > E

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Stefano Stabellini
On Thu, 4 Nov 2021, Luca Fancellu wrote: > The code introduced by commit a1743fc3a9fe9b68c265c45264dddf214fd9b882 > ("arm/efi: Use dom0less configuration when using EFI boot") is > introducing a problem to boot Xen using Grub2 on ARM machine using EDK2. > > Despite UEFI specification, EDK2+Grub2 i

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Jan Beulich
On 04.11.2021 15:12, Luca Fancellu wrote: > --- a/xen/common/efi/boot.c > +++ b/xen/common/efi/boot.c > @@ -449,6 +449,15 @@ static EFI_FILE_HANDLE __init > get_parent_handle(EFI_LOADED_IMAGE *loaded_image, > CHAR16 *pathend, *ptr; > EFI_STATUS ret; > > +/* > + * Grub2 running

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Ian Jackson
Bertrand Marquis writes ("Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64"): > > On 4 Nov 2021, at 14:12, Luca Fancellu wrote: > > Fixes: a1743fc3a9 ("arm/efi: Use dom0less configuration when using EFI > > boot") > > Signed-off-by: Luca

Re: [PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Bertrand Marquis
Hi Luca, > On 4 Nov 2021, at 14:12, Luca Fancellu wrote: > > The code introduced by commit a1743fc3a9fe9b68c265c45264dddf214fd9b882 > ("arm/efi: Use dom0less configuration when using EFI boot") is > introducing a problem to boot Xen using Grub2 on ARM machine using EDK2. > > Despite UEFI specif

[PATCH-4.16 v2] xen/efi: Fix Grub2 boot on arm64

2021-11-04 Thread Luca Fancellu
The code introduced by commit a1743fc3a9fe9b68c265c45264dddf214fd9b882 ("arm/efi: Use dom0less configuration when using EFI boot") is introducing a problem to boot Xen using Grub2 on ARM machine using EDK2. Despite UEFI specification, EDK2+Grub2 is returning a NULL DeviceHandle inside the interfac