[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/12] hw: Fix crash that happens when introspecting scsi-block on
From: |
Thomas Huth |
Subject: |
[PULL 09/12] hw: Fix crash that happens when introspecting scsi-block on older machine types |
Date: |
Mon, 22 Jul 2024 14:00:23 +0200 |
"make check SPEED=slow" is currently failing the device-introspect-test on
older machine types since introspecting "scsi-block" is causing an abort:
$ ./qemu-system-x86_64 -M pc-q35-8.0 -monitor stdio
QEMU 9.0.50 monitor - type 'help' for more information
(qemu) device_add scsi-block,help
Unexpected error in object_property_find_err() at
../../devel/qemu/qom/object.c:1357:
can't apply global scsi-disk-base.migrate-emulated-scsi-request=false:
Property 'scsi-block.migrate-emulated-scsi-request' not found
Aborted (core dumped)
The problem is that the compat code tries to change the
"migrate-emulated-scsi-request" property for all devices that are
derived from "scsi-block", but the property has only been added
to "scsi-hd" and "scsi-cd" via the DEFINE_SCSI_DISK_PROPERTIES macro.
Thus let's fix the problem by only changing the property on the devices
that really have this property.
Fixes: b4912afa5f ("scsi-disk: Fix crash for VM configured with USB CDROM after
live migration")
Message-ID: <20240703090904.909720-1-thuth@redhat.com>
Acked-by: Hyman Huang <yong.huang@smartx.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/core/machine.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index bc38cad7f2..8a878f84d7 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -36,7 +36,8 @@
GlobalProperty hw_compat_9_0[] = {
{"arm-cpu", "backcompat-cntfrq", "true" },
- {"scsi-disk-base", "migrate-emulated-scsi-request", "false" },
+ { "scsi-hd", "migrate-emulated-scsi-request", "false" },
+ { "scsi-cd", "migrate-emulated-scsi-request", "false" },
{"vfio-pci", "skip-vsc-check", "false" },
{ "virtio-pci", "x-pcie-pm-no-soft-reset", "off" },
{"sd-card", "spec_version", "2" },
--
2.45.2
- [PULL 00/12] QTests, Avocado and s390x fixes for 9.1 softfreeze, Thomas Huth, 2024/07/22
- [PULL 01/12] tests/avocado/boot_xen.py: merge base classes, Thomas Huth, 2024/07/22
- [PULL 03/12] tests/avocado/boot_xen.py: use class attribute, Thomas Huth, 2024/07/22
- [PULL 02/12] tests/avocado/boot_xen.py: unify tags, Thomas Huth, 2024/07/22
- [PULL 08/12] tests/avocado/machine_aspeed.py: Increase timeout for TPM test, Thomas Huth, 2024/07/22
- [PULL 12/12] target/s390x: filter deprecated properties based on model expansion type, Thomas Huth, 2024/07/22
- [PULL 04/12] tests/avocado: Allow overwriting AVOCADO_SHOW env variable, Thomas Huth, 2024/07/22
- [PULL 07/12] tests/avocado: Remove the remainders of the virtiofs_submounts test, Thomas Huth, 2024/07/22
- [PULL 09/12] hw: Fix crash that happens when introspecting scsi-block on older machine types,
Thomas Huth <=
- [PULL 11/12] tests: increase timeout per instance of bios-tables-test, Thomas Huth, 2024/07/22
- [PULL 06/12] tests/avocado/mem-addr-space-check: Remove unused "import signal", Thomas Huth, 2024/07/22
- [PULL 05/12] tests/avocado: Move LinuxTest related code into a separate file, Thomas Huth, 2024/07/22
- [PULL 10/12] qtest/fuzz: make range overlap check more readable, Thomas Huth, 2024/07/22
- Re: [PULL 00/12] QTests, Avocado and s390x fixes for 9.1 softfreeze, Richard Henderson, 2024/07/22