cuda: decrease time delay before raising VIA SR interrupt and remove fast path
commitd6c666ad81f6f771ff40bb9c72dde327e6c87846
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 10 Feb 2019 17:44:21 +0000 (10 17:44 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sun, 17 Feb 2019 10:54:02 +0000 (17 21:54 +1100)
tree7a7e033cbdccb3f4eaad9b1ddfd9c25e649604da
parent925969c3e28692b04ad4075022f985702bf62419
cuda: decrease time delay before raising VIA SR interrupt and remove fast path

In order to handle a race condition in the MacOS 9 CUDA driver, a
delay was introduced when raising the VIA SR interrupt inspired by
similar code in MacOnLinux.

During original testing of the MacOS 9 patches it was found that the
30us delay used in MacOnLinux did not work reliably within QEMU, and a
value of 300us was required to function correctly.

Recent experiments have shown two things: firstly when booting Linux,
MacOS 9 and MacOS X the fast path which bypasses the delay is never
triggered once the OS kernel is loaded making it effectively
useless. Rather than leave this code in place where a guest could
potentially enable it by accident and break itself, we might as well
just remove it.

Secondly the previous reliability issues are no longer present, and
this value can be reduced down to 20us with no apparent ill
effects. This has the benefit of considerably improving the
responsiveness of the ADB keyboard and mouse within the guest.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/misc/macio/cuda.c