mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
macio ide: Do remainder access asynchronously
The macio IDE controller has some pretty nasty magic in its implementation to allow for unaligned sector accesses. We used to handle these accesses synchronously inside the IO callback handler. However, the block infrastructure changed below our feet and now it's impossible to call a synchronous block read/write from the aio callback handler of a previous block access. Work around that limitation by making the unaligned handling bits also go through our asynchronous handler. This fixes booting Mac OS X for me. Reported-by: John Arbuckle <programmingkidx@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
6ab39b1bd3
commit
3e300fa6ad
3 changed files with 51 additions and 10 deletions
|
@ -748,9 +748,15 @@ static void dbdma_reset(void *opaque)
|
|||
void* DBDMA_init (MemoryRegion **dbdma_mem)
|
||||
{
|
||||
DBDMAState *s;
|
||||
int i;
|
||||
|
||||
s = g_malloc0(sizeof(DBDMAState));
|
||||
|
||||
for (i = 0; i < DBDMA_CHANNELS; i++) {
|
||||
DBDMA_io *io = &s->channels[i].io;
|
||||
qemu_iovec_init(&io->iov, 1);
|
||||
}
|
||||
|
||||
memory_region_init_io(&s->mem, NULL, &dbdma_ops, s, "dbdma", 0x1000);
|
||||
*dbdma_mem = &s->mem;
|
||||
vmstate_register(NULL, -1, &vmstate_dbdma, s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue