[libvirt PATCH 0/6] Add ability to create mediated devices in libvirt
by Jonathon Jongsma
This is the first portion of an effort to support persistent mediated devices
with libvirt. This first series simply enables creating and destroying
non-persistent mediated devices via the virNodeDeviceCreateXML() and
virNodeDeviceDestroy() functions. The 'mdevctl' utility[1] provides the backend
implementation.
[1] https://github.com/mdevctl/mdevctl
Jonathon Jongsma (6):
nodedev: factor out nodeDeviceHasCapability()
nodedev: add support for mdev attributes
nodedev: refactor nodeDeviceFindNewDevice()
nodedev: store mdev UUID in mdev caps
nodedev: add mdev support to virNodeDeviceCreateXML()
nodedev: add mdev support to virNodeDeviceDestroy()
docs/schemas/nodedev.rng | 6 +
libvirt.spec.in | 3 +
m4/virt-external-programs.m4 | 3 +
src/conf/node_device_conf.c | 59 ++++-
src/conf/node_device_conf.h | 3 +
src/conf/virnodedeviceobj.c | 34 +++
src/conf/virnodedeviceobj.h | 3 +
src/libvirt_private.syms | 3 +
src/node_device/node_device_driver.c | 326 ++++++++++++++++++++++++---
src/node_device/node_device_udev.c | 5 +-
src/util/virmdev.c | 12 +
src/util/virmdev.h | 11 +
12 files changed, 425 insertions(+), 43 deletions(-)
--
2.21.1
4 years, 6 months
[PATCH trivial v2 1/1] logging.html.in: fix number of output formats available
by Daniel Henrique Barboza
There are 4 formats available (x:stderr, x:syslog:name,
x:file:file_path, x:journald), not 3. Use "the following"
instead of the actual number to avoid the need to update
the number every time a new form is added/removed.
Suggested-by: Pino Toscano <ptoscano(a)redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
docs/logging.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/logging.html.in b/docs/logging.html.in
index 65c13e8a19..3ff0dd3eb6 100644
--- a/docs/logging.html.in
+++ b/docs/logging.html.in
@@ -124,7 +124,7 @@ x:name</pre>
priority level, messages that match that filter will still be logged,
while others will not. In order to see those messages, you must also have
an output defined that includes the priority level of your filter.</p>
- <p>The format for an output can be one of those 3 forms:</p>
+ <p>The format for an output can be one of the following forms:</p>
<ul>
<li><code>x:stderr</code> output goes to stderr</li>
<li><code>x:syslog:name</code> use syslog for the output and use the
--
2.26.2
4 years, 6 months
[PATCH 0/3] qemu: Emit an event on lease attach/detach
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (3):
qemuDomainAttachDeviceLive: Rework event emitting
Introduce VIR_DOMAIN_EVENT_ID_LEASE_CHANGE
qemu: Emit an event on lease attach/detach
examples/c/misc/event-test.c | 37 ++++++++++
include/libvirt/libvirt-domain.h | 37 ++++++++++
src/conf/domain_event.c | 100 ++++++++++++++++++++++++++++
src/conf/domain_event.h | 16 +++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_driver.c | 45 +++++++------
src/qemu/qemu_hotplug.c | 9 +++
src/remote/remote_daemon_dispatch.c | 37 ++++++++++
src/remote/remote_driver.c | 34 ++++++++++
src/remote/remote_protocol.x | 18 ++++-
src/remote_protocol-structs | 8 +++
tools/virsh-domain.c | 34 ++++++++++
12 files changed, 355 insertions(+), 22 deletions(-)
--
2.26.2
4 years, 6 months
[PATCH trivial 1/1] logging.html.in: fix number of output formats available
by Daniel Henrique Barboza
There are 4 formats available (x:stderr, x:syslog:name,
x:file:file_path, x:journald), not 3.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
docs/logging.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/logging.html.in b/docs/logging.html.in
index 65c13e8a19..9f320b439e 100644
--- a/docs/logging.html.in
+++ b/docs/logging.html.in
@@ -124,7 +124,7 @@ x:name</pre>
priority level, messages that match that filter will still be logged,
while others will not. In order to see those messages, you must also have
an output defined that includes the priority level of your filter.</p>
- <p>The format for an output can be one of those 3 forms:</p>
+ <p>The format for an output can be one of those 4 forms:</p>
<ul>
<li><code>x:stderr</code> output goes to stderr</li>
<li><code>x:syslog:name</code> use syslog for the output and use the
--
2.26.2
4 years, 6 months
Re: Question: How do I discard any changes for the device which is set by blockdev option?
by Eric Blake
On 5/19/20 12:56 PM, Masayoshi Mizuma wrote:
> Hello,
>
> I would like to discard any changes while the qemu guest OS is done.
> I can do that with snapshot and drive option.
> However, snapshot option doesn't work for the device which set by
> blockdev option like as:
>
> $QEMU --enable-kvm \
> -m 1024 \
> -nographic \
> -serial mon:stdio \
> -blockdev driver=file,node-name=mydisk,filename=/mnt/fedora.qcow2 \
> -blockdev driver=qcow2,node-name=vda,file=mydisk \
> -device virtio-blk-pci,drive=vda,bootindex=1 \
> -snapshot
>
> I would like to use blockdev option to set the device because
> libvirt uses blockdev option for disk element.
>
> If there's no way to do so, does that make sense to get available
> snapshot option to blockdev as well? If that makes sense, I'll try to
> implement that.
>
> As for qcow2, I think we can do such things to use qemu-img snapshot
> command, for example save the original image and restore the image
> after the qemu guest OS is shutdowned. However, it may be complecated
> for user. I would like the simple way like as snapshot/drive option...
>
> If I'm missing something, let me know.
>
Sounds like a repeat of this thread:
https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg06144.html
where the consensus is yes, -blockdev and -snapshot are incompatible,
libvirt has plans to use the <transient/> tag to behave the same as what
-snapshot does (but no one has implemented it yet), and in the meantime,
it is possible to force libvirt to avoid -blockdev if you still need to
supply -snapshot behind libvirt's back.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
4 years, 6 months
[PATCH 00/15] tests: qemu: Detect deprecation in the QMP schema (deprecation part 1)
by Peter Krempa
Recent qemu versions started adding the 'deprecated' feature to commands
and fields. Use this data to validate that our code doesn't rely on
deprecated commands. It turns out that we still use some old migration
commands (See 14/15) and add validator to catch anything deprecated
early.
Peter Krempa (15):
testQemuHotplugCpuPrepare: Allow unused monitor commands only on
failure
testutilsqemuschema: Introduce testQEMUSchemaValidateCommand
qemuMonitorTestProcessCommandDefaultValidate: Use
testQEMUSchemaValidateCommand
qemuMonitorTestProcessCommandDefaultValidate: Clean up return value
use
qemumonitortestutils: Introduce
qemuMonitorTestSkipDeprecatedValidation
testutilsqemuschema: Use automatic variable clearing where possible
testutilsqemuschema: Pass in 'schema' and 'debug' variables to workers
in a struct
testQEMUSchemaValidate(Command): Allow skipping validation of
deprecated fields
testQemuHotplugCpuPrepare: Allow deprecated commands for non-modern
cpu hotplug test
qemumonitorjsontest: Add infrastructure for generated tests of
deprecated commands
testQemuMonitorJSONqemuMonitorJSONQueryCPUs: Split off test for
query-cpus-fast
qemumonitorjsontest: Allow use of deprecated 'query-cpus'
qemumonitorjsontest: Allow use of deprecated 'cpu-add' and 'change'
command
qemumonitorjsontest: Mark recently deprecated migration command in our
tests
testQEMUSchemaValidate*: Reject usage of fields with 'deprecated' set
tests/qemublocktest.c | 14 +-
tests/qemuhotplugtest.c | 11 +-
tests/qemumonitorjsontest.c | 67 +++++--
tests/qemumonitortestutils.c | 66 ++++---
tests/qemumonitortestutils.h | 2 +
tests/testutilsqemuschema.c | 334 ++++++++++++++++++++++-------------
tests/testutilsqemuschema.h | 9 +
7 files changed, 325 insertions(+), 178 deletions(-)
--
2.26.2
4 years, 6 months
[PATCH] qemu: do not allow /dev/rtc or /dev/hpet access via the devices cgroup
by Paolo Bonzini
The RTC and HPET modes for the QEMU emulation tick have been dropped almost 9 years
ago, in commit 25f3151ece1d5881826232bebccc21b588d4e03e. Do not allow them in the
devices cgroup policy.
Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com>
---
docs/drvqemu.html.in | 1 -
src/qemu/qemu.conf | 1 -
src/qemu/qemu_cgroup.c | 1 -
src/qemu/test_libvirtd_qemu.aug.in | 2 --
4 files changed, 5 deletions(-)
diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in
index afc4ddf56d..b6d731bb59 100644
--- a/docs/drvqemu.html.in
+++ b/docs/drvqemu.html.in
@@ -484,7 +484,6 @@ chmod o+x /path/to/directory
/dev/null, /dev/full, /dev/zero,
/dev/random, /dev/urandom,
/dev/ptmx, /dev/kvm,
-/dev/rtc, /dev/hpet
</pre>
<p>
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index abdbf07fec..d7a3f40e78 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -495,7 +495,6 @@
# "/dev/null", "/dev/full", "/dev/zero",
# "/dev/random", "/dev/urandom",
# "/dev/ptmx", "/dev/kvm",
-# "/dev/rtc","/dev/hpet"
#]
#
# RDMA migration requires the following extra files to be added to the list:
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 2e019b64af..d92202f847 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -47,7 +47,6 @@ const char *const defaultDeviceACL[] = {
"/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm",
- "/dev/rtc", "/dev/hpet",
NULL,
};
#define DEVICE_PTY_MAJOR 136
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 19da591aae..e533b9f551 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -61,8 +61,6 @@ module Test_libvirtd_qemu =
{ "5" = "/dev/urandom" }
{ "6" = "/dev/ptmx" }
{ "7" = "/dev/kvm" }
- { "8" = "/dev/rtc" }
- { "9" = "/dev/hpet" }
}
{ "save_image_format" = "raw" }
{ "dump_image_format" = "raw" }
--
2.25.4
4 years, 6 months
[PATCH v2] README.rst: Replace the installation instructions with link to compiling.html.
by Yi Wang
From: Liao Pingfang <liao.pingfang(a)zte.com.cn>
Remove the installation instructions from README.rst, and
add the link to compiling.html.
Signed-off-by: Liao Pingfang <liao.pingfang(a)zte.com.cn>
---
Changes in v2: use compiling.html replace the installation instructions
README.rst | 26 ++------------------------
1 file changed, 2 insertions(+), 24 deletions(-)
diff --git a/README.rst b/README.rst
index cdcc97b..5d6ca55 100644
--- a/README.rst
+++ b/README.rst
@@ -45,31 +45,9 @@ and ``COPYING`` for full license terms & conditions.
Installation
============
-Libvirt uses the GNU Autotools build system, so in general can be built
-and installed with the usual commands, however, we mandate to have the
-build directory different than the source directory. For example, to build
-in a manner that is suitable for installing as root, use:
-
-::
-
- $ mkdir build && cd build
- $ ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
- $ make
- $ sudo make install
-
-While to build & install as an unprivileged user
-
-::
-
- $ mkdir build && cd build
- $ ../configure --prefix=$HOME/usr
- $ make
- $ make install
-
-The libvirt code relies on a large number of 3rd party libraries. These will
-be detected during execution of the ``configure`` script and a summary printed
-which lists any missing (optional) dependencies.
+Instructions on building and installing libvirt can be found on the website:
+https://libvirt.org/compiling.html
Contributing
============
--
2.9.5
4 years, 6 months
[libvirt PATCH] qemu: conf: fix stray comma
by Ján Tomko
The qemu.conf change broke our augeas test:
qemu/test_libvirtd_qemu.aug:96.3-203.1:exception thrown in test
qemu/test_libvirtd_qemu.aug:96.8-.34:exception: Iterated lens matched less than it should
Lens: ../../src/qemu/libvirtd_qemu.aug:170.13-.43:
Last match: ../../src/qemu/libvirtd_qemu.aug:18.52-.113:
Not matching: ../../src/qemu/libvirtd_qemu.aug:12.19-.31:
Error encountered at 48:27 (1615 characters into string)
<\n "/dev/ptmx", "/dev/kvm"|=|,\n]\nsave_image_format = "raw>
Fixes: ab5ba57012e9e6ab4f55afdeecd1813dd3ca916b
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
Pushed as a trivial build fix
src/qemu/qemu.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index d7a3f40e78..404961c53e 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -494,7 +494,7 @@
#cgroup_device_acl = [
# "/dev/null", "/dev/full", "/dev/zero",
# "/dev/random", "/dev/urandom",
-# "/dev/ptmx", "/dev/kvm",
+# "/dev/ptmx", "/dev/kvm"
#]
#
# RDMA migration requires the following extra files to be added to the list:
--
2.25.4
4 years, 6 months
[PATCH 0/2] Introduce GitLab CI and merge requests
by Daniel P. Berrangé
In v2:
- Use ubuntu for publishing pages build
Daniel P. Berrangé (2):
gitlab: introduce CI jobs for building content
gitlab: add CONTRIBUTING.rst file to indicate use of merge requests
.gitlab-ci.yml | 126 +++++++++++++++++++++++++++
.gitpublish | 4 -
CONTRIBUTING.rst | 28 ++++++
Makefile | 7 +-
ci/libvirt-centos-7.Dockerfile | 83 ++++++++++++++++++
ci/libvirt-debian-10.Dockerfile | 53 +++++++++++
ci/libvirt-debian-9.Dockerfile | 56 ++++++++++++
ci/libvirt-debian-sid.Dockerfile | 53 +++++++++++
ci/libvirt-fedora-31.Dockerfile | 50 +++++++++++
ci/libvirt-fedora-32.Dockerfile | 50 +++++++++++
ci/libvirt-fedora-rawhide.Dockerfile | 51 +++++++++++
ci/libvirt-ubuntu-1804.Dockerfile | 56 ++++++++++++
ci/libvirt-ubuntu-2004.Dockerfile | 53 +++++++++++
ci/refresh | 22 +++++
14 files changed, 685 insertions(+), 7 deletions(-)
delete mode 100644 .gitpublish
create mode 100644 CONTRIBUTING.rst
create mode 100644 ci/libvirt-centos-7.Dockerfile
create mode 100644 ci/libvirt-debian-10.Dockerfile
create mode 100644 ci/libvirt-debian-9.Dockerfile
create mode 100644 ci/libvirt-debian-sid.Dockerfile
create mode 100644 ci/libvirt-fedora-31.Dockerfile
create mode 100644 ci/libvirt-fedora-32.Dockerfile
create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile
create mode 100644 ci/libvirt-ubuntu-1804.Dockerfile
create mode 100644 ci/libvirt-ubuntu-2004.Dockerfile
create mode 100755 ci/refresh
--
2.26.2
4 years, 6 months