]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/dma/i82374: Avoid double creation of the 82374 controller
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 26 Mar 2018 15:34:37 +0000 (12:34 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Apr 2018 14:36:39 +0000 (16:36 +0200)
commit4968a2c6edb7b46b127c19a8426575d23b55ab1f
tree186011f37a5d5906a6101a930fedbcc6f980f556
parent29e560f00e2bc1b5731c8276031aaf192de55d9d
hw/dma/i82374: Avoid double creation of the 82374 controller

QEMU fails when used with the following command line:

    ./ppc64-softmmu/qemu-system-ppc64 -S -machine 40p -device i82374
    qemu-system-ppc64: hw/isa/isa-bus.c:110: isa_bus_dma: Assertion `!bus->dma[0] && !bus->dma[1]' failed.

The 40p machine type already creates the device i82374. If specified in the
command line, it will try to create it again, hence generating the error. The
function isa_bus_dma() isn't supposed to be called twice for the same bus.
Check the bus doesn't already have a DMA controller registered before creating
the device.

Fixes: https://bugs.launchpad.net/qemu/+bug/1721224
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180326153441.32641-2-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/dma/i82374.c