aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2022-02-02 12:16:02 +0100
committerPeter Maydell <peter.maydell@linaro.org>2022-02-08 10:56:28 +0000
commit43530095e18fd16dcd51a4b385ad2a22c36f5698 (patch)
tree04166a80298fc734c815b45a1897ea861d14e265 /hw/arm
parent77cd997161cc853c758b68eebb52827d56bc020e (diff)
downloadqemu-43530095e18fd16dcd51a4b385ad2a22c36f5698.zip
qemu-43530095e18fd16dcd51a4b385ad2a22c36f5698.tar.gz
qemu-43530095e18fd16dcd51a4b385ad2a22c36f5698.tar.bz2
hw/arm/smmuv3: Fix device reset
We currently miss a bunch of register resets in the device reset function. This sometimes prevents the guest from rebooting after a system_reset (with virtio-blk-pci). For instance, we may get the following errors: invalid STE smmuv3-iommu-memory-region-0-0 translation failed for iova=0x13a9d2000(SMMU_EVT_C_BAD_STE) Invalid read at addr 0x13A9D2000, size 2, region '(null)', reason: rejected invalid STE smmuv3-iommu-memory-region-0-0 translation failed for iova=0x13a9d2000(SMMU_EVT_C_BAD_STE) Invalid write at addr 0x13A9D2000, size 2, region '(null)', reason: rejected invalid STE Signed-off-by: Eric Auger <eric.auger@redhat.com> Message-id: 20220202111602.627429-1-eric.auger@redhat.com Fixes: 10a83cb988 ("hw/arm/smmuv3: Skeleton") Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/smmuv3.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 3b43368..674623a 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -278,6 +278,12 @@ static void smmuv3_init_regs(SMMUv3State *s)
s->features = 0;
s->sid_split = 0;
s->aidr = 0x1;
+ s->cr[0] = 0;
+ s->cr0ack = 0;
+ s->irq_ctrl = 0;
+ s->gerror = 0;
+ s->gerrorn = 0;
+ s->statusr = 0;
}
static int smmu_get_ste(SMMUv3State *s, dma_addr_t addr, STE *buf,