Re: [PATCH 09/12] qemu: complete vhostuser + passt support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Saturday in 2025, Laine Stump wrote:
<interface type='vhostuser'><backend type='passt'/> needs to run the
passt command just as is done for interface type='user', but then add
vhostuser bits to the qemu commandline/monitor command.

There are some changes to the parsing/validation along with changes to
the vhostuser codepath do do the extra stuff for passt. I tried
keeping them separated into different patches, but then the unit test
failed in a strange way deep down in the bowels of the commandline
generation, so this patch both 1) makes the final changes to
parsing/formatting and 2) adds passt stuff at appropriate places for
vhostuser (as well as making a couple of things *not* happen when the
passt backend is chosen). The result is that you can now have:

   <interface type='vhostuser'>
     <backend type='passt'/>
     ...
   </interface>

Then as long as you also have the following as a subelement of
<domain>:

   <memoryBacking>
     <access mode='shared'/>
   </memoryBacking>

your passt interfaces will benefit from the greatly improved
efficiency of a vhost-user data path, and all without requiring
special privileges or capabilities *anywhere* (i.e. it works for
unprivileged libvirt (qemu:///session) as well as privileged libvirt).

Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
src/conf/domain_conf.c                        | 36 ++++++---
src/conf/domain_validate.c                    | 77 +++++++------------
src/conf/schemas/domaincommon.rng             | 32 +++++++-
src/qemu/qemu_command.c                       |  7 +-
src/qemu/qemu_extdevice.c                     |  6 +-
src/qemu/qemu_hotplug.c                       | 21 ++++-
src/qemu/qemu_passt.c                         |  3 +
src/qemu/qemu_process.c                       | 15 +++-
src/qemu/qemu_validate.c                      |  7 +-
...t-user-slirp-portforward.x86_64-latest.err |  2 +-
.../net-vhostuser-passt.x86_64-latest.args    | 42 ++++++++++
.../net-vhostuser-passt.x86_64-latest.xml     | 72 +++++++++++++++++
tests/qemuxmlconfdata/net-vhostuser-passt.xml | 70 +++++++++++++++++
tests/qemuxmlconftest.c                       |  1 +
14 files changed, 317 insertions(+), 74 deletions(-)
create mode 100644 tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/net-vhostuser-passt.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/net-vhostuser-passt.xml


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux