[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notific
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications |
Date: |
Tue, 29 Sep 2015 13:30:33 +1000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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
pgpcCUH05hWO3.pgp
Description: PGP signature
[Qemu-ppc] [PATCH 7/7] vfio: Expose a VFIO PCI device's group for EEH, David Gibson, 2015/09/24
[Qemu-ppc] [PATCH 3/7] vfio: Check guest IOVA ranges against host IOMMU capabilities, David Gibson, 2015/09/24
[Qemu-ppc] [PATCH 6/7] vfio: Allow hotplug of containers onto existing guest IOMMU mappings, David Gibson, 2015/09/24
[Qemu-ppc] [PATCH 1/7] vfio: Remove unneeded union from VFIOContainer, David Gibson, 2015/09/24