From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XETag-0003re-QB for qemu-devel@nongnu.org; Mon, 04 Aug 2014 21:31:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XETaU-00064q-1d for qemu-devel@nongnu.org; Mon, 04 Aug 2014 21:31:02 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:36594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XETaT-00064L-R6 for qemu-devel@nongnu.org; Mon, 04 Aug 2014 21:30:49 -0400 Received: by mail-pa0-f52.google.com with SMTP id bj1so358221pad.11 for ; Mon, 04 Aug 2014 18:30:48 -0700 (PDT) Message-ID: <53E033C2.5030502@ozlabs.ru> Date: Tue, 05 Aug 2014 11:30:42 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1406799254-25223-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1406799254-25223-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 00/10] spapr: vfio: Enable Dynamic DMA windows (DDW) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alex Williamson , qemu-ppc@nongnu.org, Alexander Graf On 07/31/2014 07:34 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. > > 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. > > Please comment. Thanks! Alexander Graf, ping! > Alexey Kardashevskiy (10): > qom: Make object_child_foreach safe for objects removal > spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows > spapr_pci: Make find_phb()/find_dev() public > spapr_iommu: Make spapr_tce_find_by_liobn() public > linux headers update for DDW > spapr_rtas: Add Dynamic DMA windows (DDW) RTAS calls support > spapr: Add "ddw" machine option > spapr_pci: Enable DDW > spapr_pci_vfio: Enable DDW > vfio: Enable DDW ioctls to VFIO IOMMU driver > > hw/misc/vfio.c | 4 + > hw/ppc/Makefile.objs | 3 + > hw/ppc/spapr.c | 15 +++ > hw/ppc/spapr_iommu.c | 8 +- > hw/ppc/spapr_pci.c | 87 +++++++++++-- > hw/ppc/spapr_pci_vfio.c | 75 +++++++++++ > hw/ppc/spapr_rtas_ddw.c | 296 ++++++++++++++++++++++++++++++++++++++++++++ > include/hw/pci-host/spapr.h | 27 ++++ > include/hw/ppc/spapr.h | 7 +- > linux-headers/linux/vfio.h | 37 +++++- > qom/object.c | 4 +- > trace-events | 4 + > vl.c | 4 + > 13 files changed, 552 insertions(+), 19 deletions(-) > create mode 100644 hw/ppc/spapr_rtas_ddw.c > -- Alexey