[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v2 02/13] spapr_iommu: Disable in-kernel IOM
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [RFC PATCH v2 02/13] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows |
Date: |
Tue, 19 Aug 2014 10:43:30 +1000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Aug 15, 2014 at 08:12:24PM +1000, Alexey Kardashevskiy wrote:
> 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>
I think perhaps the crucial point here is that the window size
parameter to the kernel ioctl() is only 32-bit, so there's no way of
expressing a TCE window > 4GB.
> ---
> 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;
tcet->nb_table is only 32-bit itself, so this isn't going to work as
intended without a cast.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
pgpTgwzGcCYVd.pgp
Description: PGP signature
- Re: [Qemu-devel] [RFC PATCH v2 11/13] spapr_pci_vfio: Enable DDW, (continued)
- [Qemu-devel] [RFC PATCH v2 08/13] spapr_pci: Enable DDW, Alexey Kardashevskiy, 2014/08/15
- [Qemu-devel] [RFC PATCH v2 03/13] spapr_pci: Make find_phb()/find_dev() public, Alexey Kardashevskiy, 2014/08/15
- [Qemu-devel] [RFC PATCH v2 05/13] spapr_pci: Introduce a liobn number generating macros, Alexey Kardashevskiy, 2014/08/15
- [Qemu-devel] [RFC PATCH v2 04/13] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexey Kardashevskiy, 2014/08/15
- [Qemu-devel] [RFC PATCH v2 02/13] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, Alexey Kardashevskiy, 2014/08/15
- [Qemu-devel] [RFC PATCH v2 10/13] linux headers update for DDW, Alexey Kardashevskiy, 2014/08/15
[Qemu-devel] [RFC PATCH v2 07/13] spapr_rtas: Add Dynamic DMA windows (DDW) RTAS calls support, Alexey Kardashevskiy, 2014/08/15