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

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


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 20 Mar 2025 08:32:35 +0100
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: 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
  • Delivery-date: Thu, 20 Mar 2025 07:32:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.03.2025 17:31, Oleksii Kurochko wrote:
> 
> On 3/19/25 12:35 PM, Jan Beulich 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?
> 
> Only because we have stubs and not to have redefinition compilation 
> error. And, yes, they are not actively meaningful now, at least. I am 
> okay with not enabling of this config for RISC-V but then seems to me we 
> have to drop stubs in riscv/stubs.c. ~ Oleksii

Well, I don't think it's "have to", but I agree that dropping them would
make sense then (and be desirable).

Jan



 


Rackspace

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