[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Hard disk support is broken in Windows 98SE guest
From: |
Leonardo Reiter |
Subject: |
Re: [Qemu-devel] Hard disk support is broken in Windows 98SE guest |
Date: |
Wed, 3 Oct 2007 14:30:22 -0400 |
On 10/3/07, Leonardo Reiter <address@hidden> wrote:
> Index: hw/ide.c
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/hw/ide.c,v
> retrieving revision 1.69
> diff -a -u -r1.69 ide.c
> --- hw/ide.c 17 Sep 2007 08:09:47 -0000 1.69
> +++ hw/ide.c 3 Oct 2007 18:00:31 -0000
> @@ -900,7 +900,9 @@
> if(bm == NULL) {
> bm = qemu_mallocz(sizeof(BMDMAState));
> s->bmdma = bm;
> - }
> + } else if (bm->aiocb != NULL)
> + qemu_aio_wait();
> +
> bm->ide_if = s;
> bm->dma_cb = ide_sector_write_aio_cb;
>
>
> The danger here is that the AIO signal came in already by the time we
> call qemu_aio_wait() (but bm->aiocb was not called yet), which is
> pretty unlikely, but I think it could trigger a deadlock.
If you want to try that hack, I think it's probably safer (and more
correct) to use qemu_aio_flush() instead of qemu_aio_wait().
Regards,
Leo Reiter