OSDN Git Service

iommu/arm-smmu: don't bother truncating the s1 output size to VA_BITS
authorWill Deacon <will.deacon@arm.com>
Mon, 1 Sep 2014 15:24:48 +0000 (16:24 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 16 Sep 2014 18:15:18 +0000 (19:15 +0100)
commit28d6007ba2fd344164e01ef300af7f621e9e6b0d
tree7023d55de7fec73737bfbb2c30cf44163dc2aba8
parentc757e8528a304214d0a9be2e99011b94bf374d37
iommu/arm-smmu: don't bother truncating the s1 output size to VA_BITS

In order for nested translation to work correctly, we need to ensure
that the maximum output address size from stage-1 is <= the maximum
supported input address size to stage-2. The latter is currently defined
by VA_BITS, since we make use of the CPU page table functions for
allocating out tables and so the driver currently enforces this
restriction by truncating the stage-1 output size during probe.

In reality, this doesn't make a lot of sense; the guest OS is responsible
for managing the stage-1 page tables, so we actually just need to ensure
that the ID registers of the virtual SMMU interface only advertise the
supported stage-2 input size.

This patch fixes the problem by treating the stage-1 and stage-2 input
address sizes separately.

Reported-by: Tirumalesh Chalamarla <tchalamarla@cavium.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu.c