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.web08.4496.1648712948594133529 for ; Thu, 31 Mar 2022 00:49:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AvtBXF7V; 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=1648712947; 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=qDaMzRdBsk7cV5AwPvPbg607wIqGgnlB2nrYUoJBeWM=; b=AvtBXF7VUJ7YfhNajCLWUVTvFtoHXaBpycd/3+SiuJU9yDCSK28S4sR0GiFNSAVq38UzdF LIVkqjs3K9U2w6tdK4qRsctZRpTnIt0AYlnG+kp0fe7Z0Hi9RRyDnQqBg6tiDW6J40J9Yp M0kJGrA1qlHq5syfObwo2gGM4gLaCBQ= 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-351-oi_YU-wrNjKiFdOAFNSnHA-1; Thu, 31 Mar 2022 03:49:03 -0400 X-MC-Unique: oi_YU-wrNjKiFdOAFNSnHA-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 58F35805F46; Thu, 31 Mar 2022 07:49:02 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2172DC08F11; Thu, 31 Mar 2022 07:49:02 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B581718000B3; Thu, 31 Mar 2022 09:49:00 +0200 (CEST) Date: Thu, 31 Mar 2022 09:49:00 +0200 From: "Gerd Hoffmann" To: Dov Murik Cc: Brijesh Singh , devel@edk2.groups.io, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Erdem Aktas , James Bottomley , Min Xu , Tom Lendacky , Tobin Feldman-Fitzthum Subject: Re: [PATCH 2/2] OvmfPkg/ResetVector: Exclude SEV launch secrets page from pre-validation Message-ID: <20220331074900.n2fxnkqo3eyka6py@sirius.home.kraxel.org> References: <20220328184530.86797-1-dovmurik@linux.ibm.com> <20220328184530.86797-3-dovmurik@linux.ibm.com> <20220330052029.4fuzbca2364nm7fg@sirius.home.kraxel.org> <7585badc-63d5-4195-760c-3cc3665795e4@linux.ibm.com> <7ea76edb-fad8-b06e-e715-0868de1f1261@amd.com> <5a8dfc50-d9e8-447e-6328-302d8a519c79@linux.ibm.com> <4fdbb522-e7e5-a0a8-ee1b-003e3f80c9c6@amd.com> <949fc10b-1c9f-524b-dadc-55b3332adbc2@linux.ibm.com> MIME-Version: 1.0 In-Reply-To: <949fc10b-1c9f-524b-dadc-55b3332adbc2@linux.ibm.com> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > >>>>>> Check if that page is defined; if it is, skip it in the metadata > >>>>>> list. > >>>>>> In such case, VMM should fill the page with the hashes content, or > >>>>>> explicitly update it as a zero page (if kernel hashes are not used). > >>>>> > >>>>> Is it an option to just skip the page unconditionally? > >>>>> > >>>>> I think in the OvmfPkgX64 build the page is not used, so it probably > >>>>> doesn't matter whenever it is included or not, and it would make > >>>>> things > >>>>> a bit less confusing ... > // The below address range was part of the SEV OVMF metadata, and range > // should be pre-validated by the Hypervisor. > { > FixedPcdGet32 (PcdOvmfSecPageTablesBase), > FixedPcdGet32 (PcdOvmfPeiMemFvBase), > }, > As the comment says, it assumes the entire range > from PcdOvmfSecPageTablesBase (= 0x800000) > to PcdOvmfPeiMemFvBase (= 0x820000) > is pre-validated by the Hypervisor. > > How will it know to actually validate that page at 0x80F000 ? Probably it doesn't unless we split the entry into two, so we are effectively trading making the reset vector more complicated vs. making this list more complicated. I guess it's not worth the trouble then. Acked-by: Gerd Hoffmann for or the original patch (and thanks for investigating). take care, Gerd