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.web11.1651.1630388119191600701 for ; Mon, 30 Aug 2021 22:35:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BERWlai0; 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=1630388118; 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=+mGDnd/Vl+FPeI+4yReORU2ptF9utuBqa1f3PCsI7vU=; b=BERWlai0vC0Rw+/Se07IrpL1piu40oju2DrtankXH6+PBPD/M3D7rpP85bNyz4CFAH4wol MYW4gXKHqpG9K0EbIF3/0dyLBLoLBFE20sEp2FMK3C9P0rw4pOFOkz58wRr1gLjgJoI8JK TQ4TaZsFQlcY50QAe43biI3foFj3hB4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-54FgtitQPh2rKEYnn0nfNQ-1; Tue, 31 Aug 2021 01:35:15 -0400 X-MC-Unique: 54FgtitQPh2rKEYnn0nfNQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8190A871827; Tue, 31 Aug 2021 05:35:13 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A955C60BD8; Tue, 31 Aug 2021 05:35:12 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0978A1800936; Tue, 31 Aug 2021 07:35:11 +0200 (CEST) Date: Tue, 31 Aug 2021 07:35:10 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: "devel@edk2.groups.io" , Ard Biesheuvel , "Justen, Jordan L" , Brijesh Singh , Erdem Aktas , James Bottomley , "Yao, Jiewen" , Tom Lendacky Subject: Re: [edk2-devel] [PATCH V5 2/2] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf Message-ID: <20210831053510.ian6sqpefzmrrfi7@sirius.home.kraxel.org> References: <81c97a782bbbf83043854ad8a86d14604918d788.1630289827.git.min.m.xu@intel.com> <20210830074058.22gfqmzrha4su6fh@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 On Tue, Aug 31, 2021 at 03:09:08AM +0000, Xu, Min M wrote: > On Monday, August 30, 2021 3:41 PM, Gerd Hoffmann wrote: > > Hi, > > > > > _TdxPageTable: > > > If 5-level page table is supported (GPAW is 52), a top level page > > > directory pointers (1 * 256TB entry) is generated in this page. > > > _OvmfPageTable: > > > Initial page table for standard Ovmf. > > > > Hmm, isn't 5-level paging independent from TDX? Why mix the two? > > > > I think a top level page directory should be added to the standard ovmf initial > > page tables instead, and setting up 5-level paging should not happen in tdx- > > specific code. > In current Ovmf implementation (OvmfPkg/ResetVector/Ia32/PageTables64.asm) > there are 6 pages reserved for initial page tables. It doesn't support 5-level paging. Sure. And I think we should add proper 5-level paging support to the current ovmf implementation instead of adding hacks to the tdx code. take care, Gerd