qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCH qemu 2/2] spapr_pci: Advertise 16M IOMMU pages when available
Date: Thu, 22 Dec 2016 16:22:12 +1100	[thread overview]
Message-ID: <20161222052212.49006-3-aik@ozlabs.ru> (raw)
In-Reply-To: <20161222052212.49006-1-aik@ozlabs.ru>

On sPAPR, IOMMU page size varies and if QEMU is running with RAM
backed with hugepages, we can advertise this to the guest so does
this patch.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/ppc/spapr_pci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index fd6fc1d953..09244056fc 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1505,6 +1505,9 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)
     }
 
     /* DMA setup */
+    /* This allows huge pages for IOMMU when guest is backed with huge pages */
+    sphb->page_size_mask |= qemu_getrampagesize();
+
     for (i = 0; i < windows_supported; ++i) {
         tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn[i]);
         if (!tcet) {
-- 
2.11.0

  parent reply	other threads:[~2016-12-22  5:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-22  5:22 [Qemu-devel] [PATCH qemu 0/2] exec, spapr_pci: Advertise huge IOMMU pages Alexey Kardashevskiy
2016-12-22  5:22 ` [Qemu-devel] [PATCH qemu 1/2] exec, kvm, target-ppc: Move getrampagesize() to common code Alexey Kardashevskiy
2017-01-02 23:34   ` David Gibson
2017-02-09  5:43     ` Alexey Kardashevskiy
2017-02-09 11:48       ` Paolo Bonzini
2017-02-10  0:41         ` David Gibson
2017-02-28  8:12           ` Alexey Kardashevskiy
2017-03-01  1:06             ` David Gibson
2017-03-01  2:52               ` David Gibson
2016-12-22  5:22 ` Alexey Kardashevskiy [this message]
2017-01-02 23:41   ` [Qemu-devel] [PATCH qemu 2/2] spapr_pci: Advertise 16M IOMMU pages when available David Gibson
2017-01-09  2:06     ` Alexey Kardashevskiy
2017-01-12  5:09       ` David Gibson

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=20161222052212.49006-3-aik@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --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).