[libvirt] [PATCH] qemu_cgroup: Fix 'rc' argument on virDomainAuditCgroupPath() calls
by Eduardo Habkost
All calls to virDomainAuditCgroupPath() were passing 'rc == 0' as
argument, when it was supposed to pass the 'rc' value directly.
As a consequence, the audit events that were supposed to be
logged (actual cgroup changes) were never being logged, and bogus
audit events were logged when using regular files as disk image.
Fix all calls to use the return value of
virCgroup{Allow,Deny}Device*() directly as the 'rc' argument.
Signed-off-by: Eduardo Habkost <ehabkost(a)redhat.com>
---
src/qemu/qemu_cgroup.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 19252ea23..1f8fd870c 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -75,7 +75,7 @@ qemuSetupImagePathCgroup(virDomainObjPtr vm,
virDomainAuditCgroupPath(vm, priv->cgroup, "allow", path,
virCgroupGetDevicePermsString(perms),
- ret == 0);
+ ret);
return ret;
}
@@ -129,7 +129,7 @@ qemuTeardownImageCgroup(virDomainObjPtr vm,
ret = virCgroupDenyDevicePath(priv->cgroup, src->path, perms, true);
virDomainAuditCgroupPath(vm, priv->cgroup, "deny", src->path,
- virCgroupGetDevicePermsString(perms), ret == 0);
+ virCgroupGetDevicePermsString(perms), ret);
return ret;
}
@@ -187,7 +187,7 @@ qemuSetupChrSourceCgroup(virDomainObjPtr vm,
ret = virCgroupAllowDevicePath(priv->cgroup, source->data.file.path,
VIR_CGROUP_DEVICE_RW, false);
virDomainAuditCgroupPath(vm, priv->cgroup, "allow",
- source->data.file.path, "rw", ret == 0);
+ source->data.file.path, "rw", ret);
return ret;
}
@@ -211,7 +211,7 @@ qemuTeardownChrSourceCgroup(virDomainObjPtr vm,
ret = virCgroupDenyDevicePath(priv->cgroup, source->data.file.path,
VIR_CGROUP_DEVICE_RW, false);
virDomainAuditCgroupPath(vm, priv->cgroup, "deny",
- source->data.file.path, "rw", ret == 0);
+ source->data.file.path, "rw", ret);
return ret;
}
@@ -261,7 +261,7 @@ qemuSetupInputCgroup(virDomainObjPtr vm,
VIR_DEBUG("Process path '%s' for input device", dev->source.evdev);
ret = virCgroupAllowDevicePath(priv->cgroup, dev->source.evdev,
VIR_CGROUP_DEVICE_RW, false);
- virDomainAuditCgroupPath(vm, priv->cgroup, "allow", dev->source.evdev, "rw", ret == 0);
+ virDomainAuditCgroupPath(vm, priv->cgroup, "allow", dev->source.evdev, "rw", ret);
break;
}
@@ -284,7 +284,7 @@ qemuTeardownInputCgroup(virDomainObjPtr vm,
VIR_DEBUG("Process path '%s' for input device", dev->source.evdev);
ret = virCgroupDenyDevicePath(priv->cgroup, dev->source.evdev,
VIR_CGROUP_DEVICE_RWM, false);
- virDomainAuditCgroupPath(vm, priv->cgroup, "deny", dev->source.evdev, "rwm", ret == 0);
+ virDomainAuditCgroupPath(vm, priv->cgroup, "deny", dev->source.evdev, "rwm", ret);
break;
}
@@ -313,7 +313,7 @@ qemuSetupHostdevCgroup(virDomainObjPtr vm,
rv = virCgroupAllowDevicePath(priv->cgroup, path[i], perms[i], false);
virDomainAuditCgroupPath(vm, priv->cgroup, "allow", path[i],
virCgroupGetDevicePermsString(perms[i]),
- ret == 0);
+ ret);
if (rv < 0)
goto cleanup;
}
@@ -357,7 +357,7 @@ qemuTeardownHostdevCgroup(virDomainObjPtr vm,
rv = virCgroupDenyDevicePath(priv->cgroup, path[i],
VIR_CGROUP_DEVICE_RWM, false);
virDomainAuditCgroupPath(vm, priv->cgroup,
- "deny", path[i], "rwm", rv == 0);
+ "deny", path[i], "rwm", rv);
if (rv < 0)
goto cleanup;
}
@@ -388,7 +388,7 @@ qemuSetupMemoryDevicesCgroup(virDomainObjPtr vm,
rv = virCgroupAllowDevicePath(priv->cgroup, mem->nvdimmPath,
VIR_CGROUP_DEVICE_RW, false);
virDomainAuditCgroupPath(vm, priv->cgroup, "allow",
- mem->nvdimmPath, "rw", rv == 0);
+ mem->nvdimmPath, "rw", rv);
return rv;
}
@@ -410,7 +410,7 @@ qemuTeardownMemoryDevicesCgroup(virDomainObjPtr vm,
rv = virCgroupDenyDevicePath(priv->cgroup, mem->nvdimmPath,
VIR_CGROUP_DEVICE_RWM, false);
virDomainAuditCgroupPath(vm, priv->cgroup,
- "deny", mem->nvdimmPath, "rwm", rv == 0);
+ "deny", mem->nvdimmPath, "rwm", rv);
return rv;
}
@@ -434,7 +434,7 @@ qemuSetupGraphicsCgroup(virDomainObjPtr vm,
ret = virCgroupAllowDevicePath(priv->cgroup, rendernode,
VIR_CGROUP_DEVICE_RW, false);
virDomainAuditCgroupPath(vm, priv->cgroup, "allow", rendernode,
- "rw", ret == 0);
+ "rw", ret);
return ret;
}
@@ -573,7 +573,7 @@ qemuSetupRNGCgroup(virDomainObjPtr vm,
VIR_CGROUP_DEVICE_RW, false);
virDomainAuditCgroupPath(vm, priv->cgroup, "allow",
rng->source.file,
- "rw", rv == 0);
+ "rw", rv);
if (rv < 0 &&
!virLastErrorIsSystemErrno(ENOENT))
return -1;
@@ -600,7 +600,7 @@ qemuTeardownRNGCgroup(virDomainObjPtr vm,
VIR_CGROUP_DEVICE_RW, false);
virDomainAuditCgroupPath(vm, priv->cgroup, "deny",
rng->source.file,
- "rw", rv == 0);
+ "rw", rv);
if (rv < 0 &&
!virLastErrorIsSystemErrno(ENOENT))
return -1;
@@ -693,7 +693,7 @@ qemuSetupDevicesCgroup(virDomainObjPtr vm)
rv = virCgroupAllowDevicePath(priv->cgroup, deviceACL[i],
VIR_CGROUP_DEVICE_RW, false);
- virDomainAuditCgroupPath(vm, priv->cgroup, "allow", deviceACL[i], "rw", rv == 0);
+ virDomainAuditCgroupPath(vm, priv->cgroup, "allow", deviceACL[i], "rw", rv);
if (rv < 0 &&
!virLastErrorIsSystemErrno(ENOENT))
goto cleanup;
--
2.14.3
6 years, 10 months
[libvirt] [PATCH] virstringtest: Fix alignment of backslashes
by Michal Privoznik
We don't try to right align the backslashes anymore.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under trivial & build breaker rules.
tests/virstringtest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/virstringtest.c b/tests/virstringtest.c
index e8518ede1..1230aba5b 100644
--- a/tests/virstringtest.c
+++ b/tests/virstringtest.c
@@ -1119,9 +1119,9 @@ mymain(void)
#define TEST_FILTER_CHARS(str, filter, res) \
do { \
struct testFilterData filterData = { \
- .string = str, \
+ .string = str, \
.valid = filter, \
- .result = res, \
+ .result = res, \
}; \
if (virTestRun("Filter chars from " #str, \
testFilterChars, &filterData) < 0) \
--
2.13.6
6 years, 10 months
[libvirt] [PATCH] util: fix a wrong description
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
We don't have @result. Use the right one: @matches
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/util/virstring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virstring.c b/src/util/virstring.c
index b2ebce27f..0cb06bdc9 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -1038,7 +1038,7 @@ int virStringSortRevCompare(const void *a, const void *b)
* @str: string to search
* @regexp: POSIX Extended regular expression pattern used for matching
* @max_matches: maximum number of substrings to return
- * @result: pointer to an array to be filled with NULL terminated list of matches
+ * @matches: pointer to an array to be filled with NULL terminated list of matches
*
* Performs a POSIX extended regex search against a string and return all matching substrings.
* The @result value should be freed with virStringListFree() when no longer
--
2.14.3
6 years, 10 months
[libvirt] [PATCH] maint: Update to latest gnulib
by Michal Privoznik
Unfortunately, since gnulib's commit of 2c5d558745 there's an
unused parameter to stat_time_normalize() function which gnulib
developers don't want to fix [1]. Therefore, we have to work
around it by temporarily suspending -Wunused-parameter.
1: http://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00000.html
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
While we have 'gnulib update free' push rule, this one is not trivial at
all and thus I have not pushed it. It's ugly and I don't like it. So any
ideas are welcome.
.gnulib | 2 +-
bootstrap | 4 ++--
src/storage/storage_util.c | 3 +++
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.gnulib b/.gnulib
index 5e9abf871..c2cb55b34 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 5e9abf87163ad4aeaefef0b02961f8674b0a4879
+Subproject commit c2cb55b34e76546479f195c14202dfcc870c4914
diff --git a/bootstrap b/bootstrap
index 85b85c530..25920e991 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4,7 +4,7 @@ scriptversion=2017-09-19.08; # UTC
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -792,7 +792,7 @@ symlink_to_dir()
# aren't confused into doing unnecessary builds. Conversely, if the
# existing symlink's timestamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
- # <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+ # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 899a55758..da6381f52 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -64,7 +64,10 @@
#include "virfile.h"
#include "virjson.h"
#include "virqemu.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-parameter"
#include "stat-time.h"
+#pragma GCC diagnostic pop
#include "virstring.h"
#include "virxml.h"
#include "virfdstream.h"
--
2.13.6
6 years, 10 months
[libvirt] [PATCH v2] maint: Update to latest gnulib
by Eric Blake
From: Michal Privoznik <mprivozn(a)redhat.com>
Unfortunately, since gnulib's commit of 2c5d558745 there's an
unused parameter to stat_time_normalize() function which gnulib
developers don't want to fix yet [1]. Therefore, we have to work
around it by temporarily providing a downstream patch.
1: http://lists.gnu.org/archive/html/bug-gnulib/2018-01/msg00000.html
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
[eblake: use gnulib local diff, instead of #pragma]
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
v2: perhaps nicer than Michal's original suggestion, but I'd still
wait another day or two to see if my arguments on the upstream
gnulib thread can instead give us a better submodule commit to
update to that avoids the problem altogether.
---
.gnulib | 2 +-
bootstrap | 4 ++--
gnulib/local/lib/stat-time.h.diff | 13 +++++++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 gnulib/local/lib/stat-time.h.diff
diff --git a/.gnulib b/.gnulib
index 5e9abf8716..c2cb55b34e 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 5e9abf87163ad4aeaefef0b02961f8674b0a4879
+Subproject commit c2cb55b34e76546479f195c14202dfcc870c4914
diff --git a/bootstrap b/bootstrap
index 85b85c530f..25920e991c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -4,7 +4,7 @@ scriptversion=2017-09-19.08; # UTC
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -792,7 +792,7 @@ symlink_to_dir()
# aren't confused into doing unnecessary builds. Conversely, if the
# existing symlink's timestamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
- # <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+ # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
diff --git a/gnulib/local/lib/stat-time.h.diff b/gnulib/local/lib/stat-time.h.diff
new file mode 100644
index 0000000000..8333520d2d
--- /dev/null
+++ b/gnulib/local/lib/stat-time.h.diff
@@ -0,0 +1,13 @@
+diff --git i/lib/stat-time.h w/lib/stat-time.h
+index 5f8bf4e12..68871f567 100644
+--- i/lib/stat-time.h
++++ w/lib/stat-time.h
+@@ -212,7 +212,7 @@ get_stat_birthtime (struct stat const *st)
+ errno to EOVERFLOW if normalization overflowed. This function
+ is intended to be private to this .h file. */
+ _GL_STAT_TIME_INLINE int
+-stat_time_normalize (int result, struct stat *st)
++stat_time_normalize (int result, struct stat *st _GL_UNUSED)
+ {
+ #if defined __sun && defined STAT_TIMESPEC
+ if (result == 0)
--
2.14.3
6 years, 10 months
[libvirt] [PATCH] apparmor: fix virt-aa-helper profile
by Cédric Bosdonnat
Fix rule introduced by commit 0f33025a:
* to handle /var/run not being a symlink to /run
* to be properly parsed: missing comma at the end.
---
examples/apparmor/usr.lib.libvirt.virt-aa-helper | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
index 9c822b644..105f09e43 100644
--- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
+++ b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
@@ -51,7 +51,7 @@ profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
/var/lib/libvirt/images/** r,
/{media,mnt,opt,srv}/** r,
# For virt-sandbox
- /run/libvirt/**/[sv]d[a-z] r
+ /{,var/}run/libvirt/**/[sv]d[a-z] r,
/**.img r,
/**.raw r,
--
2.15.1
6 years, 10 months
[libvirt] [PATCH] storage: Fixing missing 'backingStore' tag from volume XML dumps.
by Julio Faracco
After commit a693fdb 'vol-dumpxml' missed the ability to show backingStore
information. This commit adds a volume type for files that fixes this
problem.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1529663
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/storage/storage_util.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 899a557..9e1b63a 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -1957,6 +1957,8 @@ virStorageBackendUpdateVolTargetInfoFD(virStorageSourcePtr target,
target->timestamps->ctime = get_stat_ctime(sb);
target->timestamps->mtime = get_stat_mtime(sb);
+ target->type = VIR_STORAGE_TYPE_FILE;
+
VIR_FREE(target->perms->label);
#if WITH_SELINUX
--
2.7.4
6 years, 10 months
[libvirt] [PATCH v2] qemuBuildMemPathStr: Forbid memoryBacking/access for non-numa case
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1448149
If a domain has no numa nodes, that means we don't put any
memory-backend-file onto the qemu command line. That in turn
means we can't set access='shared'. Therefore, we should produce
an error instead of ignoring the setting silently.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
diff to v2:
- switched from check at cmd line generation to validation callback (as
requested in review).
src/qemu/qemu_domain.c | 29 ++++++++-
tests/qemuxml2argvdata/hugepages-memaccess3.xml | 87 +++++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 +
3 files changed, 118 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess3.xml
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 43bd0fff4..70fb40650 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3997,6 +3997,30 @@ qemuDomainDeviceDefValidateController(const virDomainControllerDef *controller,
}
+static int
+qemuDomainDeviceDefValidateMemory(const virDomainMemoryDef *memory ATTRIBUTE_UNUSED,
+ const virDomainDef *def)
+{
+ const long system_page_size = virGetSystemPageSizeKB();
+
+ /* We can't guarantee any other mem.access
+ * if no guest NUMA nodes are defined. */
+ if (def->mem.nhugepages != 0 &&
+ def->mem.hugepages[0].size != system_page_size &&
+ virDomainNumaGetNodeCount(def->numa) == 0 &&
+ def->mem.access != VIR_DOMAIN_MEMORY_ACCESS_DEFAULT &&
+ def->mem.access != VIR_DOMAIN_MEMORY_ACCESS_PRIVATE) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("memory access mode '%s' not supported "
+ "without guest numa node"),
+ virDomainMemoryAccessTypeToString(def->mem.access));
+ return -1;
+ }
+
+ return 0;
+}
+
+
static int
qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
const virDomainDef *def,
@@ -4052,6 +4076,10 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
qemuCaps);
break;
+ case VIR_DOMAIN_DEVICE_MEMORY:
+ ret = qemuDomainDeviceDefValidateMemory(dev->data.memory, def);
+ break;
+
case VIR_DOMAIN_DEVICE_LEASE:
case VIR_DOMAIN_DEVICE_FS:
case VIR_DOMAIN_DEVICE_INPUT:
@@ -4063,7 +4091,6 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
case VIR_DOMAIN_DEVICE_SHMEM:
case VIR_DOMAIN_DEVICE_TPM:
case VIR_DOMAIN_DEVICE_PANIC:
- case VIR_DOMAIN_DEVICE_MEMORY:
case VIR_DOMAIN_DEVICE_IOMMU:
case VIR_DOMAIN_DEVICE_NONE:
case VIR_DOMAIN_DEVICE_LAST:
diff --git a/tests/qemuxml2argvdata/hugepages-memaccess3.xml b/tests/qemuxml2argvdata/hugepages-memaccess3.xml
new file mode 100644
index 000000000..8ec38d802
--- /dev/null
+++ b/tests/qemuxml2argvdata/hugepages-memaccess3.xml
@@ -0,0 +1,87 @@
+<domain type='kvm'>
+ <name>fedora</name>
+ <uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <memoryBacking>
+ <hugepages/>
+ <access mode='shared'/>
+ </memoryBacking>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-2.9'>hvm</type>
+ <bootmenu enable='yes'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='host-model' check='partial'>
+ <model fallback='allow'/>
+ </cpu>
+ <clock offset='variable' adjustment='500' basis='utc'>
+ <timer name='rtc' tickpolicy='catchup'/>
+ <timer name='pit' tickpolicy='delay'/>
+ <timer name='hpet' present='no'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <pm>
+ <suspend-to-mem enabled='yes'/>
+ <suspend-to-disk enabled='yes'/>
+ </pm>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' discard='unmap'/>
+ <source file='/var/lib/libvirt/images/fedora.qcow2'/>
+ <target dev='sda' bus='scsi'/>
+ <boot order='1'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='scsi' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </controller>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <serial type='pty'>
+ <target type='isa-serial' port='1'>
+ <model name='isa-serial'/>
+ </target>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='1'/>
+ </console>
+ <channel type='unix'>
+ <target type='virtio' name='org.qemu.guest_agent.0'/>
+ <address type='virtio-serial' controller='0' bus='0' port='1'/>
+ </channel>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'>
+ <listen type='address' address='0.0.0.0'/>
+ </graphics>
+ <graphics type='spice'>
+ <listen type='socket' socket='/tmp/spice.sock'/>
+ </graphics>
+ <video>
+ <model type='virtio' heads='1' primary='yes'>
+ <acceleration accel3d='yes'/>
+ </model>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 10ab8d787..fe15072dc 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -861,6 +861,9 @@ mymain(void)
DO_TEST("hugepages-memaccess2", QEMU_CAPS_OBJECT_MEMORY_FILE,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_DEVICE_PC_DIMM,
QEMU_CAPS_NUMA);
+ DO_TEST_FAILURE("hugepages-memaccess3", QEMU_CAPS_MEM_PATH,
+ QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE,
+ QEMU_CAPS_VIRTIO_SCSI);
DO_TEST("nosharepages", QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MEM_MERGE);
DO_TEST("disk-cdrom", NONE);
DO_TEST("disk-iscsi", NONE);
--
2.13.6
6 years, 10 months
[libvirt] [PATCH 0/2] qemu: Don't log partial buffer reads from qemu monitor
by Peter Krempa
I was debugging a case where 200 snapshots of a disk would result in a
VERY long reconnect time after libvirtd restart when debug logging was
enabled.
I've figured out that qemu responds with 9MiB of json after calling
"query-named-block-nodes" and this resulted in > 26 GiB of libvirtd
debug log just to process the message.
I'll report the qemu flaw separately.
Peter Krempa (2):
util: probe: Add quiet versions of the "PROBE" macro
qemu: monitor: Decrease logging verbosity
src/qemu/qemu_monitor.c | 4 ++--
src/qemu/qemu_monitor_json.c | 3 +++
src/util/virprobe.h | 8 ++++++++
3 files changed, 13 insertions(+), 2 deletions(-)
--
2.15.0
6 years, 10 months
[libvirt] [PATCH] util: fix another wrong description
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
commit 9026d1152c236ac7a7ab25845220a8e14d6bc630
forgot to change the referenced @result variable.
This patch completed this.
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/util/virstring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virstring.c b/src/util/virstring.c
index 0cb06bdc9..b6e7e279c 100644
--- a/src/util/virstring.c
+++ b/src/util/virstring.c
@@ -1041,7 +1041,7 @@ int virStringSortRevCompare(const void *a, const void *b)
* @matches: pointer to an array to be filled with NULL terminated list of matches
*
* Performs a POSIX extended regex search against a string and return all matching substrings.
- * The @result value should be freed with virStringListFree() when no longer
+ * The @matches value should be freed with virStringListFree() when no longer
* required.
*
* @code
--
2.14.3
6 years, 10 months