aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index c8a56e457d61..0ad8a64a2e05 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -960,6 +960,33 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf,
960 return ret; 960 return ret;
961} 961}
962 962
963static void xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot)
964{
965 pte_t pte;
966
967 phys >>= PAGE_SHIFT;
968
969 switch (idx) {
970 case FIX_BTMAP_END ... FIX_BTMAP_BEGIN:
971#ifdef CONFIG_X86_F00F_BUG
972 case FIX_F00F_IDT:
973#endif
974 case FIX_WP_TEST:
975 case FIX_VDSO:
976#ifdef CONFIG_X86_LOCAL_APIC
977 case FIX_APIC_BASE: /* maps dummy local APIC */
978#endif
979 pte = pfn_pte(phys, prot);
980 break;
981
982 default:
983 pte = mfn_pte(phys, prot);
984 break;
985 }
986
987 __native_set_fixmap(idx, pte);
988}
989
963static const struct pv_info xen_info __initdata = { 990static const struct pv_info xen_info __initdata = {
964 .paravirt_enabled = 1, 991 .paravirt_enabled = 1,
965 .shared_kernel_pmd = 0, 992 .shared_kernel_pmd = 0,
@@ -1112,6 +1139,8 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
1112 .enter = paravirt_enter_lazy_mmu, 1139 .enter = paravirt_enter_lazy_mmu,
1113 .leave = xen_leave_lazy, 1140 .leave = xen_leave_lazy,
1114 }, 1141 },
1142
1143 .set_fixmap = xen_set_fixmap,
1115}; 1144};
1116 1145
1117#ifdef CONFIG_SMP 1146#ifdef CONFIG_SMP