From: Avi Kivity Date: Fri, 2 May 2008 10:23:10 +0000 (+0300) Subject: KVM: MMU: Allow more than PAGES_PER_HPAGE write protections per large page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93df766322ba1db2801e4b826985a4932dd75866;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git KVM: MMU: Allow more than PAGES_PER_HPAGE write protections per large page 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 --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index d9344be36442..36c5406b1813 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -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)