Skip to content

Implementation of vhost-pci for inter-vm commucation

Wei Wang qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/237 patches 7 repliesIn review
  2. v1 posting 1/237 patches 0 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/37vhost-pci-net: the fundamental vhost-pci-net device emulationhw/net/Makefile.objs hw/net/vhost-pci-net.c include/hw/virtio/vhost-pci-net.h +2 more+233 -150 replies
2/37vhost-pci-net: the fundamental implementation of vhost-pci-net-pcihw/virtio/virtio-pci.c hw/virtio/virtio-pci.h include/hw/pci/pci.h+61 -00 replies
3/37vhost-user: share the vhost-user protocol related structureshw/virtio/vhost-user.c include/hw/virtio/vhost-user.h include/net/vhost-user.h+94 -880 replies
4/37vl: add the vhost-pci-slave command line optionqemu-options.hx vl.c+26 -00 replies
5/37vhost-pci-slave: start the implementation of vhost-pci-slavehw/virtio/Makefile.objs hw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+70 -00 replies
6/37vhost-pci-slave: set up the fundamental handlers for the server sockethw/virtio/vhost-pci-slave.c+54 -00 replies
7/37vhost-pci-slave/msg: VHOST_USER_GET_FEATUREShw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+39 -00 replies
8/37vhost-pci-slave/msg: VHOST_USER_SET_FEATUREShw/virtio/vhost-pci-slave.c+10 -00 replies
9/37vhost-pci-slave/msg: VHOST_USER_GET_PROTOCOL_FEATUREShw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-user.h+22 -00 replies
10/37vhost-pci-slave/msg: VHOST_USER_SET_PROTOCOL_FEATUREShw/virtio/vhost-pci-slave.c+2 -00 replies
11/37vhost-user/msg: VHOST_USER_PROTOCOL_F_SET_DEVICE_IDhw/net/vhost_net.c hw/virtio/vhost-user.c include/hw/virtio/vhost-user.h +1 more+26 -10 replies
12/37vhost-pci-slave/msg: VHOST_USER_SET_DEVICE_IDhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+24 -00 replies
13/37vhost-pci-slave/msg: VHOST_USER_GET_QUEUE_NUMhw/virtio/vhost-pci-slave.c+23 -00 replies
14/37vhost-pci-slave/msg: VHOST_USER_SET_OWNERhw/virtio/vhost-pci-slave.c+2 -00 replies
15/37vhost-pci-slave/msg: VHOST_USER_SET_MEM_TABLEhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h include/standard-headers/linux/vhost_pci_net.h+115 -10 replies
16/37vhost-pci-slave/msg: VHOST_USER_SET_VRING_NUMhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+35 -00 replies
17/37vhost-pci-slave/msg: VHOST_USER_SET_VRING_BASEhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+11 -00 replies
18/37vhost-user: send guest physical address of virtqueues to the slavehw/virtio/vhost.c include/hw/virtio/vhost.h+47 -190 replies
19/37vhost-pci-slave/msg: VHOST_USER_SET_VRING_ADDRhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+13 -00 replies
20/37vhost-pci-slave/msg: VHOST_USER_SET_VRING_KICKhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+20 -00 replies
21/37vhost-pci-slave/msg: VHOST_USER_SET_VRING_CALLhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+19 -00 replies
22/37vhost-pci-slave/msg: VHOST_USER_SET_VRING_ENABLEhw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+16 -00 replies
23/37vhost-pci-slave/msg: VHOST_USER_SET_LOG_BASEhw/virtio/vhost-pci-slave.c+2 -00 replies
24/37vhost-pci-slave/msg: VHOST_USER_SET_LOG_FDhw/virtio/vhost-pci-slave.c+4 -00 replies
25/37vhost-pci-slave/msg: VHOST_USER_SEND_RARPhw/virtio/vhost-pci-slave.c+2 -00 replies
26/37vhost-pci-slave/msg: VHOST_USER_GET_VRING_BASEhw/virtio/vhost-pci-slave.c+16 -00 replies
27/37vhost-pci-net: pass the info collected by vp_slave to the devicehw/net/vhost-pci-net.c hw/virtio/virtio-pci.c include/hw/virtio/vhost-pci-net.h +1 more+66 -00 replies
28/37vhost-pci-net: pass the mem and vring info to the driverhw/net/vhost-pci-net.c include/standard-headers/linux/vhost_pci_net.h+85 -00 replies
29/37vhost-pci-slave/msg: VHOST_USER_SET_VHOST_PCI (start)hw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-user.h+58 -00 replies
30/37vhost-pci-slave/msg: VHOST_USER_SET_VHOST_PCI (stop)hw/net/vhost-pci-net.c hw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+44 -00 replies
31/37vhost-user/msg: send VHOST_USER_SET_VHOST_PCI (start/stop)hw/net/vhost_net.c hw/virtio/vhost-user.c include/hw/virtio/vhost-backend.h +1 more+57 -00 replies
32/37vhost-user: add asynchronous read for the vhost-user masterhw/virtio/vhost-user.c include/hw/virtio/vhost-user.h include/net/vhost-user.h +1 more+70 -40 replies
33/37vhost-pci-net: send the negotiated feature bits to the masterhw/net/vhost-pci-net.c hw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+36 -00 replies
34/37vhost-pci-slave: add "peer_reset"hw/net/vhost-pci-net.c hw/virtio/vhost-pci-slave.c include/hw/virtio/vhost-pci-slave.h+23 -20 replies
35/37vhost-pci-net: start the vhost-pci-net devicehw/net/vhost-pci-net.c+15 -00 replies
36/37vhost-user/msg: handling VHOST_USER_SET_FEATUREShw/net/vhost_net.c hw/virtio/vhost-user.c hw/virtio/virtio-pci.c +3 more+63 -91 reply
37/37vl: enable vhost-pci-slavevl.c+21 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RESEND Patch v1 00/37] Implementation of vhost-pci for inter-vm commucation

This patch series implements vhost-pci, which is a point-to-point based inter-vm communication solution. The QEMU side implementation includes the vhost-user extension, vhost-pci device emulation and management. The current device part implementation is based on virtio 1.0, but it can be easily upgraded to support the upcoming virtio 1.1.

The current QEMU implementation supports the polling mode driver on both sides to receive packets. More features, such as interrupt support, live migration support, protected memory accesses will be added later.

RESEND change: Fixed some coding style issue

Wei Wang (37):
vhost-pci-net: the fundamental vhost-pci-net device emulation
vhost-pci-net: the fundamental implementation of vhost-pci-net-pci
vhost-user: share the vhost-user protocol related structures
vl: add the vhost-pci-slave command line option
vhost-pci-slave: start the implementation of vhost-pci-slave
vhost-pci-slave: set up the fundamental handlers for the server socket vhost-pci-slave/msg: VHOST_USER_GET_FEATURES vhost-pci-slave/msg: VHOST_USER_SET_FEATURES vhost-pci-slave/msg: VHOST_USER_GET_PROTOCOL_FEATURES vhost-pci-slave/msg: VHOST_USER_SET_PROTOCOL_FEATURES vhost-user/msg: VHOST_USER_PROTOCOL_F_SET_DEVICE_ID vhost-pci-slave/msg: VHOST_USER_SET_DEVICE_ID vhost-pci-slave/msg: VHOST_USER_GET_QUEUE_NUM vhost-pci-slave/msg: VHOST_USER_SET_OWNER vhost-pci-slave/msg: VHOST_USER_SET_MEM_TABLE vhost-pci-slave/msg: VHOST_USER_SET_VRING_NUM vhost-pci-slave/msg: VHOST_USER_SET_VRING_BASE
vhost-user: send guest physical address of virtqueues to the slave vhost-pci-slave/msg: VHOST_USER_SET_VRING_ADDR vhost-pci-slave/msg: VHOST_USER_SET_VRING_KICK vhost-pci-slave/msg: VHOST_USER_SET_VRING_CALL vhost-pci-slave/msg: VHOST_USER_SET_VRING_ENABLE vhost-pci-slave/msg: VHOST_USER_SET_LOG_BASE vhost-pci-slave/msg: VHOST_USER_SET_LOG_FD vhost-pci-slave/msg: VHOST_USER_SEND_RARP vhost-pci-slave/msg: VHOST_USER_GET_VRING_BASE
vhost-pci-net: pass the info collected by vp_slave to the device
vhost-pci-net: pass the mem and vring info to the driver vhost-pci-slave/msg: VHOST_USER_SET_VHOST_PCI (start) vhost-pci-slave/msg: VHOST_USER_SET_VHOST_PCI (stop) vhost-user/msg: send VHOST_USER_SET_VHOST_PCI (start/stop)
vhost-user: add asynchronous read for the vhost-user master
vhost-pci-net: send the negotiated feature bits to the master
vhost-pci-slave: add "peer_reset"
vhost-pci-net: start the vhost-pci-net device vhost-user/msg: handling VHOST_USER_SET_FEATURES
vl: enable vhost-pci-slave

 hw/net/Makefile.objs                           |   2 +-
 hw/net/vhost-pci-net.c                         | 268 ++++++++++++
 hw/net/vhost_net.c                             |  39 ++
 hw/virtio/Makefile.objs                        |   1 +
 hw/virtio/vhost-pci-slave.c                    | 570 +++++++++++++++++++++++++
 hw/virtio/vhost-user.c                         | 187 ++++----
 hw/virtio/vhost.c                              |  64 ++-
 hw/virtio/virtio-pci.c                         |  80 ++++
 hw/virtio/virtio-pci.h                         |  16 +
 include/hw/pci/pci.h                           |   1 +
 include/hw/virtio/vhost-backend.h              |   2 +
 include/hw/virtio/vhost-pci-net.h              |  45 ++
 include/hw/virtio/vhost-pci-slave.h            |  46 ++
 include/hw/virtio/vhost-user.h                 | 109 +++++
 include/hw/virtio/vhost.h                      |   3 +
 include/net/vhost-user.h                       |  22 +-
 include/net/vhost_net.h                        |   2 +
 include/standard-headers/linux/vhost_pci_net.h |  85 ++++
 include/standard-headers/linux/virtio_ids.h    |  29 +-
 net/vhost-user.c                               |  37 +-
 qemu-options.hx                                |   4 +
 vl.c                                           |  43 ++
 22 files changed, 1520 insertions(+), 135 deletions(-)
 create mode 100644 hw/net/vhost-pci-net.c
 create mode 100644 hw/virtio/vhost-pci-slave.c
 create mode 100644 include/hw/virtio/vhost-pci-net.h
 create mode 100644 include/hw/virtio/vhost-pci-slave.h
 create mode 100644 include/hw/virtio/vhost-user.h
 create mode 100644 include/standard-headers/linux/vhost_pci_net.h
Signature · 1 line
2.7.4