On Tue, 20 Jun 2023 at 20:51, Laurent Vivier <lviv...@redhat.com> wrote: > > This memory is not correctly aligned and cannot be registered > by vDPA and VFIO.
Isn't this a vDPA/VFIO problem? There's no requirement for RAM MemoryRegions to be aligned in any way. Code that doesn't want to work with small or weirdly aligned regions should skip them if that's the right behaviour for that particular code IMHO. > An error is reported for vhost-vdpa case: > qemu-kvm: vhost_vdpa_listener_region_add received unaligned region > > To make it ignored by VFIO and vDPA devices, mark it as RAM_PROTECTED. > > The RAM_PROTECTED flag has been introduced to skip memory > region that looks like RAM but is not accessible via normal > mechanims, including DMA. You can DMA to a small RAM region if you want to... thanks -- PMM