[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.1 15/38] hw/vfio: fix iteration over global VFIODevice list
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.1 15/38] hw/vfio: fix iteration over global VFIODevice list |
Date: |
Thu, 18 Jan 2024 10:52:42 +0300 |
From: Volker Rümelin <vr_qemu@t-online.de>
Commit 3d779abafe ("vfio/common: Introduce a global VFIODevice list")
introduced a global VFIODevice list, but forgot to update the list
element field name when iterating over the new list. Change the code
to use the correct list element field.
Fixes: 3d779abafe ("vfio/common: Introduce a global VFIODevice list")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2061
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
(cherry picked from commit 9353b6da430f90e47f352dbf6dc31120c8914da6)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index e70fdf5e0c..a5dfc2d27e 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -73,7 +73,7 @@ bool vfio_mig_active(void)
return false;
}
- QLIST_FOREACH(vbasedev, &vfio_device_list, next) {
+ QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) {
if (vbasedev->migration_blocker) {
return false;
}
@@ -94,7 +94,7 @@ static bool vfio_multiple_devices_migration_is_supported(void)
unsigned int device_num = 0;
bool all_support_p2p = true;
- QLIST_FOREACH(vbasedev, &vfio_device_list, next) {
+ QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) {
if (vbasedev->migration) {
device_num++;
@@ -1352,13 +1352,13 @@ void vfio_reset_handler(void *opaque)
{
VFIODevice *vbasedev;
- QLIST_FOREACH(vbasedev, &vfio_device_list, next) {
+ QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) {
if (vbasedev->dev->realized) {
vbasedev->ops->vfio_compute_needs_reset(vbasedev);
}
}
- QLIST_FOREACH(vbasedev, &vfio_device_list, next) {
+ QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) {
if (vbasedev->dev->realized && vbasedev->needs_reset) {
vbasedev->ops->vfio_hot_reset_multi(vbasedev);
}
--
2.39.2
- [Stable-8.2.1 05/38] include/ui/rect.h: fix qemu_rect_init() mis-assignment, (continued)
- [Stable-8.2.1 05/38] include/ui/rect.h: fix qemu_rect_init() mis-assignment, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 06/38] configure: use a native non-cross compiler for linux-user, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 07/38] target/i386: the sgx_epc_get_section stub is reachable, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 08/38] hw/net/can/sja1000: fix bug for single acceptance filter and standard frame, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 09/38] target/riscv: Fix mcycle/minstret increment behavior, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 10/38] chardev/char.c: fix "abstract device type" error message, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 11/38] audio/audio.c: remove trailing newline in error_setg, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 12/38] hw/net: cadence_gem: Fix MDIO_OP_xxx values, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 13/38] edu: fix DMA range upper bound check, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 14/38] vfio/container: Replace basename with g_path_get_basename, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 15/38] hw/vfio: fix iteration over global VFIODevice list,
Michael Tokarev <=
- [Stable-8.2.1 16/38] hw/intc/arm_gicv3_cpuif: handle LPIs in in the list registers, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 17/38] tcg/ppc: Use new registers for LQ destination, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 18/38] util: fix build with musl libc on ppc64le, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 19/38] tests/acpi: allow tests/data/acpi/virt/SSDT.memhp changes, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 20/38] edk2: update to git snapshot, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 21/38] edk2: update build config, set PcdUninstallMemAttrProtocol = TRUE., Michael Tokarev, 2024/01/18
- [Stable-8.2.1 22/38] edk2: update binaries to git snapshot, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 23/38] tests/acpi: update expected data files, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 24/38] tests/acpi: disallow tests/data/acpi/virt/SSDT.memhp changes, Michael Tokarev, 2024/01/18
- [Stable-8.2.1 26/38] target/s390x: Fix LAE setting a wrong access register, Michael Tokarev, 2024/01/18