From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (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 955633BC69C for ; Tue, 23 Jun 2026 23:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782258183; cv=none; b=bbD6bXi3mszcXDtMOSnua2s52Eci2CTJ6Sr6RqPSlb/rVTA5s+8V0nKrNSGTSli/TfU0ZL3cVN4KLajLzEz0bHWdYmqRjS625xivg8PSPwSoaobYXrWZdr0qH8gFAS5qtuutVfBpilCNKMr1+c4gzYNz1mioLmwZLPzKYi4OkZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782258183; c=relaxed/simple; bh=syIducttRk2fG0cX99ZSMirDQXV7FvAAoRbNBGCCMDM=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Hi3+7MPtNmRS1Vk+cV09fBnzt5vJG+1HaiKxdyT1XFBvbEu1xAjtmyX+kNaqc9ib2tljoiC4Iw9zxvqMYFSKqoQKaD6nNJbGK8EvHgjo/gTlPl10g3je1r2q1H0tV8bYduMaNlCdw9UTU4cL4jmGaji4ITG0Bmnhs6R4BBJrq5U= 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=pCnhQrJJ; arc=none smtp.client-ip=209.85.215.201 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="pCnhQrJJ" Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-c88e0f04e51so211899a12.0 for ; Tue, 23 Jun 2026 16:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782258182; x=1782862982; 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=7NgMvDUbIKofTb6b2HucDXASvWE7WMmjIOLWX301AQA=; b=pCnhQrJJNenPqL4v3qZlNftjUOA0Rao2phGI9O0TMfjsTCryUujUhuCpYvydu7SMzD ToCSSaR1bnXvEfdT+bzAS88T53NT+KIKgCGewJ8lA1nWUYWowfTpN1zMgGgK6NGmh5/+ YOC9yQVQ7y0vm9PsQw6yn/NRpxnLO4TChlE8sYTBaGXWRfb+X61DgVHtPmK1RNMzrNHw ZN2tD07zqj/eOdpRc7bnUSZVDQNBWazcyxS+juXE2U5jWVAl9JPqzhMqIeSo6owKc3fU XRkwPMYOArzGFxb4psXygvWqj8nW8xj9/5YYPPbNP2xU1sEsj+FbR4U6VKLTQFlpeI2R z0LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782258182; x=1782862982; 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=7NgMvDUbIKofTb6b2HucDXASvWE7WMmjIOLWX301AQA=; b=eG/B2NpxRIAX578hh+WGRseZKhoYRM+84ZojVFxVYQ25ksWEnDbVnOxjJeeIg18Gd5 etnWJ4bnZ4GdMlqg4fylcJZYfVRTnleG0sd61BskxHv6qudZvhp/w19LhAaIoR3W37L5 UqVAxmxnEUc75N//5N3qOY/qsirAgz61ptf/G9myCp3QiU2HjLP7bjtVF8N+/oDMrUkH 2VVJZYPs2BLZkwq5OwL3C7jQLQFr3Dn8nz8JNIPevWtsn3yDI7zul2Q4Dotl3biwyEFq OduJkOCloeaDeTqLIdzEHZyT286odoh93vLLE9EeRlBWmzAth2dmHte7yHsgw41esppN PDmg== X-Forwarded-Encrypted: i=1; AFNElJ9/PcMzde8Ug00tAeWeAaUTDY+1Ih8std8CHoTxrOVa2c78mW+MoVmX3OhL0ji6bmSGW+Bqx0vJSVco+ig=@vger.kernel.org X-Gm-Message-State: AOJu0Yw/lkxXBdBh7CNe/xvJGxTSIHFVokxL9a2wbog6S+JbOlUpJcre JoCTdA11qawLAMQPtuMRHgn0NPx8diYLuIL3jrUE76QvW1oPIIxCMNj/dKMhJeq7UMhOCk37SkA Ux72M/A== X-Received: from pfbfh27.prod.google.com ([2002:a05:6a00:391b:b0:845:3450:ea3d]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:a85:b0:845:44ec:a648 with SMTP id d2e1a72fcca58-845a2c31597mr1241566b3a.21.1782258181529; Tue, 23 Jun 2026 16:43:01 -0700 (PDT) Date: Tue, 23 Jun 2026 16:43:00 -0700 In-Reply-To: <89c4ac3a-1462-4798-a700-2e1e9407a4f8@fortanix.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <0657500d-a8bd-4dec-80a5-807e857a4306@fortanix.com> <4982d413-4634-40b2-a9f6-566733933c2b@fortanix.com> <89c4ac3a-1462-4798-a700-2e1e9407a4f8@fortanix.com> Message-ID: Subject: Re: [EXTERNAL] Re: [PATCH 4/4] kvm: svm: Support KVM_SEV_SNP_PAGE_TYPE_VMSA at SNP_LAUNCH_UPDATE From: Sean Christopherson To: Jethro Beekman Cc: Jon Lange , "=?utf-8?B?SsO2cmcgUsO2ZGVs?=" , Paolo Bonzini , "x86@kernel.org" , "thomas.lendacky" , Michael Roth , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "coconut-svsm@lists.linux.dev" , Joerg Roedel Content-Type: text/plain; charset="us-ascii" On Wed, Jun 24, 2026, Jethro Beekman wrote: > On 2026-06-24 00:55, Sean Christopherson wrote: > > On Wed, Jun 24, 2026, Jethro Beekman wrote: > >> On 2026-06-24 00:02, Sean Christopherson wrote: > >>>> A UAPI that allows creation of all architecturally-valid enclaves for > >>>> purposes of measurement portability was stated as an explicit non-goal. As > >>>> this is the only stated purpose of this patch set, it should also not be > >>>> accepted. > >>> > >>> No, the stated goals (thanks to the follow-up from Jon) are to (a) support VMSA > >>> GPAs other than KVM's hardcoded, arbitrary 0xFFFFFFFFF000, and > >> > >> As Jon points out, the VMSA GPA is not architecturally relevant, so any > >> enclave can be changed to support a BSP VMSA at 0xFFFFFFFFF000. The only > >> reason to "support VMSA GPAs other than KVM's hardcoded, arbitrary > >> 0xFFFFFFFFF000" is measurement portability. > > > > Well, that and hardcoding 0xFFFFFFFFF000 is bizarre and confusing, IMO. > > > >>> (b) to play nice with multi-VMPL scenarios in the future. > >> > >> It's not clear to me what multi-VMPL scenario Jon is describing that requires > >> custom VMSA content/address at launch time other than measurement > >> portability. It's currently completely possible for VMPL0 code to set the > >> VMPL of a VMSA or create a new VMSA with VMPL>0 at any GPA of their choosing. > > > > Sorry, I phrased that poorly. It's not about directly playing nice with multi-VMPL > > scenarios, it's that if/when multi-VMPL support comes along, the BSP's VMSA for > > VMPL0 will likely be the only VMSA that is NOT in guest memory. And so supporting > > an in-guest VMSA for BSP VMPL0 would provide consistency on top of cross-hypervisor > > compatilibity, and I place a lot of value on consistency. > > If the goal is to get rid of the arbitrary 0xFFFFFFFFF000 GPA/put the VMSA in > guest memory, then we just need a vcpu ioctl that lets you set the GPA. That's more or less what I suggested[*], hopefully by piggybacking the AP_CREATE logic inasmuch as possible. Or were you thinking something even simpler? [*] https://lore.kernel.org/all/ajr1r-PAiXMnZ7x1@google.com