From: Avi Kivity Date: Fri, 9 Mar 2007 11:04:31 +0000 (+0200) Subject: KVM: MMU: Fix host memory corruption on i386 with >= 4GB ram X-Git-Tag: v2.6.21-rc5~66^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27aba76615eeb36af84118e8ea6d35ffa51fd1e3;p=pandora-kernel.git KVM: MMU: Fix host memory corruption on i386 with >= 4GB ram PAGE_MASK is an unsigned long, so using it to mask physical addresses on i386 (which are 64-bit wide) leads to truncation. This can result in page->private of unrelated memory pages being modified, with disasterous results. Fix by not using PAGE_MASK for physical addresses; instead calculate the correct value directly from PAGE_SIZE. Also fix a similar BUG_ON(). Acked-by: Ingo Molnar Signed-off-by: Avi Kivity --- Reading git-diff-tree failed