[libvirt] [RFC PATCH 0/9] qemu: add vhost-vsock-pci support

Ján Tomko posted 9 patches 5 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1526916651.git.jtomko@redhat.com
Test syntax-check passed
configure.ac                                       |  8 ++
docs/formatdomain.html.in                          | 15 ++++
docs/schemas/domaincommon.rng                      | 14 ++++
src/bhyve/bhyve_parse_command.c                    |  2 +-
src/conf/domain_conf.c                             | 85 ++++++++++++++++++----
src/conf/domain_conf.h                             |  8 ++
src/conf/netdev_bandwidth_conf.h                   |  1 +
src/libvirt_private.syms                           |  2 +
src/libxl/libxl_conf.c                             |  1 +
src/lxc/lxc_controller.c                           |  1 +
src/lxc/lxc_driver.c                               |  3 +
src/lxc/lxc_process.c                              |  1 +
src/openvz/openvz_conf.c                           |  4 +-
src/qemu/qemu_capabilities.c                       |  3 +
src/qemu/qemu_capabilities.h                       |  1 +
src/qemu/qemu_command.c                            | 43 +++++++++--
src/qemu/qemu_domain.c                             | 47 ++++++++++++
src/qemu/qemu_domain.h                             | 13 ++++
src/qemu/qemu_domain_address.c                     |  6 +-
src/qemu/qemu_hotplug.c                            |  3 +
src/qemu/qemu_interface.c                          | 33 +++++++++
src/qemu/qemu_interface.h                          |  4 +
src/qemu/qemu_parse_command.c                      |  2 +-
src/qemu/qemu_process.c                            |  6 ++
src/uml/uml_conf.c                                 |  5 ++
src/util/virnetdev.c                               | 30 ++++++++
src/util/virnetdev.h                               |  4 +
src/vbox/vbox_common.c                             |  2 +-
src/vmx/vmx.c                                      |  3 +-
src/xenconfig/xen_common.c                         |  3 +-
src/xenconfig/xen_sxpr.c                           |  3 +-
tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml |  1 +
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml   |  1 +
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml   |  1 +
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |  1 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml   |  1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml |  1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   |  1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml   |  1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  |  1 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |  1 +
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |  1 +
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml    |  1 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml    |  1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |  1 +
.../vhost-vsock.x86_64-latest.args                 | 32 ++++++++
tests/qemuxml2argvdata/vhost-vsock.xml             | 36 +++++++++
tests/qemuxml2argvtest.c                           | 15 ++++
tests/qemuxml2xmloutdata/vhost-vsock.xml           |  1 +
tests/qemuxml2xmltest.c                            |  2 +
tools/virsh-domain.c                               |  1 +
51 files changed, 425 insertions(+), 32 deletions(-)
create mode 100644 tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/vhost-vsock.xml
create mode 120000 tests/qemuxml2xmloutdata/vhost-vsock.xml
[libvirt] [RFC PATCH 0/9] qemu: add vhost-vsock-pci support
Posted by Ján Tomko 5 years, 11 months ago
@Stefan, please take a look at the docs/ changes in patch 6

Add <interface type='vsock'>, mapping to vhost-vsock-pci

Missing: hotplug support
Similar to vhost-net, we cannot apply a SELinux label on the
file descriptor, so an adjustment of the policy will probably
be needed to make it work in enforcing mode.

https://bugzilla.redhat.com/show_bug.cgi?id=1291851

Ján Tomko (9):
  conf: split interface target element condition
  qemu: prepare for missing interface model
  Introduce virDomainNetDefNew
  Add privateData to virDomainNetDef
  qemu: add private data for interfaces
  conf: add interface type vsock
  Introduce QEMU_CAPS_DEVICE_VHOST_VSOCK
  Introduce virNetDevVsockSetGuestCid
  qemu: implement vhost-vsock-pci support

 configure.ac                                       |  8 ++
 docs/formatdomain.html.in                          | 15 ++++
 docs/schemas/domaincommon.rng                      | 14 ++++
 src/bhyve/bhyve_parse_command.c                    |  2 +-
 src/conf/domain_conf.c                             | 85 ++++++++++++++++++----
 src/conf/domain_conf.h                             |  8 ++
 src/conf/netdev_bandwidth_conf.h                   |  1 +
 src/libvirt_private.syms                           |  2 +
 src/libxl/libxl_conf.c                             |  1 +
 src/lxc/lxc_controller.c                           |  1 +
 src/lxc/lxc_driver.c                               |  3 +
 src/lxc/lxc_process.c                              |  1 +
 src/openvz/openvz_conf.c                           |  4 +-
 src/qemu/qemu_capabilities.c                       |  3 +
 src/qemu/qemu_capabilities.h                       |  1 +
 src/qemu/qemu_command.c                            | 43 +++++++++--
 src/qemu/qemu_domain.c                             | 47 ++++++++++++
 src/qemu/qemu_domain.h                             | 13 ++++
 src/qemu/qemu_domain_address.c                     |  6 +-
 src/qemu/qemu_hotplug.c                            |  3 +
 src/qemu/qemu_interface.c                          | 33 +++++++++
 src/qemu/qemu_interface.h                          |  4 +
 src/qemu/qemu_parse_command.c                      |  2 +-
 src/qemu/qemu_process.c                            |  6 ++
 src/uml/uml_conf.c                                 |  5 ++
 src/util/virnetdev.c                               | 30 ++++++++
 src/util/virnetdev.h                               |  4 +
 src/vbox/vbox_common.c                             |  2 +-
 src/vmx/vmx.c                                      |  3 +-
 src/xenconfig/xen_common.c                         |  3 +-
 src/xenconfig/xen_sxpr.c                           |  3 +-
 tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml |  1 +
 tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml   |  1 +
 tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml   |  1 +
 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |  1 +
 tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml   |  1 +
 tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml |  1 +
 tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   |  1 +
 tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml   |  1 +
 tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  |  1 +
 tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml    |  1 +
 tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml   |  1 +
 tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml    |  1 +
 tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml    |  1 +
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |  1 +
 .../vhost-vsock.x86_64-latest.args                 | 32 ++++++++
 tests/qemuxml2argvdata/vhost-vsock.xml             | 36 +++++++++
 tests/qemuxml2argvtest.c                           | 15 ++++
 tests/qemuxml2xmloutdata/vhost-vsock.xml           |  1 +
 tests/qemuxml2xmltest.c                            |  2 +
 tools/virsh-domain.c                               |  1 +
 51 files changed, 425 insertions(+), 32 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
 create mode 100644 tests/qemuxml2argvdata/vhost-vsock.xml
 create mode 120000 tests/qemuxml2xmloutdata/vhost-vsock.xml

-- 
2.16.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 0/9] qemu: add vhost-vsock-pci support
Posted by Daniel P. Berrangé 5 years, 11 months ago
On Mon, May 21, 2018 at 05:37:10PM +0200, Ján Tomko wrote:
> @Stefan, please take a look at the docs/ changes in patch 6
> 
> Add <interface type='vsock'>, mapping to vhost-vsock-pci

I think it is pretty misleading to use <interface> for this, because
the whole point of vsock existing is that it is *not* a NIC !

I think we need to use a new type of element for this, because none
of the existing ones are relevant.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 0/9] qemu: add vhost-vsock-pci support
Posted by Ján Tomko 5 years, 11 months ago
On Mon, May 21, 2018 at 04:46:13PM +0100, Daniel P. Berrangé wrote:
>On Mon, May 21, 2018 at 05:37:10PM +0200, Ján Tomko wrote:
>> @Stefan, please take a look at the docs/ changes in patch 6
>>
>> Add <interface type='vsock'>, mapping to vhost-vsock-pci
>
>I think it is pretty misleading to use <interface> for this, because
>the whole point of vsock existing is that it is *not* a NIC !
>
>I think we need to use a new type of element for this, because none
>of the existing ones are relevant.
>

Right, how does <vsock> sound?

Also, I probably mixed up the target and source here - the guest_cid
should be in <source>, since that's where the host will see it.

The <target cid> is 2 by definition.

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [RFC PATCH 0/9] qemu: add vhost-vsock-pci support
Posted by Daniel P. Berrangé 5 years, 10 months ago
On Tue, May 22, 2018 at 11:40:25AM +0200, Ján Tomko wrote:
> On Mon, May 21, 2018 at 04:46:13PM +0100, Daniel P. Berrangé wrote:
> > On Mon, May 21, 2018 at 05:37:10PM +0200, Ján Tomko wrote:
> > > @Stefan, please take a look at the docs/ changes in patch 6
> > > 
> > > Add <interface type='vsock'>, mapping to vhost-vsock-pci
> > 
> > I think it is pretty misleading to use <interface> for this, because
> > the whole point of vsock existing is that it is *not* a NIC !
> > 
> > I think we need to use a new type of element for this, because none
> > of the existing ones are relevant.
> > 
> 
> Right, how does <vsock> sound?

Sure, fine.

> Also, I probably mixed up the target and source here - the guest_cid
> should be in <source>, since that's where the host will see it.
> 
> The <target cid> is 2 by definition.

We are a bit inconsistent but '<source>' typically refers to some
resource in the host, which would mean <target> refers to the guest.
The fun bit is with <interface>  both <source> and <target> refer
to things in the host :-)

We could just set the cid as an attribute on <vsock> though, or just
call it <cid>55</cid>

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list