From 6ff074eb95b79a7e147ab578ae6813798ffa9f3d Mon Sep 17 00:00:00 2001 From: Mostafa Saleh Date: Mon, 21 Aug 2023 16:40:13 +0000 Subject: [PATCH] ANDROID: KVM: arm64: Remove HYP_SPIN_LOCK from generated code As HYP_SPIN_LOCK is used by modules, we can't include internal header for it. Instead we assume its 4, then assert this at runtime. Bug: 357781595 Bug: 384432312 Change-Id: I6d7b0c8fa8000c4e32c65fd8c98533e6ed17563f Signed-off-by: Mostafa Saleh --- arch/arm64/kvm/hyp/hyp-constants.c | 2 +- include/kvm/iommu.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm64/kvm/hyp/hyp-constants.c b/arch/arm64/kvm/hyp/hyp-constants.c index 96a6b45b424a..59bbfca0f5b3 100644 --- a/arch/arm64/kvm/hyp/hyp-constants.c +++ b/arch/arm64/kvm/hyp/hyp-constants.c @@ -8,6 +8,6 @@ int main(void) { DEFINE(STRUCT_HYP_PAGE_SIZE, sizeof(struct hyp_page)); - DEFINE(HYP_SPINLOCK_SIZE, sizeof(hyp_spinlock_t)); + return 0; } diff --git a/include/kvm/iommu.h b/include/kvm/iommu.h index c524ba84a9cf..5764b2f09a8b 100644 --- a/include/kvm/iommu.h +++ b/include/kvm/iommu.h @@ -7,8 +7,6 @@ #include #ifdef __KVM_NVHE_HYPERVISOR__ #include -#else -#include "hyp_constants.h" #endif struct kvm_hyp_iommu_domain {