SHA256
1
0
forked from pool/qemu
qemu/hw-block-fdc-Fix-fallback-property-on-sy.patch
Bruce Rogers 12286f39d2 Accepting request 885459 from home:bfrogers:branches:Virtualization
- Include upstream patches designated as stable material and
  reviewed for applicability to include here. NOTE that the
  PIIX4 patch has migration implications: the change will also be
  applied to the SLE-15-SP2 qemu, and a live migration from that
  version to this SLE-15-SP3 qemu would require this patch to be
  applied for a successful migration if PIIX4 southbridge is used
  in the machine emulation (x86 i440fx)
  block-rbd-fix-memory-leak-in-qemu_rbd_co.patch
  block-rbd-Fix-memory-leak-in-qemu_rbd_co.patch
  cpu-core-Fix-help-of-CPU-core-device-typ.patch
  hw-arm-virt-acpi-build-Fix-GSIV-values-o.patch
  hw-block-fdc-Fix-fallback-property-on-sy.patch
  hw-isa-Kconfig-Add-missing-dependency-VI.patch
  hw-isa-piix4-Migrate-Reset-Control-Regis.patch
  hw-virtio-pci-Added-AER-capability.patch
  hw-virtio-pci-Added-counter-for-pcie-cap.patch
  s390x-css-report-errors-from-ccw_dstream.patch
  target-xtensa-fix-meson.build-rule-for-x.patch
  util-fix-use-after-free-in-module_load_o.patch
  virtio-pci-compat-page-aligned-ATS.patch

OBS-URL: https://build.opensuse.org/request/show/885459
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=634
2021-04-14 18:51:51 +00:00

48 lines
2.1 KiB
Diff

From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <f4bug@amsat.org>
Date: Wed, 7 Apr 2021 15:37:42 +0200
Subject: hw/block/fdc: Fix 'fallback' property on sysbus floppy disk
controllers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Git-commit: da64789d3a16b2c5b5f1be9c75b00c2b8ae393a0
Setting the 'fallback' property corrupts the QOM instance state
(FDCtrlSysBus) because it accesses an incorrect offset (it uses
the offset of the FDCtrlISABus state).
Cc: qemu-stable@nongnu.org
Fixes: a73275dd6fc ("fdc: Add fallback option")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210407133742.1680424-1-f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/block/fdc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index d6ba6c8f730092632770cf66908b..11a43cd4a18c02e3492d3f171049 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -2961,7 +2961,7 @@ static Property sysbus_fdc_properties[] = {
DEFINE_PROP_SIGNED("fdtypeB", FDCtrlSysBus, state.qdev_for_drives[1].type,
FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
FloppyDriveType),
- DEFINE_PROP_SIGNED("fallback", FDCtrlISABus, state.fallback,
+ DEFINE_PROP_SIGNED("fallback", FDCtrlSysBus, state.fallback,
FLOPPY_DRIVE_TYPE_144, qdev_prop_fdc_drive_type,
FloppyDriveType),
DEFINE_PROP_END_OF_LIST(),
@@ -2987,7 +2987,7 @@ static Property sun4m_fdc_properties[] = {
DEFINE_PROP_SIGNED("fdtype", FDCtrlSysBus, state.qdev_for_drives[0].type,
FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type,
FloppyDriveType),
- DEFINE_PROP_SIGNED("fallback", FDCtrlISABus, state.fallback,
+ DEFINE_PROP_SIGNED("fallback", FDCtrlSysBus, state.fallback,
FLOPPY_DRIVE_TYPE_144, qdev_prop_fdc_drive_type,
FloppyDriveType),
DEFINE_PROP_END_OF_LIST(),