On 2/7/2023 4:47 PM, Peter Xu wrote: > On Tue, Feb 07, 2023 at 04:28:49PM -0500, Steven Sistare wrote: >> On 2/7/2023 3:10 PM, Peter Xu wrote: >>> On Tue, Feb 07, 2023 at 11:03:29AM -0800, Steve Sistare wrote: >>>> Add an iterator over the sections of a flattened address space. >>>> This will be needed by cpr to issue vfio ioctl's on the same memory >>>> ranges that are already programmed. >>> >>> Should this better be proposed with the context of using it? Or I don't >>> know how to justify this new interface is needed. >>> >>> For example, any explanations on why memory region listeners cannot work? >> >> For context, the new interfaces is used in the patch >> "vfio-pci: recover from unmap-all-vaddr failure" >> in the original live update series: >> >> https://lore.kernel.org/qemu-devel/1658851843-236870-1-git-send-email-steven.sist...@oracle.com/ >> >> More succinctly, the memory region listeners already ran, and the vfio >> callbacks created vfio memory regions. Now we want to perform live update, >> and are in steady state, so no listeners are being called. We need the >> flat section iterator to reproduce the same addresses and extents that were >> produced by the listeners, to make a state change on each distinct vfio >> memory region. > > Okay it makes sense, thanks. > > I think it'll be the same as one memory_listener_register() followed by an > unregister with region_add() hooked only, but maybe we should avoid > fiddling with the global list of listeners when possible.
Indeed it is the same, thanks for the suggestion. And this occurs infrequently, so modifying the listener list has no impact. I withdraw this patch request. Thank you all for reviewing it. - Steve > If you plan to keep posting it separately, would you add some information > into the commit message? With that enhanced, please feel free to add: > > Acked-by: Peter Xu <pet...@redhat.com> >