From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axra5-0000Io-PT for qemu-devel@nongnu.org; Wed, 04 May 2016 03:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axrZu-00043W-48 for qemu-devel@nongnu.org; Wed, 04 May 2016 03:50:44 -0400 Received: from mail-lf0-x233.google.com ([2a00:1450:4010:c07::233]:34384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axrZs-000417-KO for qemu-devel@nongnu.org; Wed, 04 May 2016 03:50:37 -0400 Received: by mail-lf0-x233.google.com with SMTP id m64so49767887lfd.1 for ; Wed, 04 May 2016 00:50:22 -0700 (PDT) References: <1461535977-331-1-git-send-email-davidkiarie4@gmail.com> <1461535977-331-3-git-send-email-davidkiarie4@gmail.com> <5722FA9E.4090607@web.de> From: Valentine Sinitsyn Message-ID: <5729A9B8.3060603@gmail.com> Date: Wed, 4 May 2016 12:50:16 +0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V9 2/4] hw/i386: ACPI table for AMD IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Kiarie , Jan Kiszka Cc: QEMU Developers , "Michael S. Tsirkin" , Marcel Apfelbaum , imammedo@redhat.com On 29.04.2016 13:28, David Kiarie wrote: > On Fri, Apr 29, 2016 at 9:09 AM, Jan Kiszka wrote: >> On 2016-04-25 00:12, David Kiarie wrote: >>> Add IVRS table for AMD IOMMU. Generate IVRS or DMAR >>> depending on emulated IOMMU >> >> It seems you lack scope descriptions for the PCI devices in the system. >> At least, this is what our jailhouse config generator complains about >> right now (didn't look into details yet). If so, the guest OS will >> likely not configure the IOMMU appropriately as it thinks that the >> devices are passed through anyway. >> >> On Intel, there is an easy way to state "catch them all" in the ACPI >> table. Maybe AMD has this as well so that you don't need to add >> individual devices. > > This is what am currently doing. From what I can see, linux correctly > detects the range but I will have a look at it again before sending > the next version. > > There was another issue raised by Michael about denying VFIO in case a > user requests for IOMMU support. I did look at this but since VFIO is > started with '-device' I didn't find a way to deny it in case of IOMMU > support except by parsing command line arguments which turned out to > be a bit ugly. > > We could exclude VFIO from translation by IOMMU by excluding it from > the scope descriptions but am not quite sure this will remedy all the > problems relating to VFIO and IOMMU. This will also require the device > scope to explicitly list all the devices. You may also try listing everything "up to" VFIO, then everything "after" the VFIO, I guess. Valentine