qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alexander Graf <agraf@suse.de>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Alex Williamson <alex.williamson@redhat.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Gavin Shan <gwshan@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional
Date: Fri, 06 Jun 2014 13:38:08 +1000	[thread overview]
Message-ID: <1402025888.3247.178.camel@pasglop> (raw)
In-Reply-To: <5390FEF3.4080108@suse.de>

On Fri, 2014-06-06 at 01:36 +0200, Alexander Graf wrote:
> 
> It would be nicer if the guest had full control over the virtual
> address range of a PCI device.

It does ... within a HW window which can be different between P7 and
P8. 

On P7 all PEs on a PHB share a single DMA address space that gets sliced
up, I won't get into details on what kind of slices are available,
suffice to say we provide a single smallish window in 32-bit space for
each PE and the guest controls the 4k TCEs in there.

On P8, each PE has its own DMA address space which has 2 wnidows, one at
0 and one at 0x0800_0000_0000_0000.

By default we configure the 0 window for 32-bit/4K TCE remapping (we set
it to 2G window) for compatibility with existing PAPR expectations.

The high window is used in the host as a bypass. We disable TCEs and use
a direct mapping to physical memory through it instead to allow the host
drivers that are 64-bit DMA capable to have the fastest possible access
to memory.

When we pass-through a device today we disable that second window for
obvious reasons.

With Alexey patches, we'll be able to control it which will in turn
allow us to implement the PAPR "DDW" extension which allows the guest to
populate that second window. Typically the guest will use it to create a
full mapping of its entire address space in 64-bit space using the
largest possible TCE size (whose size is constrained by the page size
used to back the guest memory).

Here too, within those windows, the guest has control of the mappings.

Cheers,
Ben.

  parent reply	other threads:[~2014-06-06  3:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05  5:49 [Qemu-devel] [PATCH v7 0/4] vfio on spapr-ppc64 Alexey Kardashevskiy
2014-06-05  5:49 ` [Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional Alexey Kardashevskiy
2014-06-05  6:43   ` Alexey Kardashevskiy
2014-06-05 13:06     ` Alexander Graf
2014-06-05 13:10       ` Alexey Kardashevskiy
2014-06-05 13:15         ` Alexander Graf
2014-06-05 13:33           ` Alexey Kardashevskiy
2014-06-05 13:36             ` Alexander Graf
2014-06-05 14:33               ` Alexey Kardashevskiy
2014-06-05 16:51                 ` Alexander Graf
2014-06-05 23:17                   ` Alexey Kardashevskiy
2014-06-05 23:36                     ` Alexander Graf
2014-06-05 23:48                       ` Alexey Kardashevskiy
2014-06-06  3:38                       ` Benjamin Herrenschmidt [this message]
2014-06-05  5:49 ` [Qemu-devel] [PATCH v7 2/4] vfio: Add vfio_container_spapr_get_info() Alexey Kardashevskiy
2014-06-05 19:27   ` Alex Williamson
2014-06-05 23:40     ` Alexey Kardashevskiy
2014-06-06  1:32       ` Gavin Shan
2014-06-05  5:50 ` [Qemu-devel] [PATCH v7 3/4] spapr_pci_vfio: Add spapr-pci-vfio-host-bridge to support vfio Alexey Kardashevskiy
2014-06-05 13:34   ` Alexander Graf
2014-06-05 14:37     ` Alexey Kardashevskiy
2014-06-05  5:50 ` [Qemu-devel] [PATCH v7 4/4] vfio: Enable for spapr Alexey Kardashevskiy
2014-06-05 19:31   ` Alex Williamson
2014-06-05 23:39     ` 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=1402025888.3247.178.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=gwshan@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).