From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTP4y-0007uV-Ew for qemu-devel@nongnu.org; Sat, 30 Jul 2016 03:53:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTP4v-0003FN-6F for qemu-devel@nongnu.org; Sat, 30 Jul 2016 03:53:04 -0400 Received: from mout.web.de ([212.227.15.3]:64262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTP4u-0003FI-SH for qemu-devel@nongnu.org; Sat, 30 Jul 2016 03:53:01 -0400 References: <1469123413-20809-1-git-send-email-mst@redhat.com> <1469123413-20809-27-git-send-email-mst@redhat.com> From: Jan Kiszka Message-ID: <53c0af03-7841-91c2-2eac-55a42b4971db@web.de> Date: Sat, 30 Jul 2016 09:52:48 +0200 MIME-Version: 1.0 In-Reply-To: <1469123413-20809-27-git-send-email-mst@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GTEapFqwHLNxUcNmkFKlG5uL3kddsKoI9" Subject: Re: [Qemu-devel] [PULL v5 26/57] x86-iommu: introduce IEC notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Peter Maydell , Richard Henderson , Eduardo Habkost , Peter Xu , Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GTEapFqwHLNxUcNmkFKlG5uL3kddsKoI9 From: Jan Kiszka To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Peter Maydell , Richard Henderson , Eduardo Habkost , Peter Xu , Paolo Bonzini Message-ID: <53c0af03-7841-91c2-2eac-55a42b4971db@web.de> Subject: Re: [PULL v5 26/57] x86-iommu: introduce IEC notifiers References: <1469123413-20809-1-git-send-email-mst@redhat.com> <1469123413-20809-27-git-send-email-mst@redhat.com> In-Reply-To: <1469123413-20809-27-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Sorry, only noticed this now in a discussion with David over the AMD IOMM= U: On 2016-07-21 19:53, Michael S. Tsirkin wrote: > From: Peter Xu >=20 > This patch introduces x86 IOMMU IEC (Interrupt Entry Cache) > invalidation notifier list. When vIOMMU receives IEC invalidate > request, all the registered units will be notified with specific > invalidation requests. >=20 > Intel IOMMU is the first provider that generates such a event. >=20 > Signed-off-by: Peter Xu > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > --- > hw/i386/intel_iommu_internal.h | 24 ++++++++++++++++++++---- > include/hw/i386/x86-iommu.h | 40 ++++++++++++++++++++++++++++++++++= ++++++ > hw/i386/intel_iommu.c | 36 +++++++++++++++++++++++++++++-----= -- > hw/i386/x86-iommu.c | 29 +++++++++++++++++++++++++++++ > hw/i386/trace-events | 3 +++ > 5 files changed, 121 insertions(+), 11 deletions(-) >=20 =2E.. > @@ -57,4 +76,25 @@ struct X86IOMMUState { > */ > X86IOMMUState *x86_iommu_get_default(void); > =20 > +/** > + * x86_iommu_iec_register_notifier - register IEC (Interrupt Entry > + * Cache) notifiers > + * @iommu: IOMMU device to register > + * @fn: IEC notifier hook function > + * @data: notifier private data > + */ > +void x86_iommu_iec_register_notifier(X86IOMMUState *iommu, > + iec_notify_fn fn, void *data); > + > +/** > + * x86_iommu_iec_notify_all - Notify IEC invalidations > + * @iommu: IOMMU device that sends the notification > + * @global: whether this is a global invalidation. If true, @index > + * and @mask are undefined. > + * @index: starting index of interrupt entry to invalidate > + * @mask: index mask for the invalidation This is Intel'ish: index and mask refer to the single Intel IR table. AMD has per-device tables. But even for Intel: Would the index make any sense to the callbacks? KVM uses (virtual and real) GSIs to address its routing entries, no? I suspect we will have to redesign this once we want to make use of non-global invalidation. Jan --GTEapFqwHLNxUcNmkFKlG5uL3kddsKoI9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlecXNAACgkQitSsb3rl5xTOwACcDsVitws9eZAMxLFIHRXyNFJj oNgAn1crM1d+3UKKvHVdpdDM4ajqLtT6 =3sdE -----END PGP SIGNATURE----- --GTEapFqwHLNxUcNmkFKlG5uL3kddsKoI9--