diff mbox

48-bit VA support in the SMMU

Message ID decb25f05ca84d439e071f6ad8cf0086@BN3PR0301MB1219.namprd03.prod.outlook.com (mailing list archive)
State New, archived
Headers show

Commit Message

Varun Sethi Nov. 20, 2014, 1:25 a.m. UTC
Hi Will,
What specific tweaks are required in the arm-smmu driver? I thought that the upstream arm-smmu (3.18-rc3) driver does support 48 bit input address (depended on the ARM64 kernel 48 bit support). Isn't this dependent on the VA_BITS?  

Regards
Varun

-----Original Message-----
From: Yoder Stuart-B08248 
Sent: Thursday, November 20, 2014 5:00 AM
To: Will Deacon
Cc: linux-arm-kernel@lists.infradead.org; Sethi Varun-B16395; Christoffer Dall
Subject: 48-bit VA support in the SMMU

Hi Will,

Regarding 48-bit support at the SMMU, this patch is currently in the kernel:

commit 04f905a9569ca2b6964a35563f135fabbb2470bc
Author: Christoffer Dall <christoffer.dall@linaro.org>
Date:   Fri Oct 10 11:14:30 2014 +0100

    arm64: Allow 48-bits VA space without ARM_SMMU

    Now when KVM has been reworked to support 48-bits host VA space, we can
    allow systems to be configured with this option.  However, the ARM SMMU
    driver also needs to be tweaked for 48-bit support so only allow the
    config option to be set when not including support for theSMMU.

    Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>


Do you know the status of any work to remove this limitation?

Thanks,
Stuart

Comments

Will Deacon Nov. 20, 2014, 10:08 a.m. UTC | #1
On Thu, Nov 20, 2014 at 01:25:18AM +0000, Varun Sethi wrote:
> What specific tweaks are required in the arm-smmu driver? I thought that
> the upstream arm-smmu (3.18-rc3) driver does support 48 bit input address
> (depended on the ARM64 kernel 48 bit support). Isn't this dependent on the
> VA_BITS?  

Yeah, but it won't work for stage-2 mappings. I'm currently rewriting the
page table code to allow this (see my iommu/pgtbl branch).

Will
Varun Sethi Nov. 20, 2014, 1:05 p.m. UTC | #2
Thanks Will. But still, if things work for the stage 1 case why disable 48 bit support for the SMMU driver. Wouldn't stage-2 be relevant in case of virtual SMMU?

Regards
Varun

-----Original Message-----
From: Will Deacon [mailto:will.deacon@arm.com] 
Sent: Thursday, November 20, 2014 3:38 PM
To: Sethi Varun-B16395
Cc: Yoder Stuart-B08248; linux-arm-kernel@lists.infradead.org; Christoffer Dall
Subject: Re: 48-bit VA support in the SMMU

On Thu, Nov 20, 2014 at 01:25:18AM +0000, Varun Sethi wrote:
> What specific tweaks are required in the arm-smmu driver? I thought 
> that the upstream arm-smmu (3.18-rc3) driver does support 48 bit input 
> address (depended on the ARM64 kernel 48 bit support). Isn't this 
> dependent on the VA_BITS?

Yeah, but it won't work for stage-2 mappings. I'm currently rewriting the page table code to allow this (see my iommu/pgtbl branch).

Will
Will Deacon Nov. 20, 2014, 1:25 p.m. UTC | #3
On Thu, Nov 20, 2014 at 01:05:51PM +0000, Varun Sethi wrote:
> Thanks Will. But still, if things work for the stage 1 case why disable 48
> bit support for the SMMU driver. Wouldn't stage-2 be relevant in case of
> virtual SMMU?

Well, VFIO installs at stage-2 and the host kernel needs to be able to
handle that. The virtual SMMU interface always installs at stage-1.

Will
diff mbox

Patch

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index ac9afde..b8053be 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -232,7 +232,7 @@  config ARM64_VA_BITS_42

 config ARM64_VA_BITS_48
        bool "48-bit"
-       depends on BROKEN
+       depends on !ARM_SMMU

 endchoice