lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aR-pxbAtS9J1mfxM@google.com>
Date: Thu, 20 Nov 2025 15:52:37 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Jim Mattson <jmattson@...gle.com>, kvm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 02/23] KVM: selftests: Extend vmx_set_nested_state_test
 to cover SVM

On Tue, Oct 21, 2025, Yosry Ahmed wrote:
> Add test cases for the validation checks in svm_set_nested_state(), and
> allow the test to run with SVM as well as VMX. The SVM test also makes
> sure that KVM_SET_NESTED_STATE accepts GIF being set or cleared if
> EFER.SVME is cleared, verifying a recently fixed bug where GIF was
> incorrectly expected to always be set when EFER.SVME is cleared.
> 
> Signed-off-by: Yosry Ahmed <yosry.ahmed@...ux.dev>
> ---
>  tools/testing/selftests/kvm/Makefile.kvm      |   2 +-
>  ...d_state_test.c => set_nested_state_test.c} | 125 ++++++++++++++++--
>  2 files changed, 116 insertions(+), 11 deletions(-)
>  rename tools/testing/selftests/kvm/x86/{vmx_set_nested_state_test.c => set_nested_state_test.c} (70%)
> 
> diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
> index b9279ce4eaab8..acfa22206e6f3 100644
> --- a/tools/testing/selftests/kvm/Makefile.kvm
> +++ b/tools/testing/selftests/kvm/Makefile.kvm
> @@ -100,6 +100,7 @@ TEST_GEN_PROGS_x86 += x86/set_sregs_test
>  TEST_GEN_PROGS_x86 += x86/smaller_maxphyaddr_emulation_test
>  TEST_GEN_PROGS_x86 += x86/smm_test
>  TEST_GEN_PROGS_x86 += x86/state_test
> +TEST_GEN_PROGS_x86 += x86/set_nested_state_test

Hmm, when you post this with the next version of the GIF fixes, I think it makes
sense to go with nested_set_state_test, so that we can bundle all the nested
tests together (selftests are often sorted alphabetically).

>  TEST_GEN_PROGS_x86 += x86/vmx_preemption_timer_test
>  TEST_GEN_PROGS_x86 += x86/svm_vmcall_test
>  TEST_GEN_PROGS_x86 += x86/svm_int_ctl_test
> @@ -116,7 +117,6 @@ TEST_GEN_PROGS_x86 += x86/vmx_dirty_log_test
>  TEST_GEN_PROGS_x86 += x86/vmx_exception_with_invalid_guest_state
>  TEST_GEN_PROGS_x86 += x86/vmx_msrs_test
>  TEST_GEN_PROGS_x86 += x86/vmx_invalid_nested_guest_state
> -TEST_GEN_PROGS_x86 += x86/vmx_set_nested_state_test
>  TEST_GEN_PROGS_x86 += x86/vmx_la57_nested_state_test
>  TEST_GEN_PROGS_x86 += x86/vmx_tsc_adjust_test
>  TEST_GEN_PROGS_x86 += x86/vmx_nested_tsc_scaling_test
> diff --git a/tools/testing/selftests/kvm/x86/vmx_set_nested_state_test.c b/tools/testing/selftests/kvm/x86/set_nested_state_test.c
> similarity index 70%
> rename from tools/testing/selftests/kvm/x86/vmx_set_nested_state_test.c
> rename to tools/testing/selftests/kvm/x86/set_nested_state_test.c
> index c4c400d2824c1..fe12fffacd2ec 100644
> --- a/tools/testing/selftests/kvm/x86/vmx_set_nested_state_test.c
> +++ b/tools/testing/selftests/kvm/x86/set_nested_state_test.c
> @@ -1,6 +1,6 @@
>  // SPDX-License-Identifier: GPL-2.0-only
>  /*
> - * vmx_set_nested_state_test
> + * set_nested_state_test

Just delete these comments, they're completely useless.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ