From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH v4 00/18] spapr: vfio: Enable Dynamic DMA windows (DDW)
Date: Fri, 30 Jan 2015 15:01:38 +1100 [thread overview]
Message-ID: <54CB0222.60300@ozlabs.ru> (raw)
In-Reply-To: <1422523650-2888-1-git-send-email-aik@ozlabs.ru>
Hi!
Forgot to mention - this is RFC only as 1) it depends on the host kernel
changes 2) does not support migration for emulated PHB + DDW, I think I
have to give David's idea with TCE table stub object a go.
Thanks
On 01/29/2015 08:27 PM, Alexey Kardashevskiy wrote:
> At the moment sPAPR PHB supports only a single 32bit window
> which is normally 1..2GB which is not enough for high performance devices.
>
> PAPR spec enables creating an additional window(s) to support 64bit
> DMA and bigger page sizes.
>
> This patchset adds DDW support for pseries. The host kernel changes are
> required, posted earlier today as:
> [PATCH v3 00/24] powerpc/iommu/vfio: Enable Dynamic DMA windows
>
> This was tested on POWER8 system which allows one additional DMA window
> which is mapped at 0x800.0000.0000.0000 and supports 16MB pages.
> Existing guests check for DDW capabilities in PHB's device tree and if it
> is present, they request for an additional window and map entire guest RAM
> using H_PUT_TCE/... hypercalls once at boot time and switch to direct DMA
> operations.
>
> TCE tables still may be big enough for guests backed with 64K pages but they
> are reasonably small for guests backed by 16MB pages.
>
>
> This does not contain PCI 64bit BAR support and VIO-TCE-bypass rework, these
> are required for this to work but they have been posted separately today.
>
>
> Please comment. Thanks!
>
> Changes:
> v4:
> * (!) reimplemented the whole thing
> * machine reset and ddw-reset RTAS call both remove all TCE tables and
> create the default one
> * IOMMU group id is not needed to use VFIO PHB anymore, multiple groups
> are supported on the same VFIO container and virtual PHB
>
> v3:
> * removed "reset" from API now
> * reworked machine versions
> * applied multiple comments
> * includes David's machine QOM rework as this patchset adds a new machine type
>
> v2:
> * tested on emulated PHB
> * removed "ddw" machine property, now it is PHB property
> * disabled by default
> * defined "pseries-2.2" machine which enables DDW by default
> * fixed reset() and reference counting
>
>
>
>
> Alexey Kardashevskiy (18):
> spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows
> spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe
> spapr_pci: Introduce a liobn number generating macros
> spapr_vio: Introduce a liobn number generating macros
> spapr_pci: Make find_phb()/find_dev() public
> spapr_iommu: Make spapr_tce_find_by_liobn() public
> spapr_iommu: Implement free_table() helper
> vfio: Add DMA memory registering
> spapr_rtas: Reserve DDW RTAS token numbers
> spapr_pci: Define DDW callbacks
> spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)
> spapr_rtas: Add Dynamic DMA windows (DDW) RTAS handlers
> spapr_pci: Advertise dynamic DMA windows to guest
> vfio: Enable DDW ioctls to VFIO IOMMU driver
> spapr_pci_vfio: Enable multiple groups per container
> spapr_rtas_ddw: Workaround broken LE guests
> target-ppc: kvm: make use of KVM_CREATE_SPAPR_TCE_64
> vfio: Enable in-kernel acceleration via VFIO KVM device
>
> hw/ppc/Makefile.objs | 3 +
> hw/ppc/spapr.c | 5 +
> hw/ppc/spapr_iommu.c | 23 ++-
> hw/ppc/spapr_pci.c | 209 ++++++++++++++++++++------
> hw/ppc/spapr_pci_vfio.c | 108 +++++++++-----
> hw/ppc/spapr_rtas.c | 29 ++++
> hw/ppc/spapr_rtas_ddw.c | 337 ++++++++++++++++++++++++++++++++++++++++++
> hw/ppc/spapr_vio.c | 2 +-
> hw/vfio/common.c | 167 ++++++++++++++++++---
> include/hw/pci-host/spapr.h | 38 ++++-
> include/hw/ppc/spapr.h | 15 +-
> include/hw/vfio/vfio-common.h | 3 +-
> include/hw/vfio/vfio.h | 6 +-
> target-ppc/kvm.c | 48 ++++--
> target-ppc/kvm_ppc.h | 10 +-
> trace-events | 4 +
> 16 files changed, 881 insertions(+), 126 deletions(-)
> create mode 100644 hw/ppc/spapr_rtas_ddw.c
>
--
Alexey
prev parent reply other threads:[~2015-01-30 4:02 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 9:27 [Qemu-devel] [PATCH v4 00/18] spapr: vfio: Enable Dynamic DMA windows (DDW) Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 01/18] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 02/18] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe Alexey Kardashevskiy
2015-02-02 6:30 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 03/18] spapr_pci: Introduce a liobn number generating macros Alexey Kardashevskiy
2015-02-04 15:31 ` Alexander Graf
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 04/18] spapr_vio: " Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 05/18] spapr_pci: Make find_phb()/find_dev() public Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 06/18] spapr_iommu: Make spapr_tce_find_by_liobn() public Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 07/18] spapr_iommu: Implement free_table() helper Alexey Kardashevskiy
2015-02-02 6:37 ` David Gibson
2015-02-03 1:32 ` Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 08/18] vfio: Add DMA memory registering Alexey Kardashevskiy
2015-02-02 7:04 ` David Gibson
2015-02-17 2:14 ` Alexey Kardashevskiy
2015-02-17 23:53 ` David Gibson
2015-02-17 2:20 ` [Qemu-devel] [PATCH v4 08/18] vfio: Add DMA memory registering [repost] Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 09/18] spapr_rtas: Reserve DDW RTAS token numbers Alexey Kardashevskiy
2015-02-02 7:09 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 10/18] spapr_pci: Define DDW callbacks Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 11/18] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) Alexey Kardashevskiy
2015-02-05 3:51 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 12/18] spapr_rtas: Add Dynamic DMA windows (DDW) RTAS handlers Alexey Kardashevskiy
2015-02-05 4:05 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 13/18] spapr_pci: Advertise dynamic DMA windows to guest Alexey Kardashevskiy
2015-02-05 4:10 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 14/18] vfio: Enable DDW ioctls to VFIO IOMMU driver Alexey Kardashevskiy
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 15/18] spapr_pci_vfio: Enable multiple groups per container Alexey Kardashevskiy
2015-02-05 4:19 ` David Gibson
2015-02-17 0:34 ` Alexey Kardashevskiy
2015-02-17 23:52 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 16/18] spapr_rtas_ddw: Workaround broken LE guests Alexey Kardashevskiy
2015-02-05 4:23 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 17/18] target-ppc: kvm: make use of KVM_CREATE_SPAPR_TCE_64 Alexey Kardashevskiy
2015-02-05 4:30 ` David Gibson
2015-01-29 9:27 ` [Qemu-devel] [PATCH v4 18/18] vfio: Enable in-kernel acceleration via VFIO KVM device Alexey Kardashevskiy
2015-02-05 4:49 ` David Gibson
2015-02-17 2:36 ` Alexey Kardashevskiy
2015-02-17 23:56 ` David Gibson
2015-01-30 4:01 ` Alexey Kardashevskiy [this message]
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=54CB0222.60300@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=david@gibson.dropbear.id.au \
--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).