On Wed, 26 Jan 2011, Anthony Liguori wrote: > > +void qemu_invalidate_map_cache(void) > > +{ > > + unsigned long i; > > + MapCacheRev *reventry; > > + > > + qemu_aio_flush(); > > > > This is bizarre? Why is this needed? >
Sorry, I forgot to reply to this question. Xen might send an IOREQ_TYPE_INVALIDATE at any time and we have to flush the mapcache in response. Of course we cannot flush the mapcache if there are any in flight AIO's, so we have to make sure they are all completed before destroying all the mappings. Maybe there is better API to do that than calling qemu_aio_flush()?