[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/40] spapr_iommu: Disable in-kernel IOMMU tables fo
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 05/40] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows |
Date: |
Wed, 3 Jun 2015 23:45:06 +0200 |
From: Alexey Kardashevskiy <address@hidden>
The existing KVM_CREATE_SPAPR_TCE ioctl only support 4G windows max as
the window size parameter to the kernel ioctl() is 32-bit so
there's no way of expressing a TCE window > 4GB.
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.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <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 f3990fd..e19bf89 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -126,11 +126,11 @@ static MemoryRegionIOMMUOps spapr_iommu_ops = {
static int spapr_tce_table_realize(DeviceState *dev)
{
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
+ uint64_t window_size = (uint64_t)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);
}
--
1.8.1.4
- [Qemu-devel] [PULL 00/40] ppc patch queue 2015-06-03, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 02/40] dtc: Update dtc / libfdt submodule to version 1.4.0, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 03/40] configure: Check for libfdt version 1.4.0, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 01/40] macio: Convert to realize(), Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 10/40] spapr_iommu: Add separate trace points for PCI DMA operations, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 23/40] spapr_rtas: add get-sensor-state RTAS interface, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 31/40] pci: make pci_bar useable outside pci.c, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 05/40] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows,
Alexander Graf <=
- [Qemu-devel] [PULL 33/40] spapr_pci: emit hotplug add/remove events during hotplug, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 04/40] spapr_pci: Fix unsafe signed/unsigned comparisons, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 30/40] spapr_pci: create DRConnectors for each PCI slot during PHB realize, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 15/40] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 24/40] spapr: add rtas_st_buffer_direct() helper, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 12/40] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 08/40] spapr_vio: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 06/40] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 07/40] spapr_pci: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03