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.133.124]) by mx.groups.io with SMTP id smtpd.web10.19632.1680162659752863091 for ; Thu, 30 Mar 2023 00:50:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XuNbANvj; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680162658; 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=hjuPU3UYx8nriDru0uJJ8222LPU02nZ3HVknQFojMyY=; b=XuNbANvjSVmZR6vpO93/qHWReWuwRbtsdFXAoctc9FS3wlNjDoyZIuDVzwKr4/ZGP/iPgV c1BxMot+lZ2p2igpBlDhSZjKsoVo4lYeETFJxOV/StcIOq3Q+Na8blsBrSAtNAUSPy5BtM dMfVtWhyDU/nMpUbYoslNpWY1RzxPh8= 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-530-UWmnqFe7OgGpa1ThKD-Zuw-1; Thu, 30 Mar 2023 03:50:55 -0400 X-MC-Unique: UWmnqFe7OgGpa1ThKD-Zuw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 149C885A5A3; Thu, 30 Mar 2023 07:50:55 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4BBEC15BA0; Thu, 30 Mar 2023 07:50:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 71908180061B; Thu, 30 Mar 2023 09:50:53 +0200 (CEST) Date: Thu, 30 Mar 2023 09:50:53 +0200 From: "Gerd Hoffmann" To: Min Xu Cc: devel@edk2.groups.io, Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Michael Roth , Joey Lee Subject: Re: [PATCH V1 1/1] OvmfPkg/PlatformPei: Skip PlatformInitEmuVariableNvStore in SEV guest Message-ID: <4tmi32c3kevecoc3y7mb6jlv7d7ygmctt6bgwflvjybqwphjqk@gnnertcj5kz2> References: <20230329052310.27-1-min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: <20230329052310.27-1-min.m.xu@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 29, 2023 at 01:23:10PM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4379 > > PlatformInitEmuVariableNvStore is called to initialize the > EmuVariableNvStore with the content pointed by > PcdOvmfFlashNvStorageVariableBase. This is because when OVMF is launched > with -bios parameter, UEFI variables will be partially emulated, and > non-volatile variables may lose their contents after a reboot. This makes > the secure boot feature not working. > > But in SEV guest, this design doesn't work. Because at this point the > variable store mapping is still private/encrypted, OVMF will see > ciphertext. So we skip the call of PlatformInitEmuVariableNvStore in > SEV guest. I'd suggest to simply build without -D SECURE_BOOT_ENABLE instead. Without initializing the emu var store you will not get a functional secure boot setup anyway. take care, Gerd