|
|
2bc292 |
From c08c3fbb2bb8494738fd34ec8fc9dc434ce82f4b Mon Sep 17 00:00:00 2001
|
|
|
2bc292 |
From: Eric Auger <eric.auger@redhat.com>
|
|
|
2bc292 |
Date: Wed, 2 Feb 2022 12:16:02 +0100
|
|
|
2bc292 |
Subject: [PATCH 12/12] hw/arm/smmuv3: Fix device reset
|
|
|
2bc292 |
|
|
|
2bc292 |
RH-Author: Eric Auger <eric.auger@redhat.com>
|
|
|
2bc292 |
RH-MergeRequest: 72: hw/arm/smmuv3: Fix device reset
|
|
|
2bc292 |
RH-Commit: [1/1] 2cfee2f7a03692681224fed96bb4f28406bf460a (eauger1/centos-qemu-kvm)
|
|
|
2bc292 |
RH-Bugzilla: 2042481
|
|
|
2bc292 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
2bc292 |
RH-Acked-by: Peter Xu <peterx@redhat.com>
|
|
|
2bc292 |
RH-Acked-by: Andrew Jones <drjones@redhat.com>
|
|
|
2bc292 |
|
|
|
2bc292 |
branch: c9s
|
|
|
2bc292 |
Brew: 42958737
|
|
|
2bc292 |
Upstream: yes
|
|
|
2bc292 |
|
|
|
2bc292 |
We currently miss a bunch of register resets in the device reset
|
|
|
2bc292 |
function. This sometimes prevents the guest from rebooting after
|
|
|
2bc292 |
a system_reset (with virtio-blk-pci). For instance, we may get
|
|
|
2bc292 |
the following errors:
|
|
|
2bc292 |
|
|
|
2bc292 |
invalid STE
|
|
|
2bc292 |
smmuv3-iommu-memory-region-0-0 translation failed for iova=0x13a9d2000(SMMU_EVT_C_BAD_STE)
|
|
|
2bc292 |
Invalid read at addr 0x13A9D2000, size 2, region '(null)', reason: rejected
|
|
|
2bc292 |
invalid STE
|
|
|
2bc292 |
smmuv3-iommu-memory-region-0-0 translation failed for iova=0x13a9d2000(SMMU_EVT_C_BAD_STE)
|
|
|
2bc292 |
Invalid write at addr 0x13A9D2000, size 2, region '(null)', reason: rejected
|
|
|
2bc292 |
invalid STE
|
|
|
2bc292 |
|
|
|
2bc292 |
Signed-off-by: Eric Auger <eric.auger@redhat.com>
|
|
|
2bc292 |
Message-id: 20220202111602.627429-1-eric.auger@redhat.com
|
|
|
2bc292 |
Fixes: 10a83cb988 ("hw/arm/smmuv3: Skeleton")
|
|
|
2bc292 |
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
|
|
|
2bc292 |
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
|
2bc292 |
(cherry picked from commit 43530095e18fd16dcd51a4b385ad2a22c36f5698)
|
|
|
2bc292 |
Signed-off-by: Eric Auger <eric.auger@redhat.com>
|
|
|
2bc292 |
---
|
|
|
2bc292 |
hw/arm/smmuv3.c | 6 ++++++
|
|
|
2bc292 |
1 file changed, 6 insertions(+)
|
|
|
2bc292 |
|
|
|
2bc292 |
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
|
|
|
2bc292 |
index 01b60bee49..1b5640bb98 100644
|
|
|
2bc292 |
--- a/hw/arm/smmuv3.c
|
|
|
2bc292 |
+++ b/hw/arm/smmuv3.c
|
|
|
2bc292 |
@@ -276,6 +276,12 @@ static void smmuv3_init_regs(SMMUv3State *s)
|
|
|
2bc292 |
s->features = 0;
|
|
|
2bc292 |
s->sid_split = 0;
|
|
|
2bc292 |
s->aidr = 0x1;
|
|
|
2bc292 |
+ s->cr[0] = 0;
|
|
|
2bc292 |
+ s->cr0ack = 0;
|
|
|
2bc292 |
+ s->irq_ctrl = 0;
|
|
|
2bc292 |
+ s->gerror = 0;
|
|
|
2bc292 |
+ s->gerrorn = 0;
|
|
|
2bc292 |
+ s->statusr = 0;
|
|
|
2bc292 |
}
|
|
|
2bc292 |
|
|
|
2bc292 |
static int smmu_get_ste(SMMUv3State *s, dma_addr_t addr, STE *buf,
|
|
|
2bc292 |
--
|
|
|
2bc292 |
2.27.0
|
|
|
2bc292 |
|