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

Re: [PATCH 08/10] xen/arm: Rename setup_pagetables with a more generic name


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Thu, 13 Mar 2025 12:02:46 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=xSeo7nM9tWXQJOl4gBmo0CAM8K+7o2LjNLuFSwh05Fg=; b=xVjioABFOR5kONzE1Bg5kvCYElKI8LNEbwHEwpXrvvaKiaNOs4nsDYplD57rba4+YOTfX2nXV2sa9B+HxIIiy67/Tn7pvyF5TQsbi6I/xoJ1J2zLBz46vm8QAVgh0fuDdV38ssp6ZJGYp55mn0OFQX6hX3p3KHqx7OqsI0LbfpLTqoHBmD3hTeNs582J6io/WQn7Cx6HH+AYbd1mNZmOLLtESA99gGo8Z04Hml34bQzB7N/VVwN9xoCDVCABhgzBbdxyrQZPAoVHWbX+D1PQOPs75Cn4+h/aynwemYZ91dt/h27YlmJNZF7uPh1PecFTuzhooVWn2FXa+qhk00M6jg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QZB796/R2jlDE+dfy0AUggMWvW6B7SGrf5yYClUtCkZL4YZ7i8gHNAESgZJBHUdHzj6ZUlC5eQaEZhqjOe40y2dS2VK5c2dfv2djLqoGlDQPyr98SxzgRB38n9gQqKZy0lGN/7w5dsmzRolLQlM44MTlpIA0pZ/Utb4Pje8FgDIsvgO7oGdl+vRK3TPBqkx6YX6rSuVX6L7PpZir1SeCURvtxCjfWlfAPrqkQFkDm3P1kGy7j9Cq7c60BVa5ARAzNsPlobe+4i0j1GBp4lg53TkDcfF9beoPP/RX3c37ay/BTZPjcd+ruqvUP3kwjdQmxjhvk/W/owCCo5/RfMKb3g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 13 Mar 2025 11:02:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 13/03/2025 11:32, Luca Fancellu wrote:
> 
> 
> Hi Michal,
> 
>> On 13 Mar 2025, at 10:19, Orzel, Michal <michal.orzel@xxxxxxx> wrote:
>>
>>
>>
>> On 12/03/2025 14:52, Luca Fancellu wrote:
>>>
>>>
>>> Rename the setup_pagetables function to setup_mappings in
>>> order to be implemented also for MPU system that does not
>>> have page tables.
>>
>> mappings is better than pagetables, so:
>> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
>>
>> but I'd like to understand what will be implementation of setup_mappings for
>> MPU. I suppose regions setup such that the following call to early_fdt_map 
>> can
>> succeed and doing this in setup_mm is already too late?
> 
> So on the MPU side, mappings are well defined in HW by registers, so we don’t 
> need to
> allocate pagetables, so setup_mappings in reality will only prepare our 
> logical data structure
> that tracks the MPU region state (few regions are already written by the asm 
> early code and
> needs to be tracked).
> 
> early_fdt_map won’t use this logical view of the MPU (as it’s called early), 
> it will use low level
> API to access the MPU registers, like the early asm code did, basically to 
> map the DTB.
> 
> Doing that, we ensure that the current code flow in start_xen can be reused 
> as it.
Then the question is: can the MPU part be moved to setup_mm if early_fdt_map
does not need setup_mappings? If so, we can avoid introducing a function with a
name that is at least odd in MPU context and leave setup_pagetables only for
MMU. Adding a function with not ideal name just for the sake of avoiding #ifdef
MMU does not sound like a good idea for me.

You can check with others on this one.

~Michal




 


Rackspace

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