qemu-e2k/hw
Peter Maydell 0c285e0128 hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA
The sysbus floppy controllers (devices sysbus-fdc and sun-fdtwo)
don't support DMA.  The core floppy controller code expects this to
be indicated by setting FDCtrl::dma_chann to -1.  This used to be
done in the device instance_init functions sysbus_fdc_initfn() and
sun4m_fdc_initfn(), but in commit 1430759ec3 we refactored this code
and accidentally lost the setting of dma_chann.

For sysbus-fdc this has no ill effects because we were redundantly
also setting dma_chann in fdctrl_init_sysbus(), but for sun-fdtwo
this means that guests which try to enable DMA on the floppy
controller will cause QEMU to crash because FDCtrl::dma is NULL.

Set dma_chann to -1 in the common instance init, and remove the
redundant code in fdctrl_init_sysbus() that is also setting it.

There is a six-year-old FIXME comment in the jazz board code to the
effect that in theory it should support doing DMA via a custom DMA
controller.  If anybody ever chooses to fix that they can do it by
adding support for setting both FDCtrl::dma_chann and FDCtrl::dma.
(A QOM link property 'dma-controller' on the sysbus device which can
be set to an instance of IsaDmaClass is probably the way to go.)

Fixes: 1430759ec3 ("hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/958
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20220505101842.2757905-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-06-11 11:36:14 +02:00
..
9pfs
acpi virtio,pc,pci: fixes,cleanups,features 2022-06-10 18:15:34 -07:00
adc hw/adc/zynq-xadc: Use qemu_irq typedef 2022-05-19 16:19:02 +01:00
alpha
arm hw/core/loader: return image sizes as ssize_t 2022-06-10 09:31:42 +10:00
audio hw/audio/ac97: Remove unneeded local variables 2022-05-25 21:26:35 +02:00
avr
block hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA 2022-06-11 11:36:14 +02:00
char acpi: serial-is: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml 2022-06-09 19:32:48 -04:00
core virtio,pc,pci: fixes,cleanups,features 2022-06-10 18:15:34 -07:00
cpu
cris
cxl hw/cxl: Fix missing write mask for HDM decoder target list registers 2022-06-09 19:32:49 -04:00
display xlnx_dp: Fix the interrupt disable logic 2022-06-08 19:38:47 +01:00
dma ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
gpio hw/gpio: replace HWADDR_PRIx with PRIx64 2022-05-25 10:31:33 +02:00
hppa hppa: Fix serial port assignments and pass-through 2022-05-28 12:25:42 +02:00
hyperv hw/hyperv/vmbus: Remove unused vmbus_load/save_req() 2022-05-30 19:49:42 +02:00
i2c acpi: ich9-smb: add support for AcpiDevAmlIf interface 2022-06-09 19:32:48 -04:00
i386 virtio,pc,pci: fixes,cleanups,features 2022-06-10 18:15:34 -07:00
ide include/hw/ide: Unexport pci_piix3_xen_ide_unplug() 2022-06-09 14:47:42 +01:00
input acpi: pckbd: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml 2022-06-09 19:32:48 -04:00
intc hw/intc: sifive_plic: Avoid overflowing the addr_config buffer 2022-06-10 09:31:42 +10:00
ipack
ipmi acpi: ipmi: use AcpiDevAmlIf interface to build IPMI device descriptors 2022-06-09 19:32:49 -04:00
isa acpi: q35: isa bridge: use AcpiDevAmlIf interface to build ISA device descriptors 2022-06-09 19:32:49 -04:00
loongarch hw/loongarch: Add LoongArch virt power manager support. 2022-06-06 18:14:13 +00:00
m68k ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
mem
microblaze
mips hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA 2022-06-11 11:36:14 +02:00
misc acpi: pvpanic-isa: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML 2022-06-09 19:32:49 -04:00
net ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
nios2
nubus
nvme hw/nvme: add new command abort case 2022-06-03 21:48:24 +02:00
nvram
openrisc
pci virtio,pc,pci: fixes,cleanups,features 2022-06-10 18:15:34 -07:00
pci-bridge pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup. 2022-06-09 19:32:49 -04:00
pci-host
pcmcia
ppc spapr: Use address from elf parser for kernel address 2022-05-26 17:11:32 -03:00
rdma
remote
riscv hw/core/loader: return image sizes as ssize_t 2022-06-10 09:31:42 +10:00
rtc acpi: mc146818rtc: replace ISADeviceClass::build_aml with AcpiDevAmlIfClass:build_dev_aml 2022-06-09 19:32:48 -04:00
rx
s390x modules: introduces module_kconfig directive 2022-06-06 09:26:53 +02:00
scsi virtio,pc,pci: fixes,cleanups,features 2022-06-10 18:15:34 -07:00
sd hw/sd/allwinner-sdhost: report FIFO water level as 1 when data ready 2022-05-30 12:34:46 +01:00
sensor
sh4
smbios
sparc
sparc64 Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
ssi
timer Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
tpm acpi: tpm-tis: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML 2022-06-09 19:32:49 -04:00
tricore
usb modules: introduces module_kconfig directive 2022-06-06 09:26:53 +02:00
vfio vfio/common: remove spurious warning on vfio_listener_region_del 2022-06-08 08:44:19 -06:00
virtio hw/virtio/vhost-user: don't use uninitialized variable 2022-06-09 19:32:49 -04:00
watchdog
xen
xenpv
xtensa
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00