aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/xen/page.h3
-rw-r--r--arch/x86/xen/p2m.c25
-rw-r--r--arch/x86/xen/setup.c5
3 files changed, 2 insertions, 31 deletions
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h
index 8417ef7c3885..497f7d28c1d6 100644
--- a/arch/x86/include/asm/xen/page.h
+++ b/arch/x86/include/asm/xen/page.h
@@ -158,9 +158,6 @@ static inline unsigned long mfn_to_pfn_no_overrides(unsigned long mfn)
158 unsigned long pfn; 158 unsigned long pfn;
159 int ret; 159 int ret;
160 160
161 if (xen_feature(XENFEAT_auto_translated_physmap))
162 return mfn;
163
164 if (unlikely(mfn >= machine_to_phys_nr)) 161 if (unlikely(mfn >= machine_to_phys_nr))
165 return ~0; 162 return ~0;
166 163
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 276da636dd39..6083ba462f35 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -212,8 +212,7 @@ void __ref xen_build_mfn_list_list(void)
212 unsigned int level, topidx, mididx; 212 unsigned int level, topidx, mididx;
213 unsigned long *mid_mfn_p; 213 unsigned long *mid_mfn_p;
214 214
215 if (xen_feature(XENFEAT_auto_translated_physmap) || 215 if (xen_start_info->flags & SIF_VIRT_P2M_4TOOLS)
216 xen_start_info->flags & SIF_VIRT_P2M_4TOOLS)
217 return; 216 return;
218 217
219 /* Pre-initialize p2m_top_mfn to be completely missing */ 218 /* Pre-initialize p2m_top_mfn to be completely missing */
@@ -269,9 +268,6 @@ void __ref xen_build_mfn_list_list(void)
269 268
270void xen_setup_mfn_list_list(void) 269void xen_setup_mfn_list_list(void)
271{ 270{
272 if (xen_feature(XENFEAT_auto_translated_physmap))
273 return;
274
275 BUG_ON(HYPERVISOR_shared_info == &xen_dummy_shared_info); 271 BUG_ON(HYPERVISOR_shared_info == &xen_dummy_shared_info);
276 272
277 if (xen_start_info->flags & SIF_VIRT_P2M_4TOOLS) 273 if (xen_start_info->flags & SIF_VIRT_P2M_4TOOLS)
@@ -291,9 +287,6 @@ void __init xen_build_dynamic_phys_to_machine(void)
291{ 287{
292 unsigned long pfn; 288 unsigned long pfn;
293 289
294 if (xen_feature(XENFEAT_auto_translated_physmap))
295 return;
296
297 xen_p2m_addr = (unsigned long *)xen_start_info->mfn_list; 290 xen_p2m_addr = (unsigned long *)xen_start_info->mfn_list;
298 xen_p2m_size = ALIGN(xen_start_info->nr_pages, P2M_PER_PAGE); 291 xen_p2m_size = ALIGN(xen_start_info->nr_pages, P2M_PER_PAGE);
299 292
@@ -540,9 +533,6 @@ int xen_alloc_p2m_entry(unsigned long pfn)
540 unsigned long addr = (unsigned long)(xen_p2m_addr + pfn); 533 unsigned long addr = (unsigned long)(xen_p2m_addr + pfn);
541 unsigned long p2m_pfn; 534 unsigned long p2m_pfn;
542 535
543 if (xen_feature(XENFEAT_auto_translated_physmap))
544 return 0;
545
546 ptep = lookup_address(addr, &level); 536 ptep = lookup_address(addr, &level);
547 BUG_ON(!ptep || level != PG_LEVEL_4K); 537 BUG_ON(!ptep || level != PG_LEVEL_4K);
548 pte_pg = (pte_t *)((unsigned long)ptep & ~(PAGE_SIZE - 1)); 538 pte_pg = (pte_t *)((unsigned long)ptep & ~(PAGE_SIZE - 1));
@@ -640,9 +630,6 @@ unsigned long __init set_phys_range_identity(unsigned long pfn_s,
640 if (unlikely(pfn_s >= xen_p2m_size)) 630 if (unlikely(pfn_s >= xen_p2m_size))
641 return 0; 631 return 0;
642 632
643 if (unlikely(xen_feature(XENFEAT_auto_translated_physmap)))
644 return pfn_e - pfn_s;
645
646 if (pfn_s > pfn_e) 633 if (pfn_s > pfn_e)
647 return 0; 634 return 0;
648 635
@@ -660,10 +647,6 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn)
660 pte_t *ptep; 647 pte_t *ptep;
661 unsigned int level; 648 unsigned int level;
662 649
663 /* don't track P2M changes in autotranslate guests */
664 if (unlikely(xen_feature(XENFEAT_auto_translated_physmap)))
665 return true;
666
667 if (unlikely(pfn >= xen_p2m_size)) { 650 if (unlikely(pfn >= xen_p2m_size)) {
668 BUG_ON(mfn != INVALID_P2M_ENTRY); 651 BUG_ON(mfn != INVALID_P2M_ENTRY);
669 return true; 652 return true;
@@ -711,9 +694,6 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
711 int i, ret = 0; 694 int i, ret = 0;
712 pte_t *pte; 695 pte_t *pte;
713 696
714 if (xen_feature(XENFEAT_auto_translated_physmap))
715 return 0;
716
717 if (kmap_ops) { 697 if (kmap_ops) {
718 ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, 698 ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref,
719 kmap_ops, count); 699 kmap_ops, count);
@@ -756,9 +736,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,
756{ 736{
757 int i, ret = 0; 737 int i, ret = 0;
758 738
759 if (xen_feature(XENFEAT_auto_translated_physmap))
760 return 0;
761
762 for (i = 0; i < count; i++) { 739 for (i = 0; i < count; i++) {
763 unsigned long mfn = __pfn_to_mfn(page_to_pfn(pages[i])); 740 unsigned long mfn = __pfn_to_mfn(page_to_pfn(pages[i]));
764 unsigned long pfn = page_to_pfn(pages[i]); 741 unsigned long pfn = page_to_pfn(pages[i]);
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index c81046323ebc..ac55c02f98e9 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -340,8 +340,6 @@ static void __init xen_do_set_identity_and_remap_chunk(
340 340
341 WARN_ON(size == 0); 341 WARN_ON(size == 0);
342 342
343 BUG_ON(xen_feature(XENFEAT_auto_translated_physmap));
344
345 mfn_save = virt_to_mfn(buf); 343 mfn_save = virt_to_mfn(buf);
346 344
347 for (ident_pfn_iter = start_pfn, remap_pfn_iter = remap_pfn; 345 for (ident_pfn_iter = start_pfn, remap_pfn_iter = remap_pfn;
@@ -1024,8 +1022,7 @@ void __init xen_pvmmu_arch_setup(void)
1024void __init xen_arch_setup(void) 1022void __init xen_arch_setup(void)
1025{ 1023{
1026 xen_panic_handler_init(); 1024 xen_panic_handler_init();
1027 if (!xen_feature(XENFEAT_auto_translated_physmap)) 1025 xen_pvmmu_arch_setup();
1028 xen_pvmmu_arch_setup();
1029 1026
1030#ifdef CONFIG_ACPI 1027#ifdef CONFIG_ACPI
1031 if (!(xen_start_info->flags & SIF_INITDOMAIN)) { 1028 if (!(xen_start_info->flags & SIF_INITDOMAIN)) {