From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88226C433EF for ; Mon, 10 Jan 2022 11:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244344AbiAJLBu (ORCPT ); Mon, 10 Jan 2022 06:01:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:25878 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244382AbiAJLB3 (ORCPT ); Mon, 10 Jan 2022 06:01:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641812488; 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=+PA8Vg//oTzHEGQwEE7hFyLmXJdElvmOjQHkElYPEaI=; b=QeRbGIDMhn+rUGFpDOdHOPidtTxCn/3ZdHvl/+GQS/46Z5xf23mQu7q1hseZ3kB9t6M707 8sUZvmREV+VUY3MonjX61pFMlO0q1tQiRN2yS3Y5uueAg5rNvnpJiiXk9KLdzONHYYFJ2Y W/lTpQ20A/zMebdBxMWSeqv5ePyJfm0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-613-sjwusAxaPwCaUnHnsW-kDA-1; Mon, 10 Jan 2022 06:01:24 -0500 X-MC-Unique: sjwusAxaPwCaUnHnsW-kDA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DF98E69737; Mon, 10 Jan 2022 11:01:22 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8FEE0752AA; Mon, 10 Jan 2022 11:01:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A76E818003A0; Mon, 10 Jan 2022 12:01:20 +0100 (CET) Date: Mon, 10 Jan 2022 12:01:20 +0100 From: Gerd Hoffmann To: Xiaoyao Li Cc: Laszlo Ersek , isaku.yamahata@gmail.com, qemu-devel@nongnu.org, pbonzini@redhat.com, alistair@alistair23.me, ehabkost@redhat.com, marcel.apfelbaum@gmail.com, mst@redhat.com, cohuck@redhat.com, mtosatti@redhat.com, seanjc@google.com, erdemaktas@google.com, kvm@vger.kernel.org, isaku.yamahata@intel.com, "Min M . Xu" Subject: Re: [RFC PATCH v2 20/44] i386/tdx: Parse tdx metadata and store the result into TdxGuestState Message-ID: <20220110110120.ldjekirdzgmgex4z@sirius.home.kraxel.org> References: <20210826111838.fgbp6v6gd5wzbnho@sirius.home.kraxel.org> <4eb6a628-0af6-409b-7e42-52787ee3e69d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org > > If you go without pflash, then you likely will not have a > > standards-conformant UEFI variable store. (Unless you reimplement the > > variable arch protocols in edk2 on top of something else than the Fault > > Tolerant Write and Firmware Volume Block protocols.) Whether a > > conformant UEFI varstore matters to you (or to TDX in general) is > > something I can't comment on. > > Thanks for your reply! Laszlo > > regarding "standards-conformant UEFI variable store", I guess you mean the > change to UEFI non-volatile variables needs to be synced back to the > OVMF_VARS.fd file. right? Yes. UEFI variables are expected to be persistent, and syncing to OVMF_VARS.fd handles that. Not fully sure whenever that expectation holds up in the CC world. At least the AmdSev variant has just OVMF.fd, i.e. no CODE/VARS split. > > Regarding pflash itself, the read-only KVM memslot is required for it. > > Otherwise pflash cannot work as a "ROMD device" (= you can't flip it > > back and forth between ROM mode and programming (MMIO) mode). > > We don't need Read-only mode for TDVF so far. If for this purpose, is it > acceptable that allowing a pflash without KVM readonly memslot support if > read-only is not required for the specific pflash device? In case you don't want/need persistent VARS (which strictly speaking is a UEFI spec violation) you should be able to go for a simple "-bios OVMF.fd". take care, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82DABC433F5 for ; Mon, 10 Jan 2022 11:03:35 +0000 (UTC) Received: from localhost ([::1]:53148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6sSc-00016Y-CS for qemu-devel@archiver.kernel.org; Mon, 10 Jan 2022 06:03:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6sQh-0007kN-JI for qemu-devel@nongnu.org; Mon, 10 Jan 2022 06:01:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:27834) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6sQf-000240-Va for qemu-devel@nongnu.org; Mon, 10 Jan 2022 06:01:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641812488; 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=+PA8Vg//oTzHEGQwEE7hFyLmXJdElvmOjQHkElYPEaI=; b=QeRbGIDMhn+rUGFpDOdHOPidtTxCn/3ZdHvl/+GQS/46Z5xf23mQu7q1hseZ3kB9t6M707 8sUZvmREV+VUY3MonjX61pFMlO0q1tQiRN2yS3Y5uueAg5rNvnpJiiXk9KLdzONHYYFJ2Y W/lTpQ20A/zMebdBxMWSeqv5ePyJfm0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-613-sjwusAxaPwCaUnHnsW-kDA-1; Mon, 10 Jan 2022 06:01:24 -0500 X-MC-Unique: sjwusAxaPwCaUnHnsW-kDA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DF98E69737; Mon, 10 Jan 2022 11:01:22 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8FEE0752AA; Mon, 10 Jan 2022 11:01:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A76E818003A0; Mon, 10 Jan 2022 12:01:20 +0100 (CET) Date: Mon, 10 Jan 2022 12:01:20 +0100 From: Gerd Hoffmann To: Xiaoyao Li Subject: Re: [RFC PATCH v2 20/44] i386/tdx: Parse tdx metadata and store the result into TdxGuestState Message-ID: <20220110110120.ldjekirdzgmgex4z@sirius.home.kraxel.org> References: <20210826111838.fgbp6v6gd5wzbnho@sirius.home.kraxel.org> <4eb6a628-0af6-409b-7e42-52787ee3e69d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Received-SPF: pass client-ip=170.10.129.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.597, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: isaku.yamahata@intel.com, cohuck@redhat.com, ehabkost@redhat.com, kvm@vger.kernel.org, mst@redhat.com, seanjc@google.com, alistair@alistair23.me, qemu-devel@nongnu.org, mtosatti@redhat.com, "Min M . Xu" , erdemaktas@google.com, pbonzini@redhat.com, Laszlo Ersek , isaku.yamahata@gmail.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" > > If you go without pflash, then you likely will not have a > > standards-conformant UEFI variable store. (Unless you reimplement the > > variable arch protocols in edk2 on top of something else than the Fault > > Tolerant Write and Firmware Volume Block protocols.) Whether a > > conformant UEFI varstore matters to you (or to TDX in general) is > > something I can't comment on. > > Thanks for your reply! Laszlo > > regarding "standards-conformant UEFI variable store", I guess you mean the > change to UEFI non-volatile variables needs to be synced back to the > OVMF_VARS.fd file. right? Yes. UEFI variables are expected to be persistent, and syncing to OVMF_VARS.fd handles that. Not fully sure whenever that expectation holds up in the CC world. At least the AmdSev variant has just OVMF.fd, i.e. no CODE/VARS split. > > Regarding pflash itself, the read-only KVM memslot is required for it. > > Otherwise pflash cannot work as a "ROMD device" (= you can't flip it > > back and forth between ROM mode and programming (MMIO) mode). > > We don't need Read-only mode for TDVF so far. If for this purpose, is it > acceptable that allowing a pflash without KVM readonly memslot support if > read-only is not required for the specific pflash device? In case you don't want/need persistent VARS (which strictly speaking is a UEFI spec violation) you should be able to go for a simple "-bios OVMF.fd". take care, Gerd