Sunday, 9 February 2014

Slides posted for "VIRTIO 1.0: Paravirtualized I/O for KVM and beyond"

I attended devconf.cz 2014 and gave a talk on VIRTIO 1.0, the standard for paravirtualized I/O devices supported by KVM and other virtualization software.

If you are looking for an overview of virtio, curious how paravirtualized I/O works, or thinking about designing custom devices, check out the slides:

http://vmsplice.net/~stefan/virtio-devconf-2014.pdf

The VIRTIO 1.0 standard refines the hardware specification so that implementors have a clear reference. Older versions of the specification were informal and did not undergo as much scrutiny. The presentation explains the key concepts: virtqueues, configuration space, the device status field, and feature negotiation. It should give you enough background to dive into the code or standard.

5 comments:

  1. Hey stefan

    The slides are very clear and informative. Wish i could catch the video :)

    BTW - Do you have any resource (slides, blog) on how non-virtio emulation works in QEMU ?
    Also, is virtio taking over as the preferred method for device emulation ?

    Thanks

    Yehuda

    ReplyDelete
  2. Thanks Yehuda. If you want to learn about real hardware, take a look at the datasheets that hardware vendors provide.

    For example, the Intel gigabit network cards: http://www.intel.com/content/dam/doc/manual/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf

    Virtio is preferred because the open source community can extended and improve the device models. It is not possible to change real hardware devices because the hardware vendor controls the specification and the drivers.

    ReplyDelete
    Replies
    1. Thanks Stefan

      I am experienced in writing linux device drivers so i know about regular device programming under linux.
      What i was never able to figure out is how QEMU enables guests to use an IO device (say serial port) without virtio emulation or any para-virtualization. Meaning how full hardware virtualization works in QEMU.
      For example, does QEMU have to know the programming model of each emulated device ? Does the hypervisor trap any access to device register space or the register space is redirected to memory used later by QEMU ? Can a fully emulated device be shared among several guests ?

      Maybe me questions are bit of direction. I appreciate if you can enlighten my a bit :)

      Thanks a lot

      Yehuda

      Delete
    2. > does QEMU have to know the programming model of each emulated device ?

      Yes. QEMU emulates the hardware registers of various platform, PCI, USB, etc devices.

      > Does the hypervisor trap any access to device register space or the register space is redirected to memory used later by QEMU?

      QEMU traps all device register accesses (memory-mapped I/O or programmed I/O) so that the guest is talking to QEMU instead of real hardware.

      > Can a fully emulated device be shared among several guests?

      No. Each QEMU process and the devices it emulates are for 1 guest. Of course guests can be connected via network interfaces.

      Delete
    3. Thanks again.
      Now the big picture is more clear

      Yehuda



      Yehuda

      Delete