BACKPORT: FROMLIST: KVM: arm64: smmu-v3: Initialize registers

Ensure all writable registers are properly initialized. We do not touch
registers that will not be read by the SMMU due to disabled features.

Link: https://lore.kernel.org/all/20241212180423.1578358-27-smostafa@google.com/

Bug: 357781595
Bug: 384432312

Change-Id: I2f8ed283765c3b9fe577239be96b84164a6a23f1
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
Jean-Philippe Brucker
2024-12-12 18:03:50 +00:00
committed by Mostafa Saleh
parent c16a84d8e6
commit b414161ca3
2 changed files with 140 additions and 1 deletions
+11
View File
@@ -5,8 +5,19 @@
#include <asm/kvm_asm.h>
#include <kvm/iommu.h>
/*
* Parameters from the trusted host:
* @mmio_addr base address of the SMMU registers
* @mmio_size size of the registers resource
*
* Other members are filled and used at runtime by the SMMU driver.
*/
struct hyp_arm_smmu_v3_device {
struct kvm_hyp_iommu iommu;
phys_addr_t mmio_addr;
size_t mmio_size;
void __iomem *base;
};
extern size_t kvm_nvhe_sym(kvm_hyp_arm_smmu_v3_count);