On Mon, Sep 28, 2015 at 10:59:03AM +0200, Paolo Bonzini wrote: > > > On 26/09/2015 08:54, David Gibson wrote: > > On Fri, Sep 25, 2015 at 02:04:14PM +0200, Paolo Bonzini wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 > >> > >> > >> > >> On 25/09/2015 13:33, David Gibson wrote: > >>> 1) Is there a case where using the no-replay functions makes > >>> sense? > >>> > >>> I'm not sure. I think vfio is the only user so far, so I > >>> guess that's technically a no. I was reluctant to change the > >>> interface and semantics just off the bat, though. > >> > >> Considering memory_region_listener does the reply, I think it's > >> okay. > > > > Uh.. just to be clear, are you saying I should change this so > > there's only the replaying interface? > > Maybe... The only issue is the "granularity" argument, which is > not in memory_region_register_iommu_notifier. That makes me wonder if > the replay and registration make sense as separate operations. > > What about adding a new function memory_region_iommu_replay and > separate the two phases?
Hm.. I'm not sure I see much advantage to separating the phases. But I don't particularly object to the idea either. So, I think it's your call. > >> For solving the problem that Laurent mentioned, using int128 > >> seems like the easiest solution... > > > > Maybe. It means I have to do all the address calculation in the > > loop with an int128, then truncate it to do the actual call. That > > seems harder to me than the overflow check I added, but I suppose > > it's conceptually similar in some ways. > > Your overflow check is also okay, I wrote this before seeing the > updated version. > > Paolo > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
pgpPROZnpgheD.pgp
Description: PGP signature