[libvirt PATCH] meson: Fix typo backand -> backend
by Andrea Bolognani
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
meson_options.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson_options.txt b/meson_options.txt
index 1313effd09..1d19094e2e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -74,7 +74,7 @@ option('secdriver_selinux', type: 'feature', value: 'auto', description: 'use SE
# storage driver options
-option('storage_dir', type: 'feature', value: 'auto', description: 'directory backand for the storage driver')
+option('storage_dir', type: 'feature', value: 'auto', description: 'directory backend for the storage driver')
option('storage_disk', type: 'feature', value: 'auto', description: 'GPartd Disk backend for the storage driver')
option('storage_fs', type: 'feature', value: 'auto', description: 'FileSystem backend for the storage driver')
option('storage_gluster', type: 'feature', value: 'auto', description: 'Gluster backend for the storage driver')
--
2.26.2
4 years, 3 months
[PATCH] numa_conf: Properly check for caches in virDomainNumaDefValidate()
by Michal Privoznik
When adding support for HMAT, in f0611fe8830 I've introduced a
check which aims to validate /domain/cpu/numa/interconnects. As a
part of that, there is a loop which checks whether all <latency/>
with @cache attribute refer to an existing cache level. For
instance:
<cpu mode='host-model' check='partial'>
<numa>
<cell id='0' cpus='0-5' memory='512000' unit='KiB' discard='yes'>
<cache level='1' associativity='direct' policy='writeback'>
<size value='8' unit='KiB'/>
<line value='5' unit='B'/>
</cache>
</cell>
<interconnects>
<latency initiator='0' target='0' cache='1' type='access' value='5'/>
<bandwidth initiator='0' target='0' type='access' value='204800' unit='KiB'/>
</interconnects>
</numa>
</cpu>
This XML defines that accessing L1 cache of node #0 from node #0
has latency of 5ns.
However, the loop was not written properly. Well, the check in
it, as it was always checking for the first cache in the target
node and not the rest. Therefore, the following example errors
out:
<cpu mode='host-model' check='partial'>
<numa>
<cell id='0' cpus='0-5' memory='512000' unit='KiB' discard='yes'>
<cache level='3' associativity='direct' policy='writeback'>
<size value='10' unit='KiB'/>
<line value='8' unit='B'/>
</cache>
<cache level='1' associativity='direct' policy='writeback'>
<size value='8' unit='KiB'/>
<line value='5' unit='B'/>
</cache>
</cell>
<interconnects>
<latency initiator='0' target='0' cache='1' type='access' value='5'/>
<bandwidth initiator='0' target='0' type='access' value='204800' unit='KiB'/>
</interconnects>
</numa>
</cpu>
This errors out even though it is a valid configuration. The L1
cache under node #0 is still present.
Fixes: f0611fe8830
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Is this trivial enough to be pushed as such? ;-)
src/conf/numa_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index 50d57ba8f6..9305e125b7 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -1421,7 +1421,7 @@ virDomainNumaDefValidate(const virDomainNuma *def)
if (l->cache > 0) {
for (j = 0; j < def->mem_nodes[l->target].ncaches; j++) {
- const virDomainNumaCache *cache = def->mem_nodes[l->target].caches;
+ const virDomainNumaCache *cache = &def->mem_nodes[l->target].caches[j];
if (l->cache == cache->level)
break;
--
2.26.2
4 years, 3 months
[libvirt PATCH 0/2] meson augeas test fixes
by Pavel Hrdina
Pavel Hrdina (2):
src/meson: introduce srcdir and builddir into augeas_test_data
dictionary
meson/src: add missing augeas tests
src/bhyve/meson.build | 3 +++
src/libxl/meson.build | 3 +++
src/locking/meson.build | 9 +++++++
src/logging/meson.build | 3 +++
src/lxc/meson.build | 3 +++
src/meson.build | 52 +++++++++++++++++++++++++++--------------
src/qemu/meson.build | 3 +++
7 files changed, 58 insertions(+), 18 deletions(-)
--
2.26.2
4 years, 3 months
[libvirt PATCH 00/16] Add support for persistent mediated devices
by Jonathon Jongsma
This patch series follows the previously-merged series which added support for
transient mediated devices. This series expands mdev support to include
persistent device definitions. Again, it relies on mdevctl as the backend.
It follows the common libvirt pattern of APIs by adding the following new APIs
for node devices:
- virNodeDeviceDefineXML() - defines a persistent device
- virNodeDeviceUndefine() - undefines a persistent device
- virNodeDeviceCreate() - starts a previously-defined device
It also adds virsh commands mapping to these new APIs: nodedev-define,
nodedev-undefine, and nodedev-start.
The method of staying up-to-date with devices defined by mdevctl is currently a
little bit crude due to the fact that mdevctl does not emit any events when new
devices are added or removed. As a workaround, we create a file monitor for the
mdevctl config directory and re-query mdevctl when we detect changes within
that directory. In the future, mdevctl may introduce a more elegant solution.
Jonathon Jongsma (16):
tests: remove extra trailing semicolon
nodedev: introduce concept of 'active' node devices
nodedev: Add ability to filter by active state
virsh: Add --active, --inactive, --all to nodedev-list
nodedev: add ability to list and parse defined mdevs
nodedev: add STOPPED/STARTED lifecycle events
nodedev: add mdevctl devices to node device list
nodedev: handle mdevs that disappear from mdevctl
nodedev: add an mdevctl thread
api: add virNodeDeviceDefineXML()
virsh: add nodedev-define command
api: add virNodeDeviceUndefine()
virsh: Factor out function to find node device
virsh: add nodedev-undefine command
api: add virNodeDeviceCreate()
virsh: add "nodedev-start" command
examples/c/misc/event-test.c | 4 +
include/libvirt/libvirt-nodedev.h | 19 +-
src/conf/node_device_conf.h | 9 +
src/conf/virnodedeviceobj.c | 24 +
src/conf/virnodedeviceobj.h | 7 +
src/driver-nodedev.h | 14 +
src/libvirt-nodedev.c | 115 ++++
src/libvirt_private.syms | 2 +
src/libvirt_public.syms | 6 +
src/node_device/node_device_driver.c | 522 +++++++++++++++++-
src/node_device/node_device_driver.h | 38 ++
src/node_device/node_device_udev.c | 275 ++++++++-
src/remote/remote_driver.c | 3 +
src/remote/remote_protocol.x | 40 +-
src/remote_protocol-structs | 16 +
src/rpc/gendispatch.pl | 1 +
...19_36ea_4111_8f0a_8c9a70e21366-define.argv | 1 +
...19_36ea_4111_8f0a_8c9a70e21366-define.json | 1 +
...39_495e_4243_ad9f_beb3f14c23d9-define.argv | 1 +
...39_495e_4243_ad9f_beb3f14c23d9-define.json | 1 +
...16_1ca8_49ac_b176_871d16c13076-define.argv | 1 +
...16_1ca8_49ac_b176_871d16c13076-define.json | 1 +
tests/nodedevmdevctldata/mdevctl-create.argv | 1 +
.../mdevctl-list-defined.argv | 1 +
.../mdevctl-list-multiple-parents.json | 59 ++
.../mdevctl-list-multiple-parents.out.xml | 39 ++
.../mdevctl-list-multiple.json | 59 ++
.../mdevctl-list-multiple.out.xml | 39 ++
.../mdevctl-list-single-noattr.json | 11 +
.../mdevctl-list-single-noattr.out.xml | 8 +
.../mdevctl-list-single.json | 31 ++
.../mdevctl-list-single.out.xml | 14 +
.../nodedevmdevctldata/mdevctl-undefine.argv | 1 +
tests/nodedevmdevctltest.c | 226 +++++++-
tools/virsh-nodedev.c | 281 ++++++++--
35 files changed, 1783 insertions(+), 88 deletions(-)
create mode 100644 tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv
create mode 100644 tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.json
create mode 100644 tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv
create mode 100644 tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.json
create mode 100644 tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv
create mode 100644 tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.json
create mode 100644 tests/nodedevmdevctldata/mdevctl-create.argv
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-defined.argv
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-multiple-parents.json
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-multiple-parents.out.xml
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-multiple.json
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-single-noattr.json
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-single-noattr.out.xml
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-single.json
create mode 100644 tests/nodedevmdevctldata/mdevctl-list-single.out.xml
create mode 100644 tests/nodedevmdevctldata/mdevctl-undefine.argv
--
2.21.3
4 years, 3 months
[PATCH] doCoreDump: fix return value not expect as result
by Hao Wang
From: Hao Wang <wanghao232(a)huawei.com>
Subject: [PATCH] doCoreDump: fix return value not expect as result
In a case that qemuDumpToFd() return zero while VIR_CLOSE(fd) fails,
codes will go to "cleanup" with "ret=0", resulting in unexpected return
value. Fix that.
Signed-off-by: Hao Wang <wanghao232(a)huawei.com>
---
src/qemu/qemu_driver.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0f98243fe4..8dfb9a38bf 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3796,6 +3796,7 @@ doCoreDump(virQEMUDriverPtr driver,
{
int fd = -1;
int ret = -1;
+ int rc = -1;
virFileWrapperFdPtr wrapperFd = NULL;
int directFlag = 0;
unsigned int flags = VIR_FILE_WRAPPER_NON_BLOCKING;
@@ -3843,8 +3844,8 @@ doCoreDump(virQEMUDriverPtr driver,
if (STREQ(memory_dump_format, "elf"))
memory_dump_format = NULL;
- ret = qemuDumpToFd(driver, vm, fd, QEMU_ASYNC_JOB_DUMP,
- memory_dump_format);
+ rc = qemuDumpToFd(driver, vm, fd, QEMU_ASYNC_JOB_DUMP,
+ memory_dump_format);
} else {
if (dumpformat != VIR_DOMAIN_CORE_DUMP_FORMAT_RAW) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
@@ -3856,11 +3857,11 @@ doCoreDump(virQEMUDriverPtr driver,
if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
goto cleanup;
- ret = qemuMigrationSrcToFile(driver, vm, fd, compressor,
- QEMU_ASYNC_JOB_DUMP);
+ rc = qemuMigrationSrcToFile(driver, vm, fd, compressor,
+ QEMU_ASYNC_JOB_DUMP);
}
- if (ret < 0)
+ if (rc < 0)
goto cleanup;
if (VIR_CLOSE(fd) < 0) {
--
2.23.0
4 years, 3 months
[PATCH] NEWS: Document recent virdevmapper fix
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
NEWS.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 63ca689b43..b80e72f8c6 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -17,6 +17,13 @@ v6.7.0 (unreleased)
* **Bug fixes**
+ * virdevmapper: Deal with kernels without DM support
+
+ In the previous release libvirt dropped libdevmapper in favor of its own
+ implementation. However, it forgot to deal with kernels that either don't
+ have device mapper enabled or the dm-mod module is not loaded yet. This is
+ now fixed.
+
v6.6.0 (2020-08-02)
===================
--
2.26.2
4 years, 3 months
[PATCH 0/3] Avoid some GCC 10 warnings
by Boris Fiuczynski
Caught these when switching to F32 using GCC v10.2.1 on s390x.
Boris Fiuczynski (3):
qemu: avoid maybe-uninitialized warning by GCC 10
tools: avoid potential null pointer dereference by GCC 10
storage: avoid maybe-uninitialized warning by GCC 10
src/qemu/qemu_migration.c | 2 +-
src/storage/storage_backend_iscsi_direct.c | 8 ++++----
tools/vsh.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
--
2.25.1
4 years, 3 months
[PATCH 0/2] virdevmapper: Deal with kernels without DM support
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
virdevmapper: Don't error on kernels without DM support
virdevmapper: Deal with unloading dm module
src/util/virdevmapper.c | 59 ++++++++++++++++++++++++++++++++---------
1 file changed, 47 insertions(+), 12 deletions(-)
--
2.26.2
4 years, 3 months
[PATCH] docs: build: Fix links to 'edit this page' for kbase/manpages/internals
by Peter Krempa
Commit 862cf2ace4f04dadc175caacc74448e96c625ccb modified the generator
to base edit links in the root of the repository but forgot to add the
'docs/' prefix to the code generating kbase articles, manpages and the
internals documentation.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/internals/meson.build | 2 +-
docs/kbase/meson.build | 2 +-
docs/manpages/meson.build | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/internals/meson.build b/docs/internals/meson.build
index 169cc5d5f0..5d008dec5b 100644
--- a/docs/internals/meson.build
+++ b/docs/internals/meson.build
@@ -24,7 +24,7 @@ foreach name : internals_in_files
subsite_xsl,
'@INPUT@',
'@OUTPUT@',
- 'internals' / html_in_file,
+ 'docs/internals' / html_in_file,
],
depends: [ aclperms_gen ],
depend_files: [ page_xsl ],
diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build
index d7f254e163..e836a8a022 100644
--- a/docs/kbase/meson.build
+++ b/docs/kbase/meson.build
@@ -37,7 +37,7 @@ foreach name : docs_kbase_files
subsite_xsl,
'@INPUT@',
'@OUTPUT@',
- 'kbase' / rst_file,
+ 'docs/kbase' / rst_file,
],
depends: [ aclperms_gen ],
depend_files: [ page_xsl ],
diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index 8295e9e5ea..3888bb8efe 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -118,7 +118,7 @@ foreach data : docs_man_files
subsite_xsl,
'@INPUT@',
'@OUTPUT@',
- 'manpages' / rst_in_file,
+ 'docs/manpages' / rst_in_file,
],
depends: [ aclperms_gen ],
depend_files: [ page_xsl ],
--
2.25.4
4 years, 3 months
[libvirt PATCH] docs: improve auth service listing
by Pino Toscano
Slightly improve the list of known authentication service types:
- reword 'ssh' to mention it is used for the ssh driver (for remote
QEMU), and stop mentioning the removed Phyp driver
- add 'hyperv', used by the HyperV driver
- alphabetically sort the list
- use a bulletted list instead of a numbered one
Signed-off-by: Pino Toscano <ptoscano(a)redhat.com>
---
docs/auth.html.in | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/docs/auth.html.in b/docs/auth.html.in
index 6f8805b6f5..9964313776 100644
--- a/docs/auth.html.in
+++ b/docs/auth.html.in
@@ -122,17 +122,19 @@ credentials=defgrp</pre>
<p>
- The following service types are known to libvirt
+ The following service types are known to libvirt:
</p>
- <ol>
- <li><code>libvirt</code> - used for connections to a libvirtd
- server, which is configured with SASL auth</li>
- <li><code>ssh</code> - used for connections to a Phyp server
- over SSH, but the Phyp driver has been removed</li>
+ <ul>
<li><code>esx</code> - used for connections to an ESX or
VirtualCenter server</li>
- </ol>
+ <li><code>hyperv</code> - used for connections to an HyperV
+ server</li>
+ <li><code>libvirt</code> - used for connections to a libvirtd
+ server, which is configured with SASL auth</li>
+ <li><code>ssh</code> - used for connections to a remote QEMU driver
+ over SSH</li>
+ </ul>
<p>
Applications using libvirt are free to use this same configuration
--
2.26.2
4 years, 3 months