[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH qemu 2/2] spapr_pci: Advertise 16M IOMMU pages when av
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH qemu 2/2] spapr_pci: Advertise 16M IOMMU pages when available |
Date: |
Thu, 22 Dec 2016 16:22:12 +1100 |
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 <address@hidden>
---
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