diff options
Diffstat (limited to 'arch/x86/xen/mmu.c')
-rw-r--r-- | arch/x86/xen/mmu.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index f987bde77c49..3dd53f997b11 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1713,15 +1713,17 @@ static void __init xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1713 | void __init xen_setup_machphys_mapping(void) | 1713 | void __init xen_setup_machphys_mapping(void) |
1714 | { | 1714 | { |
1715 | struct xen_machphys_mapping mapping; | 1715 | struct xen_machphys_mapping mapping; |
1716 | unsigned long machine_to_phys_nr_ents; | ||
1717 | 1716 | ||
1718 | if (HYPERVISOR_memory_op(XENMEM_machphys_mapping, &mapping) == 0) { | 1717 | if (HYPERVISOR_memory_op(XENMEM_machphys_mapping, &mapping) == 0) { |
1719 | machine_to_phys_mapping = (unsigned long *)mapping.v_start; | 1718 | machine_to_phys_mapping = (unsigned long *)mapping.v_start; |
1720 | machine_to_phys_nr_ents = mapping.max_mfn + 1; | 1719 | machine_to_phys_nr = mapping.max_mfn + 1; |
1721 | } else { | 1720 | } else { |
1722 | machine_to_phys_nr_ents = MACH2PHYS_NR_ENTRIES; | 1721 | machine_to_phys_nr = MACH2PHYS_NR_ENTRIES; |
1723 | } | 1722 | } |
1724 | machine_to_phys_order = fls(machine_to_phys_nr_ents - 1); | 1723 | #ifdef CONFIG_X86_32 |
1724 | WARN_ON((machine_to_phys_mapping + (machine_to_phys_nr - 1)) | ||
1725 | < machine_to_phys_mapping); | ||
1726 | #endif | ||
1725 | } | 1727 | } |
1726 | 1728 | ||
1727 | #ifdef CONFIG_X86_64 | 1729 | #ifdef CONFIG_X86_64 |
@@ -1916,6 +1918,7 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot) | |||
1916 | # endif | 1918 | # endif |
1917 | #else | 1919 | #else |
1918 | case VSYSCALL_LAST_PAGE ... VSYSCALL_FIRST_PAGE: | 1920 | case VSYSCALL_LAST_PAGE ... VSYSCALL_FIRST_PAGE: |
1921 | case VVAR_PAGE: | ||
1919 | #endif | 1922 | #endif |
1920 | case FIX_TEXT_POKE0: | 1923 | case FIX_TEXT_POKE0: |
1921 | case FIX_TEXT_POKE1: | 1924 | case FIX_TEXT_POKE1: |
@@ -1956,7 +1959,8 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot) | |||
1956 | #ifdef CONFIG_X86_64 | 1959 | #ifdef CONFIG_X86_64 |
1957 | /* Replicate changes to map the vsyscall page into the user | 1960 | /* Replicate changes to map the vsyscall page into the user |
1958 | pagetable vsyscall mapping. */ | 1961 | pagetable vsyscall mapping. */ |
1959 | if (idx >= VSYSCALL_LAST_PAGE && idx <= VSYSCALL_FIRST_PAGE) { | 1962 | if ((idx >= VSYSCALL_LAST_PAGE && idx <= VSYSCALL_FIRST_PAGE) || |
1963 | idx == VVAR_PAGE) { | ||
1960 | unsigned long vaddr = __fix_to_virt(idx); | 1964 | unsigned long vaddr = __fix_to_virt(idx); |
1961 | set_pte_vaddr_pud(level3_user_vsyscall, vaddr, pte); | 1965 | set_pte_vaddr_pud(level3_user_vsyscall, vaddr, pte); |
1962 | } | 1966 | } |