Re: [PATCH 02/12] KVM: selftests: Extend vmx_set_nested_state_test to cover SVM

From: Yosry Ahmed
Date: Thu Oct 09 2025 - 19:13:30 EST


On Thu, Oct 09, 2025 at 03:40:44PM -0700, Jim Mattson wrote:
> On Wed, Oct 1, 2025 at 8:03 AM Yosry Ahmed <yosry.ahmed@xxxxxxxxx> wrote:
> >
> > From: Yosry Ahmed <yosryahmed@xxxxxxxxxx>
> >
> > Add test cases for the validation checks in svm_set_nested_state(), and
> > allow the test to run with SVM as well as VMX.
> >
> > Signed-off-by: Yosry Ahmed <yosry.ahmed@xxxxxxxxx>
> > ---
> > ...
> > + /* If EFER.SVME is clear, GIF must be set and guest mode is disallowed */
>
> The GIF constraint is not architected. See
> https://lore.kernel.org/kvm/20251009223153.3344555-2-jmattson@xxxxxxxxxx/.

Yes, I didn't connect our discussion about clearing GIF when EFER.SVME
is cleared to the nested state code. I will remove the GIF assertion in
the next version.

Thanks!