[PATCH v2] formatdomain.rst: update slice xml in "Hard drives" part
by MeinaLi
The disk type=’lun’ doesn't support storage slice, which was introduced in:
5d72c3ce28 qemu: domain: Forbid slice/encryption/copy_on_read with disk type='lun'
Signed-off-by: Meina Li <meili(a)redhat.com>
---
docs/formatdomain.rst | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 1b9b221611..7bd5e685e8 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -2381,9 +2381,6 @@ paravirtualized driver is specified via the ``disk`` element.
<disk type='block' device='lun'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sda'>
- <slices>
- <slice type='storage' offset='12345' size='123'/>
- </slices>
<reservations managed='no'>
<source type='unix' path='/path/to/qemu-pr-helper' mode='client'/>
</reservations>
@@ -2393,7 +2390,11 @@ paravirtualized driver is specified via the ``disk`` element.
</disk>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
- <source dev='/dev/sda'/>
+ <source dev='/dev/sda'>
+ <slices>
+ <slice type='storage' offset='12345' size='123'/>
+ </slices>
+ </source>
<geometry cyls='16383' heads='16' secs='63' trans='lba'/>
<blockio logical_block_size='512' physical_block_size='4096'/>
<target dev='hdj' bus='ide'/>
--
2.27.0
3 years, 6 months
[libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part V
by Tim Wiederhake
For background, see
https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html
Tim Wiederhake (10):
virXMLPropEnum: Fix return value
virDomainControllerDef: Change type of ioeventfd to virTristateSwitch
virDomainPCIControllerOpts: Change type of modelName to
virDomainControllerPCIModelName
virDomainControllerDefParseXML: Use virXMLProp*
virDomainActualNetDef: Change type of type to virDomainNetType
virDomainActualNetDefParseXML: Use virXMLProp*
virDomainNetDefParseXML: Use virXMLProp*
virDomainGraphicsListenDefParseXML: Use virXMLProp*
virDomainGraphicsDef: Change type of sharePolicy to
virDomainGraphicsVNCSharePolicy
virDomainGraphicsDefParseXMLVNC: Use virXMLProp*
src/conf/domain_conf.c | 643 +++++++++++----------------------
src/conf/domain_conf.h | 8 +-
src/qemu/qemu_domain_address.c | 2 +-
src/util/virxml.c | 2 +-
4 files changed, 227 insertions(+), 428 deletions(-)
--
2.26.3
3 years, 6 months
[PATCH] qemu: Don't double free @node_cpus in qemuProcessSetupPid()
by Michal Privoznik
When placing vCPUs into CGroups the qemuProcessSetupPid() is
called which then enters a for() loop (around its middle) where
it calls virDomainNumaGetNodeCpumask() for each guest NUMA node.
But the latter returns only a pointer not new reference/copy and
thus the caller must not free it. But the variable is decorated
with g_autoptr() which leads to a double free.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_process.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 05104e3098..92c1f0ab74 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2741,8 +2741,7 @@ qemuProcessSetupPid(virDomainObj *vm,
/* Look for the guest NUMA node of this vCPU */
for (i = 0; i < virDomainNumaGetNodeCount(numatune); i++) {
- g_autoptr(virBitmap) node_cpus = NULL;
- node_cpus = virDomainNumaGetNodeCpumask(numatune, i);
+ virBitmap *node_cpus = virDomainNumaGetNodeCpumask(numatune, i);
if (!virBitmapIsBitSet(node_cpus, id))
continue;
--
2.26.3
3 years, 6 months
[PATCH] rpc: libssh2: Enable EC host keys
by Bastian Germann
libssh2 has ECDSA and ED25519 support beginning with v1.9.0. libvirt cannot
make use of those because it will handle them as unknown key types.
Add support for those host key types.
Signed-off-by: Bastian Germann <bastiangermann(a)fishpost.de>
---
src/rpc/virnetsshsession.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c
index fe77594..c311e90 100644
--- a/src/rpc/virnetsshsession.c
+++ b/src/rpc/virnetsshsession.c
@@ -389,7 +389,21 @@ virNetSSHCheckHostKey(virNetSSHSessionPtr sess)
case LIBSSH2_HOSTKEY_TYPE_DSS:
keyType = LIBSSH2_KNOWNHOST_KEY_SSHDSS;
break;
-
+#ifdef LIBSSH2_HOSTKEY_TYPE_ED25519
+ /* defs from libssh2 v1.9.0 or later */
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_256:
+ keyType = LIBSSH2_KNOWNHOST_KEY_ECDSA_256;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_384:
+ keyType = LIBSSH2_KNOWNHOST_KEY_ECDSA_384;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_ECDSA_521:
+ keyType = LIBSSH2_KNOWNHOST_KEY_ECDSA_521;
+ break;
+ case LIBSSH2_HOSTKEY_TYPE_ED25519:
+ keyType = LIBSSH2_KNOWNHOST_KEY_ED25519;
+ break;
+#endif
case LIBSSH2_HOSTKEY_TYPE_UNKNOWN:
default:
virReportError(VIR_ERR_SSH, "%s",
--
2.31.0
3 years, 6 months
[libvirt PATCH 0/3] docs: qemu: add socket for virtiofs filesystems
by Ján Tomko
Add documentation for the new attribute.
Ján Tomko (3):
docs: document new socket attribute for virtiofs
docs: virtiofs: add section about externally-launched virtiofsd
NEWS: qemu: add socket for virtiofs filesystems
NEWS.rst | 6 ++++++
docs/formatdomain.rst | 10 +++++++++-
docs/kbase/virtiofs.rst | 14 ++++++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)
--
2.29.2
3 years, 6 months
[libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part IV
by Tim Wiederhake
For background, see
https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html
Tim Wiederhake (10):
virDomainDiskDef: Change type of cachemode to virDomainDiskCache
virDomainDiskDef: Change type of error_policy to
virDomainDiskErrorPolicy
virDomainDiskDef: Change type of rerror_policy to
virDomainDiskErrorPolicy
virDomainDiskDef: Change type of iomode to virDomainDiskInfo
virDomainDiskDef: Change type of discard to virDomainDiskDiscard
virDomainDiskDef: Change type of detect_zeroes to
virDomainDiskDetectZeroes
virDomainDiskDefDriverParseXML: Use virXMLProp*
domain_conf: Introduce function virDomainChrSouceModeTypeFromString
domain_conf: Remove function virDomainChrSourceDefParseMode
virDomainChrSourceDefParseTCP: Use virXMLProp*
src/conf/domain_conf.c | 176 +++++++++++++----------------------------
src/conf/domain_conf.h | 12 +--
2 files changed, 61 insertions(+), 127 deletions(-)
--
2.26.3
3 years, 6 months
[libvirt PATCH] vahDeinit: Fix memory leak
by Tim Wiederhake
Calling VIR_FREE on a virDomainDef* does not free its various contained
pointers.
Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/security/virt-aa-helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 68ac817f47..2331cc6648 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -79,7 +79,7 @@ vahDeinit(vahControl * ctl)
if (ctl == NULL)
return -1;
- VIR_FREE(ctl->def);
+ virDomainDefFree(ctl->def);
virObjectUnref(ctl->caps);
virObjectUnref(ctl->xmlopt);
VIR_FREE(ctl->files);
--
2.26.3
3 years, 6 months
[libvirt] [PATCH 0/2] virsh completer fixes
by Lin Ma
Lin Ma (2):
virsh: Add mountpoint completion to domfsfreeze/domfsthaw command
virsh: Fix completion logic to guestvcpus command
tools/virsh-completer-domain.c | 104 +++++++++++++++++++++++++++------
tools/virsh-completer-domain.h | 4 ++
tools/virsh-domain.c | 2 +
3 files changed, 93 insertions(+), 17 deletions(-)
--
2.26.2
3 years, 6 months
[PATCH 0/4] lxc: Let the driver detect CGroups earlier
by Michal Privoznik
See 4/4 for explanation.
Michal Prívozník (4):
lxc_controller: Initialize ctrl->handshakeFd properly
lxc_controller: Move closing of handshakeFd out of
virLXCControllerDaemonHandshake()
lxc: Pass another pipe to lxc_controller
lxc: Let the driver detect CGroups earlier
src/lxc/lxc_controller.c | 65 +++++++++++++++++++++++++++++++---------
src/lxc/lxc_process.c | 41 ++++++++++++++++++++-----
2 files changed, 84 insertions(+), 22 deletions(-)
--
2.26.3
3 years, 6 months
[libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part III
by Tim Wiederhake
For background, see
https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html
Tim Wiederhake (10):
virDomainKeyWrapCipherDefParseXML: Use virXMLProp*
virDomainKeyWrapDef: Make members virTristateSwitch
qemuAppendKeyWrapMachineParm: Stricten parameter types
virxml: Add virXMLPropULongLong
virDomainDeviceDimmAddressParseXML: Use virXMLProp*
virDomainHostdevSubsysSCSIHostDefParseXML: Use virXMLProp*
virStorageEncryptionInfoParseCipher: Use virXMLProp*
virDomainDeviceInfoParseXML: Use virXMLProp*
virDomainDiskSourceNetworkParse: Use virXMLProp*
virDomainMemorytuneDefParseMemory: Use virXMLProp*
src/conf/domain_conf.c | 214 ++++++++---------------------
src/conf/domain_conf.h | 4 +-
src/conf/storage_encryption_conf.c | 16 +--
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 3 +-
src/util/virxml.c | 56 ++++++++
src/util/virxml.h | 8 ++
7 files changed, 125 insertions(+), 177 deletions(-)
--
2.26.3
3 years, 6 months