[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALMp9eQ-KnS-nEGFOvTjNJNOiayumQSiScHixCpPa23pnVBq8w@mail.gmail.com>
Date: Mon, 13 Oct 2025 11:52:36 -0700
From: Jim Mattson <jmattson@...gle.com>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Yosry Ahmed <yosryahmed@...gle.com>
Subject: Re: [PATCH 10/12] KVM: selftests: Move EPT-specific init outside nested_create_pte()
On Wed, Oct 1, 2025 at 8:06 AM Yosry Ahmed <yosry.ahmed@...ux.dev> wrote:
>
> From: Yosry Ahmed <yosryahmed@...gle.com>
>
> Refactor the EPT specific initialization into nested_ept_create_pte(),
> in preparation for making nested_create_pte() NPT-friendly.
>
> Signed-off-by: Yosry Ahmed <yosry.ahmed@...ux.dev>
> ---
> tools/testing/selftests/kvm/lib/x86/vmx.c | 71 ++++++++++++++---------
> 1 file changed, 43 insertions(+), 28 deletions(-)
>
> ...
> +
> + /*
> + * For now mark these as accessed and dirty because the only
> + * testcase we have needs that. Can be reconsidered later.
> + */
> + epte->accessed = *leaf;
> + epte->dirty = *leaf;
Not your change, but it seems strange to set the 'accessed' bit only
at the leaf. The CPU will set the 'accessed' bits from the PGD down as
it does the walk. So, to only have an accessed bit set on the leaf
requires the existence of some software agent to clear the higher
levels.
Reviewed-by: Jim Mattson <jmattson@...gle.com>
Powered by blists - more mailing lists