Skip to contentSkip to conversation

xen: handle highmem pages correctly when shrinking a domain

PATCH Applied Ian Campbell 2 participants 2 messages Jan 23, 2009 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

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.

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
diff -r 7f26a03c3e02 -r 70c0102ea4c1 drivers/xen/balloon.c
@@ -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. */
Applied
#1 lore raw
Quoted 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 -0800

xen: actually release memory when shrinking domain

If a page is highmem then there is no need to unmap it.

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