diff options
-rw-r--r-- | arch/x86/xen/enlighten.c | 3 | ||||
-rw-r--r-- | arch/x86/xen/p2m.c | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index eb0efc2f9d3c..23ead298edbd 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1488,8 +1488,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
1488 | x86_configure_nx(); | 1488 | x86_configure_nx(); |
1489 | 1489 | ||
1490 | /* Get mfn list */ | 1490 | /* Get mfn list */ |
1491 | if (!xen_feature(XENFEAT_auto_translated_physmap)) | 1491 | xen_build_dynamic_phys_to_machine(); |
1492 | xen_build_dynamic_phys_to_machine(); | ||
1493 | 1492 | ||
1494 | /* | 1493 | /* |
1495 | * Set up kernel GDT and segment registers, mainly so that | 1494 | * Set up kernel GDT and segment registers, mainly so that |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 2ae8699e8767..fb7ee0a4f9d0 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
@@ -280,6 +280,9 @@ void __ref xen_build_mfn_list_list(void) | |||
280 | { | 280 | { |
281 | unsigned long pfn; | 281 | unsigned long pfn; |
282 | 282 | ||
283 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
284 | return; | ||
285 | |||
283 | /* Pre-initialize p2m_top_mfn to be completely missing */ | 286 | /* Pre-initialize p2m_top_mfn to be completely missing */ |
284 | if (p2m_top_mfn == NULL) { | 287 | if (p2m_top_mfn == NULL) { |
285 | p2m_mid_missing_mfn = extend_brk(PAGE_SIZE, PAGE_SIZE); | 288 | p2m_mid_missing_mfn = extend_brk(PAGE_SIZE, PAGE_SIZE); |
@@ -346,10 +349,15 @@ void xen_setup_mfn_list_list(void) | |||
346 | /* Set up p2m_top to point to the domain-builder provided p2m pages */ | 349 | /* Set up p2m_top to point to the domain-builder provided p2m pages */ |
347 | void __init xen_build_dynamic_phys_to_machine(void) | 350 | void __init xen_build_dynamic_phys_to_machine(void) |
348 | { | 351 | { |
349 | unsigned long *mfn_list = (unsigned long *)xen_start_info->mfn_list; | 352 | unsigned long *mfn_list; |
350 | unsigned long max_pfn = min(MAX_DOMAIN_PAGES, xen_start_info->nr_pages); | 353 | unsigned long max_pfn; |
351 | unsigned long pfn; | 354 | unsigned long pfn; |
352 | 355 | ||
356 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
357 | return; | ||
358 | |||
359 | mfn_list = (unsigned long *)xen_start_info->mfn_list; | ||
360 | max_pfn = min(MAX_DOMAIN_PAGES, xen_start_info->nr_pages); | ||
353 | xen_max_p2m_pfn = max_pfn; | 361 | xen_max_p2m_pfn = max_pfn; |
354 | 362 | ||
355 | p2m_missing = extend_brk(PAGE_SIZE, PAGE_SIZE); | 363 | p2m_missing = extend_brk(PAGE_SIZE, PAGE_SIZE); |