[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.8 59/61] hw/misc/mos6522: Fix bad class definition of the MO
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.8 59/61] hw/misc/mos6522: Fix bad class definition of the MOS6522 device |
Date: |
Mon, 18 Nov 2024 22:35:14 +0300 |
From: Thomas Huth <thuth@redhat.com>
When compiling QEMU with --enable-cfi, the "q800" m68k machine
currently crashes very early, when the q800_machine_init() function
tries to wire the interrupts of the "via1" device.
This happens because TYPE_MOS6522_Q800_VIA1 is supposed to be a
proper SysBus device, but its parent (TYPE_MOS6522) has a mistake
in its class definition where it is only derived from DeviceClass,
and not from SysBusDeviceClass, so we end up in funny memory access
issues here. Using the right class hierarchy for the MOS6522 device
fixes the problem.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2675
Signed-off-by: Thomas Huth <thuth@redhat.com>
Fixes: 51f233ec92 ("misc: introduce new mos6522 VIA device")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-ID: <20241114104653.963812-1-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit c3d7c18b0d616cf7fb3c1f325503e1462307209d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/include/hw/misc/mos6522.h b/include/hw/misc/mos6522.h
index fba45668ab..920871a598 100644
--- a/include/hw/misc/mos6522.h
+++ b/include/hw/misc/mos6522.h
@@ -154,7 +154,7 @@ struct MOS6522State {
OBJECT_DECLARE_TYPE(MOS6522State, MOS6522DeviceClass, MOS6522)
struct MOS6522DeviceClass {
- DeviceClass parent_class;
+ SysBusDeviceClass parent_class;
ResettablePhases parent_phases;
void (*portB_write)(MOS6522State *dev);
--
2.39.5
- [Stable-8.2.8 51/61] target/arm: Drop user-only special case in sve_stN_r, (continued)
- [Stable-8.2.8 51/61] target/arm: Drop user-only special case in sve_stN_r, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 50/61] linux-user: Fix setreuid and setregid to use direct syscalls, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 52/61] accel/tcg: Fix user-only probe_access_internal plugin check, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 53/61] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 54/61] linux-user/arm: Reduce vdso alignment to 4k, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 55/61] linux-user/arm: Select vdso for be8 and be32 modes, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 56/61] tcg: Allow top bit of SIMD_DATA_BITS to be set in simd_desc(), Michael Tokarev, 2024/11/18
- [Stable-8.2.8 57/61] target/i386: fix hang when using slow path for ptw_setl, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 58/61] contrib/plugins: add compat for g_memdup2, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 60/61] hw/audio/hda: fix memory leak on audio setup, Michael Tokarev, 2024/11/18
- [Stable-8.2.8 59/61] hw/misc/mos6522: Fix bad class definition of the MOS6522 device,
Michael Tokarev <=
- [Stable-8.2.8 61/61] usb-hub: Fix handling port power control messages, Michael Tokarev, 2024/11/18