> -----Original Message-----
> From: Eric Auger <[email protected]>
> Sent: 26 May 2026 10:31
> To: Shameer Kolothum Thodi <[email protected]>; qemu-
> [email protected]; [email protected]
> Cc: [email protected]; [email protected]; [email protected]; Nicolin
> Chen <[email protected]>; Nathan Chen <[email protected]>; Matt
> Ochs <[email protected]>; Jiandi An <[email protected]>; Jason Gunthorpe
> <[email protected]>; [email protected]; Krishnakant Jaju
> <[email protected]>; [email protected]; Peter Xu <[email protected]>;
> Philippe Mathieu-Daudé <[email protected]>
> Subject: Re: [PATCH v5 26/32] system/physmem: Add
> qemu_ram_backend_pagesize_min() helper
> 
> External email: Use caution opening links or attachments
> 
> 
> On 5/19/26 12:37 PM, Shameer Kolothum wrote:
> > Some hardware accelerators DMA directly to the host physical address
> s/DMA/perform DMA accesses
> > of a guest-resident buffer (e.g. set up via IOMMUFD). The HPA is
> > contiguous only within a single host backing page; a buffer larger
> > than the smallest backing page in use may span non-contiguous host
> > pages and fault.
> >
> > Introduce qemu_ram_backend_pagesize_min(), which returns the smallest
> > page size among RAM regions backed by a memory-backend object. Falls
> Don't you have means to be more precise? I mean you know the GPA of the
> cmdq, can't you make sure it belongs to a specific ramblock and check
> its min page_size?

As you noted in the next patch we don’t have GPA at the time of init.

> 
> By the way there is find_min_backend_pagesize() that exists. Can't you
> reuse that?

Ah.. Thanks!. That looks like is doing the same thing. And we also have
warpper that uses it, qemu_minrampagesize().

I will get rid of this patch and use that instead.

Thanks,
Shameer

Reply via email to