qemu-kvm/kvm-hw-arm-smmuv3-Fix-device-reset.patch
Miroslav Rezanina 0daf0004a7 * Mon Feb 14 2022 Miroslav Rezanina <mrezanin@redhat.com> - 6.2.0-8
- kvm-numa-Enable-numa-for-SGX-EPC-sections.patch [bz#2033708]
- kvm-numa-Support-SGX-numa-in-the-monitor-and-Libvirt-int.patch [bz#2033708]
- kvm-doc-Add-the-SGX-numa-description.patch [bz#2033708]
- kvm-Enable-SGX-RH-Only.patch [bz#2033708]
- kvm-qapi-Cleanup-SGX-related-comments-and-restore-sectio.patch [bz#2033708]
- kvm-block-io-Update-BSC-only-if-want_zero-is-true.patch [bz#2041461]
- kvm-iotests-block-status-cache-New-test.patch [bz#2041461]
- kvm-iotests-Test-qemu-img-convert-of-zeroed-data-cluster.patch [bz#1882917]
- kvm-qemu-img-make-is_allocated_sectors-more-efficient.patch [bz#1882917]
- kvm-block-backend-prevent-dangling-BDS-pointers-across-a.patch [bz#2040123]
- kvm-iotests-stream-error-on-reset-New-test.patch [bz#2040123]
- kvm-hw-arm-smmuv3-Fix-device-reset.patch [bz#2042481]
- Resolves: bz#2033708
  ([Intel 9.0 Feat] qemu-kvm: SGX 1.5 (SGX1 + Flexible Launch Control) support)
- Resolves: bz#2041461
  (Inconsistent block status reply in qemu-nbd)
- Resolves: bz#1882917
  (the target image size is incorrect when converting a badly fragmented file)
- Resolves: bz#2040123
  (Qemu core dumped when do block-stream to a snapshot node on non-enough space storage)
- Resolves: bz#2042481
  ([aarch64] Launch guest with "default-bus-bypass-iommu=off,iommu=smmuv3" and "iommu_platform=on", guest hangs after system_reset)
2022-02-14 06:48:51 -05:00

62 lines
2.0 KiB
Diff

From c08c3fbb2bb8494738fd34ec8fc9dc434ce82f4b Mon Sep 17 00:00:00 2001
From: Eric Auger <eric.auger@redhat.com>
Date: Wed, 2 Feb 2022 12:16:02 +0100
Subject: [PATCH 12/12] hw/arm/smmuv3: Fix device reset
RH-Author: Eric Auger <eric.auger@redhat.com>
RH-MergeRequest: 72: hw/arm/smmuv3: Fix device reset
RH-Commit: [1/1] 2cfee2f7a03692681224fed96bb4f28406bf460a (eauger1/centos-qemu-kvm)
RH-Bugzilla: 2042481
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Peter Xu <peterx@redhat.com>
RH-Acked-by: Andrew Jones <drjones@redhat.com>
branch: c9s
Brew: 42958737
Upstream: yes
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>
(cherry picked from commit 43530095e18fd16dcd51a4b385ad2a22c36f5698)
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
hw/arm/smmuv3.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 01b60bee49..1b5640bb98 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -276,6 +276,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,
--
2.27.0