[libvirt PATCH] cpu_map: Remove intel-pt from x86 CPU models
by Jiri Denemark
As explained in QEMU commit 4c257911dcc7c4189768e9651755c849ce9db4e8
intel-pt features should never be included in the CPU models as it was
not supported by KVM back then and even once it started to be supported,
users have to enable it by passing pt_mode=1 parameter to kvm_intel
module. The Icelake-* CPU models with intel-pt included were added to
QEMU 3.1.0 and removed right in the following 4.0.0 release (and even in
3.1.1 maintenance release).
In libvirt 6.10.0 I introduced 'removed' attribute for features included
in our CPU model definitions which we can use to drop intel-pt from
Icelake-* CPU models. Back then I explained we can safely do so only for
features which could never be enabled, which is not the case of intel-pt.
Theoretically, it could be possible to create an environment in which
QEMU would enable intel-pt without asking for it explicitly: it would
need to use a new enough kernel (not available at the time of QEMU
3.1.0) and pt_mode KVM parameter in combination with QEMU 3.1.0 running
a domain with q35 machine type and all that on a CPU which didn't really
exist at that time.
Migrating such domain to a host with newer SW stack including libvirt
with this patch applied would result in incompatible guest ABI (the
virtual CPU would lose intel-pt). However, QEMU changed its CPU models
unconditionally and thus migration would not work even without this
patch. That said, it is safe to follow QEMU and remove the feature from
Icelake-* CPU models in our cpu_map.
https://bugzilla.redhat.com/show_bug.cgi?id=1853972
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/cpu_map/x86_Icelake-Client-noTSX.xml | 2 +-
src/cpu_map/x86_Icelake-Client.xml | 2 +-
src/cpu_map/x86_Icelake-Server-noTSX.xml | 2 +-
src/cpu_map/x86_Icelake-Server.xml | 2 +-
tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 +
tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml | 1 +
.../cpu-Icelake-Server-pconfig.x86_64-3.1.0.args | 2 +-
.../cpu-Icelake-Server-pconfig.x86_64-latest.args | 2 +-
8 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/cpu_map/x86_Icelake-Client-noTSX.xml b/src/cpu_map/x86_Icelake-Client-noTSX.xml
index 65e648ae21..217adba4f2 100644
--- a/src/cpu_map/x86_Icelake-Client-noTSX.xml
+++ b/src/cpu_map/x86_Icelake-Client-noTSX.xml
@@ -30,7 +30,7 @@
<feature name='fsgsbase'/>
<feature name='fxsr'/>
<feature name='gfni'/>
- <feature name='intel-pt'/>
+ <feature name='intel-pt' removed='yes'/>
<feature name='invpcid'/>
<feature name='lahf_lm'/>
<feature name='lm'/>
diff --git a/src/cpu_map/x86_Icelake-Client.xml b/src/cpu_map/x86_Icelake-Client.xml
index 5cf32e91fa..b725227f46 100644
--- a/src/cpu_map/x86_Icelake-Client.xml
+++ b/src/cpu_map/x86_Icelake-Client.xml
@@ -31,7 +31,7 @@
<feature name='fxsr'/>
<feature name='gfni'/>
<feature name='hle'/>
- <feature name='intel-pt'/>
+ <feature name='intel-pt' removed='yes'/>
<feature name='invpcid'/>
<feature name='lahf_lm'/>
<feature name='lm'/>
diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Icelake-Server-noTSX.xml
index 34a0f7c18c..7c9c32c977 100644
--- a/src/cpu_map/x86_Icelake-Server-noTSX.xml
+++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml
@@ -37,7 +37,7 @@
<feature name='fsgsbase'/>
<feature name='fxsr'/>
<feature name='gfni'/>
- <feature name='intel-pt'/>
+ <feature name='intel-pt' removed='yes'/>
<feature name='invpcid'/>
<feature name='la57'/>
<feature name='lahf_lm'/>
diff --git a/src/cpu_map/x86_Icelake-Server.xml b/src/cpu_map/x86_Icelake-Server.xml
index 1ee4ea9cd4..b4685bead0 100644
--- a/src/cpu_map/x86_Icelake-Server.xml
+++ b/src/cpu_map/x86_Icelake-Server.xml
@@ -38,7 +38,7 @@
<feature name='fxsr'/>
<feature name='gfni'/>
<feature name='hle'/>
- <feature name='intel-pt'/>
+ <feature name='intel-pt' removed='yes'/>
<feature name='invpcid'/>
<feature name='la57'/>
<feature name='lahf_lm'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
index 3a71b28cfb..7fcd20d26d 100644
--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
+++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml
@@ -21,6 +21,7 @@
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='cmt'/>
<feature policy='require' name='avx512ifma'/>
+ <feature policy='require' name='intel-pt'/>
<feature policy='require' name='sha-ni'/>
<feature policy='require' name='ospke'/>
<feature policy='require' name='rdpid'/>
diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
index 1582de0422..07e8f8bc24 100644
--- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
+++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml
@@ -22,6 +22,7 @@
<feature name='tsc_adjust'/>
<feature name='cmt'/>
<feature name='avx512ifma'/>
+ <feature name='intel-pt'/>
<feature name='sha-ni'/>
<feature name='ospke'/>
<feature name='rdpid'/>
diff --git a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args
index 96d4306238..b69bfe0f0f 100644
--- a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-3.1.0.args
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine pc-i440fx-3.1,accel=kvm,usb=off,dump-guest-core=off \
--cpu Icelake-Server,pconfig=off \
+-cpu Icelake-Server,pconfig=off,intel-pt=off \
-m 214 \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args
index a512623af6..64f223bee3 100644
--- a/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/cpu-Icelake-Server-pconfig.x86_64-latest.args
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
-object secret,id=masterKey0,format=raw,\
file=/tmp/lib/domain--1-test/master-key.aes \
-machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \
--cpu Icelake-Server \
+-cpu Icelake-Server,intel-pt=off \
-m 214 \
-object memory-backend-ram,id=pc.ram,size=224395264 \
-overcommit mem-lock=off \
--
2.30.0
4 years, 2 months
[libvirt PATCH] qemu: fix release of virDomainObjPtr in SSH key APIs
by Daniel P. Berrangé
The qemuDomainObjFromDomain() API must be paired with
the virDomainObjEndAPI API. The qemuDomainAuthorizedSSHKeysGet
method simply did 'return -1' leaking a reference in two paths.
The qemuDomainAuthorizedSSHKeysSet method marked the object
as an autoptr while also have some code paths that will call
virDomainObjEndAPI, resulting in attempted double free.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/qemu/qemu_driver.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 027617deef..05e021cce4 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20254,10 +20254,10 @@ qemuDomainAuthorizedSSHKeysGet(virDomainPtr dom,
return -1;
if (virDomainAuthorizedSshKeysGetEnsureACL(dom->conn, vm->def) < 0)
- return -1;
+ goto cleanup;
if (qemuDomainObjBeginAgentJob(driver, vm, QEMU_AGENT_JOB_QUERY) < 0)
- return -1;
+ goto cleanup;
if (!qemuDomainAgentAvailable(vm, true))
goto endagentjob;
@@ -20268,6 +20268,7 @@ qemuDomainAuthorizedSSHKeysGet(virDomainPtr dom,
endagentjob:
qemuDomainObjEndAgentJob(vm);
+ cleanup:
virDomainObjEndAPI(&vm);
return rv;
}
@@ -20281,7 +20282,7 @@ qemuDomainAuthorizedSSHKeysSet(virDomainPtr dom,
unsigned int flags)
{
virQEMUDriverPtr driver = dom->conn->privateData;
- g_autoptr(virDomainObj) vm = NULL;
+ virDomainObjPtr vm = NULL;
qemuAgentPtr agent;
const bool append = flags & VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_APPEND;
const bool remove = flags & VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_REMOVE;
@@ -20294,10 +20295,10 @@ qemuDomainAuthorizedSSHKeysSet(virDomainPtr dom,
return -1;
if (virDomainAuthorizedSshKeysSetEnsureACL(dom->conn, vm->def) < 0)
- return -1;
+ goto cleanup;
if (qemuDomainObjBeginAgentJob(driver, vm, QEMU_AGENT_JOB_QUERY) < 0)
- return -1;
+ goto cleanup;
if (!qemuDomainAgentAvailable(vm, true))
goto endagentjob;
@@ -20311,6 +20312,7 @@ qemuDomainAuthorizedSSHKeysSet(virDomainPtr dom,
endagentjob:
qemuDomainObjEndAgentJob(vm);
+ cleanup:
virDomainObjEndAPI(&vm);
return rv;
}
--
2.29.2
4 years, 2 months
[PATCH] docs: formatdomain: Fix poll-control XML example
by Cole Robinson
Fixes: 3fc4412c6f5
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
Pushed as trivial
docs/formatdomain.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index af540391db..c738078b90 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -1766,7 +1766,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off.
<kvm>
<hidden state='on'/>
<hint-dedicated state='on'/>
- <poll-control='on'/>
+ <poll-control state='on'/>
</kvm>
<xen>
<e820_host state='on'/>
--
2.29.2
4 years, 2 months
[libvirt PATCH] docs: link to PCI docs from the kbase page
by Daniel P. Berrangé
While the PCI docs are linked from formatdomain.html, finding those
links is not straightforward. It is good for users to highlight them in
the kbase pages. The PCI docs are intentionally not moved to the kbase/
sub-directory in order to avoid breaking hyperlinks.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/kbase/index.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/kbase/index.rst b/docs/kbase/index.rst
index 1494be1e77..83b9bb7200 100644
--- a/docs/kbase/index.rst
+++ b/docs/kbase/index.rst
@@ -40,6 +40,12 @@ Usage
`KVM real time <kvm-realtime.html>`__
Run real time workloads in guests on a KVM hypervisor
+`PCI hotplug <../pci-hotplug.html>`__
+ Effectively usage of PCI hotplug
+
+`PCI topology <../pci-addresses.html>`__
+ Addressing schemes for PCI devices
+
Internals / Debugging
---------------------
--
2.29.2
4 years, 2 months
[libvirt PATCH] docs: use a relative link to the kbase page
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
docs/index.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/index.html.in b/docs/index.html.in
index f44e055174..bf164edb58 100644
--- a/docs/index.html.in
+++ b/docs/index.html.in
@@ -64,7 +64,7 @@
<dt><a href="https://wiki.libvirt.org">Wiki</a></dt>
<dd>Read further community contributed content</dd>
- <dt><a href="https://libvirt.org/kbase/index.html">Knowledge base</a></dt>
+ <dt><a href="kbase/index.html">Knowledge base</a></dt>
<dd>Learn more about libvirt through knowledge base</dd>
</dl>
</div>
--
2.29.2
4 years, 2 months
[PATCH 00/55] Hyper-V: code cleanup & prep for future changes
by Matt Coleman
This series of patches simplifies the code in several ways and makes a
few changes required by the next round of patches that I'll submit.
Simplifications:
* add a macro to cut down on repetitive SettingData code
* enable GLib auto-cleanup for hypervObject and several OpenWSMAN types
Changes:
* store the version in hypervPrivate, which will be used to handle
breaking changes in the Hyper-V API: despite 2012R2 and 2016+ all
using Hyper-V's "V2" API, backwards-incompatible changes were made in
2016
* add inheritance to the WMI generator to simplify handling of the
backwards-incompatible changes introduced in Hyper-V 2016
Matt Coleman (55):
hyperv: add a macro for retrieving setting data
hyperv: store the Hyper-V version when connecting
hyperv: add inheritance to the WMI generator
hyperv: store hypervPrivate in hypervObject
hyperv: enable use of g_autoptr for hypervObject
hyperv: enable use of g_autoptr for the rest of the CIM/WMI classes
hyperv: enable automatic cleanup for OpenWSMAN types
hyperv: use g_autoptr for Win32_OperatingSystem in hypervConnectOpen
hyperv: use g_autoptr for Win32_ComputerSystem in
hypervConnectGetHostname
hyperv: use g_autoptr for Msvm_ProcessorSettingData in
hypervConnectGetMaxVcpus
hyperv: use g_autoptr for WMI classes in hypervNodeGetInfo
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervConnectNumOfDomains
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervConnectListDomains
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainLookupByID
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainLookupByUUID
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainLookupByName
hyperv: use g_autoptr for Msvm_ComputerSystem in hypervDomainResume
hyperv: use g_autoptr for WMI classes in hypervDomainShutdownFlags
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainDestroyFlags
hyperv: use g_autoptr for WMI classes in hypervDomainGetMaxMemory
hyperv: use g_autoptr for WMI classes in hypervDomainSetMemoryProperty
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervRequestStateChange
hyperv: use g_autoptr for Win32_ComputerSystemProduct in
hypervLookupHostSystemBiosUuid
hyperv: use g_autoptr for Msvm_ResourceAllocationSettingData in
hypervDomainAttachPhysicalDisk
hyperv: use g_autoptr for WMI classes in hypervDomainAttachStorage
hyperv: use g_autoptr for Msvm_DiskDrive in
hypervDomainDefParsePhysicalDisk
hyperv: use g_autoptr for WMI classes in hypervDomainGetInfo
hyperv: use g_autoptr for Msvm_ComputerSystem in hypervDomainGetState
hyperv: use g_autoptr for WMI classes in hypervDomainSetVcpusFlags
hyperv: use g_autoptr for WMI classes in hypervDomainGetVcpusFlags
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervConnectListDefinedDomains
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervConnectNumOfDefinedDomains
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainCreateWithFlags
hyperv: use g_autoptr for Msvm_VirtualSystemSettingData in
hypervDomainGetAutostart
hyperv: use g_autoptr for Msvm_VirtualSystemSettingData in
hypervDomainSetAutostart
hyperv: use g_autoptr for WMI classes in
hypervDomainGetSchedulerParametersFlags
hyperv: use g_autoptr for Msvm_ComputerSystem in hypervDomainIsActive
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainManagedSave
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainHasManagedSaveImage
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervDomainManagedSaveRemove
hyperv: use g_autoptr for Msvm_ComputerSystem in
hypervConnectListAllDomains
hyperv: use GLib auto-cleanup in hypervDomainSendKey
hyperv: use GLib auto-cleanup in hypervInvokeMethod
hyperv: use GLib auto-cleanup in
hypervInvokeMsvmComputerSystemRequestStateChange
hyperv: use GLib auto-cleanup in hypervMsvmVSMSAddResourceSettings and
hypervMsvmVSMSModifyResourceSettings
hyperv: use g_autoptr for
Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor in
hypervDomainGetVcpus
hyperv: use g_autoptr for Win32_OperatingSystem in
hypervNodeGetFreeMemory
hyperv: use GLib auto-cleanup in hypervDomainGetXMLDesc
hyperv: use g_autoptr for WMI classes in hypervDomainAttachDeviceFlags
hyperv: use GLib auto-cleanup in hypervSerializeEprParam
hyperv: use GLib auto-cleanup in hypervEnumAndPull
hyperv: use GLib auto-cleanup in hypervSerializeEmbeddedParam
hyperv: use GLib auto-cleanup in hypervCreateInvokeXmlDoc
hyperv: use g_auto for WsXmlDocH in hypervDomainAttachVirtualDisk
hyperv: use g_auto for WsXmlDocH in hypervDomainAttachCDROM
scripts/hyperv_wmi_generator.py | 16 +-
src/hyperv/hyperv_driver.c | 755 +++++++++++---------------------
src/hyperv/hyperv_private.h | 4 +-
src/hyperv/hyperv_wmi.c | 408 +++++++----------
src/hyperv/hyperv_wmi.h | 4 +-
src/hyperv/hyperv_wsman.h | 28 ++
6 files changed, 457 insertions(+), 758 deletions(-)
create mode 100644 src/hyperv/hyperv_wsman.h
--
2.30.0
4 years, 2 months
[PATCH 0/3] RFC: stop using netcf for the interface driver backend
by Laine Stump
This is a followup to my message in December suggesting that we
deprecate use of the netcf package:
https://www.redhat.com/archives/libvir-list/2020-December/msg00183.html
(or Message-Id: <4889202b-734c-4d0f-472c-d86894319878(a)redhat.com> for
those of you who keep a local archive)
Each of these patches takes a baby step in the direction of removing
netcf from libvirt:
1) makes it possible to explicitly disable netcf in a build without
uninstalling netcf-devel.
2) makes netcf=disabled the default for all normal builds
3) switches all RHEL/Fedora/CentOS rpm builds to disable netcf, and no
longer require that netcf and netcf-devel be installed.
I purposefully didn't include a patch to completely remove all traces
of netcf; we can leave it disabled for awhile before taking that step.
Much of the basic functionality provided by the netcf backend to the
interface driver is also provided by the udev backend which is used
when netcf isn't available.
Some differences:
1) the udev backend can't make any modifications to host interface
configuration. It is only useful for reading a list of host network
devices, and querying some basic status of those interfaces (*not*
the contents of configuration files, but how the interface is
currently setup)
2) With the netcf backend, "virsh iface-list --all" shows a list of
those interfaces that have an ifcfg-blah file in
/etc/sysconfig/network-scripts. With the udev backend, the same
command shows a list of all network devices currently on the host,
as provided by the udev function
udev_enumerate_add_match_subsystem(enumerate, "net")
(with some exceptions - see udeevGetDevices()). This means that, for
example, the bridge devices created by libvirt for virtual networks
(virbrX) will show in the list when using udev.
3) The udev backend doesn't fill in IP address info about the devices
in the output of "virsh iface-dumpxml" (netcf does).
4) The udev driver *does* go to the trouble of filling in the MTU of
every interface, even when it is the default value of 1500.
In the end, all the information it reports is correct (well, item (2)
is debatable - it depends on what you would use the info for), but it
is different, which is why I'm sending this as an RFC - I'd appreciate if
people can build and try running something like this script with
existing libvirt as well as with the patches applied:
http://people.redhat.com/lstump/ncfresults
and compare the before/after.
The real question is whether or not this difference really "makes a
difference" to anyone. My guess/hope is that the answer to this is
"no". As far as I know, there aren't any management applications that
use the virInterface API (even virt-manager has stopped) so it's
probably only humans using virsh that encounter it.
(If it's considered important, we could 1) filter out the bridge
devices used by libvirt virtual networks, and 2) copy the netcf code
that fills in IP address info. I don't want to spend time doing that
if nobody's going to use it anyway, though.)
Laine Stump (3):
build: support explicitly disabling netcf
build: make netcf=disabled the default
rpm: disable netcf for the interface driver on RHEL/Fedora/CentOS
libvirt.spec.in | 8 ++------
meson.build | 9 ++++++---
2 files changed, 8 insertions(+), 9 deletions(-)
--
2.29.2
4 years, 2 months
[libvirt PATCH v2 00/13] second part of cleanup storage source related code
by Pavel Hrdina
Pavel Hrdina (13):
src: add missing virstoragefile.h includes
virstoragefile: properly include virstoragefile.h header
virstoragefile: change virStorageSource->drv to void pointer
storage: move storage file sources to separate directory
util: move virStorageSourceFindByNodeName into qemu_domain
util: extract storage file probe code into virtstoragefileprobe.c
util: extract virStorageFile code into storage_source
util: move virStorageFileBackend code into storage_file
util: move virStorageFileProbe code into storage_file
util: move virStorageSource code into conf
util: move virStorageEncryption code into conf
virstoragefile: use virStorageFile prefix for all functions
storage_source: use virStorageSource prefix for all functions
po/POTFILES.in | 11 +-
src/conf/backup_conf.c | 2 +-
src/conf/checkpoint_conf.c | 2 +-
src/conf/domain_conf.c | 2 +-
src/conf/domain_conf.h | 6 +-
src/conf/meson.build | 2 +
src/conf/snapshot_conf.c | 2 +-
src/conf/storage_conf.c | 2 +-
src/conf/storage_conf.h | 4 +-
.../storage_encryption_conf.c} | 4 +-
.../storage_encryption_conf.h} | 2 +-
src/conf/storage_source_conf.c | 1350 +++++
src/conf/storage_source_conf.h | 537 ++
src/esx/esx_storage_backend_iscsi.c | 2 +-
src/esx/esx_storage_backend_vmfs.c | 2 +-
src/libvirt_private.syms | 189 +-
src/libxl/meson.build | 1 +
src/libxl/xen_xl.c | 2 +-
src/locking/lock_driver_lockd.c | 1 +
src/meson.build | 1 +
src/qemu/meson.build | 1 +
src/qemu/qemu_backup.c | 11 +-
src/qemu/qemu_block.c | 10 +-
src/qemu/qemu_blockjob.c | 2 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_domain.c | 55 +-
src/qemu/qemu_driver.c | 69 +-
src/qemu/qemu_hotplug.c | 7 +-
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_process.c | 5 +-
src/qemu/qemu_snapshot.c | 24 +-
src/security/meson.build | 1 +
src/security/virt-aa-helper.c | 3 +-
src/storage/meson.build | 34 +-
src/storage/storage_backend.c | 2 +-
src/storage/storage_backend_gluster.c | 6 +-
src/storage/storage_util.c | 9 +-
src/storage_file/meson.build | 61 +
.../storage_file_backend.c} | 4 +-
.../storage_file_backend.h} | 6 +-
.../storage_file_fs.c | 23 +-
.../storage_file_fs.h | 0
.../storage_file_gluster.c | 34 +-
.../storage_file_gluster.h | 0
src/storage_file/storage_file_probe.c | 967 ++++
src/storage_file/storage_file_probe.h | 44 +
src/storage_file/storage_source.c | 2614 +++++++++
src/storage_file/storage_source.h | 148 +
src/util/meson.build | 2 -
src/util/virstoragefile.c | 4790 +----------------
src/util/virstoragefile.h | 554 +-
tests/meson.build | 4 +-
tests/qemublocktest.c | 1 +
tests/virstoragetest.c | 19 +-
54 files changed, 6045 insertions(+), 5593 deletions(-)
rename src/{util/virstorageencryption.c => conf/storage_encryption_conf.c} (99%)
rename src/{util/virstorageencryption.h => conf/storage_encryption_conf.h} (98%)
create mode 100644 src/conf/storage_source_conf.c
create mode 100644 src/conf/storage_source_conf.h
create mode 100644 src/storage_file/meson.build
rename src/{util/virstoragefilebackend.c => storage_file/storage_file_backend.c} (97%)
rename src/{util/virstoragefilebackend.h => storage_file/storage_file_backend.h} (93%)
rename src/{storage => storage_file}/storage_file_fs.c (90%)
rename src/{storage => storage_file}/storage_file_fs.h (100%)
rename src/{storage => storage_file}/storage_file_gluster.c (89%)
rename src/{storage => storage_file}/storage_file_gluster.h (100%)
create mode 100644 src/storage_file/storage_file_probe.c
create mode 100644 src/storage_file/storage_file_probe.h
create mode 100644 src/storage_file/storage_source.c
create mode 100644 src/storage_file/storage_source.h
--
2.29.2
4 years, 2 months
[PATCH] virsh: Fix XPATH in virshDomainDeviceAliasCompleter()
by Michal Privoznik
The way this completer works is that it dumps XML of specified
domain and then tries to look for @name attribute of <alias/>
element. However, the XPATH it uses is not correct which results
in no aliases returned by the completer.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/virsh-completer-domain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c
index 4a3459f12a..e773af6552 100644
--- a/tools/virsh-completer-domain.c
+++ b/tools/virsh-completer-domain.c
@@ -316,14 +316,14 @@ virshDomainDeviceAliasCompleter(vshControl *ctl,
if (virshDomainGetXML(ctl, cmd, domainXMLFlags, &xmldoc, &ctxt) < 0)
return NULL;
- naliases = virXPathNodeSet("./devices//alias/@name", ctxt, &aliases);
+ naliases = virXPathNodeSet("/domain/devices//alias[@name]", ctxt, &aliases);
if (naliases < 0)
return NULL;
tmp = g_new0(char *, naliases + 1);
for (i = 0; i < naliases; i++) {
- if (!(tmp[i] = virXMLNodeContentString(aliases[i])))
+ if (!(tmp[i] = virXMLPropString(aliases[i], "name")))
return NULL;
}
--
2.26.2
4 years, 2 months
[PATCH] virNetworkDHCPLeaseTimeDefParseXML: Output error when 'expiry' can't be parsed
by Peter Krempa
virStrToLong_ul doesn't report it's own error.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1918674
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/network_conf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 4f1115e103..ff7a56f4f4 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -418,8 +418,11 @@ virNetworkDHCPLeaseTimeDefParseXML(virNetworkDHCPLeaseTimeDefPtr *lease,
if (!(expirystr = virXMLPropString(node, "expiry")))
return 0;
- if (virStrToLong_ul(expirystr, NULL, 10, &expiry) < 0)
+ if (virStrToLong_ul(expirystr, NULL, 10, &expiry) < 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("failed to parse expiry value '%s'"), expirystr);
return -1;
+ }
if ((unitstr = virXMLPropString(node, "unit"))) {
if ((unit = virNetworkDHCPLeaseTimeUnitTypeFromString(unitstr)) < 0) {
--
2.29.2
4 years, 2 months