aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/Kconfig3
-rw-r--r--drivers/xen/balloon.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 126d8ce591ce..cabfa97f4674 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -206,4 +206,7 @@ config XEN_MCE_LOG
206 Allow kernel fetching MCE error from Xen platform and 206 Allow kernel fetching MCE error from Xen platform and
207 converting it into Linux mcelog format for mcelog tools 207 converting it into Linux mcelog format for mcelog tools
208 208
209config XEN_HAVE_PVMMU
210 bool
211
209endmenu 212endmenu
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index d6886d90ccfd..a56776dbe095 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -359,6 +359,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages)
359 359
360 set_phys_to_machine(pfn, frame_list[i]); 360 set_phys_to_machine(pfn, frame_list[i]);
361 361
362#ifdef CONFIG_XEN_HAVE_PVMMU
362 /* Link back into the page tables if not highmem. */ 363 /* Link back into the page tables if not highmem. */
363 if (xen_pv_domain() && !PageHighMem(page)) { 364 if (xen_pv_domain() && !PageHighMem(page)) {
364 int ret; 365 int ret;
@@ -368,6 +369,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages)
368 0); 369 0);
369 BUG_ON(ret); 370 BUG_ON(ret);
370 } 371 }
372#endif
371 373
372 /* Relinquish the page back to the allocator. */ 374 /* Relinquish the page back to the allocator. */
373 ClearPageReserved(page); 375 ClearPageReserved(page);
@@ -416,13 +418,14 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
416 418
417 scrub_page(page); 419 scrub_page(page);
418 420
421#ifdef CONFIG_XEN_HAVE_PVMMU
419 if (xen_pv_domain() && !PageHighMem(page)) { 422 if (xen_pv_domain() && !PageHighMem(page)) {
420 ret = HYPERVISOR_update_va_mapping( 423 ret = HYPERVISOR_update_va_mapping(
421 (unsigned long)__va(pfn << PAGE_SHIFT), 424 (unsigned long)__va(pfn << PAGE_SHIFT),
422 __pte_ma(0), 0); 425 __pte_ma(0), 0);
423 BUG_ON(ret); 426 BUG_ON(ret);
424 } 427 }
425 428#endif
426 } 429 }
427 430
428 /* Ensure that ballooned highmem pages don't have kmaps. */ 431 /* Ensure that ballooned highmem pages don't have kmaps. */