[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: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications |
Date: |
Mon, 28 Sep 2015 10:59:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
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?
>> 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
- [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, (continued)
[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