aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-01-05 19:36:50 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-06 02:55:26 -0500
commit139bdb2d9e410d448281057a37b53770324ccac8 (patch)
tree35bd78df2e50b008e4dfb9477336bacb75b06252
parent5f1e0b6abcc100a79528387207adc3dd92aa5374 (diff)
[PATCH] KVM: MMU: If an empty shadow page is not empty, report more info
Signed-off-by: Avi Kivity <avi@qumranet.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/kvm/mmu.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index b9ba240144b7..8cf3688f7e70 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -305,12 +305,16 @@ static void rmap_write_protect(struct kvm *kvm, u64 gfn)
305 305
306static int is_empty_shadow_page(hpa_t page_hpa) 306static int is_empty_shadow_page(hpa_t page_hpa)
307{ 307{
308 u32 *pos; 308 u64 *pos;
309 u32 *end; 309 u64 *end;
310 for (pos = __va(page_hpa), end = pos + PAGE_SIZE / sizeof(u32); 310
311 for (pos = __va(page_hpa), end = pos + PAGE_SIZE / sizeof(u64);
311 pos != end; pos++) 312 pos != end; pos++)
312 if (*pos != 0) 313 if (*pos != 0) {
314 printk(KERN_ERR "%s: %p %llx\n", __FUNCTION__,
315 pos, *pos);
313 return 0; 316 return 0;
317 }
314 return 1; 318 return 1;
315} 319}
316 320