Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-07 Thread Matt Fleming
On Fri, 2012-09-07 at 08:43 +0100, Jan Beulich wrote: > >>> On 06.09.12 at 17:47, Matt Fleming wrote: > > On Thu, 2012-09-06 at 15:34 +0100, Jan Beulich wrote: > >> >>> On 06.09.12 at 15:15, Matt Fleming wrote: > >> > + > >> > +pgd += i; > >> > +save[i] = *pgd; > >

Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-07 Thread Matt Fleming
On Fri, 2012-09-07 at 08:40 +0100, Jan Beulich wrote: > >>> On 06.09.12 at 19:07, "H. Peter Anvin" wrote: > > Anyone care to refresh my memory why we can't use the "global" > > 1:1+kernel map, possibly with some improvements (which would benefit the > > users of those maps too)? With that I mea

Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-07 Thread Jan Beulich
>>> On 06.09.12 at 17:47, Matt Fleming wrote: > On Thu, 2012-09-06 at 15:34 +0100, Jan Beulich wrote: >> >>> On 06.09.12 at 15:15, Matt Fleming wrote: >> > + >> > + pgd += i; >> > + save[i] = *pgd; >> > + set_pgd(pgd, efi_one_to_one_pgd[i]); >> > + } >> >> Did you, as

Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-07 Thread Jan Beulich
>>> On 06.09.12 at 19:07, "H. Peter Anvin" wrote: > Anyone care to refresh my memory why we can't use the "global" > 1:1+kernel map, possibly with some improvements (which would benefit the > users of those maps too)? With that I mean initial_page_map on i386 and > trampoline_pgd on x86-64...

Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-07 Thread Jan Beulich
>>> On 06.09.12 at 17:47, Matt Fleming wrote: > On Thu, 2012-09-06 at 15:34 +0100, Jan Beulich wrote: >> >>> On 06.09.12 at 15:15, Matt Fleming wrote: >> > + __flush_tlb_all(); >> >> Is it certain you will _never_ hit a global mapping (in which case I >> believe the above would be insufficient)

Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-06 Thread H. Peter Anvin
Anyone care to refresh my memory why we can't use the "global" 1:1+kernel map, possibly with some improvements (which would benefit the users of those maps too)? With that I mean initial_page_map on i386 and trampoline_pgd on x86-64... -hpa -- H. Peter Anvin, Intel Open Source Technol

Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-06 Thread Matt Fleming
On Thu, 2012-09-06 at 15:34 +0100, Jan Beulich wrote: > >>> On 06.09.12 at 15:15, Matt Fleming wrote: > > From: Matt Fleming > > > > Some firmware still needs a 1:1 (virt->phys) mapping even after we've > > called SetVirtualAddressMap(). So install the mapping alongside our > > existing kernel m

Re: [PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-06 Thread Jan Beulich
>>> On 06.09.12 at 15:15, Matt Fleming wrote: > From: Matt Fleming > > Some firmware still needs a 1:1 (virt->phys) mapping even after we've > called SetVirtualAddressMap(). So install the mapping alongside our > existing kernel mapping whenever we make EFI calls in virtual mode. > > This bug w

[PATCH] x86, efi: 1:1 pagetable mapping for virtual EFI calls

2012-09-06 Thread Matt Fleming
From: Matt Fleming Some firmware still needs a 1:1 (virt->phys) mapping even after we've called SetVirtualAddressMap(). So install the mapping alongside our existing kernel mapping whenever we make EFI calls in virtual mode. This bug was discovered on ASUS machines where the firmware implementat