]> xenbits.xensource.com Git - xen.git/commit
x86: fix map_domain_page() last resort fallback
authorJan Beulich <jbeulich@suse.com>
Thu, 13 Jun 2013 08:49:01 +0000 (10:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 13 Jun 2013 08:49:01 +0000 (10:49 +0200)
commit61c6dfce3296da2643c4c4f90eaab6fa3c1cf8b3
tree9d6e3618cdb7a48691ea3edd7083af0c4ed183df
parentfd0b06689555be4855b9a70c4f4995e623168e94
x86: fix map_domain_page() last resort fallback

Guests with vCPU count not divisible by 4 have unused bits in the last
word of their inuse bitmap, and the garbage collection code therefore
would get mislead believing that some entries were actually recoverable
for use.

Also use an earlier established local variable in mapcache_vcpu_init()
instead of re-calculating the value (noticed while investigating the
generally better option of setting those overhanging bits once during
setup - this didn't work out in a simple enough fashion because the
mapping getting established there isn't in the current address space,
and hence the bitmap isn't directly accessible there).

Reported-by: Konrad Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/domain_page.c