[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: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 13 Mar 2025 11:08:46 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=cRbv6m0a5GMGuyI5fstQobk3/CkKmm46Dh4epjdxGpA=; b=Fsv/BNXbSPb6TEaUPyndxF9tC/tTyvVZPpDbF1x41oH6voFL+8F6k5lN1YR0sGXlkGDi58K4eFOsbR4qfBKxUPvkqp+7l4a44q3dhpBH79XWkZV3ewFBgDcz7OH6qNlz4UA1six6JVu1kBuiKpSdK/EXH3ZPd74XgptNlgIzd7NOVnPLqpv8RuJ+N4ldtv4xldEmtzDoVyFiRJcFDvVyieKzjU7444bEDqPY8ksJnkDPGbzPVFuRovs2i9KKXEfIhuYnisgExr2nFLF4cmvsJKfHz+W7Ggd0wp/bnn8ZjaxKoJvE5lT00I3cU5mEgeWrAxqjaxxml6x7wP/w7ach6w==
  • 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=cRbv6m0a5GMGuyI5fstQobk3/CkKmm46Dh4epjdxGpA=; b=qaZX9f8aVHM8jZ1Z2saVaSLKubnGbHVR1Z0xcJNaaNKlaRrMfaa2DnigwoCPrF9mDHKNxzPrkQ6WFJsR6LQNhPrbJu75YP6AgyGscsC6NV/X+eBW84Ue+qK919dIrc2Zf0DnS5Sa16qoc1T/lnkJeSZ+lguLSS6+BY3+ymwzzcP9sdKcZR76u6nVxr8HbIbFMHHqdAaFqu8CLkXWcHlSHu/AOfJZAf9ECkpoc+slNFnLlL7JzUOpMNHQ92dbjcZoN2K2BqtFhvTVDPXt9ag+PbmW39mlXBv5iVp9Es2CeuNuQ6mbF6Iy0DK/I3qGZ4gIyLpOAXyicM5SWGHT4i4e+A==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=GBwuoCcmfZ7qFf9P8UBY0e4ypZfAuk1MfNaxL2WdB1NQiHVv8sQbB9hcTRrIH8qIrhnSGvDtPSUeD75D4T3rCCr7a0AWCiZGdJ3gScatCtmJhuuDxySLHV0wVQauQOc+XqQBn+JKkaMS8SsdHSJqhIc0hwu0qUMzktn5JzNxy/k7hfGyX8NvG6rp63Mlrl4yIOYUYoc+HuA4hD+VX+r+7QXzOfjoompUZcvsvd7TrtlV3IYqRwpelWRrlh8IyCWFaxo9jr9108OI4wXo1KSwZ8Z6yalhKU7bV4Kqa5xlh6RFk3/3es9j5fPvSZsjuOtF0QAsDsA5SlGFOAo8hb24jg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KwtGhAfarE4vD8Qw9CleHEDG+5rjRYYKUlS/52ZDv/DQ41PGF1wePR5UdVB0Hez9zShjWbGPIfiLZUtMZMZRmF97ArKkMEWer8r4xgAPMNVdFjOXcVnPbnlJQQsDWnTSysv3QgyPhKifx9MwXX1bXrL3WvPmhr63vlwvuQopOzVnJFBnCe1/5LUq4p3vp6gfJNjgwmmxZDe/pgp4kEFGKxjkpJ/JepX3U+IteIhy99LfGA4/lO0LdNYj3EjqRJg4IZJXs/y0VdoEJ4qClEPDLuqIPXACl+UAfFcYEdXWfICj682EYH7ZwMQ/zk86duEC/UG7/kGdmGlFHRmit7XyxQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.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:09:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHbk1Yo0cmyjZFeTUSq869Hx0J/E7Nw3DiAgAADaQCAAAiZAIAAAYkA
  • Thread-topic: [PATCH 08/10] xen/arm: Rename setup_pagetables with a more generic name


> On 13 Mar 2025, at 11:02, Orzel, Michal <michal.orzel@xxxxxxx> wrote:
> 
> 
> 
> 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.

I think you are right, I could provide a stub implementation for 
setup_pagetables()
on MPU since there are no pagetables and introduce earlier setup_mm which
will setup the datastructure.

I don’t think anyone will oppose to that, so if I don’t ear from anyone I will 
drop this patch
and implement the above


> 
> ~Michal
> 


 


Rackspace

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