[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.2 36/60] smmu: Clear SMMUPciBus pointer cache when system re
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.2 36/60] smmu: Clear SMMUPciBus pointer cache when system reset |
Date: |
Wed, 21 Feb 2024 11:20:24 +0300 |
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
s->smmu_pcibus_by_bus_num is a SMMUPciBus pointer cache indexed
by bus number, bus number may not always be a fixed value,
i.e., guest reboot to different kernel which set bus number with
different algorithm.
This could lead to smmu_iommu_mr() providing the wrong iommu MR.
Suggested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20240125073706.339369-3-zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 8a6b3f4dc95a064e88adaca86374108da0ecb38d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
index 9a8ac45431..f58261bb81 100644
--- a/hw/arm/smmu-common.c
+++ b/hw/arm/smmu-common.c
@@ -675,6 +675,8 @@ static void smmu_base_reset_hold(Object *obj)
{
SMMUState *s = ARM_SMMU(obj);
+ memset(s->smmu_pcibus_by_bus_num, 0, sizeof(s->smmu_pcibus_by_bus_num));
+
g_hash_table_remove_all(s->configs);
g_hash_table_remove_all(s->iotlb);
}
--
2.39.2
- [Stable-8.2.2 27/60] tcg: Increase width of temp_subindex, (continued)
- [Stable-8.2.2 27/60] tcg: Increase width of temp_subindex, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 20/60] migration: Fix logic of channels and transport compatibility check, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 23/60] configure: run plugin TCG tests again, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 29/60] vhost-user.rst: Fix vring address description, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 47/60] iotests: Make 144 deterministic again, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 51/60] i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 48/60] .gitlab-ci/windows.yml: Don't install libusb or spice packages on 32-bit, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 58/60] audio: Depend on dbus_display1_dep, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 56/60] ui/clipboard: add asserts for update and request, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 59/60] meson: Explicitly specify dbus-display1.h dependency, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 36/60] smmu: Clear SMMUPciBus pointer cache when system reset,
Michael Tokarev <=
- [Stable-8.2.2 45/60] target/arm: Fix SVE/SME gross MTE suppression checks, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 52/60] i386/cpuid: Move leaf 7 to correct group, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 24/60] hw/smbios: Fix OEM strings table option validation, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 33/60] hw/cxl: Pass CXLComponentState to cache_mem_ops, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 50/60] i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 60/60] tests/qtest: Depend on dbus_display1_dep, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 54/60] ui: reject extended clipboard message if not activated, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 42/60] target/arm: Adjust and validate mtedesc sizem1, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 31/60] cxl/cdat: Fix header sum value in CDAT checksum, Michael Tokarev, 2024/02/21
- [Stable-8.2.2 53/60] target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix, Michael Tokarev, 2024/02/21