[virt-tools-list] [vhostmd virtio PATCH v3 0/6] Add virtio transport

Michael Trapp Michael.Trapp at sap.com
Tue Nov 27 14:06:03 UTC 2018


Add virtio serial channels as transport method for VM and host metrics.

A serial port at the VM side provides access to host metrics and
metrics of the reading VM, access to metrics of other VMs is not supported.
Virtio transport can be activated in the vhostmd transport configuration.
The required QEMU setup and the virtio configuration options are documented
in the vhostmd README.

virtio.c, which is the main part of this change, contains the virtio channel
related implementation of the transport. Connection handling and I/O is
executed in an additional thread and separates collecting metrics from serving
requests. Basic concept of vhostmd/virtio interaction is documented in the
patch.


Notes on V4
- moved virtio channel to standard libvirt path and naming scheme
  /var/lib/libvirt/qemu/channel/target/domain-<ID>-<NAME>/org.github.vhostmd.1
- switched from uuid to id
- reviewed internal data structures, merged mbuffer and channel structs,
  replaced btree with preallocated structs and index

Michael Trapp (6):
  Initialize allocated buffer
  Fix update_interval behaviour
  Extend vu_buffer struct
  Add virtio functions
  Activate virtio support in vhostmd
  Add virtio support to vm-dump-metrics

 README                       |  78 +++-
 include/util.h               |   1 +
 include/virtio.h             |  48 +++
 libmetrics/Makefile.am       |  17 +-
 libmetrics/libmetrics.h      |   6 +
 libmetrics/libserialclient.c | 172 ++++++++
 libmetrics/libserialclient.h |  30 ++
 vhostmd.changes              |   5 +
 vhostmd.dtd                  |   6 +-
 vhostmd.xml                  |   6 +
 vhostmd/Makefile.am          |   4 +-
 vhostmd/util.c               |   2 +
 vhostmd/vhostmd.c            |  65 ++-
 vhostmd/virtio.c             | 759 +++++++++++++++++++++++++++++++++++
 vm-dump-metrics/main.c       |  29 +-
 15 files changed, 1207 insertions(+), 21 deletions(-)
 create mode 100644 include/virtio.h
 create mode 100644 libmetrics/libserialclient.c
 create mode 100644 libmetrics/libserialclient.h
 create mode 100644 vhostmd/virtio.c

-- 
2.17.2 (Apple Git-113)




More information about the virt-tools-list mailing list