Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-30 Thread David Gibson
On Tue, Apr 30, 2013 at 09:30:12AM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Il 30/04/2013 04:23, David Gibson ha scritto: > >>> I think this is a different problem. Basically the question is > >>> "what happens if a MemoryRegion 'disappears' while an > >>>

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-30 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 30/04/2013 04:23, David Gibson ha scritto: >>> I think this is a different problem. Basically the question is >>> "what happens if a MemoryRegion 'disappears' while an >>> AddressSpace is still referring to it", and the answer right >>> now is "bad

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-29 Thread David Gibson
On Tue, Apr 30, 2013 at 12:05:39PM +1000, David Gibson wrote: > On Mon, Apr 29, 2013 at 03:44:43PM +0200, Paolo Bonzini wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Il 29/04/2013 13:56, David Gibson ha scritto: > > >> Why should VFIO be any special in this? It is reassurin

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-29 Thread David Gibson
On Mon, Apr 29, 2013 at 03:44:43PM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Il 29/04/2013 13:56, David Gibson ha scritto: > >> Why should VFIO be any special in this? It is reassuring to me > >> that the VFIO maintainer thinks the same. :) > > > > Because

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-29 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 29/04/2013 13:56, David Gibson ha scritto: >> Why should VFIO be any special in this? It is reassuring to me >> that the VFIO maintainer thinks the same. :) > > Because device passthrough is a sufficiently special case, IMO. > It introduces requir

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-29 Thread David Gibson
On Mon, Apr 29, 2013 at 01:38:06PM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Il 29/04/2013 13:00, David Gibson ha scritto: > > On Mon, Apr 29, 2013 at 10:11:06AM +0200, Paolo Bonzini wrote: > >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > >> > >> Il 28/

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-29 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 29/04/2013 13:00, David Gibson ha scritto: > On Mon, Apr 29, 2013 at 10:11:06AM +0200, Paolo Bonzini wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> Il 28/04/2013 03:58, David Gibson ha scritto: > Ok, knowing about changes that ha

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-29 Thread David Gibson
On Mon, Apr 29, 2013 at 10:11:06AM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Il 28/04/2013 03:58, David Gibson ha scritto: > >>> Ok, knowing about changes that happen in the IOMMU mapping is > >>> indeed out of scope of MemoryListeners. What about adding a

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-29 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 28/04/2013 03:58, David Gibson ha scritto: >>> Ok, knowing about changes that happen in the IOMMU mapping is >>> indeed out of scope of MemoryListeners. What about adding a >>> NotifierList? Then VFIO can register a notifier and use it to >>> learn

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-27 Thread David Gibson
On Sat, Apr 27, 2013 at 02:17:54PM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Il 27/04/2013 11:49, David Gibson ha scritto: > >> There's no fundamental reason for VFIO to use multiple > >> MemoryListeners. It could use one for all VFIO instances. > > > > A

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-27 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 27/04/2013 11:49, David Gibson ha scritto: >> There's no fundamental reason for VFIO to use multiple >> MemoryListeners. It could use one for all VFIO instances. > > Actually, there kind of is. Using a new listener for each new > container mean

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-27 Thread David Gibson
On Fri, Apr 26, 2013 at 03:40:30PM +0200, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Il 26/04/2013 13:31, David Gibson ha scritto: > >> You need to add this capability to VFIO's MemoryListener (either > >> the one that's already there, or a new one), looking for IOM

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-26 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 26/04/2013 13:31, David Gibson ha scritto: >> You need to add this capability to VFIO's MemoryListener (either >> the one that's already there, or a new one), looking for IOMMU >> regions in the region_add callback. > > Putting it in the MemoryList

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-26 Thread David Gibson
On Fri, Apr 26, 2013 at 10:23:40AM +0200, Paolo Bonzini wrote: > Il 26/04/2013 08:02, David Gibson ha scritto: > > At the moment, vfio maintains a global list of containers that are assumed > > to be more or less interchangeable, since they are all set up with a > > MemoryListener to have all of sy

Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-26 Thread Paolo Bonzini
Il 26/04/2013 08:02, David Gibson ha scritto: > At the moment, vfio maintains a global list of containers that are assumed > to be more or less interchangeable, since they are all set up with a > MemoryListener to have all of system memory mapped. However, that only > makes sense if all the contai

[Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion

2013-04-25 Thread David Gibson
At the moment, vfio maintains a global list of containers that are assumed to be more or less interchangeable, since they are all set up with a MemoryListener to have all of system memory mapped. However, that only makes sense if all the containers are used on devices which really do expect a dma