[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/6] arm/mpu: Introduce modify_after_init_mappings


  • To: Harry Ramsey <harry.ramsey@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Tue, 13 Jan 2026 11:37:17 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SgGxVNYG8YELeYIgfqBCNDjHyU1LsBL7L6iSbZP7FxI=; b=mFnt3JqZlpBiVvHkmuZ6Cy7TokFkLdmLYAGXyOPsjypLf485yZLnXz6vpHSmFa66A3Tm51fjM8q2biFJAI2NWHLK6OeE+aXl+0bR/c5Uw4BJv9ZRQwI3C9yJcyZf+w0VyqiQFLn6EgpvMoQWdNsqWOCQBSVAmv5DqxROLpRM+QW31n6A3xo1mW0BYYA9aVQhynOGo15/dygP1/msAbjkGLqUkVEvYrT0PzeuI+SHePWcb9zyd3dvRNnXhe8Thqyl5t+KPf/HSlc36Z3Cgt6ultPr/738dO0ya79Qi/rsT5/Ysrn1ThHoRr2JNJ93x0KZeJW8F3UpvueOwOspOR8lag==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SH7dJwwKtx/DDIJTESEG9aVak6Wt4SbPiRCCXwlkSsSKtdouK8Cf66S/4qDXBkI5GZlpc3rhU25gUARWlP9RiKORjCWxwCJotpT0RrKguWQgxC7w7etqPJsBm3PLPls8chrzaIElDqhrs8P+fw9tPKUw9aZTjMLDPaihUALCm8FKgJXQa/ujMN2ufRxZRfkfTZxfwHxPTr3sHGOROmDBd8iiIlym4ICmuaS/b0gJBxulr87AwopROVevKgOaqoIqyEl2QolASS0TwFNRUivOqX12QTqF68JhuWaAOrK8hnmK2wDJbqDYYsZ+tr2Rlm0fNMrdR3Vei4KNdfG+uoRsMA==
  • Cc: <Luca.Fancellu@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Hari Limaye <hari.limaye@xxxxxxx>
  • Delivery-date: Tue, 13 Jan 2026 10:37:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 05/01/2026 12:35, Harry Ramsey wrote:
> From: Luca Fancellu <luca.fancellu@xxxxxxx>
> 
> During `init_done`, Xen sets the permissions of all symbols marked with
> __ro_after_init to be read-only. This does not work on MPU systems at
> present because part-region modification is not supported.
> 
> Therefore introduce the function `modify_after_init_mappings` for MMU
> and MPU, to handle the divergent approaches to setting permissions of
> __ro_after_init symbols.
> 
> For MPU systems `modify_xen_mappings` will shrink the RW mapping on one
> side and extend the RO mapping on the other. This approach prevents
> wasting an additional region between RW and RO mappings.
> 
> As the new function is marked with __init, it needs to be called before
> `free_init_memory`.
> 
> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> Signed-off-by: Hari Limaye <hari.limaye@xxxxxxx>
> Signed-off-by: Harry Ramsey <harry.ramsey@xxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.