[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <60d6242e12030c744ff88322b84d0aa586e2d43d.camel@intel.com>
Date: Wed, 13 Mar 2024 16:25:42 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "dongli.zhang@...cle.com"
<dongli.zhang@...cle.com>
CC: "pbonzini@...hat.com" <pbonzini@...hat.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "hao.p.peng@...ux.intel.com"
<hao.p.peng@...ux.intel.com>, "Yamahata, Isaku" <isaku.yamahata@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] KVM: x86/mmu: x86: Don't overflow lpage_info when
checking attributes
On Wed, 2024-03-13 at 02:49 -0700, Dongli Zhang wrote:
> The memslot id=10 has:
> - base_gfn=1048576
> - npages=1024
>
> Therefore, "level - 1 will not contain an entry for each GFN at page
> size
> level". If aligned, we expect lpage_info[0] to have 512 elements.
>
> 1GB: lpage_info[1] has 1 element
> 2MB: lpage_info[0] has 2 elemtnts
1048576 GFN is 2MB aligned, 1024 pages is also 2MB aligned. There are
512 4k pages in a 2MB huge page, so size of 2 for npages=1024 looks
right to me. One struct for each potential 2MB huge page in the range.
I think overall you are saying in this response that you didn't find
any problem in the analysis or fix. Is that correct?
Powered by blists - more mailing lists