Recent floppy boot regression in qemu-system-i386
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In recent versions of qemu-system-i386, booting from an
emulated floppy no longer works.
Using bisection, I have determined that the problem appeared
with the following commit:
commit 582299336879504
Author: Julien Grall <email address hidden>
Date: Wed Sep 19 12:50:09 2012 +0100
hw/dma.c: Replace register_ioport_*
Replace all register_ioport_*() with the new Memory API functions.
This permits to use the new Memory stuff like listeners.
Signed-
Acked-by: Avi Kivity <email address hidden>
[AF: Rebased onto hwaddr]
Signed-
One way to reproduce the problem is using the FreeDOS floppy image
listed on http://
wget http://
qemu-system-i386 -fda odin1440.img
This successfully boots FreeDOS in qemu version
258711c6448c44b
in version 582299336879504
or newer.
Changed in qemu: | |
status: | New → Fix Committed |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
On Wed, Dec 19, 2012 at 12:09:21PM +0000, Julien Grall wrote: 353e60c7937fbc7 0fea93f3da introduced a 1-shift for ++++--- ------- -
> The commit 582299336879504
> some offset in dma emulation.
>
> Before the previous commit, which converted ioport_register_* to MemoryRegion,
> the DMA controller registered 8 ioports with the following formula:
> base + ((8 + i) << d->shift) where 0 <= i < 8
> When an IO occured within a Memory Region, DMA callback receives an offset
> relative to the started address. Here the started address is:
> base + (8 << d->shift).
> The offset should be: (i << d->shift). After the shift is reverted, the offset
> are 0..7 not 1..8.
>
> Cc: <email address hidden>
> Reviewed-by: Andreas Färber <email address hidden>
> Reported-by: Andreas Gustafsson <email address hidden>
> Signed-off-by: Julien Grall <email address hidden>
> ---
>
> Modification between V1 and V2:
> * Modify the commit message to explain the problem.
>
> hw/dma.c | 22 +++++++
> 1 file changed, 11 insertions(+), 11 deletions(-)
This patch resolves "dma: unknown iport 0" warnings for my Windows 8 guest.
Tested-by: Stefan Hajnoczi <email address hidden>