akkartik / mu

Soul of a tiny new machine. More thorough tests → More comprehensible and rewrite-friendly software → More resilient society.
http://akkartik.name/akkartik-convivial-20200607.pdf
Other
1.38k stars 47 forks source link

Keyboard input stops working after moving the mouse #52

Open copy opened 9 months ago

copy commented 9 months ago

Reproduced as follows:

./translate shell/*.mu
qemu-system-i386 code.img -m 256 -snapshot -display gtk,zoom-to-fit=on

Initially the keyboard works. After clicking on the screen to lock the mouse and moving it, keyboard input stops working.

I've narrowed it down (while debugging another issue in v86): Mu turns off the mouse interrupts, but doesn't poll from the IO port. When a mouse event happens, the PS/2 controller sets the output buffer status bit, which prevents further interrupts (including keyboard) until port 60h is read.

akkartik commented 9 months ago

Thanks so much for the report! I noticed this issue 2 months ago but had no idea where to look for it. So I really appreciate the insight.

(It seems I had somehow been playing with Qemu for a year in 2021 without ever tapping the mouse?! Either that or something changed in Qemu between then and now..)