[libvirt PATCH 00/16] various network driver cleanups
by Laine Stump
These all bubbled to the top of a series that adds support for an
nftables backend to the network driver, but are valid patches by
themselves, so I'm sending them separately to make the other series
look shorter.
Laine Stump (16):
conf: replace explicit virNetworkDefFree() with
g_autoptr(virNetworkDef)
esx: replace explicit virNetworkDefFree() with
g_autoptr(virNetworkDef)
network: replace explicit virNetworkDefFree() with
g_autoptr(virNetworkDef)
qemu: replace explicit virNetworkDefFree() with
g_autoptr(virNetworkDef)
test driver: replace explicit virNetworkDefFree() with
g_autoptr(virNetworkDef)
vbox: replace explicit virNetworkDefFree() with
g_autoptr(virNetworkDef)
tests: replace explicit virNetworkDefFree() with
g_autoptr(virNetworkDef)
conf: remove superfluous cleanup: labels and ret return variables
qemu: remove superfluous cleanup: labels and ret return variables
tests: remove superfluous cleanup: labels and ret return variables
network: move driver state struct into bridge_driver_conf.h
network: create separate config object for virNetworkDriverState
util: replace g_snprintf with g_autofreed g_strdup_printf in
viriptables.c
util: remove unused function virFirewallApplyRuleFirewallD()
util: make virFirewallRuleToString() global
util: don't use virFirewallRuleToString() to log the rule being
applied
po/POTFILES | 1 +
src/conf/domain_conf.c | 26 +--
src/conf/virnetworkobj.c | 72 ++++-----
src/esx/esx_network_driver.c | 6 +-
src/libvirt_private.syms | 1 +
src/network/bridge_driver.c | 233 ++++++++++++---------------
src/network/bridge_driver_conf.c | 165 +++++++++++++++++++
src/network/bridge_driver_conf.h | 82 ++++++++++
src/network/bridge_driver_platform.h | 43 +----
src/network/meson.build | 1 +
src/qemu/qemu_process.c | 24 ++-
src/test/test_driver.c | 6 +-
src/util/virfirewall.c | 28 ++--
src/util/virfirewall.h | 3 +
src/util/viriptables.c | 15 +-
src/vbox/vbox_network.c | 6 +-
tests/networkxml2firewalltest.c | 15 +-
tests/networkxml2xmltest.c | 3 +-
tests/networkxml2xmlupdatetest.c | 8 +-
19 files changed, 443 insertions(+), 295 deletions(-)
create mode 100644 src/network/bridge_driver_conf.c
create mode 100644 src/network/bridge_driver_conf.h
--
2.37.1
2 years, 4 months
[libvirt PATCH 0/6] qemu: retire three more capabilities
by Ján Tomko
Ján Tomko (6):
qemu: always assume QEMU_CAPS_DUMP_GUEST_MEMORY
qemu: retire QEMU_CAPS_DUMP_GUEST_MEMORY
qemu: always assume QEMU_CAPS_*_HOLE64_SIZE
qemu: Retire QEMU_CAPS_I440FX_PCI_HOLE64_SIZE
qemu: retire QEMU_CAPS_Q35_PCI_HOLE64_SIZE
qemu: do not probe for -pcihost properties
src/qemu/qemu_capabilities.c | 21 +-
src/qemu/qemu_capabilities.h | 6 +-
src/qemu/qemu_driver.c | 6 -
src/qemu/qemu_validate.c | 14 -
.../caps_4.2.0.aarch64.replies | 140 ++++----
.../caps_4.2.0.aarch64.xml | 1 -
.../caps_4.2.0.ppc64.replies | 128 +++-----
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 -
.../caps_4.2.0.s390x.replies | 114 +++----
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 -
.../caps_4.2.0.x86_64.replies | 264 ++++-----------
.../caps_4.2.0.x86_64.xml | 3 -
.../caps_5.0.0.aarch64.replies | 144 ++++-----
.../caps_5.0.0.aarch64.xml | 1 -
.../caps_5.0.0.ppc64.replies | 140 ++++----
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 -
.../caps_5.0.0.riscv64.replies | 128 +++-----
.../caps_5.0.0.riscv64.xml | 1 -
.../caps_5.0.0.x86_64.replies | 277 ++++------------
.../caps_5.0.0.x86_64.xml | 3 -
.../caps_5.1.0.sparc.replies | 86 ++---
.../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 -
.../caps_5.1.0.x86_64.replies | 291 ++++-------------
.../caps_5.1.0.x86_64.xml | 3 -
.../caps_5.2.0.aarch64.replies | 148 ++++-----
.../caps_5.2.0.aarch64.xml | 1 -
.../caps_5.2.0.ppc64.replies | 140 ++++----
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 -
.../caps_5.2.0.riscv64.replies | 128 +++-----
.../caps_5.2.0.riscv64.xml | 1 -
.../caps_5.2.0.s390x.replies | 118 +++----
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 -
.../caps_5.2.0.x86_64.replies | 291 ++++-------------
.../caps_5.2.0.x86_64.xml | 3 -
.../caps_6.0.0.aarch64.replies | 148 ++++-----
.../caps_6.0.0.aarch64.xml | 1 -
.../caps_6.0.0.s390x.replies | 118 +++----
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 -
.../caps_6.0.0.x86_64.replies | 291 ++++-------------
.../caps_6.0.0.x86_64.xml | 3 -
.../caps_6.1.0.x86_64.replies | 301 ++++--------------
.../caps_6.1.0.x86_64.xml | 3 -
.../caps_6.2.0.aarch64.replies | 148 ++++-----
.../caps_6.2.0.aarch64.xml | 1 -
.../caps_6.2.0.ppc64.replies | 140 ++++----
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 -
.../caps_6.2.0.x86_64.replies | 301 ++++--------------
.../caps_6.2.0.x86_64.xml | 3 -
.../caps_7.0.0.aarch64.replies | 152 ++++-----
.../caps_7.0.0.aarch64.xml | 1 -
.../caps_7.0.0.ppc64.replies | 140 ++++----
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 -
.../caps_7.0.0.x86_64.replies | 301 ++++--------------
.../caps_7.0.0.x86_64.xml | 3 -
.../caps_7.1.0.x86_64.replies | 301 ++++--------------
.../caps_7.1.0.x86_64.xml | 3 -
tests/qemuxml2argvdata/pcihole64-none.err | 1 -
tests/qemuxml2argvdata/pcihole64-none.xml | 25 --
tests/qemuxml2argvtest.c | 6 +-
tests/qemuxml2xmloutdata/pcihole64-none.xml | 30 --
tests/qemuxml2xmltest.c | 8 +-
61 files changed, 1457 insertions(+), 3582 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/pcihole64-none.err
delete mode 100644 tests/qemuxml2argvdata/pcihole64-none.xml
delete mode 100644 tests/qemuxml2xmloutdata/pcihole64-none.xml
--
2.37.1
2 years, 4 months
[libvirt PATCH v4 0/6] Add support for 'blob' to virtio video device
by Jonathon Jongsma
Add support to libvirt for the 'blob' option for virtio video devices in qemu.
Also do a little preparatory refactoring of the video device xml parsing code.
I sent this series out a couple times but didn't get much review. Sending out
again after fixing a few minor test- and doc-related things discussed in the
last version and rebasing to current master branch.
changes in v4:
- rebased to latest master
- updated tests
changes in v3:
- rebased to latest master
Changes in v2:
- Added some basic documentation
- add a qemu capability
- Make sure that the /dev/udmabuf device is accessible to qemu (cgroups, etc)
Jonathon Jongsma (6):
conf: Refactor video model parsing
conf: switch to virXMLProp* functions
conf: use enum variable for video type
conf: add support for 'blob' in virtio video device
qemu: Add capability for virtio-gpu.blob
qemu: Implement 'blob' support for virtio gpu
docs/formatdomain.rst | 7 +
src/conf/domain_conf.c | 133 +++++++++---------
src/conf/domain_conf.h | 3 +-
src/conf/domain_validate.c | 13 +-
src/conf/schemas/domaincommon.rng | 5 +
src/libxl/libxl_conf.c | 10 ++
src/libxl/libxl_domain.c | 11 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 22 ++-
src/qemu/qemu_command.c | 3 +
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_monitor_json.c | 16 ++-
src/qemu/qemu_namespace.c | 22 +++
src/qemu/qemu_process.c | 7 +
src/qemu/qemu_validate.c | 9 ++
.../caps_6.1.0.x86_64.xml | 1 +
.../caps_6.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 +
.../caps_6.2.0.x86_64.xml | 1 +
.../caps_7.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 +
.../caps_7.0.0.x86_64.xml | 1 +
.../caps_7.1.0.x86_64.xml | 1 +
...ideo-virtio-blob-absent.x86_64-latest.args | 39 +++++
.../video-virtio-blob-absent.xml | 36 +++++
.../video-virtio-blob-off.x86_64-latest.args | 39 +++++
.../video-virtio-blob-off.xml | 36 +++++
.../video-virtio-blob-on.x86_64-latest.args | 39 +++++
.../qemuxml2argvdata/video-virtio-blob-on.xml | 36 +++++
tests/qemuxml2argvtest.c | 3 +
...video-virtio-blob-absent.x86_64-latest.xml | 48 +++++++
.../video-virtio-blob-off.x86_64-latest.xml | 48 +++++++
.../video-virtio-blob-on.x86_64-latest.xml | 48 +++++++
tests/qemuxml2xmltest.c | 3 +
35 files changed, 567 insertions(+), 81 deletions(-)
create mode 100644 tests/qemuxml2argvdata/video-virtio-blob-absent.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/video-virtio-blob-absent.xml
create mode 100644 tests/qemuxml2argvdata/video-virtio-blob-off.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/video-virtio-blob-off.xml
create mode 100644 tests/qemuxml2argvdata/video-virtio-blob-on.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/video-virtio-blob-on.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-blob-absent.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-blob-off.x86_64-latest.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-blob-on.x86_64-latest.xml
--
2.37.1
2 years, 4 months
[libvirt PATCH] tests: Drop irrelevant CPU config from graphics-spice-timeout
by Jiri Denemark
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/243
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
.../graphics-spice-timeout.x86_64-latest.args | 4 ++--
.../graphics-spice-timeout.xml | 18 ------------------
.../graphics-spice-timeout.x86_64-latest.xml | 17 +----------------
3 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args
index 17b49e3169..13c4c08e6f 100644
--- a/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-spice-timeout.x86_64-latest.args
@@ -12,11 +12,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-f14/.config \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-f14/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \
-accel kvm \
--cpu core2duo,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,ds-cpl=on,vmx=on,est=on,tm2=on,cx16=on,xtpr=on,lahf-lm=on \
+-cpu qemu64 \
-m 1024 \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
-overcommit mem-lock=off \
--smp 2,sockets=1,dies=1,cores=2,threads=1 \
+-smp 2,sockets=2,cores=1,threads=1 \
-uuid 553effab-b5e1-2d80-dfe3-da4344826c43 \
-no-user-config \
-nodefaults \
diff --git a/tests/qemuxml2argvdata/graphics-spice-timeout.xml b/tests/qemuxml2argvdata/graphics-spice-timeout.xml
index 57b48656b2..d1620b7df4 100644
--- a/tests/qemuxml2argvdata/graphics-spice-timeout.xml
+++ b/tests/qemuxml2argvdata/graphics-spice-timeout.xml
@@ -15,24 +15,6 @@
<apic/>
<pae/>
</features>
- <cpu match='exact' check='none'>
- <model>core2duo</model>
- <vendor>Intel</vendor>
- <topology sockets='1' dies='1' cores='2' threads='1'/>
- <feature policy='require' name='ds'/>
- <feature policy='require' name='acpi'/>
- <feature policy='require' name='ss'/>
- <feature policy='require' name='ht'/>
- <feature policy='require' name='tm'/>
- <feature policy='require' name='pbe'/>
- <feature policy='require' name='ds_cpl'/>
- <feature policy='require' name='vmx'/>
- <feature policy='require' name='est'/>
- <feature policy='require' name='tm2'/>
- <feature policy='require' name='cx16'/>
- <feature policy='require' name='xtpr'/>
- <feature policy='require' name='lahf_lm'/>
- </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/graphics-spice-timeout.x86_64-latest.xml b/tests/qemuxml2xmloutdata/graphics-spice-timeout.x86_64-latest.xml
index 6f8a20950c..6f1c0a6c93 100644
--- a/tests/qemuxml2xmloutdata/graphics-spice-timeout.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/graphics-spice-timeout.x86_64-latest.xml
@@ -16,22 +16,7 @@
<pae/>
</features>
<cpu mode='custom' match='exact' check='none'>
- <model fallback='allow'>core2duo</model>
- <vendor>Intel</vendor>
- <topology sockets='1' dies='1' cores='2' threads='1'/>
- <feature policy='require' name='ds'/>
- <feature policy='require' name='acpi'/>
- <feature policy='require' name='ss'/>
- <feature policy='require' name='ht'/>
- <feature policy='require' name='tm'/>
- <feature policy='require' name='pbe'/>
- <feature policy='require' name='ds_cpl'/>
- <feature policy='require' name='vmx'/>
- <feature policy='require' name='est'/>
- <feature policy='require' name='tm2'/>
- <feature policy='require' name='cx16'/>
- <feature policy='require' name='xtpr'/>
- <feature policy='require' name='lahf_lm'/>
+ <model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
--
2.35.1
2 years, 4 months
[PATCH] vmx: Fix leak in virVMXParseEthernet
by Martin Kletzander
Commit 580538c5dd7f forgot to free switchId.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/vmx/vmx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 9ad463658aa8..191f0b5e83ff 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2920,6 +2920,7 @@ virVMXParseEthernet(virConf *conf, int controller, virDomainNetDef **def)
VIR_FREE(address);
VIR_FREE(virtualDev);
VIR_FREE(vnet);
+ VIR_FREE(switchId);
return result;
}
--
2.37.2
2 years, 4 months
[PATCH] news: Mention esx support for new interface types
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
NEWS.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 548828c60d72..468b41c1fd9a 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -24,6 +24,11 @@ v8.7.0 (unreleased)
* **Improvements**
+ * esx: Domain XMLs can now be dumped for VMs with two new interface types
+
+ One is when the interface is not connected anywhere `type='dummy'` and one
+ when it is connected to VMWare Distributed Switch `type='vds'`.
+
* **Bug fixes**
--
2.37.2
2 years, 4 months
slow live migration ram
by Ignazio Cassano
Hello, I am using openstack rdo with kvm libvirt.
Live migration is very slow when the vm is using ram intensively. If I
migrate a vm that has been running on a host for a few days, it takes
several minutes to migrate the memory. After the first migration, I
immediately try another one on the same vm, it takes very little. I think
it's due to the fragmentation of the pages: is there any remedy?
Thanks
Ignazio
2 years, 4 months
[PATCH v4 0/3] qemu: add an API for "query-stats" QMP command
by Amneesh Singh
QEMU is gaining introspectable statistics which can be queried via the
"query-stats" QMP command. This patchset aims to add an API for the
same.
The returned JSON for "query-stats" is an array of objects containing
their own respective array of statistics.
Patch 1 adds the API for "query-stats" and a function to deserialize the
returned objects into respective hashtables.
Patch 2 adds the "query-stats" to QEMU capabilities.
Patch 3 uses the API to query the halt poll success time and the halt
poll failure time.
v3 -> v4
========
Some changes based on past reviews by Mr. Martin and me
[1/3]:
-
- clean up qemuMonitorQueryStatsProviderNew.
- make relevant checks/changes to support the change above.
- do NOT return the GPtrArray, instead just return the json object.
(this helps retain the non-stat info returned which will be
useful in the future patches).
- add a function which deserializes value associated with the "stats"
key in the JSON object (one of the objects returned in the JSON
array above) into a GHashTable.
[2/3]:
- add a flag to for the capability in tests.
[3/3]:
- use a helper function to make things cleaner.
v2 -> v3
========
Sorry for the late patchset, I was under the impression I had sent it on
Monday but apparently, I did not.
[1/3]:
- use a single enum for all the statistics.
- use QEMU_MONITOR_QUERY_STATS_NAME_LAST as the sentinel value for the
provider constructor.
- relevant changes to enum values.
[2/3]:
- fix comment spacing
[3/3]
- better checks
v1 -> v2
========
I have been tinkering with the v1 patchset and have rewrote the v2
patches a couple of times. I believe the current patchset is still not
perfect and would appreciate some reviews.
I have another patch or two written but they do not make any significant
changes to the current patchset.
[1/3]:
- use virBitmap instead of an array of strings for statistics.
- add enums for the stat names and add
qemuMonitorQueryStatsNameTypeToString to switch between the
"ToString" functions based on the target type.
- change qemuMonitorQueryStatsProviderNew to a variadic function that
takes stat enum values with the sentinel value being -1.
[2/3]:
- No changes
[3/3]:
- Add relevant monitor related checks to check if the domain is
active.
- Acquire and release qemuMonitorObj lock before and after calling
qemuMonitorQueryStats respectively.
- Add the check for privileged access.
Relevant QEMU patches can be found here:
https://lore.kernel.org/all/20220530150714.756954-1-pbonzini@redhat.com/
This patchset is part of the 2022 GSOC contributor project.
Amneesh Singh (3):
qemu_monitor: add qemuMonitorQueryStats
qemu_capabilities: add "query-stats" QMP command to the QEMU
capabilities
qemu_driver: use qemuMonitorQueryStats to extract halt poll time
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_driver.c | 81 +++++++++++-
src/qemu/qemu_monitor.c | 117 ++++++++++++++++++
src/qemu/qemu_monitor.h | 48 +++++++
src/qemu/qemu_monitor_json.c | 91 ++++++++++++++
src/qemu/qemu_monitor_json.h | 6 +
.../caps_7.1.0.x86_64.xml | 1 +
8 files changed, 345 insertions(+), 6 deletions(-)
--
2.37.1
2 years, 4 months
[PATCH] RFC: char: deprecate usage of bidirectional pipe
by marcandre.lureau@redhat.com
From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
As Ed Swierk explained back in 2006:
https://lists.nongnu.org/archive/html/qemu-devel/2006-12/msg00160.html
"When qemu writes into the pipe, it immediately reads back what it just
wrote and treats it as a monitor command, endlessly breathing its own
exhaust."
This is similarly confusing when using the chardev with a serial device,
as reported in https://bugzilla.redhat.com/show_bug.cgi?id=2106975.
It seems we have kept the support for bidirectional pipes for historical
reasons and odd systems, however it's not documented in qemu -chardev
options. I suggest to stop supporting it, for portability reasons.
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
---
docs/about/deprecated.rst | 6 ++++++
chardev/char-pipe.c | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 7ee26626d5cf..dd5ca30d527b 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -45,6 +45,12 @@ transmit audio through the VNC protocol.
``tty`` and ``parport`` are aliases that will be removed. Instead, the
actual backend names ``serial`` and ``parallel`` should be used.
+``-chardev pipe`` support for bidirectional pipes (since 7.1)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+For portability reasons, the support for bidirectional ``pipe`` will
+be removed. Instead, use ``file.in`` & ``file.out`` unidirectional pipes.
+
Short-form boolean options (since 6.0)
''''''''''''''''''''''''''''''''''''''
diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c
index 66d3b8509183..7db963035e7d 100644
--- a/chardev/char-pipe.c
+++ b/chardev/char-pipe.c
@@ -27,6 +27,7 @@
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "qemu/option.h"
+#include "qemu/error-report.h"
#include "chardev/char.h"
#ifdef _WIN32
@@ -142,6 +143,9 @@ static void qemu_chr_open_pipe(Chardev *chr,
if (fd_out >= 0) {
close(fd_out);
}
+ warn_report("Support for bidirectional pipe is deprecated,");
+ warn_report("please use portable one-way pipes instead (%s.in & %s.out).",
+ filename, filename);
TFR(fd_in = fd_out = qemu_open_old(filename, O_RDWR | O_BINARY));
if (fd_in < 0) {
error_setg_file_open(errp, errno, filename);
--
2.37.0.rc0
2 years, 4 months