From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.7524.1682068717779171377 for ; Fri, 21 Apr 2023 02:18:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OCfa1IOi; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682068716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fkLls3DTP+WpMfXkTBouOnt7uTda0ZzbdShquiXPvZQ=; b=OCfa1IOi2JQBFigjPuAJzKBzhAAPvDdouR1SgXCgQlC5RJwCo//7MjNkgnsZnCxjn/CyLz no/iTnmrs8GQ3w5xFm/fHmVP4EUS3aU40/KZiYN+fc9XGJdxkwY09m7ZsU910n2kAuOO1E L0gQa6Qk+AImC29h2Cuu0bOiuObzt5o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-tCJHypFPOK6FdrlLht4xgA-1; Fri, 21 Apr 2023 05:18:33 -0400 X-MC-Unique: tCJHypFPOK6FdrlLht4xgA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0677185A78B; Fri, 21 Apr 2023 09:18:32 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6BC3B2026D16; Fri, 21 Apr 2023 09:18:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 22C771800083; Fri, 21 Apr 2023 11:18:31 +0200 (CEST) Date: Fri, 21 Apr 2023 11:18:31 +0200 From: "Gerd Hoffmann" To: Tom Lendacky Cc: "Xu, Min M" , joeyli , "devel@edk2.groups.io" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Michael Roth Subject: Re: [PATCH V1 1/1] OvmfPkg/PlatformPei: Skip PlatformInitEmuVariableNvStore in SEV guest Message-ID: References: <7a06aa46-4c10-fc85-48a6-826a4d82991e@amd.com> <2xjjrifeaa7khaha4se7gs3hmtdz2kkg2dv4t7njwf5z5mbn2f@qb5s2k7c6225> <03fed1d7-cbd8-ee45-ebd8-8ecf60971e61@amd.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > > Hmm, good question. Can the guest figure what memory ranges are part > > of the launch measurement? > > > > I have a patch here (attached below) which refines flash detection and > > can detect whenever varstore flash is writable or not. I suspect that > > doesn't help much though as flash probing requires mappings already > > being correct. > > Sorry for the delay, but, yeah, doesn't help. SEV and SEV-ES assert and > SEV-SNP terminates because of accessing a shared page (in the RMP) as a > private page (we don't support the generated 0x404 error code in the #VC > handler). Can you try this? https://github.com/kraxel/edk2/commits/devel/secure-boot-pcd It moves the varstore copy from platform init to emu variable driver, which should be late enough that sev setup should be complete. take care, Gerd