RE: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-06 Thread Prakhya, Sai Praneeth
> >> I agree. Keep it simple. If the EFI crap fails, then assist with the > >> reboot and otherwise just kill it. > > > > The reasons for saving old memory map are (in my view, these are the > > less important ones because they are very unlikely to happen) > > > > 1. Make sure that a memory

Re: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-06 Thread Ard Biesheuvel
On 5 September 2018 at 19:53, Prakhya, Sai Praneeth wrote: >> On Wed, 5 Sep 2018, Ard Biesheuvel wrote: >> > On 5 September 2018 at 14:56, Peter Zijlstra wrote: >> > > On Wed, Sep 05, 2018 at 02:27:49PM +0200, Ard Biesheuvel wrote: >> > >> Would we still need to preserve the old memory map in

RE: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-05 Thread Prakhya, Sai Praneeth
> On Wed, 5 Sep 2018, Ard Biesheuvel wrote: > > On 5 September 2018 at 14:56, Peter Zijlstra wrote: > > > On Wed, Sep 05, 2018 at 02:27:49PM +0200, Ard Biesheuvel wrote: > > >> Would we still need to preserve the old memory map in that case? > > > > > > I thought the reason for having this was

Re: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-05 Thread Thomas Gleixner
On Wed, 5 Sep 2018, Ard Biesheuvel wrote: > On 5 September 2018 at 14:56, Peter Zijlstra wrote: > > On Wed, Sep 05, 2018 at 02:27:49PM +0200, Ard Biesheuvel wrote: > >> Would we still need to preserve the old memory map in that case? > > > > I thought the reason for having this was being able to

Re: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-05 Thread Ard Biesheuvel
On 5 September 2018 at 14:56, Peter Zijlstra wrote: > On Wed, Sep 05, 2018 at 02:27:49PM +0200, Ard Biesheuvel wrote: >> On 5 September 2018 at 00:12, Sai Praneeth Prakhya >> wrote: >> > From: Sai Praneeth >> > >> > The efi page fault handler that recovers from page faults caused by the >> >

Re: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-05 Thread Peter Zijlstra
On Wed, Sep 05, 2018 at 02:27:49PM +0200, Ard Biesheuvel wrote: > On 5 September 2018 at 00:12, Sai Praneeth Prakhya > wrote: > > From: Sai Praneeth > > > > The efi page fault handler that recovers from page faults caused by the > > firmware needs the original memory map passed by the firmware.

Re: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-05 Thread Ard Biesheuvel
On 5 September 2018 at 00:12, Sai Praneeth Prakhya wrote: > From: Sai Praneeth > > The efi page fault handler that recovers from page faults caused by the > firmware needs the original memory map passed by the firmware. It looks > up this memory map to find the type of the memory region at which

Re: [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware

2018-09-05 Thread Peter Zijlstra
On Tue, Sep 04, 2018 at 03:12:27PM -0700, Sai Praneeth Prakhya wrote: > +void __init efi_save_original_memmap(void) > +{ > + efi_memory_desc_t *md; > + void *remapped_phys, *new_md; > + phys_addr_t new_phys, new_size; > + > + new_size = efi.memmap.desc_size * efi.memmap.nr_map; > +