On Wed, May 21, 2025 at 09:43:11AM +0200, Cédric Le Goater wrote: > !-------------------------------------------------------------------| > CAUTION: External Email > > |-------------------------------------------------------------------! > > +Steven, > > On 5/20/25 17:03, John Levon wrote: > > Pass through the MemoryRegion to DMA operation handlers of vfio > > containers. The vfio-user container will need this later, to translate > > the vaddr into an offset for the dma map vfio-user message. > > > > Originally-by: John Johnson <john.g.john...@oracle.com> > > Signed-off-by: Jagannathan Raman <jag.ra...@oracle.com> > > Signed-off-by: Elena Ufimtseva <elena.ufimts...@oracle.com> > > Signed-off-by: John Levon <john.le...@nutanix.com> > > > This change conflicts with : > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_qemu-2Ddevel_1747063973-2D124548-2D28-2Dgit-2Dsend-2Demail-2Dsteven.sistare-40oracle.com&d=DwICaQ&c=s883GpUCOChKOHiocYtGcg&r=v7SNLJqx7b9Vfc7ZO82Wg4nnZ8O5XkACFQ30bVKxotI&m=ZGgaPL84zJdxC-NJiZdGWRzh1WIXiIKzDUt8YcytF-NfxOT9I_gSOxNCph5DfyVM&s=V-_fptKbd0WpQ_JDJWze9TxsbOrvVfEm2EIPPH6HJ2k&e= > > Steven, > > Could we use this version instead for the "live update" series ?
I could use the ram block for the offset but the mrp is also used here: 86 int fd = memory_region_get_fd(mrp); which is 2406 int memory_region_get_fd(MemoryRegion *mr) 2407 { 2408 RCU_READ_LOCK_GUARD(); 2409 while (mr->alias) { 2410 mr = mr->alias; 2411 } 2412 return mr->ram_block->fd; 2413 } In the tests I've done, mr->alias is always NULL, but I don't know enough about MR handling to be sure this will always be the case? Perhaps others can, in which case I only need the ram block too. regards john