From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX7Bc-0006q5-6Q for qemu-devel@nongnu.org; Wed, 02 Sep 2015 08:30:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX7BX-0003jY-QD for qemu-devel@nongnu.org; Wed, 02 Sep 2015 08:30:44 -0400 References: <1441133302-18950-1-git-send-email-knut.omang@oracle.com> From: Marcel Apfelbaum Message-ID: <55E6EBE1.5070709@gmail.com> Date: Wed, 2 Sep 2015 15:30:25 +0300 MIME-Version: 1.0 In-Reply-To: <1441133302-18950-1-git-send-email-knut.omang@oracle.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/2] intel_iommu: Add support for translation for devices behind bridges Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Knut Omang , qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , Jan Kiszka , Le Tan , Alexander Graf , Alex Williamson , qemu-ppc@nongnu.org, David Gibson , Paolo Bonzini , Richard Henderson , =?UTF-8?Q?Andreas_F=c3=a4rber?= On 09/01/2015 09:48 PM, Knut Omang wrote: > This patch set changes the data structure used to handle address spaces within > the emulated Intel iommu to support traversal also if bus numbers are dynamically > allocated, as is the case for devices that sit behind root ports or downstream switches. > This means that we cannot use bus number as index, instead a QLIST is used. > > This requires a change in the API for setup of IOMMUs which is taken care of by > the first patch. The second patch implements the fix. > > The initial patch set had some discussion related to whether this fix, applied to the > bridge code, was applicable to all bridges. No clear conclusion arised as far as I understood, > in the meantime a number of people have run into the same issue as I did which lead me > to implement this, so I gather it might be a useful intermediate solution that works until > a better approach can be found? I believe the IOMMU emulation code has limited usefulness > if it only supports devices sitting directly on the root complex. Hi, Thank you for (re)sending the patches! While I believe you are perfectly right and IOMMU would benefit from this addition, I saw that are some reviews in the prev thread that are not purely theoretical/philosophical. E.g. PCIDevice *dev field in VTDAddressSpace and maybe a few more. I would suggest to address them so it will be easier to continue the review process. Thank you, Marcel > > This is the thread following the initial patch set: > > http://thread.gmane.org/gmane.comp.emulators.qemu/302246 > > The patch set was also discussed in this thread: > > http://thread.gmane.org/gmane.comp.emulators.qemu/316949 > > Changes from v1: > - Rebased to current master > - Fixed minor syntax issues > > Knut Omang (2): > iommu: Replace bus+devfn arguments with PCIDevice* in PCIIOMMUFunc > intel_iommu: Add support for translation for devices behind bridges. > > hw/alpha/typhoon.c | 2 +- > hw/i386/intel_iommu.c | 56 +++++++++++++++++++------------------------ > hw/pci-host/apb.c | 2 +- > hw/pci-host/prep.c | 3 +-- > hw/pci-host/q35.c | 42 +++++++++++++------------------- > hw/pci/pci.c | 7 +++--- > hw/pci/pci_bridge.c | 6 +++++ > hw/ppc/spapr_pci.c | 2 +- > include/hw/i386/intel_iommu.h | 6 +++-- > include/hw/pci/pci.h | 5 +++- > 10 files changed, 62 insertions(+), 69 deletions(-) > > -- > 2.4.3 >