From 8a8500235e3fd44818723ae1b169528ed565166f Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Mon, 6 Dec 2021 17:02:46 +0000 Subject: [PATCH] Revert "ANDROID: KVM: arm64: Unmap S2MPU MMIO regions in MPT" Unmapping S2MPU MMIO regions from MPTs is causing issues on oriole/raven because it forces a 4K mapping in the first physical GB region instead of 1G. During suspend AOC/APM can issue traffic through the S2MPUs and the page lookup transaction fails because the MIF is powered off. Revert the patch until the problem is fixed by AOC/APM device drivers. This reverts commit 533c59945d4c6562e3646afde92ecf6b648521a9. Test: unplug device, wait until it suspends, observe no crash Bug: 190463801 Bug: 209399107 Signed-off-by: David Brazdil Change-Id: I9a84ccf4ace459dc35918fc31d86933bc5b923f7 --- arch/arm64/kvm/hyp/nvhe/iommu/s2mpu.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/iommu/s2mpu.c b/arch/arm64/kvm/hyp/nvhe/iommu/s2mpu.c index a1286e1b3bc2..4d6e6a0ff94c 100644 --- a/arch/arm64/kvm/hyp/nvhe/iommu/s2mpu.c +++ b/arch/arm64/kvm/hyp/nvhe/iommu/s2mpu.c @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -453,11 +452,6 @@ static int s2mpu_init(void) */ for_each_powered_s2mpu(dev) initialize_with_mpt(dev, &kvm_hyp_host_mpt); - - /* Prevent DMA to the S2MPU MMIO regions. */ - for_each_s2mpu(dev) - s2mpu_host_stage2_set_owner(dev->pa, S2MPU_MMIO_SIZE, pkvm_hyp_id); - return 0; }