Skip to content

vmmouse device gets attached twice, one without i8042 associated

Host environment

  • Operating system: Fedora 34
  • OS/kernel version: Linux salient 5.13.16-200.fc34.x86_64 #1 SMP Mon Sep 13 12:39:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Architecture: amd64
  • QEMU flavor: qemu-system-i386
  • QEMU version: 6.1.92 (v6.2.0-rc1-96-gdd4b0de459)
  • QEMU command line:
    qemu-system-i386 -boot c -hda win31.qcow2 -vga cirrus -m 16 -device vmmouse

Emulated/Virtualized environment

  • Operating system: Windows, MS-DOS
  • OS/kernel version: 3.1, 5.0
  • Architecture: i386

Description of problem

I'm developing a driver for the VMware mouse device. I know this works properly on VMware, but I'm trying it in QEMU too.

My full notes, but most relevant is:

  • a vmmouse instance gets initialized twice (confirmed in qtree), one with i8042 the first time, one without the second time
  • the second vmmouse instance is the one receiving the events, passing them to the i8042 device's fake event handler
  • obviously, a crash because ISAKBDDevice should never be null

Steps to reproduce

  1. Load VMware mouse driver
  2. Move cursor (I recommend waiting until Windows loads before doing so, it is very easy to corrupt the guest filesystem if you do it while Windows is loading)
  3. Crash

Additional information

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information