[libvirt PATCH v2 0/2] qemu: changes to use feature=on|off syntax for -cpu unconditionally
by Daniel P. Berrangé
Given our min QEMU, it doesn't seem like we need to support either
the old "-feature" / "+feature" syntax, nor the bare "feature"
syntax.
v2:
- Now with cpu name compatibility retained
Daniel P. Berrangé (2):
qemu: remove use of (+|-)name syntax for -cpu featres
qemu: remove use of implicit boolean syntax for -cpu features
src/qemu/qemu_command.c | 40 +++++++------------
.../clock-timer-hyperv-rtc.args | 2 +-
tests/qemuxml2argvdata/cpu-Haswell2.args | 2 +-
tests/qemuxml2argvdata/cpu-Haswell3.args | 2 +-
.../qemuxml2argvdata/cpu-cache-disable3.args | 2 +-
.../cpu-check-default-partial.args | 2 +-
tests/qemuxml2argvdata/cpu-eoi-disabled.args | 2 +-
tests/qemuxml2argvdata/cpu-eoi-enabled.args | 2 +-
tests/qemuxml2argvdata/cpu-exact1.args | 2 +-
.../cpu-exact2-nofallback.args | 2 +-
tests/qemuxml2argvdata/cpu-exact2.args | 2 +-
tests/qemuxml2argvdata/cpu-fallback.args | 2 +-
tests/qemuxml2argvdata/cpu-host-kvmclock.args | 2 +-
.../qemuxml2argvdata/cpu-host-model-cmt.args | 2 +-
.../cpu-host-model-fallback.args | 2 +-
.../cpu-host-model-vendor.args | 2 +-
tests/qemuxml2argvdata/cpu-host-model.args | 2 +-
.../cpu-host-passthrough-features.args | 2 +-
tests/qemuxml2argvdata/cpu-kvmclock.args | 2 +-
tests/qemuxml2argvdata/cpu-minimum1.args | 2 +-
tests/qemuxml2argvdata/cpu-minimum2.args | 2 +-
tests/qemuxml2argvdata/cpu-strict1.args | 2 +-
.../cpu-translation.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/cpu-tsc-frequency.args | 2 +-
.../eoi-disabled.x86_64-latest.args | 2 +-
.../eoi-enabled.x86_64-latest.args | 2 +-
.../graphics-spice-timeout.args | 2 +-
.../hyperv-stimer-direct.x86_64-latest.args | 2 +-
.../qemuxml2argvdata/hyperv.x86_64-4.0.0.args | 2 +-
.../hyperv.x86_64-latest.args | 2 +-
.../kvmclock+eoi-disabled.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/kvmclock.args | 2 +-
.../pci-bridge-many-disks.args | 2 +-
.../pv-spinlock-disabled.x86_64-latest.args | 2 +-
.../pv-spinlock-enabled.x86_64-latest.args | 2 +-
35 files changed, 48 insertions(+), 60 deletions(-)
--
2.31.1
3 years, 1 month
[libvirt PATCH 0/2] qemu: changes to use feature=on|off syntax for -cpu unconditionally
by Daniel P. Berrangé
Given our min QEMU, it doesn't seem like we need to support either
the old "-feature" / "+feature" syntax, nor the bare "feature"
syntax.
Daniel P. Berrangé (2):
qemu: remove use of (+|-)name syntax for -cpu featres
qemu: remove use of implicit boolean syntax for -cpu features
src/qemu/qemu_command.c | 38 ++++++-------------
.../clock-timer-hyperv-rtc.args | 2 +-
tests/qemuxml2argvdata/cpu-Haswell2.args | 2 +-
tests/qemuxml2argvdata/cpu-Haswell3.args | 2 +-
.../qemuxml2argvdata/cpu-cache-disable3.args | 2 +-
.../cpu-check-default-partial.args | 2 +-
tests/qemuxml2argvdata/cpu-eoi-disabled.args | 2 +-
tests/qemuxml2argvdata/cpu-eoi-enabled.args | 2 +-
tests/qemuxml2argvdata/cpu-exact1.args | 2 +-
.../cpu-exact2-nofallback.args | 2 +-
tests/qemuxml2argvdata/cpu-exact2.args | 2 +-
tests/qemuxml2argvdata/cpu-fallback.args | 2 +-
tests/qemuxml2argvdata/cpu-host-kvmclock.args | 2 +-
.../qemuxml2argvdata/cpu-host-model-cmt.args | 2 +-
.../cpu-host-model-fallback.args | 2 +-
.../cpu-host-model-vendor.args | 2 +-
tests/qemuxml2argvdata/cpu-host-model.args | 2 +-
.../cpu-host-model.x86_64-4.1.0.args | 2 +-
.../cpu-host-model.x86_64-4.2.0.args | 2 +-
.../cpu-host-model.x86_64-5.0.0.args | 2 +-
.../cpu-host-model.x86_64-5.1.0.args | 2 +-
.../cpu-host-model.x86_64-5.2.0.args | 2 +-
.../cpu-host-model.x86_64-6.0.0.args | 2 +-
.../cpu-host-model.x86_64-6.1.0.args | 2 +-
.../cpu-host-model.x86_64-latest.args | 2 +-
.../cpu-host-passthrough-features.args | 2 +-
tests/qemuxml2argvdata/cpu-kvmclock.args | 2 +-
tests/qemuxml2argvdata/cpu-minimum1.args | 2 +-
tests/qemuxml2argvdata/cpu-minimum2.args | 2 +-
tests/qemuxml2argvdata/cpu-strict1.args | 2 +-
.../cpu-translation.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/cpu-tsc-frequency.args | 2 +-
.../eoi-disabled.x86_64-latest.args | 2 +-
.../eoi-enabled.x86_64-latest.args | 2 +-
.../graphics-spice-timeout.args | 2 +-
.../hyperv-stimer-direct.x86_64-latest.args | 2 +-
.../qemuxml2argvdata/hyperv.x86_64-4.0.0.args | 2 +-
.../hyperv.x86_64-latest.args | 2 +-
.../kvmclock+eoi-disabled.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/kvmclock.args | 2 +-
.../pci-bridge-many-disks.args | 2 +-
.../pv-spinlock-disabled.x86_64-latest.args | 2 +-
.../pv-spinlock-enabled.x86_64-latest.args | 2 +-
43 files changed, 54 insertions(+), 68 deletions(-)
--
2.31.1
3 years, 1 month
[libvirt PATCHv2 0/5] qemu: implement virtiofs hot(un)plug (virtiofs epopee)
by Ján Tomko
diff to v1
* do not store logCtxt in private data
* qemuDomainGetVHostUserChrSourceDef inlined in the only function
that uses it
* a new connection to the logManager is opened when virtiofsd is started
* use VIR_APPEND_ELEMENT_COPY to reuse 'fs' on the successful audit
* qemuDomainRemoveFSDevice only processes virtiofs devices now
Ján Tomko (5):
logging: define cleanup func for virLogManager
qemu: virtiofs: open a separate connection to virtlogd
qemu: Revert "qemuExtDevicesStart: pass logManager"
qemu: implement virtiofs hotplug
qemu: implement virtiofs hotunplug
src/conf/domain_conf.c | 24 +++++
src/conf/domain_conf.h | 2 +
src/libvirt_private.syms | 1 +
src/logging/log_manager.h | 2 +
src/qemu/qemu_driver.c | 9 +-
src/qemu/qemu_extdevice.c | 3 +-
src/qemu/qemu_extdevice.h | 1 -
src/qemu/qemu_hotplug.c | 186 +++++++++++++++++++++++++++++++++++++-
src/qemu/qemu_process.c | 4 +-
src/qemu/qemu_virtiofs.c | 8 +-
src/qemu/qemu_virtiofs.h | 3 +-
11 files changed, 230 insertions(+), 13 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH] tools: Fix typo firemare -> firmware
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
tools/virt-host-validate-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c
index 556223242d..7a5cda4104 100644
--- a/tools/virt-host-validate-common.c
+++ b/tools/virt-host-validate-common.c
@@ -515,7 +515,7 @@ int virHostValidateSecureGuests(const char *hvname,
} else {
virHostMsgFail(level,
"AMD Secure Encrypted Virtualization appears to be "
- "disabled in firemare.");
+ "disabled in firmware.");
return VIR_HOST_VALIDATE_FAILURE(level);
}
}
--
2.31.1
3 years, 1 month
[PATCH 00/11] qdev: Add JSON -device and fix QMP device_add
by Kevin Wolf
It's still a long way until we'll have QAPIfied devices, but there are
some improvements that we can already make now to make the future switch
easier.
One important part of this is having code paths without QemuOpts, which
we want to get rid of and replace with the keyval parser in the long
run. This series adds support for JSON syntax to -device, which bypasses
QemuOpts.
While we're not using QAPI yet, devices are based on QOM, so we already
do have type checks and an implied schema. JSON syntax supported now can
be supported by QAPI later and regarding command line compatibility,
actually switching to it becomes an implementation detail this way (of
course, it will still add valuable user-visible features like
introspection and documentation).
Apart from making things more future proof, this also immediately adds
a way to do non-scalar properties on the command line. nvme could have
used list support recently, and the lack of it in -device led to some
rather unnatural solution in the first version (doing the relationship
between a device and objects backwards) and loss of features in the
following. With this series, using a list as a device property should be
possible without any weird tricks.
Unfortunately, even QMP device_add goes through QemuOpts before this
series, which destroys any type safety QOM provides and also can't
support non-scalar properties. This is a bug that is fixed during this
series, but that is technically an incompatible change. A similar change
was made for netdev_add in commit db2a380c84.
libvirt needs to make sure that it actually always passes the right
type, because passing a wrong type will start to fail after this
series. I hope that libvirt already does things correctly, so this
won't cause any trouble, but if it does, there is the option of using
the QemuOpts-less code path only for JSON -device and going through a
deprecation period for QMP device_add.
Kevin Wolf (11):
qom: Reduce use of error_propagate()
iotests/245: Fix type for iothread property
iotests/051: Fix typo
qdev: Avoid using string visitor for properties
qdev: Make DeviceState.id independent of QemuOpts
qdev: Add Error parameter to qdev_set_id()
qemu-option: Allow deleting opts during qemu_opts_foreach()
qdev: Base object creation on QDict rather than QemuOpts
qdev: Avoid QemuOpts in QMP device_add
vl: Enable JSON syntax for -device
Deprecate stable non-JSON -device and -object
qapi/qdev.json | 15 +++--
docs/about/deprecated.rst | 11 ++++
include/hw/qdev-core.h | 10 ++--
include/monitor/qdev.h | 2 +-
hw/arm/virt.c | 2 +-
hw/core/qdev.c | 6 +-
hw/net/virtio-net.c | 4 +-
hw/pci-bridge/pci_expander_bridge.c | 2 +-
hw/ppc/e500.c | 2 +-
hw/vfio/pci.c | 4 +-
hw/xen/xen-legacy-backend.c | 3 +-
qom/object.c | 7 +--
qom/object_interfaces.c | 17 ++----
softmmu/qdev-monitor.c | 90 +++++++++++++++++------------
softmmu/vl.c | 58 ++++++++++++++++---
util/qemu-option.c | 4 +-
tests/qemu-iotests/051 | 2 +-
tests/qemu-iotests/051.pc.out | 4 +-
tests/qemu-iotests/245 | 4 +-
19 files changed, 161 insertions(+), 86 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH v2 0/5] Add support for librbd encryption
by Or Ozeri
Changes from v1: addressed (hopefully) all of Peter's v1 comments (thanks Peter!)
Or Ozeri (5):
qemu: add disk post parse to qemublocktest
qemu: add rbd encryption capability probing
conf: add luks2 encryption format
conf: add encryption engine property
qemu: add librbd encryption engine
docs/formatstorageencryption.html.in | 8 +-
docs/schemas/domainbackup.rng | 7 +
docs/schemas/storagecommon.rng | 9 +
src/conf/storage_encryption_conf.c | 33 +++-
src/conf/storage_encryption_conf.h | 11 ++
src/qemu/qemu_block.c | 33 ++++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_domain.c | 37 +++-
src/qemu/qemu_domain.h | 4 +
tests/qemublocktest.c | 3 +
.../caps_6.1.0.x86_64.xml | 1 +
tests/qemustatusxml2xmldata/upgrade-out.xml | 6 +-
...sk-network-rbd-encryption.x86_64-6.0.0.err | 1 +
...-network-rbd-encryption.x86_64-latest.args | 49 ++++++
.../disk-network-rbd-encryption.xml | 75 +++++++++
tests/qemuxml2argvtest.c | 2 +
...k-network-rbd-encryption.x86_64-latest.xml | 83 +++++++++
tests/qemuxml2xmloutdata/disk-nvme.xml | 65 ++++++-
.../disk-slices.x86_64-latest.xml | 4 +-
.../encrypted-disk-usage.xml | 38 ++++-
tests/qemuxml2xmloutdata/encrypted-disk.xml | 2 +-
.../luks-disks-source-qcow2.x86_64-latest.xml | 14 +-
.../qemuxml2xmloutdata/luks-disks-source.xml | 10 +-
tests/qemuxml2xmloutdata/luks-disks.xml | 47 +++++-
tests/qemuxml2xmloutdata/user-aliases.xml | 159 +++++++++++++++++-
tests/qemuxml2xmltest.c | 1 +
27 files changed, 678 insertions(+), 27 deletions(-)
create mode 100644 tests/qemuxml2argvdata/disk-network-rbd-encryption.x86_64-6.0.0.err
create mode 100644 tests/qemuxml2argvdata/disk-network-rbd-encryption.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-network-rbd-encryption.xml
create mode 100644 tests/qemuxml2xmloutdata/disk-network-rbd-encryption.x86_64-latest.xml
mode change 120000 => 100644 tests/qemuxml2xmloutdata/disk-nvme.xml
mode change 120000 => 100644 tests/qemuxml2xmloutdata/encrypted-disk-usage.xml
mode change 120000 => 100644 tests/qemuxml2xmloutdata/luks-disks.xml
mode change 120000 => 100644 tests/qemuxml2xmloutdata/user-aliases.xml
--
2.25.1
3 years, 1 month
[PATCH] tools: Fix virt-host-validate SEV detection
by Jim Fehlig
virt-host-validate checks if AMD SEV is enabled by verifying
/sys/module/kvm_amd/parameters/sev is set to '1'. On a system
running kernel 5.13, the parameter is reported as 'Y'. To be
extra paranoid, add a check for 'y' along with 'Y' to complement
the existing check for '1'.
Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1188715
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
tools/virt-host-validate-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c
index 556223242d..ba7f54b4ce 100644
--- a/tools/virt-host-validate-common.c
+++ b/tools/virt-host-validate-common.c
@@ -501,7 +501,7 @@ int virHostValidateSecureGuests(const char *hvname,
return VIR_HOST_VALIDATE_FAILURE(level);
}
- if (mod_value[0] != '1') {
+ if (mod_value[0] != '1' && mod_value[0] != 'Y' && mod_value[0] != 'y') {
virHostMsgFail(level,
"AMD Secure Encrypted Virtualization appears to be "
"disabled in kernel. Add kvm_amd.sev=1 "
--
2.33.0
3 years, 1 month
[libvirt PATCH 00/16] qemu: implement virtiofs hot(un)plug (virtiofs epopee)
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1897708
Ján Tomko (16):
qemu: vhost-user-fs: format alias on the command line
conf: define cleanup func for virDomainChrSourceDef
qemu: domain: introduce qemuDomainGetVHostUserFSSocketPath
qemu: domain: introduce qemuDomainGetVHostUserChrSourceDef
tests: qemuxml2argvtest: fix path to virtiofs socket
qemu: vhost-user-fs: separate building of chardev string
qemu: vhost-user-fs: separate building of device string
qemu: do not put virtiofs socket in private data
qemu: remove private data from virDomainFSDef
qemu: alias: prepare qemuAssignDeviceFSAlias for disjunct ranges
qemu: vhost-user-fs: build extdevice for zpci
qemu: export vhost-user-fs-related functions
qemu: store logCtxt in domain private data
qemu: use priv->logCtxt in qemuProcessLaunch
qemu: implement virtiofs hotplug
qemu: implement virtiofs hotunplug
src/conf/domain_conf.c | 24 +++
src/conf/domain_conf.h | 4 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_alias.c | 20 +-
src/qemu/qemu_alias.h | 4 +
src/qemu/qemu_command.c | 81 +++++---
src/qemu/qemu_command.h | 6 +
src/qemu/qemu_domain.c | 64 +++----
src/qemu/qemu_domain.h | 30 +--
src/qemu/qemu_driver.c | 9 +-
src/qemu/qemu_extdevice.c | 6 +-
src/qemu/qemu_hotplug.c | 177 +++++++++++++++++-
src/qemu/qemu_hotplug.h | 4 +
src/qemu/qemu_process.c | 21 ++-
src/qemu/qemu_virtiofs.c | 14 +-
...vhost-user-fs-fd-memory.x86_64-latest.args | 4 +-
...vhost-user-fs-hugepages.x86_64-latest.args | 4 +-
tests/qemuxml2argvtest.c | 12 --
18 files changed, 360 insertions(+), 125 deletions(-)
--
2.31.1
3 years, 1 month
[PATCH 0/8] virsh: Use g_autoptr() for public types
by Michal Privoznik
In this patchset I'm switching from virXXXFree to g_autoptr(). There are
still some left, but very rare occurrence:
libvirt.git $ git grep -o "vir[A-Z].*Free" -- tools/ | \
cut -d':' -f 2 | sort | uniq -c | sort -n
And of course, after these some functions could use subsequent cleanup,
e.g. because cleanup label collapsed to just return statement. But I
leave those for future work.
Michal Prívozník (8):
virsh-util.h: Fix ordering of virshXXXFree functions
virsh: Add wrapper for virInterfaceFree
virsh: Add wrapper for virStoragePoolFree
virsh: Add wrapper for virStorageVolFree
virsh: Add wrapper for virNetworkFree
virsh: Add wrapper for virNodeDeviceFree
virsh: Add wrapper for virNWFilterFree
virsh: Add wrapper for virStreamFree
build-aux/syntax-check.mk | 4 +-
tools/virsh-completer-interface.c | 3 +-
tools/virsh-completer-network.c | 8 +--
tools/virsh-completer-nodedev.c | 3 +-
tools/virsh-completer-nwfilter.c | 3 +-
tools/virsh-completer-pool.c | 3 +-
tools/virsh-completer-volume.c | 8 +--
tools/virsh-console.c | 8 +--
tools/virsh-domain.c | 10 +--
tools/virsh-interface.c | 55 +++++----------
tools/virsh-network.c | 75 ++++++--------------
tools/virsh-nodedev.c | 49 ++++----------
tools/virsh-nwfilter.c | 22 ++----
tools/virsh-pool.c | 67 ++++++------------
tools/virsh-util.c | 78 +++++++++++++++++++++
tools/virsh-util.h | 46 +++++++++++--
tools/virsh-volume.c | 109 ++++++++----------------------
17 files changed, 254 insertions(+), 297 deletions(-)
--
2.32.0
3 years, 1 month