[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH qemu v10 00/14] spapr: vfio: Enable Dynamic DMA wi
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH qemu v10 00/14] spapr: vfio: Enable Dynamic DMA windows (DDW) |
Date: |
Mon, 6 Jul 2015 21:13:43 +1000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Jul 06, 2015 at 12:10:56PM +1000, Alexey Kardashevskiy wrote:
>
> (cut-n-paste from kernel patchset)
>
> Each Partitionable Endpoint (IOMMU group) has an address range on a PCI bus
> where devices are allowed to do DMA. These ranges are called DMA windows.
> By default, there is a single DMA window, 1 or 2GB big, mapped at zero
> on a PCI bus.
>
> PAPR defines a DDW RTAS API which allows pseries guests
> querying the hypervisor about DDW support and capabilities (page size mask
> for now). A pseries guest may request an additional (to the default)
> DMA windows using this RTAS API.
> The existing pseries Linux guests request an additional window as big as
> the guest RAM and map the entire guest window which effectively creates
> direct mapping of the guest memory to a PCI bus.
>
> This patchset reworks PPC64 IOMMU code and adds necessary structures
> to support big windows.
>
> Once a Linux guest discovers the presence of DDW, it does:
> 1. query hypervisor about number of available windows and page size masks;
> 2. create a window with the biggest possible page size (today 4K/64K/16M);
> 3. map the entire guest RAM via H_PUT_TCE* hypercalls;
> 4. switche dma_ops to direct_dma_ops on the selected PE.
>
> Once this is done, H_PUT_TCE is not called anymore for 64bit devices and
> the guest does not waste time on DMA map/unmap operations.
>
> Note that 32bit devices won't use DDW and will keep using the default
> DMA window so KVM optimizations will be required (to be posted later).
>
> This patchset adds DDW support for pseries. The host kernel changes are
> required, available in the current upstream.
>
> This patchset is based on git://github.com/dgibson/qemu.git spapr-next branch.
>
> Please comment. Thanks!
I've applied this to my "spapr-dev" branch. Here's what needs to
happen before I move it into spapr-next (which is what I'll be pushing
to Alex Graf).
* For you and Gavin to test it to see that DDW and EEH work properly
together
* Some word from Alex W on how he wants to go about merging 12-13/14
* Some indication about who should be merging 2/14
* Review from at least one more person - I've looked at so many
versions of the ddw patches I no longer trust that I've got it all
straight in my head
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
pgpoDSm6W6QLM.pgp
Description: PGP signature
- Re: [Qemu-ppc] [PATCH qemu v10 14/14] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW), (continued)
[Qemu-ppc] [PATCH qemu v10 05/14] spapr_iommu: Introduce "enabled" state for TCE table, Alexey Kardashevskiy, 2015/07/05
Re: [Qemu-ppc] [PATCH qemu v10 00/14] spapr: vfio: Enable Dynamic DMA windows (DDW),
David Gibson <=
Re: [Qemu-ppc] [Qemu-devel] [PATCH qemu v10 00/14] spapr: vfio: Enable Dynamic DMA windows (DDW), Thomas Huth, 2015/07/06