From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEq0e-0000pl-7t for qemu-devel@nongnu.org; Sun, 19 Jun 2016 23:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEq0a-0001Qp-0V for qemu-devel@nongnu.org; Sun, 19 Jun 2016 23:36:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEq0Z-0001Qi-RD for qemu-devel@nongnu.org; Sun, 19 Jun 2016 23:36:19 -0400 Date: Mon, 20 Jun 2016 11:36:13 +0800 From: Peter Xu Message-ID: <20160620033613.GO27635@pxdev.xzpeter.org> References: <1463912514-12658-1-git-send-email-davidkiarie4@gmail.com> <1463912514-12658-3-git-send-email-davidkiarie4@gmail.com> <20160524065432.GF8247@pxdev.xzpeter.org> <5743FD5C.8060002@gmail.com> <20160618123244.GL27635@pxdev.xzpeter.org> <57653FD2.4040303@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <57653FD2.4040303@web.de> Subject: Re: [Qemu-devel] [V11 2/4] hw/i386: ACPI IVRS table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: David Kiarie , Valentine Sinitsyn , QEMU Developers , "Michael S. Tsirkin" , Marcel Apfelbaum On Sat, Jun 18, 2016 at 02:34:26PM +0200, Jan Kiszka wrote: > On 2016-06-18 14:32, Peter Xu wrote: > > On Sat, Jun 18, 2016 at 11:18:29AM +0300, David Kiarie wrote: [...] > >> I missed this is the last version of the patch I should fix it in next version. > >> > >> On taking a closer look at this there might be larger problem where > >> with the advent of -device users can possibly emulate two > >> IOMMUs at the same time ? A proposed solution was to have > >> pci_setup_iommu check that DMA hook as not been setup yet and fail if > >> yes. I should send a fix for that too. > > > > Currently we should only support single vIOMMU. If you are going to > > rebase to x86-iommu codes, there is a patch that includes the check: > > > > "[PATCH v9 02/25] x86-iommu: provide x86_iommu_get_default" > > > > by: > > > > assert(x86_iommu_default == NULL); > > > > Maybe we should print something more readable, like "multiple vIOMMUs > > are not supported yet", rather than an assertion fail. > > You need proper error handling and a readable error message because > nothing else will stop the user from doing -device intel-iommu -device > amd-iommu. Will do. Thanks. -- peterx