From: Jan Kiszka <[email protected]> There is no need to preserve existing settings, and reserved fields can always be overwritten by zeros (Should-Be-Zero-*or*-Preserved).
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm64/smmu.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/hypervisor/arch/arm64/smmu.c b/hypervisor/arch/arm64/smmu.c index 9078fbe9..34c99a6a 100644 --- a/hypervisor/arch/arm64/smmu.c +++ b/hypervisor/arch/arm64/smmu.c @@ -96,8 +96,6 @@ #define sCR0_PTM (1 << 12) #define sCR0_FB (1 << 13) #define sCR0_VMID16EN (1 << 31) -#define sCR0_BSU_SHIFT 14 -#define sCR0_BSU_MASK 0x3 /* Auxiliary Configuration Register */ #define ARM_SMMU_GR0_sACR 0x10 @@ -532,23 +530,11 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu) mmio_write32(gr0_base + ARM_SMMU_GR0_TLBIALLH, 0); mmio_write32(gr0_base + ARM_SMMU_GR0_TLBIALLNSNH, 0); - reg = mmio_read32(ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0); - /* Enable fault reporting */ - reg |= (sCR0_GFRE | sCR0_GFIE | sCR0_GCFGFRE | sCR0_GCFGFIE); - - /* Disable TLB broadcasting. */ - reg |= (sCR0_VMIDPNE | sCR0_PTM); - - /* Enable client access, handling unmatched streams as appropriate */ - reg &= ~sCR0_CLIENTPD; - reg |= sCR0_USFCFG; - - /* Disable forced broadcasting */ - reg &= ~sCR0_FB; + reg = sCR0_GFRE | sCR0_GFIE | sCR0_GCFGFRE | sCR0_GCFGFIE; - /* Don't upgrade barriers */ - reg &= ~(sCR0_BSU_MASK << sCR0_BSU_SHIFT); + /* Private VMIDS, disable TLB broadcasting, fault unmatched streams */ + reg |= sCR0_VMIDPNE | sCR0_PTM | sCR0_USFCFG; if (smmu->features & ARM_SMMU_FEAT_VMID16) reg |= sCR0_VMID16EN; -- 2.26.2 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/7659ef3cc6a0b58bfea92f5d757d9b6b544be7c4.1602664150.git.jan.kiszka%40siemens.com.
