Re: [PATCH V2 4/7] KVM: X86/MMU: Activate special shadow pages and remove old logic

Lai Jiangshan
2022-05-26T09:15:30Z

On Tue, May 17, 2022 at 8:16 AM David Matlack <dmatlack@google.com> wrote:

>
> This comment does not explain why FNAME(fetch) might pass these values
> to allocate special shadow pages. How about adjust it to something like
> this:
>
> /*
> * Initialize the guest walker with default values. These values will
> * be used in cases where KVM shadows a guest page table structure
> * with more levels than what the guest. For example, KVM shadows
> * 2-level non-PAE guests with 3-level PAE paging.
> *
> * Note, the gfn is technically ignored for these special shadow
> * pages, but it's more consistent to always pass 0 to
> * kvm_mmu_get_page().
> */

The comment is copied into V3 with slightly changed.

>
> > + for (i = 2; i < PT_MAX_FULL_LEVELS; i++) {
>
> s/2/PT32_ROOT_LEVEL/
>

Did in v3

Thanks
Lai