Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xen/x86: adjust xen_set_fixmap()

Using __native_set_fixmap() here means guaranteed trap-and-emulate
instances the hypervisor has to deal with. Since the virtual address
covered by the to be adjusted page table entry is easy to determine (and
actually already gets obtained in a special case), simply use an
available, easy to invoke hypercall instead.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/11fcaea2-ec17-3edd-ecdf-4cdd2d472bd0@suse.com
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

authored by

Jan Beulich and committed by
Boris Ostrovsky
4c360db6 cae73951

+5 -4
+5 -4
arch/x86/xen/mmu_pv.c
··· 2011 2011 static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot) 2012 2012 { 2013 2013 pte_t pte; 2014 + unsigned long vaddr; 2014 2015 2015 2016 phys >>= PAGE_SHIFT; 2016 2017 ··· 2052 2051 break; 2053 2052 } 2054 2053 2055 - __native_set_fixmap(idx, pte); 2054 + vaddr = __fix_to_virt(idx); 2055 + if (HYPERVISOR_update_va_mapping(vaddr, pte, UVMF_INVLPG)) 2056 + BUG(); 2056 2057 2057 2058 #ifdef CONFIG_X86_VSYSCALL_EMULATION 2058 2059 /* Replicate changes to map the vsyscall page into the user 2059 2060 pagetable vsyscall mapping. */ 2060 - if (idx == VSYSCALL_PAGE) { 2061 - unsigned long vaddr = __fix_to_virt(idx); 2061 + if (idx == VSYSCALL_PAGE) 2062 2062 set_pte_vaddr_pud(level3_user_vsyscall, vaddr, pte); 2063 - } 2064 2063 #endif 2065 2064 } 2066 2065