diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2009-01-23 11:26:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-23 12:55:28 -0500 |
commit | ff4ce8c332859508dc97826ab8b7f42bb9c212c9 (patch) | |
tree | 091c7d3adf9c045129b76c1757094dce7792cc08 /drivers/xen/balloon.c | |
parent | 42ef73fe134732b2e91c0326df5fd568da17c4b2 (diff) |
xen: handle highmem pages correctly when shrinking a domain
Commit 1058a75f07b9bb8323fb5197be5526220f8b75cf ("xen: actually release
memory when shrinking domain") causes a crash if the page being released
is a highmem page.
If a page is highmem then there is no need to unmap it.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r-- | drivers/xen/balloon.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 8069d520c460..2ba8f95516a0 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -299,10 +299,13 @@ static int decrease_reservation(unsigned long nr_pages) | |||
299 | 299 | ||
300 | scrub_page(page); | 300 | scrub_page(page); |
301 | 301 | ||
302 | ret = HYPERVISOR_update_va_mapping( | 302 | if (!PageHighMem(page)) { |
303 | (unsigned long)__va(pfn << PAGE_SHIFT), | 303 | ret = HYPERVISOR_update_va_mapping( |
304 | __pte_ma(0), 0); | 304 | (unsigned long)__va(pfn << PAGE_SHIFT), |
305 | BUG_ON(ret); | 305 | __pte_ma(0), 0); |
306 | BUG_ON(ret); | ||
307 | } | ||
308 | |||
306 | } | 309 | } |
307 | 310 | ||
308 | /* Ensure that ballooned highmem pages don't have kmaps. */ | 311 | /* Ensure that ballooned highmem pages don't have kmaps. */ |