From: Avi Kivity Date: Sat, 6 Jan 2007 00:36:50 +0000 (-0800) Subject: [PATCH] KVM: MMU: If an empty shadow page is not empty, report more info X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=139bdb2d9e410d448281057a37b53770324ccac8;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] KVM: MMU: If an empty shadow page is not empty, report more info Signed-off-by: Avi Kivity Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) static int is_empty_shadow_page(hpa_t page_hpa) { - u32 *pos; - u32 *end; - for (pos = __va(page_hpa), end = pos + PAGE_SIZE / sizeof(u32); + u64 *pos; + u64 *end; + + for (pos = __va(page_hpa), end = pos + PAGE_SIZE / sizeof(u64); pos != end; pos++) - if (*pos != 0) + if (*pos != 0) { + printk(KERN_ERR "%s: %p %llx\n", __FUNCTION__, + pos, *pos); return 0; + } return 1; }