Qdev status: Difference between revisions

From KVM
m (Fix typo)
(Update for v0.12.0-rc2)
 
(2 intermediate revisions by the same user not shown)
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 are still in RFC stage.  Gerd and Mark posted patches for discussion.  Mark proposed -netdev, similar in spirit to -chardev.
* 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 ===
=== PC driver conversion status ===
Line 22: Line 24:


* ISA FDC, PS/2 keyboard & mouse, RTC, serial, parallel done
* ISA FDC, PS/2 keyboard & mouse, RTC, serial, parallel done
* Working on nicer defaults for -device serial and parallel


* VGA done (all variants, ISA & PCI), except for ROMs (see "option ROMs" below)
* VGA done (all variants, ISA & PCI), but doesn't work, because it needs to be initialized before i440fx_init_memory_mappings() runs.


* NICs partly converted, missing are host/guest split (see above) and boot ROMs (see "option ROMs" below)
* NICs done, but see "default optional devices" below


* Audio done, except for a few rarely used ISA devices
* Audio done, except for a few rarely used ISA devices
Line 34: Line 35:
* SCSI done
* SCSI done


* USB HID (tablet, mouse, keyboard), storage, hub done.
* USB HID (tablet, mouse, keyboard), storage, hub, host (pass-through), serial, braille done
* USB serial, net, host (pass-through) serial partly converted.
* 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
* IDE disks done, but see "default optional devices" below
Line 43: Line 46:
* Bluetooth not converted
* Bluetooth not converted


* Option ROMs not done, but getting very close
* Option ROMs done


=== 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 thereBeing discussed upstream.
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 FILENeeds more testing.


=== Hot plug ===
=== Hot plug ===
Line 56: Line 66:


Still need equivalents to -chardev and future -netdev (what drive_add is to -drive).
Still need equivalents to -chardev and future -netdev (what drive_add is to -drive).
Nice to have, perhaps: info config like -writeconfig.


=== Resources ===
=== Resources ===


Gerd's [http://repo.or.cz/w/qemu/kraxel.git git tree]
Gerd's [http://repo.or.cz/w/qemu/kraxel.git git tree]

Latest revision as of 09: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