[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [RFC PATCH 02/10] spapr_iommu: Disable in-kernel IOMMU tables
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [RFC PATCH 02/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows |
Date: |
Thu, 31 Jul 2014 19:34:06 +1000 |
The existing KVM_CREATE_SPAPR_TCE ioctl only support 4G windows max.
We are going to add huge DMA windows support so this will create small
window and unexpectedly fail later.
This disables KVM_CREATE_SPAPR_TCE for windows bigger that 4GB. Since
those windows are normally mapped at the boot time, there will be no
performance impact.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
hw/ppc/spapr_iommu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index f6e32a4..36f5d27 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -113,11 +113,11 @@ static MemoryRegionIOMMUOps spapr_iommu_ops = {
static int spapr_tce_table_realize(DeviceState *dev)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
+ uint64_t window_size = tcet->nb_table << tcet->page_shift;
- if (kvm_enabled()) {
+ if (kvm_enabled() && !(window_size >> 32)) {
tcet->table = kvmppc_create_spapr_tce(tcet->liobn,
- tcet->nb_table <<
- tcet->page_shift,
+ window_size,
&tcet->fd,
tcet->vfio_accel);
}
--
2.0.0
- [Qemu-ppc] [RFC PATCH 00/10] spapr: vfio: Enable Dynamic DMA windows (DDW), Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 05/10] linux headers update for DDW, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 06/10] spapr_rtas: Add Dynamic DMA windows (DDW) RTAS calls support, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 03/10] spapr_pci: Make find_phb()/find_dev() public, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 07/10] spapr: Add "ddw" machine option, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 01/10] qom: Make object_child_foreach safe for objects removal, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 08/10] spapr_pci: Enable DDW, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 02/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows,
Alexey Kardashevskiy <=
- [Qemu-ppc] [RFC PATCH 09/10] spapr_pci_vfio: Enable DDW, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 10/10] vfio: Enable DDW ioctls to VFIO IOMMU driver, Alexey Kardashevskiy, 2014/07/31
- [Qemu-ppc] [RFC PATCH 04/10] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexey Kardashevskiy, 2014/07/31