From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDAfL-00050R-Ci for qemu-devel@nongnu.org; Wed, 15 Jun 2016 09:15:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDAfG-00010q-RJ for qemu-devel@nongnu.org; Wed, 15 Jun 2016 09:15:31 -0400 Received: from mout.web.de ([212.227.15.4]:57427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDAfG-00010I-DJ for qemu-devel@nongnu.org; Wed, 15 Jun 2016 09:15:26 -0400 References: <1465993312-18119-1-git-send-email-davidkiarie4@gmail.com> From: Jan Kiszka Message-ID: <576154E4.1010907@web.de> Date: Wed, 15 Jun 2016 15:15:16 +0200 MIME-Version: 1.0 In-Reply-To: <1465993312-18119-1-git-send-email-davidkiarie4@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rwoti8pMw4w4E7962Fr4apgDLmo3JMEP8" Subject: Re: [Qemu-devel] [V12 0/4] AMD IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Kiarie , qemu-devel@nongnu.org Cc: marcel@redhat.com, mst@redhat.com, peterx@redhat.com, alex.williamson@redhat.com, valentine.sinitsyn@gmail.com, ehabkost@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rwoti8pMw4w4E7962Fr4apgDLmo3JMEP8 From: Jan Kiszka To: David Kiarie , qemu-devel@nongnu.org Cc: marcel@redhat.com, mst@redhat.com, peterx@redhat.com, alex.williamson@redhat.com, valentine.sinitsyn@gmail.com, ehabkost@redhat.com Message-ID: <576154E4.1010907@web.de> Subject: Re: [V12 0/4] AMD IOMMU References: <1465993312-18119-1-git-send-email-davidkiarie4@gmail.com> In-Reply-To: <1465993312-18119-1-git-send-email-davidkiarie4@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 2016-06-15 14:21, David Kiarie wrote: > Hi all, >=20 > This patchset adds basic AMD IOMMU emulation support to Qemu. >=20 > Changes since V11 > -AMD IOMMU is not started with -device amd-iommu (with a dependency = on Marcel's patches). s/not/now/ ;) > -IOMMU commands are represented using bitfields which is less error = prone and more readable[Peter] > -Changed from debug fprintfs to tracing[Jan] >=20 > Changes since V10 > =20 > -Support for huge pages including some obscure AMD IOMMU feature tha= t allows default page size override[Jan]. > -Fixed an issue with generation of interrupts. We noted that AMD IOM= MU has BusMaster- and is therefore not able to generate interrupts like a= ny other PCI device. We have resulted in writing directly to system addre= ss but this could be fixed by some patches which have not been merged yet= =2E >=20 > Changes since v9 >=20 > -amd_iommu prefixes have been renamed to a shorter 'amdvi' both in t= he macros > and in the functions/code. The register macros have not been moved = to the=20 > implementation file since almost the macros there are basically mac= ros and I=20 > reckoned renaming them should suffice. > -taken care of byte order in the use of 'dma_memory_read'[Michael] > -Taken care of invalid DTE entries to ensure no DMA unless a device = is configured to allow it. > -An issue with the emulate IOMMU defaulting to AMD_IOMMU has been fi= xed[Marcel] > =20 > You can test[1] this patches by starting with parameters=20 > qemu-system-x86_64 -M -device amd-iommu -m 2G -enable-kvm -smp 4 -c= pu host -hda file.img -soundhw ac97=20 > emulating whatever devices you want. >=20 > Not passing any command line parameters to linux should be enough to te= st this patches since the devices are basically > passes-through but to the 'host' (l1 guest). You can still go ahead pas= s command line parameter 'iommu=3Dpt iommu=3D1' > and try to pass a device to L2 guest. This can also done without passin= g any iommu related parameters to the kernel.=20 >=20 > For convinience: > [1] https://github.com/aslaq/qemu/tree/v12 >=20 > David Kiarie (4): > hw/pci: Prepare for AMD IOMMU > trace-events: Add AMD IOMMU trace events > hw/i386: Introduce AMD IOMMU > hw/i386: AMD IOMMU IVRS table >=20 > hw/acpi/aml-build.c | 2 +- > hw/i386/Makefile.objs | 1 + > hw/i386/acpi-build.c | 95 ++- > hw/i386/amd_iommu.c | 1559 +++++++++++++++++++++++++++++++++++= ++++++++ > hw/i386/amd_iommu.h | 287 ++++++++ > include/hw/acpi/acpi-defs.h | 13 + > include/hw/acpi/aml-build.h | 1 + > include/hw/pci/pci.h | 2 + > trace-events | 29 + > 9 files changed, 1977 insertions(+), 12 deletions(-) > create mode 100644 hw/i386/amd_iommu.c > create mode 100644 hw/i386/amd_iommu.h >=20 --rwoti8pMw4w4E7962Fr4apgDLmo3JMEP8 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 iEYEARECAAYFAldhVOQACgkQitSsb3rl5xTi7QCfZ7q7Mj00dyIqnmhY75v0xPRx RtAAni1qJN9B7x3BtFSJF5pVEq8x5/fj =4fFZ -----END PGP SIGNATURE----- --rwoti8pMw4w4E7962Fr4apgDLmo3JMEP8--