[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:24:47 +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=OtuF7yoLNX4iJk3mqWLFPe2hDSgluCb2PrHOceTSBOx9Q0/6Wzmds6yMDjuoyvb+F+bZjzpuHjo18pM9tiRsbCmLs9ao2xTmmBKba09qhSqJn+W4troJNpZ7uTWp3KbSpi3UQjN9EtjxStpqqg/8wTuM6BhcZc/MCHzXpIwep+PcuTYcBS9qs9b1U6kqqX/JWbIAPQ79gsciw986dYg/nRmkZXq4AtJtCMX7tgZ1i0je9U877fZ4QV0tnYzh/OOuqQU57AsgFrCI5Tfv9+KcKpZsmTnkUs6GPYITcvYEMVYzZPnt3bT1Gnog4KIhi9v+Yb/LjZD8fCPayc2X5rnw6A==
  • 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=cxDLq5+JQXYRwkg5x4M07yaVrPwzETJjrwirfXxaJXMdgeHOopM17ke6CJAp57vVOcLIoCQdtMX4JCqkF9z5VYH4ooWzJHovA+m/iEs+dtTxTDc+pjT1aLSc0NayZNveFPXIWPrcax+ShYPJgM2r/TWukYrZZqb1WA0I3evpQqcZJQ7CK9oevjtFuoXLuouc0Cs1505TI84ye0WxeDB13xBpbkFo5OmjR9EcnUV9bRzUCTEly/krkI/+YeLVReez6m9gyCVPlnwF4iwuktE9908gJcwRUZlwZueccLjFD9eDVlRyHMG5bVG29qTWEkRWzbdmamAhbVs58cXe4gXEcA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=A/0iUoeoHFAji7Sgq7C0Ms7RWBhcSzRfdsk2GcCdjVXuWZTLb27pFHCRReXlU1FHdQg46VAvoBAnjrY7TcQJRt8AiqfkROrfeIzhYBC6MHNIYhgZjCh4T+w5KbyWHUcMOL1AY8xtd+k28N6y0D8CEqkWbv58qYu1WbJyiieowQ3YZzNev0FcKTJGsbEK4imwxfdhbkMv60jsOmTquZUeTKUUfoU2qHaI98zLrgamt3AtIKkn5gvhBif76lIA6YV1yyJrKD3XKm+MdWMGUpQwQhZ3waFhEsaYhc/oWR6zHz3ci0wyx+H4ipUPUX6WU6kBWx7QbgPBFQJY8HvXlhrKpg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qBGlAf6XYbVJ18uYRQ43CbJ56yR9QzaXLzpPciXb/upVRtvCIWnMie7Grr25YbChtM4R13+y0OMkvfPpClV7rhfkvi1N+cANO+6Dh0KSbL0GPCND7CMiZxmuj4Sb2XdG4q5TIU9vogwTy7Ly7n0paZjw9CRYhkyXSoO/S/3/0fnRlHl0KhYiR3pmHxncEGNAU/bJtWOZVHmABnxcmzl9NvsYSwwH4UN7/oaFKJNtkxY0q3H5VMSx2Z26CklOtPSWncwY9d+dDkjj5xzg5KoxWOWeCZSXrJBvhtfs0Oe39Mm7tXwohX9GPb3fMVysjGVYiN8WyKVj4qpvBj3qBLxM4w==
  • 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:25:15 +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: AQHbl3hIuq5Ui4sTKky0PpKNFdMoBrN43e6AgAF5B4CAAAvlgIAAAd+A
  • 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®.