From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ykqcc-0000az-TS for qemu-devel@nongnu.org; Wed, 22 Apr 2015 05:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkqcY-0000I0-NJ for qemu-devel@nongnu.org; Wed, 22 Apr 2015 05:07:06 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkqcY-0000Hh-HD for qemu-devel@nongnu.org; Wed, 22 Apr 2015 05:07:02 -0400 Received: by paboj16 with SMTP id oj16so267535285pab.0 for ; Wed, 22 Apr 2015 02:07:00 -0700 (PDT) Message-ID: <553764AC.3010607@ozlabs.ru> Date: Wed, 22 Apr 2015 19:06:52 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1428679484-15451-1-git-send-email-aik@ozlabs.ru> <1428679484-15451-13-git-send-email-aik@ozlabs.ru> <20150422064659.GQ31815@voom.redhat.com> In-Reply-To: <20150422064659.GQ31815@voom.redhat.com> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH qemu v6 12/15] spapr_vfio_pci: Remove redundant spapr-pci-vfio-host-bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Alexander Graf , Michael Roth , qemu-devel@nongnu.org, Alex Williamson , qemu-ppc@nongnu.org, Gavin Shan On 04/22/2015 04:47 PM, David Gibson wrote: > On Sat, Apr 11, 2015 at 01:24:41AM +1000, Alexey Kardashevskiy wrote: >> sPAPRTCETable is handling 2 TCE tables already: >> >> 1) guest view of the TCE table - emulated devices use only this table; >> >> 2) hardware IOMMU table - VFIO PCI devices use it for actual work but >> it does not replace 1) and it is not visible to the guest. >> The initialization of this table is driven by vfio-pci device, >> DMA map/unmap requests are handled via MemoryListener so there is very >> little to do in spapr-pci-vfio-host-bridge. >> >> This moves VFIO bits to the generic spapr-pci-host-bridge which allows >> putting emulated and VFIO devices on the same PHB. It is still possible >> to create multiple PHBs and avoid sharing PHB resouces for emulated and >> VFIO devices. >> >> If there is no VFIO-PCI device attaches, no special ioctls will be called. >> If there are some VFIO-PCI devices attached, PHB may refuse to attach >> another VFIO-PCI device if a VFIO container on the host kernel side >> does not support >> container sharing. >> >> This changes spapr-pci-host-bridge to support properties of >> spapr-pci-vfio-host-bridge. This makes spapr-pci-vfio-host-bridge type >> equal to spapr-pci-host-bridge. >> >> Signed-off-by: Alexey Kardashevskiy > > Reviewed-by: David Gibson > >> --- >> >> How do create aliases for types? > > ^^ I assume this is left over from some notes of your own? Nope, this is a question to the public. I ended up having 2 different QOM types (one is derived from another and has an extra property - "iommuid") while I could (probably) have just one (spapr-pci-host-bridge) and the other (spapr-pci-vfio-host-bridge) would be an alias as we have aliases for machines (when "pseries" is an alias for "pseries-2.3", etc). I am fine with the existing approach as it does not add new property to spapr-pci-host-bridge (otherwise it would have to), but still. -- Alexey