[PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Ard Biesheuvel
KVM guests on ARM have special requirements when it comes to mapping framebuffers: given that the host [emulating the framebuffer] uses cacheable accesses to read from the framebuffer region, the guest should uses cacheable accesses as well, or coherency is lost, i.e., the host does not see what

[PATCH 1/2] efi: drop type and attribute checks in efi_mem_desc_lookup()

2018-06-15 Thread Ard Biesheuvel
The current implementation of efi_mem_desc_lookup() includes the following check on the memory descriptor it returns: if (!(md->attribute & EFI_MEMORY_RUNTIME) && md->type != EFI_BOOT_SERVICES_DATA && md->type != EFI_RUNTIME_SERVICES_DATA) { continue; } This

[PATCH 2/2] fbdev/efifb: honour UEFI memory map attributes when mapping the fb

2018-06-15 Thread Ard Biesheuvel
If the framebuffer address provided by the Graphics Output Protocol (GOP) is covered by the UEFI memory map, it will tell us which memory attributes are permitted when mapping this region. In some cases, (KVM guest on ARM), violating this will result in loss of coherency, which means that updates

Re: [PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Ard Biesheuvel
On 15 June 2018 at 14:37, Laszlo Ersek wrote: > On 06/15/18 12:48, Ard Biesheuvel wrote: >> KVM guests on ARM have special requirements when it comes to mapping >> framebuffers: given that the host [emulating the framebuffer] uses >> cacheable accesses to read from the framebuffer region, the

Re: [PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Laszlo Ersek
On 06/15/18 12:48, Ard Biesheuvel wrote: > KVM guests on ARM have special requirements when it comes to mapping > framebuffers: given that the host [emulating the framebuffer] uses > cacheable accesses to read from the framebuffer region, the guest > should uses cacheable accesses as well, or

Re: [PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Ard Biesheuvel
On 15 June 2018 at 18:38, Laszlo Ersek wrote: > On 06/15/18 12:48, Ard Biesheuvel wrote: >> KVM guests on ARM have special requirements when it comes to mapping >> framebuffers: given that the host [emulating the framebuffer] uses >> cacheable accesses to read from the framebuffer region, the

Re: [PATCH 0/2] efi: add support for cacheable efifb mappings

2018-06-15 Thread Laszlo Ersek
On 06/15/18 12:48, Ard Biesheuvel wrote: > KVM guests on ARM have special requirements when it comes to mapping > framebuffers: given that the host [emulating the framebuffer] uses > cacheable accesses to read from the framebuffer region, the guest > should uses cacheable accesses as well, or

[PATCH] x86/efi: Free allocated memory if remap fails

2018-06-15 Thread Sai Praneeth Prakhya
From: Sai Praneeth efi_memmap_alloc(), as the name suggests, allocates memory for a new efi memory map. It's referenced from couple of places, namely, efi_arch_mem_reserve() and efi_free_boot_services(). These callers, after allocating memory, remap it for further use. As usual, a routine check