[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJhGHyDr6WH+yREd4=ua--c1BA7s5HNHLGJoPSSWAOAwECCZ+g@mail.gmail.com>
Date: Fri, 6 Jan 2023 09:45:37 +0800
From: Lai Jiangshan <jiangshanlai@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Lai Jiangshan <jiangshan.ljs@...group.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org
Subject: Re: [PATCH] kvm: x86/mmu: Remove FNAME(is_self_change_mapping)
On Tue, Dec 13, 2022 at 8:54 PM Lai Jiangshan <jiangshanlai@...il.com> wrote:
>
> From: Lai Jiangshan <jiangshan.ljs@...group.com>
>
> FNAME(is_self_change_mapping) has two functionalities.
>
> If the fault is on a huge page but at least one of the pagetable on
> the walk is also on the terminal huge page, disable the huge page
> mapping for the fault.
>
> If the fault is modifying at least one of the pagetable on the walk,
> set something to tell the emulator.
>
> The first functionality is much better handled by kvm_mmu_hugepage_adjust()
> now, and it has a defect that it blindly disables the huge page mapping
> rather than trying to reduce the size of the huge page first.
>
> Huang Hang reported that when a guest is writing to a 1G page, but
> only a 4K page is mapped because of the first functionality in a case
> in which we think a 2M page should be mapped. The 1G page includes
> a pagetable on the pagetable-walk, but the narrowed 2M page doesn't.
>
> To fix the problem, remove FNAME(is_self_change_mapping) for its first
> functionality is already and better handled by kvm_mmu_hugepage_adjust(),
> and re-implement the second functionality in FNAME(fetch).
>
> Reported-by: Huang Hang <hhuang@...ux.alibaba.com>
> Signed-off-by: Lai Jiangshan <jiangshan.ljs@...group.com>
> ---
Hello,
Ping.
Thanks
Lai
Powered by blists - more mailing lists