Re: [PATCH] KVM: x86/mmu: x86: Don't overflow lpage_info when checking attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux