[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b6eac47f-648f-4197-8f6d-96bc71cf15b8@suse.com>
Date: Thu, 13 Feb 2025 10:16:38 +0100
From: Jan Beulich <jbeulich@...e.com>
To: Juergen Gross <jgross@...e.com>
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, xen-devel@...ts.xenproject.org,
Alan Robinson <Alan.Robinson@...itsu.com>, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: Re: [PATCH v2 2/2] x86/xen: allow larger contiguous memory regions in
PV guests
On 13.02.2025 09:55, Juergen Gross wrote:
> Today a PV guest (including dom0) can create 2MB contiguous memory
> regions for DMA buffers at max. This has led to problems at least
> with the megaraid_sas driver, which wants to allocate a 2.3MB DMA
> buffer.
>
> The limiting factor is the frame array used to do the hypercall for
> making the memory contiguous, which has 512 entries and is just a
> static array in mmu_pv.c.
>
> In order to not waste memory for non-PV guests, put the initial
> frame array into .init.data section and dynamically allocate an array
> from the .init_after_bootmem hook of PV guests.
>
> In case a contiguous memory area larger than the initially supported
> 2MB is requested, allocate a larger buffer for the frame list. Note
> that such an allocation is tried only after memory management has been
> initialized properly, which is tested via a flag being set in the
> .init_after_bootmem hook.
>
> Fixes: 9f40ec84a797 ("xen/swiotlb: add alignment check for dma buffers")
> Signed-off-by: Juergen Gross <jgross@...e.com>
> Tested-by: Alan Robinson <Alan.Robinson@...itsu.com>
Reviewed-by: Jan Beulich <jbeulich@...e.com>
Powered by blists - more mailing lists