From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVitM-0005kc-73 for qemu-devel@nongnu.org; Fri, 26 Apr 2013 09:40:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVitK-0001RM-Gr for qemu-devel@nongnu.org; Fri, 26 Apr 2013 09:40:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVitK-0001RI-7j for qemu-devel@nongnu.org; Fri, 26 Apr 2013 09:40:46 -0400 Message-ID: <517A83CE.2070505@redhat.com> Date: Fri, 26 Apr 2013 15:40:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1366956141-2066-1-git-send-email-david@gibson.dropbear.id.au> <1366956141-2066-4-git-send-email-david@gibson.dropbear.id.au> <517A398C.6030104@redhat.com> <20130426113121.GB4360@truffula.fritz.box> In-Reply-To: <20130426113121.GB4360@truffula.fritz.box> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/4] vfio: Move container list to iommu MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: aik@ozlabs.ru, alex.williamson@redhat.com, qemu-devel@nongnu.org -----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 MemoryListener doesn't work. First, there could > be multiple listeners if there are multiple containers attached to > the MemoryRegion - the information we have here needs to be per > MemoryRegion. There's no fundamental reason for VFIO to use multiple MemoryListeners. It could use one for all VFIO instances. > More importantly, what I'm working towards here is vfio support for > guest visible IOMMUs that don't have all of guest RAM mapped into > them initially. In that case there won't (and can't) be any > MemoryListener at all. Why? All you want here is to look for appearance of an IOMMU MemoryRegion in the flat representation of the AddressSpace. That's exactly what the MemoryListener does---of course that's a different MemoryListener implementation than VFIO's current one. The MemoryListener is used for a lot of different things, I find it hard to believe that this is not a variation on one of them. Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJReoPOAAoJEBvWZb6bTYbyWRYP/jK7ZTJgQFGGoiqkZU+0/vTK B5mrRfld9qdZzT2wLHyZ43pVyteECUJ/tA4T6J9pRMm4m1TmSLvCACEMUQbSoDKO pfAgNQiEyt7y/9+/vZaxoBOdbovwtRaiMHWdUUgZ1fbgoyqTvGKrfXs1Jtz9+tLZ hLD4A/CRMbId2Zji4pBtIBr6s5S12wnrfaYxrbieX1F4tSor+6LfAcTqdHRPFBU9 YY9bEJdLC/igCrJBbEVKfpJac8S+2ybRbYX9lSKNs/zZjfZ1ycRP1Vm/Hywu44PX zs18LqTKf4begPhcTG8ioAs900kW2QIPmZB9MIl+dV9QmNhZcYmZ3AsGVElRuGe7 wnrskkGNHgPa5fEpj63C70Zrz+ONT8OFvrw7vU50tvZmi3OuAFK5+mWSPqNcKDJw GiRHWzauXLJxE716zY7vA+AHJGyLy/mHbcDjDzlUYbUJCfTbRWhb40fcGkN2ZFV7 5jl5d2pd6A5JtZNZkc3K9O6HGfySpXAVCl4+2UqZl9WdRQkdYtNELzdXDH0eznTj kWKcwPJj3U2SBX1TG5qnRKGkqIPHuDJkvNPWzU73iZc5nPErgVCMt9AN4yd4xcNo s0qrSE3wTgE2FiUR3Nr9CR9+lF9dBiF1C+Dy3Yai8L0IFWQYOtRHmeRMbaZOyPxB L4NkXs6jPDD8Pz0C/avr =TWCF -----END PGP SIGNATURE-----