From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Alexander Graf <agraf@suse.de>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
qemu-devel@nongnu.org,
Alex Williamson <alex.williamson@redhat.com>,
qemu-ppc@nongnu.org, Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH qemu v6 12/15] spapr_vfio_pci: Remove redundant spapr-pci-vfio-host-bridge
Date: Wed, 22 Apr 2015 19:06:52 +1000 [thread overview]
Message-ID: <553764AC.3010607@ozlabs.ru> (raw)
In-Reply-To: <20150422064659.GQ31815@voom.redhat.com>
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 <aik@ozlabs.ru>
>
> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
>
>> ---
>>
>> 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
next prev parent reply other threads:[~2015-04-22 9:07 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 15:24 [Qemu-devel] [PATCH qemu v6 00/15] spapr: vfio: Enable Dynamic DMA windows (DDW) Alexey Kardashevskiy
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 01/15] linux headers update for DDW on SPAPR Alexey Kardashevskiy
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 02/15] vmstate: Define VARRAY with VMS_ALLOC Alexey Kardashevskiy
2015-04-15 3:47 ` David Gibson
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 03/15] spapr_pci: Make find_phb()/find_dev() public Alexey Kardashevskiy
2015-04-21 20:44 ` Michael Roth
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 04/15] vfio: spapr: Move SPAPR-related code to a separate file Alexey Kardashevskiy
2015-04-16 7:50 ` Thomas Huth
2015-04-16 16:27 ` Alexey Kardashevskiy
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 05/15] spapr_pci_vfio: Enable multiple groups per container Alexey Kardashevskiy
2015-04-22 5:34 ` David Gibson
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 06/15] spapr_pci: Convert finish_realize() to dma_capabilities_update()+dma_init_window() Alexey Kardashevskiy
2015-04-22 5:39 ` David Gibson
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 07/15] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering) Alexey Kardashevskiy
2015-04-16 10:07 ` Thomas Huth
2015-04-24 5:55 ` Alexey Kardashevskiy
2015-04-22 5:53 ` David Gibson
2015-04-22 9:38 ` Alexey Kardashevskiy
2015-04-29 5:58 ` David Gibson
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 08/15] spapr_iommu: Introduce "enabled" state for TCE table Alexey Kardashevskiy
2015-04-16 10:59 ` Thomas Huth
2015-04-22 6:14 ` David Gibson
2015-04-22 9:10 ` Alexey Kardashevskiy
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 09/15] spapr_iommu: Add root memory region Alexey Kardashevskiy
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 10/15] spapr_pci_vfio: Remove unnecessary cast to sPAPRPHBVFIOState Alexey Kardashevskiy
2015-04-16 10:31 ` Thomas Huth
2015-04-17 1:55 ` Alexey Kardashevskiy
2015-04-22 6:33 ` David Gibson
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 11/15] spapr_pci: Do complete reset of DMA config when resetting PHB Alexey Kardashevskiy
2015-04-22 6:39 ` David Gibson
2015-04-22 9:17 ` Alexey Kardashevskiy
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 12/15] spapr_vfio_pci: Remove redundant spapr-pci-vfio-host-bridge Alexey Kardashevskiy
2015-04-22 6:47 ` David Gibson
2015-04-22 9:06 ` Alexey Kardashevskiy [this message]
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 13/15] spapr: Add pseries-2.4 machine Alexey Kardashevskiy
2015-04-22 6:48 ` David Gibson
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 14/15] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) Alexey Kardashevskiy
2015-04-10 15:24 ` [Qemu-devel] [PATCH qemu v6 15/15] vfio: Enable DDW ioctls to VFIO IOMMU driver Alexey Kardashevskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553764AC.3010607@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=gwshan@linux.vnet.ibm.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).