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.34396.1683643152070425774 for ; Tue, 09 May 2023 07:39:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XTSwEubU; 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=1683643151; 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=IX8I3fS7R7FG7/tv76jk2xwknZAfQCOpJclGmO809N8=; b=XTSwEubUgldXWE/ek4wgiSVnlr2bU0GFT1XOOyFyOGDEQsqkIirXYYsv1ilbO9gcLzvoTU zhyfM+IDi9I7/6VakdWcVzpRB11qnIVIPMVAQPUydbfQzB7/+5oxLw5hQYEWkEYg7A1nod WBZ/hyRrvzP0nF4zV06xfwUJftbXwlk= 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-424-KmqkHtWWPqCWs0RrBdBrMA-1; Tue, 09 May 2023 10:39:09 -0400 X-MC-Unique: KmqkHtWWPqCWs0RrBdBrMA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2D3318A6466; Tue, 9 May 2023 14:39:08 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.221]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8956C40C2063; Tue, 9 May 2023 14:39:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4F44A18000A6; Tue, 9 May 2023 16:39:07 +0200 (CEST) Date: Tue, 9 May 2023 16:39:07 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, jiaxin.wu@intel.com Cc: Eric Dong , Ray Ni , Zeng Star , Rahul Kumar Subject: Re: [edk2-devel] [PATCH v1 1/3] UefiCpuPkg/SecCore: Migrate page table to permanent memory Message-ID: References: <20230509102253.16632-1-jiaxin.wu@intel.com> <20230509102253.16632-2-jiaxin.wu@intel.com> MIME-Version: 1.0 In-Reply-To: <20230509102253.16632-2-jiaxin.wu@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > + if (PagingMode == Paging4Level1GB || PagingMode == Paging4Level) { > + // > + // The max lineaddress bits is 48 for 4 level page table. > + // > + VirPhyAddressSize.Bits.PhysicalAddressBits = MIN (VirPhyAddressSize.Bits.PhysicalAddressBits, 48); > + } virtual addresses in long mode are sign-extended. Which means you have only 47 bits (or 56 bits with 5-level paging) for identity mappings. take care, Gerd