KVM: MMU: Allow more than PAGES_PER_HPAGE write protections per large page
authorAvi Kivity <avi@qumranet.com>
Fri, 2 May 2008 10:23:10 +0000 (13:23 +0300)
committerAvi Kivity <avi@qumranet.com>
Sun, 4 May 2008 11:44:49 +0000 (14:44 +0300)
nonpae guests can call rmap_write_protect twice per page (for page tables)
or four times per page (for page directories), triggering a bogus warning.

Remove the warning.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/mmu.c

index d9344be36442481c2795b2b37f3d72298cda6191..36c5406b1813d4a5c3a52faff20b64a16e5ee54f 100644 (file)
@@ -376,7 +376,6 @@ static void account_shadowed(struct kvm *kvm, gfn_t gfn)
 
        write_count = slot_largepage_idx(gfn, gfn_to_memslot(kvm, gfn));
        *write_count += 1;
-       WARN_ON(*write_count > KVM_PAGES_PER_HPAGE);
 }
 
 static void unaccount_shadowed(struct kvm *kvm, gfn_t gfn)