Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-20 Thread Roger Pau Monné
On Wed, Aug 19, 2020 at 01:33:39PM +0200, Norbert Kaminski wrote: > > On 19.08.2020 10:19, Roger Pau Monné wrote: > > On Tue, Aug 18, 2020 at 08:40:18PM +0200, Marek Marczykowski-Górecki wrote: > > > On Tue, Aug 18, 2020 at 07:21:14PM +0200, Roger Pau Monné wrote: > > > > > Let me draw the

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-20 Thread Marek Marczykowski-Górecki
On Thu, Aug 20, 2020 at 11:30:25AM +0200, Roger Pau Monné wrote: > Right, so you only need access to the ESRT table, that's all. Then I > think we need to make sure Xen doesn't use this memory for anything > else, which will require some changes in Xen (or at least some > checks?). > > We also

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-20 Thread Ard Biesheuvel
On Thu, 20 Aug 2020 at 11:30, Roger Pau Monné wrote: > > On Wed, Aug 19, 2020 at 01:33:39PM +0200, Norbert Kaminski wrote: > > > > On 19.08.2020 10:19, Roger Pau Monné wrote: > > > On Tue, Aug 18, 2020 at 08:40:18PM +0200, Marek Marczykowski-Górecki > > > wrote: > > > > On Tue, Aug 18, 2020 at

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-20 Thread Roger Pau Monné
On Thu, Aug 20, 2020 at 11:34:54AM +0200, Marek Marczykowski-Górecki wrote: > On Thu, Aug 20, 2020 at 11:30:25AM +0200, Roger Pau Monné wrote: > > Right, so you only need access to the ESRT table, that's all. Then I > > think we need to make sure Xen doesn't use this memory for anything > > else,

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-19 Thread Norbert Kaminski
On 19.08.2020 10:19, Roger Pau Monné wrote: On Tue, Aug 18, 2020 at 08:40:18PM +0200, Marek Marczykowski-Górecki wrote: On Tue, Aug 18, 2020 at 07:21:14PM +0200, Roger Pau Monné wrote: Let me draw the picture from the beginning. Thanks, greatly appreciated. EFI memory map contains various

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-19 Thread Roger Pau Monné
On Tue, Aug 18, 2020 at 08:40:18PM +0200, Marek Marczykowski-Górecki wrote: > On Tue, Aug 18, 2020 at 07:21:14PM +0200, Roger Pau Monné wrote: > > > Let me draw the picture from the beginning. > > > > Thanks, greatly appreciated. > > > > > EFI memory map contains various memory regions. Some of

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-19 Thread Jan Beulich
On 18.08.2020 14:47, Roger Pau Monné wrote: > On Tue, Aug 18, 2020 at 02:01:35PM +0200, Marek Marczykowski-Górecki wrote: >> On Mon, Aug 17, 2020 at 11:00:13AM +0200, Roger Pau Monné wrote: >>> On Sun, Aug 16, 2020 at 02:19:49AM +0200, Marek Marczykowski-Górecki wrote: In case of Xen PV dom0,

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
On Tue, Aug 18, 2020 at 07:21:14PM +0200, Roger Pau Monné wrote: > > Let me draw the picture from the beginning. > > Thanks, greatly appreciated. > > > EFI memory map contains various memory regions. Some of them are marked > > as not needed after ExitBootServices() call (done in Xen before > >

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Roger Pau Monné
On Tue, Aug 18, 2020 at 05:00:20PM +0200, Marek Marczykowski-Górecki wrote: > On Tue, Aug 18, 2020 at 02:47:10PM +0200, Roger Pau Monné wrote: > > On Tue, Aug 18, 2020 at 02:01:35PM +0200, Marek Marczykowski-Górecki wrote: > > > Do you mean PV dom0 should receive full EFI memory map? Jan already >

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
On Tue, Aug 18, 2020 at 02:47:10PM +0200, Roger Pau Monné wrote: > On Tue, Aug 18, 2020 at 02:01:35PM +0200, Marek Marczykowski-Górecki wrote: > > Do you mean PV dom0 should receive full EFI memory map? Jan already > > objected this as it would be a layering violation. > > dom0 is already capable

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Roger Pau Monné
On Tue, Aug 18, 2020 at 02:01:35PM +0200, Marek Marczykowski-Górecki wrote: > On Mon, Aug 17, 2020 at 11:00:13AM +0200, Roger Pau Monné wrote: > > On Sun, Aug 16, 2020 at 02:19:49AM +0200, Marek Marczykowski-Górecki wrote: > > > In case of Xen PV dom0, Xen passes along info about system tables

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
On Mon, Aug 17, 2020 at 11:00:13AM +0200, Roger Pau Monné wrote: > On Sun, Aug 16, 2020 at 02:19:49AM +0200, Marek Marczykowski-Górecki wrote: > > In case of Xen PV dom0, Xen passes along info about system tables (see > > arch/x86/xen/efi.c), but not the memory map from EFI. > > I think that's

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
On Mon, Aug 17, 2020 at 10:16:07AM +0200, Ard Biesheuvel wrote: > > @@ -331,7 +333,8 @@ void __init efi_esrt_init(void) > > > > end = esrt_data + size; > > pr_info("Reserving ESRT space from %pa to %pa.\n", _data, > > ); > > - if (md.type == EFI_BOOT_SERVICES_DATA) > > + > >

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-17 Thread Roger Pau Monné
On Sun, Aug 16, 2020 at 02:19:49AM +0200, Marek Marczykowski-Górecki wrote: > In case of Xen PV dom0, Xen passes along info about system tables (see > arch/x86/xen/efi.c), but not the memory map from EFI. I think that's because the memory map returned by XENMEM_machine_memory_map is in e820 form,

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-17 Thread Ard Biesheuvel
Hi Marek, On Sun, 16 Aug 2020 at 02:20, Marek Marczykowski-Górecki wrote: > > In case of Xen PV dom0, Xen passes along info about system tables (see > arch/x86/xen/efi.c), but not the memory map from EFI. This makes sense > as it is Xen responsible for managing physical memory address space. >

[PATCH] efi: discover ESRT table on Xen PV too

2020-08-15 Thread Marek Marczykowski-Górecki
In case of Xen PV dom0, Xen passes along info about system tables (see arch/x86/xen/efi.c), but not the memory map from EFI. This makes sense as it is Xen responsible for managing physical memory address space. In this case, it doesn't make sense to condition using ESRT table on availability of