Qdev status: Difference between revisions

From KVM
No edit summary
(Update for v0.12.0-rc2)
 
Line 12: Line 12:
** Host side: -chardev pty,id=<name>
** Host side: -chardev pty,id=<name>
** Guest side: -device isa-serial,chardev=<name>
** Guest side: -device isa-serial,chardev=<name>
** A few small issues remain, e.g. -device isa-serial still requires -serial none to work.  See "default optional devices" below.


* NICs done
* NICs done
Line 26: Line 25:
* ISA FDC, PS/2 keyboard & mouse, RTC, serial, parallel done
* ISA FDC, PS/2 keyboard & mouse, RTC, serial, parallel done


* VGA done (all variants, ISA & PCI), but:
* VGA done (all variants, ISA & PCI), but doesn't work, because it needs to be initialized before i440fx_init_memory_mappings() runs.
** Still requires -vga none, see "default optional devices" below.
** Doesn't work, because it needs to be initialized before i440fx_init_memory_mappings() runs.


* NICs done, but see "default optional devices" below
* NICs done, but see "default optional devices" below
Line 53: Line 50:
=== Default optional devices ===
=== Default optional devices ===


QEMU creates a bunch of optional devices (NIC, CD-ROM, VGA, ...). Some of them can be suppressed, some not.  Default devices get in the way when you work with -device & friends.  For instance, ide1/master is untouchable, because QEMU insists on putting a CD-ROM therePatch posted.
QEMU creates a bunch of optional devices (NIC, CD-ROM, VGA, ...). They get automatically suppressed when you specify your own with -device & friends.  Except NIC and CD-ROM (ide.1/master) don'tWork-around: suppress all optional devices with -nodefaults.


=== Configuration file ===
=== Configuration file ===

Latest revision as of 08:04, 15 December 2009

qdev Status

qdev is a QEMU-internal API for device configuration and creation. It's the machinery that makes -device and device_add / device_del possible. Devices are being converted to qdev, and qdev evolves along with that. This page tracks how far we got, and what's still left to do.

Host/guest split

  • Drives done
    • Host side: -drive if=none,id=<name>,<parameters>
    • Guest side: -device virtio-blk-pci,drive=<name>
  • Character devices done
    • Host side: -chardev pty,id=<name>
    • Guest side: -device isa-serial,chardev=<name>
  • NICs done
    • Host side: -netdev type=tap,id=<name>,fd=<tapfd>
    • Guest side: -device virtio-net-pci,netdev=<name>
    • Note that -netdev doesn't support VLANs

PC driver conversion status

  • PIC, APIC, CPUs, memory not converted
  • i440FX/PIIX3 done (host bridge, ISA bridge, USB, IDE) except for ACPI (PIIX3 function 3)
  • ISA FDC, PS/2 keyboard & mouse, RTC, serial, parallel done
  • VGA done (all variants, ISA & PCI), but doesn't work, because it needs to be initialized before i440fx_init_memory_mappings() runs.
  • NICs done, but see "default optional devices" below
  • Audio done, except for a few rarely used ISA devices
  • Virtio done, except virtio-console still needs chardev hooked up (Amit's working on it as part of vmchannel)
  • SCSI done
  • USB HID (tablet, mouse, keyboard), storage, hub, host (pass-through), serial, braille done
  • USB net patch posted
  • USB bt (Bluetooth) not converted
  • No way to ensure stable USB addresses
  • IDE disks done, but see "default optional devices" below
  • Watchdogs done
  • Bluetooth not converted
  • Option ROMs done

Default optional devices

QEMU creates a bunch of optional devices (NIC, CD-ROM, VGA, ...). They get automatically suppressed when you specify your own with -device & friends. Except NIC and CD-ROM (ide.1/master) don't. Work-around: suppress all optional devices with -nodefaults.

Configuration file

qdev options (and many others) can be read from a configuration file. -FOO VAR="VAL" becomes

   [FOO]
   VAR = "VAL"

Option -readconfig FILE reads configuration from FILE, and -writeconfig FILE writes the current configuration to FILE. Needs more testing.

Hot plug

device_add / device_del are on par with -device: Any device you can create with -device you can hot-plug with device_add / device_del. As long as it's hot-pluggable, of course.

drive_add is on par with -drive. May still need drive_del.

Still need equivalents to -chardev and future -netdev (what drive_add is to -drive).

Nice to have, perhaps: info config like -writeconfig.

Resources

Gerd's git tree