xen: handle highmem pages correctly when shrinking a domain
PATCH 1/1 xen: handle highmem pages correctly when shrinking a domain
This commit causes a crash if the page being released is a highmem page.
commit 1058a75f07b9bb8323fb5197be5526220f8b75cf
Author: Dan Magenheimer <[email protected]>
Date: Thu Jan 22 14:36:08 2009 -0800
xen: actually release memory when shrinking domain
If a page is highmem then there is no need to unmap it.
Signed-off-by Ian Campbell <[email protected]>
Cc Jeremy Fitzhardinge <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Xen-devel <[email protected]>
Cc Stable Kernel <[email protected]>
--- drivers/xen/balloon.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/xen/balloon.c +7 -4
@@ -292,10 +292,13 @@scrub_page (page); - ret =HYPERVISOR_update_va_mapping ( - (unsigned long )__va (pfn <<PAGE_SHIFT ), -__pte_ma (0 ),0 ); -BUG_ON (ret); +if (!PageHighMem (page)) { + ret =HYPERVISOR_update_va_mapping ( + (unsigned long )__va (pfn <<PAGE_SHIFT ), +__pte_ma (0 ),0 ); +BUG_ON (ret); + } + }/* Ensure that ballooned highmem pages don't have kmaps. */
Ingo Molnar
AppliedQuoted 17 lines · Ian Campbell
This commit causes a crash if the page being released is a highmem page.
commit
1058a75f07b9bb8323fb5197be5526220f8b75cf
Author: Dan Magenheimer <[email protected]>
Date: Thu Jan 22 14:36:08 2009 -0800xen: actually release memory when shrinking domain
If a page is highmem then there is no need to unmap it.
Signed-off-by Ian Campbell <[email protected]>Cc Jeremy Fitzhardinge <[email protected]>Cc Ingo Molnar <[email protected]>Cc Xen-devel <[email protected]>Cc Stable Kernel <[email protected]>
Quoted 3 lines
--- drivers/xen/balloon.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
Applied to tip/x86/urgent, thanks Ian!
Ingo