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

Re: [PATCH v3 6/7] xen: introduce Kconfig ARCH_PAGING_MEMPOOL


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 19 Mar 2025 12:26:18 +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=dmgsT9LLY1+AMem+hNahUPrYUjJDEKKRRV3TYLgNnqs=; b=SRD6mjLFM+tjiVkfgnWNZ9GOH9S+yLRD2KE/5zMqgOg2jwp/RiBn1ssPKd+aTAnYx7LljVD5eClJJUUV5LPEYMWwNPD4g/Q/b2qwHjUXkPEi7cohZvDt21Ri+y5PIuynRb2vZKz1XhCViOiMUyvfNGGaGmlVgWYdtt1vDFoMVcu6LeOhKr+fCjoz0fN7Fwl/FBh6HTqaHpEoMbMIDND8hIgo4MTvmwf24/5boSM/itUsBj4FJdQZV4dCpslb22Lb9Mpe3G2b31yvs6ejaHwce6Mry6FxxhzLQwLK/KHUx0g+B8T6SxFEbH5yPXxfSKwBB/XlqsXmvgtmU5Gl2sHsgg==
  • 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=dmgsT9LLY1+AMem+hNahUPrYUjJDEKKRRV3TYLgNnqs=; b=yuXb5/auRhnnUG79xO+swBpdE/MwRrji80oPU71Xd/zV1zGwLxK+FXq20PwQ3Q3A0et/08QxTTn4DplHWlk3H3hftCudQX1QH4f/Pj5B/sSpwzIs5BhaEbfIdBn4fypNzRAnHfSNneKJfcJn0t8c/oDfJHiR3LHMK4VRKquCxscMUk0aAZlwinizmH62QKWfyT7iWBcXxg+43NmpsZaxYuybSNv6ODmsBEvl3rZffvzV8lfsqWKgFZhRsVvppr7KUMTDWTcCEgaxGU9qEjvdurRM8B3c6nG3hNbeMXmwZTZVEfGqzankER/cfjDLMwtmluCjXAU5MsFZKLIV94z6tw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=L+ZddJJzFFU+uvk4DJbEnZEBdNQkTIqLGoDPHOcT+j/JlojAyDAaRw/UGKQgd1RLD98FF82NIFAffPvgpcwKmtWlwoeco6nJwwa2mwkZblg2Q9NwhinmOfjcMUUes06g3rgzqYjYCvsmvo7m3ZewEDPpqKVRwwoFHeXstklgwYK1FpipCelfw9VIDQiX0AnvTlkp9WOrdRHpcGwV7Vwaic1qsN7L5IRy6gtxNWpXxOZ/SnuX2ZFkxB+YjywOGm8iR9ny3VyQb4G50zEdQ508XM0OfeNYLgQTcdNGzw5HMiGEXKhj0+Dlyw84Vxal8PL6drNVM3gIKRgJymHE+KOXzA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C+MDFX47nsKRBSba8yabLngGWBvqBSjZreFTXbW+hUMFYighqzrlE7Kf+YHR1yQ3n5SocjxalgRqXQ/6x/14o96c3vQuv69r8+pwa3brJHICBtEBI7Bw4xlBal/+e2VXpWeI/dBgCK4bBCtkUAOGVKj85XcZEO6uvGNJNMaV9exdGf5khcOwbmw69egMBQsRzoeFfis6Wkw9ZMx58LsohsQ2xZAaDn1r3+ovEnKYm0nlnu6RHFjBn07/L0dDfENa5WTwBT3z02n9AraKJvrj4yTjqjKtZp6df/mFyYUDAoda+GYZKOBm2Qg28RhJeHHdgXKy5s5vDgVz9HR/24y25g==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 19 Mar 2025 12:26:41 +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: AQHbl3hIuq5Ui4sTKky0PpKNFdMoBrN43e6AgAF5B4CAAAvlgIAAAkwA
  • Thread-topic: [PATCH v3 6/7] xen: introduce Kconfig ARCH_PAGING_MEMPOOL


> On 19 Mar 2025, at 12:18, Luca Fancellu <Luca.Fancellu@xxxxxxx> wrote:
> 
> Hi Jan,
> 
>> On 19 Mar 2025, at 11:35, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> 
>> On 18.03.2025 14:05, Oleksii Kurochko wrote:
>>> 
>>> On 3/17/25 9:07 PM, Luca Fancellu wrote:
>>>> From: Penny Zheng<Penny.Zheng@xxxxxxx>
>>>> 
>>>> ARM MPU system doesn't need to use paging memory pool, as MPU memory
>>>> mapping table at most takes only one 4KB page, which is enough to
>>>> manage the maximum 255 MPU memory regions, for all EL2 stage 1
>>>> translation and EL1 stage 2 translation.
>>>> 
>>>> Introduce ARCH_PAGING_MEMPOOL Kconfig common symbol, selected for Arm
>>>> MMU systems, x86 and RISC-V.
>>>> 
>>>> Wrap the code inside 'construct_domU' that deal with p2m paging
>>>> allocation in a new function 'domain_p2m_set_allocation', protected
>>>> by ARCH_PAGING_MEMPOOL, this is done in this way to prevent polluting
>>>> the former function with #ifdefs and improve readability
>>>> 
>>>> Introduce arch_{get,set}_paging_mempool_size stubs for architecture
>>>> with !ARCH_PAGING_MEMPOOL.
>>>> 
>>>> Remove 'struct paging_domain' from Arm 'struct arch_domain' when the
>>>> field is not required.
>>>> 
>>>> Signed-off-by: Penny Zheng<penny.zheng@xxxxxxx>
>>>> Signed-off-by: Wei Chen<wei.chen@xxxxxxx>
>>>> Signed-off-by: Luca Fancellu<luca.fancellu@xxxxxxx>
>>>> ---
>>>> v3 changes:
>>>> - Introduced ARCH_PAGING_MEMPOOL instead of HAS_PAGING_MEMPOOL
>>>> v2 changes:
>>>> - make Kconfig HAS_PAGING_MEMPOOL common
>>>> - protect also "xen,domain-p2m-mem-mb" reading with HAS_PAGING_MEMPOOL
>>>> - do not define p2m_teardown{_allocation} in this patch
>>>> - change commit message
>>>> ---
>>>> xen/arch/arm/Kconfig              |  1 +
>>>> xen/arch/arm/dom0less-build.c     | 74 ++++++++++++++++++++-----------
>>>> xen/arch/arm/include/asm/domain.h |  2 +
>>>> xen/arch/riscv/Kconfig            |  1 +
>>>> xen/arch/x86/Kconfig              |  1 +
>>>> xen/common/Kconfig                |  3 ++
>>>> xen/include/xen/domain.h          | 17 +++++++
>>>> 7 files changed, 73 insertions(+), 26 deletions(-)
>>> 
>>> For RISC-V:
>>> Reviewed-by: Oleksii Kurochko<oleksii.kurochko@xxxxxxxxx>
>> 
>> Mind me asking then why RISC-V needs this at this point? The stubs surely
>> were added to address some build issue, not because they are actively
>> meaningful?
> 
> sorry I’m not a RISC-V expert, I saw the stub and I thought the architecture 
> wanted to have them implemented.
> 
> If not, is it possible to let the RISC-V people handle that separately? I’ll 
> be off until 31st of March and this patch is
> useful for Ayan to introduce a building status for arm32.

Oh, apologies I didn’t see you were replying to Oleksii, anyway if possible and 
you are ok with this patch,
I would ask the above.

> 
> Cheers,
> Luca
> 
>> 
>> Jan
> 


 


Rackspace

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