-----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-----