From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E9E13330649 for ; Mon, 23 Feb 2026 17:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771866917; cv=none; b=df9F2ox8CYiNt0OSxSKe2MVLj6rX86DIbN37If1yybfjjZ30ZM9IMU+A1R/sB7cfGsV5zgVKPkM0gRH4HZYA6Hs6kOP0/AsbymERV++ljxvcWDKTJnPcEuxnkbp8SQV4tXEW6Y1Gbv7uaJtAlPOB+uOUjke/RDjQa+mI5853hoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771866917; c=relaxed/simple; bh=HKwLbvFmJGYEGnpPr7MOM6oLTlNTOu8bfAhYYTRO13E=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jSpHCfQbwzrobqar9zaOP0qRN70cEx7ZH7nbsUVZO388KRNOdnZ+5sD6FLkmF3S8jhJb41w4FCJqgfNc+MSIgA8S0fTLZj6OHAcuYAkj+Lk3g4Wk5gz5Q00SRsW6oSHX27AtgfxndAJz7Jt9EO2035zB8vOKCe9DVj5JEQy0APY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=WgAGk0Bk; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="WgAGk0Bk" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2aad60525deso336739085ad.1 for ; Mon, 23 Feb 2026 09:15:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771866915; x=1772471715; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=qB/D8oykiAjYH+aojy11MUffmbGAGIdMwqBS+z3LBGk=; b=WgAGk0Bk55uiejxu96L2NKrxY/yQztTYJ8SjfeOjAsYB7UT2PY82EebeMu4INfNuQ8 24F1frhdW0Vr57JI/tAe/cCk0U/dEit9Va6WGmeKLxVZAR3pdx3cBZK3r0NM4VJGwqJJ Szq3x6FoggeTgB5m33sAm3rxMwMY+ODR9AMGY+KcITBlHxqT5m0w0O2VGEdEmn179oRm HADjm7dAr5CwfxOTRwl9izLomLx+v68xPhWio0rzKwRLP1UGNWLMxmJRsnfJESaj7yor 6DXxIHFxKS+jZ8c3r45dt/NP0itUtxwefT4XNaLp+WqGmprewC88ZCM4mSbtIAzNJCnf DyOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771866915; x=1772471715; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qB/D8oykiAjYH+aojy11MUffmbGAGIdMwqBS+z3LBGk=; b=gNu+gsfukvvE3K3IKQgUdeaRy3S93UBNNe/pBoU9XHA49CnOOOqWXxa3c61xxzvPlb YCX3Nu3c0Z8C75t4n1uLCuXOXZ3hPzUHODR47dYdaJ671Cfmf/kuGnfkpldNV+CyZ/My /HFb5wPUcocuo70uo5JmSHaJQN1RCu9WjGk1B/5T6Pnq8DTUhlBrCsjyNEHfEtClHnX0 uNqRm8wcE8wRB8acWAo+J44fSM2hxAccNm/3bsYEG8gKc/sas0mVFMLTl7RMEg8X32Jz AhMaWRamh3s1Z0iSlKPGPOAmIYpS/NiVii1yUW5mgrLOqzEIWdHbK+YRa95qsIgtRl10 h7jQ== X-Forwarded-Encrypted: i=1; AJvYcCU8r8ffLdbi4NdJTpmmZWB3Uw940YMa5N8Y2OZRWrRGzoSZva+8+VQYIpalbv3M1FH1YCaFuaYDnOmjduM=@vger.kernel.org X-Gm-Message-State: AOJu0YxUpjJTioKd6KgVBmzoiv8GDI2/Ss8mLPfh0EqPb9mTDuTbjn+9 Zkntk7I2/40RKMF0k8s9GLolKRFuqMeWLyyLE2j8LpneD27NgWG7wTxnxWOuM8zDT55eQOk09w5 5vWUlkw== X-Received: from plpw17.prod.google.com ([2002:a17:902:9a91:b0:2a0:c485:7eed]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:b90:b0:2a9:411a:c5c6 with SMTP id d9443c01a7336-2ad74511698mr75532445ad.39.1771866915160; Mon, 23 Feb 2026 09:15:15 -0800 (PST) Date: Mon, 23 Feb 2026 09:15:13 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260223162900.772669-1-tycho@kernel.org> <20260223162900.772669-3-tycho@kernel.org> Message-ID: Subject: Re: [PATCH 2/4] selftests/kvm: check that SEV-ES VMs are allowed in SEV-SNP mode From: Sean Christopherson To: Tycho Andersen Cc: Ashish Kalra , Tom Lendacky , John Allen , Herbert Xu , Paolo Bonzini , Shuah Khan , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Mon, Feb 23, 2026, Tycho Andersen wrote: > > > + /* > > > + * In some cases when SEV-SNP is enabled, firmware disallows starting > > > + * an SEV-ES VM. When SEV-SNP is enabled try to launch an SEV-ES, and > > > + * check the underlying firmware error for this case. > > > + */ > > > + vm = vm_sev_create_with_one_vcpu(KVM_X86_SEV_ES_VM, guest_sev_es_code, > > > + &vcpu); > > > > If there's a legimate reason why an SEV-ES VM can't be created, then that needs > > to be explicitly enumerated in some way by the kernel. E.g. is this due to lack > > of ASIDs due to CipherTextHiding or something? > > Newer firmware that fixes CVE-2025-48514 won't allow SEV-ES VMs to be > started with SNP enabled, there is a footnote (2) about it here: > > https://www.amd.com/en/resources/product-security/bulletin/amd-sb-3023.html > > Probably should have included this in the patch, sorry. > > > Throwing a noodle to see if it sticks is not an option. > > Sure, we could do some firmware version test to see if it's fixed > instead? Or do this same test in the kernel and export that as an > ioctl? Uh, no idea what would be ideal, but there absolutely needs to be some way to communicate lack of effective SEV-ES support to userspace, and in a way that doesn't break userspace. Hrm, I think we also neglected to communicate when SEV and SEV-ES are effectively unusable, e.g. due to CipherTextHiding, so maybe we can kill two birds with one stone? IIRC, we didn't bother enumerating the limitation with CipherTextHiding because making SEV-ES unusable would require a deliberate act from the admin. "Update firmware" is also an deliberate act, but the side effect of SEV-ES being disabled, not so much.