Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen: balloon: allow PVMMU interfaces to be compiled out

The ARM platform has no concept of PVMMU and therefor no
HYPERVISOR_update_va_mapping et al. Allow this code to be compiled out
when not required.

In some similar situations (e.g. P2M) we have defined dummy functions
to avoid this, however I think we can/should draw the line at dummying
out actual hypercalls.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

+8 -1
+1
arch/x86/xen/Kconfig
··· 6 6 bool "Xen guest support" 7 7 select PARAVIRT 8 8 select PARAVIRT_CLOCK 9 + select XEN_HAVE_PVMMU 9 10 depends on X86_64 || (X86_32 && X86_PAE && !X86_VISWS) 10 11 depends on X86_CMPXCHG && X86_TSC 11 12 help
+3
drivers/xen/Kconfig
··· 206 206 Allow kernel fetching MCE error from Xen platform and 207 207 converting it into Linux mcelog format for mcelog tools 208 208 209 + config XEN_HAVE_PVMMU 210 + bool 211 + 209 212 endmenu
+4 -1
drivers/xen/balloon.c
··· 359 359 360 360 set_phys_to_machine(pfn, frame_list[i]); 361 361 362 + #ifdef CONFIG_XEN_HAVE_PVMMU 362 363 /* Link back into the page tables if not highmem. */ 363 364 if (xen_pv_domain() && !PageHighMem(page)) { 364 365 int ret; ··· 369 368 0); 370 369 BUG_ON(ret); 371 370 } 371 + #endif 372 372 373 373 /* Relinquish the page back to the allocator. */ 374 374 ClearPageReserved(page); ··· 418 416 419 417 scrub_page(page); 420 418 419 + #ifdef CONFIG_XEN_HAVE_PVMMU 421 420 if (xen_pv_domain() && !PageHighMem(page)) { 422 421 ret = HYPERVISOR_update_va_mapping( 423 422 (unsigned long)__va(pfn << PAGE_SHIFT), 424 423 __pte_ma(0), 0); 425 424 BUG_ON(ret); 426 425 } 427 - 426 + #endif 428 427 } 429 428 430 429 /* Ensure that ballooned highmem pages don't have kmaps. */