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.web11.27283.1658152200963088696 for ; Mon, 18 Jul 2022 06:50:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=av23Lkym; 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=1658152200; 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=lJWRNVUfMzXKMtqZRxpMjXHLrLG18OslojFeWjiNl9o=; b=av23LkymDunuzrQspgLHPqfoOwXvU7aWrGOBMDrY7yhnMu43iGMYoaUsKW8xteNX30QL66 YWhu/dEPfj5rdZjkjMI0OWs+bDbGWsWFwkqi7k7fs1Qsg99tuyyAiOW1EbnHHWpWNxtw+v 4l4ZUA/QYES6G/VF9OjXCYAJ8k6bPxE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-369-OE9DrMt9Mm2LCW3RELxtnQ-1; Mon, 18 Jul 2022 09:49:56 -0400 X-MC-Unique: OE9DrMt9Mm2LCW3RELxtnQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5761A1C06EC1; Mon, 18 Jul 2022 13:49:56 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 286082026D64; Mon, 18 Jul 2022 13:49:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 87F161800082; Mon, 18 Jul 2022 15:49:54 +0200 (CEST) Date: Mon, 18 Jul 2022 15:49:54 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, ray.ni@intel.com Cc: Eric Dong Subject: Re: [edk2-devel] [PATCH 01/10] UefiCpuPkg: Create CpuPageTableLib for manipulating X86 paging structs Message-ID: <20220718134954.s7h5gmbqbcim6nis@sirius.home.kraxel.org> References: <20220718131831.660-1-ray.ni@intel.com> <20220718131831.660-2-ray.ni@intel.com> MIME-Version: 1.0 In-Reply-To: <20220718131831.660-2-ray.ni@intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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 Mon, Jul 18, 2022 at 09:18:22PM +0800, Ni, Ray wrote: > The lib includes two APIs: > * PageTableMap > It creates/updates mapping from LA to PA. > The implementation only supports paging structures used in 64bit > mode now. PAE paging structure support will be added in future. > > * PageTableParse > It parses the page table and returns the mapping relations in an > array of IA32_MAP_ENTRY. > > It passed some stress tests. These test code will be upstreamed in > other patches following edk2 Unit Test framework. Nice to finally see the paging library arrive. What is the plan for splitting huge pages? I remember several places needed that functionality. Will the library get functions for that in the future? Or is the plan to hide that from callers, i.e. have PageTableMap() automatically create huge pages if possible and split them if needed? thanks, Gerd