From 57726405ee90c4ae229ebf0026076a4202d6493a Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Thu, 7 Jul 2022 15:48:53 +0100 Subject: [PATCH] Revert "ANDROID: KVM: arm64: iommu: No powered check in DABT handler" This reverts commit 2c05ff981ae74ec77db31df2ffd435e54265c818. Bug: 233587962 Signed-off-by: Will Deacon Change-Id: I164f13bb4bd466e86cec2d07cda67a7641049f7a --- arch/arm64/kvm/hyp/nvhe/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kvm/hyp/nvhe/iommu.c b/arch/arm64/kvm/hyp/nvhe/iommu.c index 3c0d2327a839..9ad3e8079e03 100644 --- a/arch/arm64/kvm/hyp/nvhe/iommu.c +++ b/arch/arm64/kvm/hyp/nvhe/iommu.c @@ -467,8 +467,7 @@ bool pkvm_iommu_host_dabt_handler(struct kvm_cpu_context *host_ctxt, u32 esr, if (pa < dev->pa || pa >= dev->pa + dev->size) continue; - /* No 'powered' check - the host assumes it is powered. */ - if (!dev->ops->host_dabt_handler || + if (!dev->powered || !dev->ops->host_dabt_handler || !dev->ops->host_dabt_handler(dev, host_ctxt, esr, pa - dev->pa)) return false;