qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 00/14] Migration pull request


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL 00/14] Migration pull request
Date: Fri, 20 Nov 2015 11:33:17 +0000

On 20 November 2015 at 09:38, Peter Lieven <address@hidden> wrote:
> I wonder if there is a glitch in the PIO implementation of test-ide.c. As far 
> as I understand the specs
> it is not allowed to read data while the BSY flag is set. With the following 
> change to the test-ide script
> the test does not race:
>
> diff --git a/tests/ide-test.c b/tests/ide-test.c
> index d1014bb..ab0489e 100644
> --- a/tests/ide-test.c
> +++ b/tests/ide-test.c
> @@ -728,6 +728,7 @@ static void cdrom_pio_impl(int nblocks)
>      for (i = 0; i < DIV_ROUND_UP(rxsize, limit); i++) {
>          size_t offset = i * (limit / 2);
>          size_t rem = (rxsize / 2) - offset;
> +        ide_wait_clear(BSY);
>          for (j = 0; j < MIN((limit / 2), rem); j++) {
>              rx[offset + j] = le16_to_cpu(inw(IDE_BASE + reg_data));
>          }
>
> Note: in the old sync version of the ATAPI PIO implementation this could not 
> happen.

This certainly fixes the stalls for me, though I don't know enough
IDE to say whether it is the correct fix.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]