From 028c503497b9676cdcc7387811dbe72135abac07 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 3 Oct 2012 12:17:50 +0100 Subject: [PATCH] --- yaml --- r: 343430 b: refs/heads/master c: c2374bf57e7861039bb129ead538515502ef7860 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/xen/Kconfig | 1 + trunk/drivers/xen/Kconfig | 3 +++ trunk/drivers/xen/balloon.c | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 5ecb5bda1e00..84d855037064 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d71f513985c22f1050295d1a7e4327cf9fb060da +refs/heads/master: c2374bf57e7861039bb129ead538515502ef7860 diff --git a/trunk/arch/x86/xen/Kconfig b/trunk/arch/x86/xen/Kconfig index fdce49c7aff6..c31ee77e1ec1 100644 --- a/trunk/arch/x86/xen/Kconfig +++ b/trunk/arch/x86/xen/Kconfig @@ -6,6 +6,7 @@ config XEN bool "Xen guest support" select PARAVIRT select PARAVIRT_CLOCK + select XEN_HAVE_PVMMU depends on X86_64 || (X86_32 && X86_PAE && !X86_VISWS) depends on X86_CMPXCHG && X86_TSC help diff --git a/trunk/drivers/xen/Kconfig b/trunk/drivers/xen/Kconfig index 126d8ce591ce..cabfa97f4674 100644 --- a/trunk/drivers/xen/Kconfig +++ b/trunk/drivers/xen/Kconfig @@ -206,4 +206,7 @@ config XEN_MCE_LOG Allow kernel fetching MCE error from Xen platform and converting it into Linux mcelog format for mcelog tools +config XEN_HAVE_PVMMU + bool + endmenu diff --git a/trunk/drivers/xen/balloon.c b/trunk/drivers/xen/balloon.c index d6886d90ccfd..a56776dbe095 100644 --- a/trunk/drivers/xen/balloon.c +++ b/trunk/drivers/xen/balloon.c @@ -359,6 +359,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages) set_phys_to_machine(pfn, frame_list[i]); +#ifdef CONFIG_XEN_HAVE_PVMMU /* Link back into the page tables if not highmem. */ if (xen_pv_domain() && !PageHighMem(page)) { int ret; @@ -368,6 +369,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages) 0); BUG_ON(ret); } +#endif /* Relinquish the page back to the allocator. */ ClearPageReserved(page); @@ -416,13 +418,14 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) scrub_page(page); +#ifdef CONFIG_XEN_HAVE_PVMMU if (xen_pv_domain() && !PageHighMem(page)) { ret = HYPERVISOR_update_va_mapping( (unsigned long)__va(pfn << PAGE_SHIFT), __pte_ma(0), 0); BUG_ON(ret); } - +#endif } /* Ensure that ballooned highmem pages don't have kmaps. */