Re: [PATCH v2 08/20] KVM: s390: KVM page table management functions: allocation

Janosch Frank
2025-09-11T08:23:04Z

On 9/10/25 8:07 PM, Claudio Imbrenda wrote:
> Add page table management functions to be used for KVM guest (gmap)
> page tables.
>
> This patch adds the boilerplate and functions for the allocation and
> deallocation of DAT tables.
>
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

> +void dat_free_level(struct crst_table *table, bool owns_ptes);
> +struct page_table *dat_alloc_pt(unsigned long pte_bits, unsigned long pgste_bits);
> +struct crst_table *dat_alloc_crst(unsigned long init);
> +
> static inline struct crst_table *crste_table_start(union crste *crstep)
> {
> return (struct crst_table *)ALIGN_DOWN((unsigned long)crstep, _CRST_TABLE_SIZE);
> diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c
> index 01f9b39e65f5..5bee173db72e 100644
> --- a/arch/s390/mm/page-states.c
> +++ b/arch/s390/mm/page-states.c
> @@ -13,6 +13,7 @@
> #include <asm/page.h>
>
> int __bootdata_preserved(cmma_flag);
> +EXPORT_SYMBOL(cmma_flag);

Why does this need to be exported?