Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
xen.950
555b04bd-x86-EFI-sync-runtime-services-top-leve...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 555b04bd-x86-EFI-sync-runtime-services-top-level-page-tables.patch of Package xen.950
# Commit db83975f0fcd30370392ed288a7bd2420624ed4e # Date 2015-05-19 11:39:09 +0200 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> x86/EFI: keep EFI runtime services top level page tables up-to-date Updates to idle_pg_table[] need to be mirrored into the page tables used for invoking EFI runtime services. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> --- a/xen/arch/x86/efi/runtime.c +++ b/xen/arch/x86/efi/runtime.c @@ -4,6 +4,7 @@ #include <xen/guest_access.h> #include <xen/irq.h> #include <xen/time.h> +#include <asm/atomic.h> #include <asm/mc146818rtc.h> DEFINE_XEN_GUEST_HANDLE(CHAR16); @@ -45,6 +46,12 @@ l4_pgentry_t *__read_mostly efi_l4_pgtab const struct efi_pci_rom *__read_mostly efi_pci_roms; +void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t l4e) +{ + if ( efi_l4_pgtable ) + l4e_write(efi_l4_pgtable + l4idx, l4e); +} + unsigned long efi_rs_enter(void) { static const u16 fcw = FCW_DEFAULT; --- a/xen/arch/x86/efi/stub.c +++ b/xen/arch/x86/efi/stub.c @@ -2,6 +2,7 @@ #include <xen/errno.h> #include <xen/init.h> #include <xen/lib.h> +#include <asm/page.h> #ifndef efi_enabled const bool_t efi_enabled = 0; @@ -9,6 +10,8 @@ const bool_t efi_enabled = 0; void __init efi_init_memory(void) { } +void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t l4e) { } + paddr_t efi_rs_page_table(void) { BUG(); --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5286,7 +5286,10 @@ static l3_pgentry_t *virt_to_xen_l3e(uns spin_lock(&map_pgdir_lock); if ( !(l4e_get_flags(*pl4e) & _PAGE_PRESENT) ) { - l4e_write(pl4e, l4e_from_paddr(__pa(pl3e), __PAGE_HYPERVISOR)); + l4_pgentry_t l4e = l4e_from_paddr(__pa(pl3e), __PAGE_HYPERVISOR); + + l4e_write(pl4e, l4e); + efi_update_l4_pgtable(l4_table_offset(v), l4e); pl3e = NULL; } if ( locking ) --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -286,6 +286,7 @@ extern l2_pgentry_t l2_identmap[4*L2_PAG extern l1_pgentry_t l1_identmap[L1_PAGETABLE_ENTRIES], l1_fixmap[L1_PAGETABLE_ENTRIES]; void paging_init(void); +void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t); #endif /* !defined(__ASSEMBLY__) */ #define _PAGE_NONE _AC(0x000,U)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor