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: <c3e638e9-631f-47af-b0d2-06cea949ec1e@amd.com>
Date: Wed, 20 Aug 2025 10:23:09 +0530
From: "Nikunj A. Dadhania" <nikunj@....com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
	<pbonzini@...hat.com>
CC: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Thomas Lendacky
	<thomas.lendacky@....com>, Michael Roth <michael.roth@....com>, "Borislav
 Petkov" <bp@...en8.de>, Vaishali Thakkar <vaishali.thakkar@...e.com>, "Kai
 Huang" <kai.huang@...el.com>, <David.Kaplan@....com>
Subject: Re: [PATCH v11 8/8] KVM: SVM: Enable Secure TSC for SNP guests



On 8/20/2025 5:18 AM, Sean Christopherson wrote:
> From: Nikunj A Dadhania <nikunj@....com>
> 
> @@ -2195,6 +2206,12 @@ static int snp_launch_start(struct kvm *kvm, struct kvm_sev_cmd *argp)
>  
>  	start.gctx_paddr = __psp_pa(sev->snp_context);
>  	start.policy = params.policy;
> +
> +	if (snp_is_secure_tsc_enabled(kvm)) {
> +		WARN_ON_ONCE(!kvm->arch.default_tsc_khz);

Any particular reason to drop the the following change: 

+		if (WARN_ON(!kvm->arch.default_tsc_khz)) {
+			rc = -EINVAL;
+			goto e_free_context;
+		}

As this is an unsupported configuration as per the SEV SNP Firmware ABI Specification: 

8.16 SNP_LAUNCH_START

DESIRED_TSC_FREQ
Hypervisor-desired mean TSC frequency in KHz of the guest. This field has no effect if guests
do not enable Secure TSC in the VMSA. The hypervisor should set this field to 0h if it 
*does not support Secure TSC* for this guest.

> +		start.desired_tsc_khz = kvm->arch.default_tsc_khz;
> +	}
> +
Regards,Nikunj

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ