[libvirt] [PATCH] build: Fix accidental revert of .gnulib update
by John Ferlan
Commit id 1bff5bbe25eb7a7e7a4e0067c4ca7cbc1cb34999 accidentally
reverted .gnulib back to d6397dde2e127e246e3eeb5254a21f42cac783c8
which was two updates ago.
Update to the latest 68df637b5f1b5c10370f6981d2a43a5cf74368df
which includes three changes since the previous fetch of
cdbf3d385a32ff904c96f20c26f3470bd8345248.
> autoupdate
> hard-locale: simplify by removing hard-locale.m4
> gnulib-tool: limit line length for git send-email
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushing under this I know fixes some previous build breaking issue
and of course it's a .gnulib maint, so that's reason #2.
.gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gnulib b/.gnulib
index d6397dde2e..68df637b5f 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit d6397dde2e127e246e3eeb5254a21f42cac783c8
+Subproject commit 68df637b5f1b5c10370f6981d2a43a5cf74368df
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] virt-xml-validate: Add schema for nwfilterbinding
by Han Han
Add nwfilterbinding schema in virt-xml-validate for autoprobing.
Add document of nwfilterbinding schema in tools/virt-xml-validate.pod.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1600330
Signed-off-by: Han Han <hhan(a)redhat.com>
---
tools/virt-xml-validate.in | 3 +++
tools/virt-xml-validate.pod | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/tools/virt-xml-validate.in b/tools/virt-xml-validate.in
index 81fde4d832..7513413189 100644
--- a/tools/virt-xml-validate.in
+++ b/tools/virt-xml-validate.in
@@ -77,6 +77,9 @@ if [ -z "$TYPE" ]; then
*device*)
TYPE="nodedev"
;;
+ *filterbinding*)
+ TYPE="nwfilterbinding"
+ ;;
*filter*)
TYPE="nwfilter"
;;
diff --git a/tools/virt-xml-validate.pod b/tools/virt-xml-validate.pod
index f8e67503fd..a51a57002a 100644
--- a/tools/virt-xml-validate.pod
+++ b/tools/virt-xml-validate.pod
@@ -52,6 +52,10 @@ The schema for the XML format used to declare driver capabilities
The schema for the XML format used by network traffic filters
+=item C<nwfilterbinding>
+
+The schema for XML format used by network filter bindings.
+
=item C<secret>
The schema for the XML format used by secrets descriptions
--
2.17.1
6 years, 4 months
[libvirt] [java PATCH 0/1] *** Add support for sendng Qemu Guest Agent Commands ***
by Wido den Hollander
*** BLURB HERE ***
Wido den Hollander (1):
Add support for Qemu Guest Agent commands
src/main/java/org/libvirt/Domain.java | 34 ++++++
src/main/java/org/libvirt/Library.java | 3 +
.../java/org/libvirt/jna/LibvirtQemu.java | 16 +++
.../java/org/libvirt/qemu/QemuCommand.java | 106 ++++++++++++++++++
.../org/libvirt/qemu/TestQemuCommand.java | 24 ++++
5 files changed, 183 insertions(+)
create mode 100644 src/main/java/org/libvirt/jna/LibvirtQemu.java
create mode 100644 src/main/java/org/libvirt/qemu/QemuCommand.java
create mode 100644 src/test/java/org/libvirt/qemu/TestQemuCommand.java
--
2.17.1
6 years, 4 months
[libvirt] [dockerfiles PATCH] Refresh after switch from yajl to jansson
by Andrea Bolognani
The corresponding libvirt-jenkins-ci commit is d2bbe1eee61a.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed under the Dockerfile refresh rule.
buildenv-centos-7.Dockerfile | 4 ++--
buildenv-debian-8.Dockerfile | 2 +-
buildenv-debian-9.Dockerfile | 2 +-
buildenv-debian-sid.Dockerfile | 2 +-
buildenv-fedora-27.Dockerfile | 2 +-
buildenv-fedora-28.Dockerfile | 2 +-
buildenv-fedora-rawhide.Dockerfile | 2 +-
buildenv-ubuntu-16.Dockerfile | 2 +-
buildenv-ubuntu-18.Dockerfile | 2 +-
9 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/buildenv-centos-7.Dockerfile b/buildenv-centos-7.Dockerfile
index 5d92bfa..2c4c26d 100644
--- a/buildenv-centos-7.Dockerfile
+++ b/buildenv-centos-7.Dockerfile
@@ -23,6 +23,7 @@ ENV PACKAGES audit-libs-devel \
gnutls-devel \
iproute \
iscsi-initiator-utils \
+ jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -63,8 +64,7 @@ ENV PACKAGES audit-libs-devel \
scrub \
sudo \
systemtap-sdt-devel \
- vim \
- yajl-devel
+ vim
RUN yum install -y ${PACKAGES} && \
yum autoremove -y && \
yum clean all -y
diff --git a/buildenv-debian-8.Dockerfile b/buildenv-debian-8.Dockerfile
index 0766cc9..8a8c3b0 100644
--- a/buildenv-debian-8.Dockerfile
+++ b/buildenv-debian-8.Dockerfile
@@ -29,6 +29,7 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
+ libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -50,7 +51,6 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
- libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-debian-9.Dockerfile b/buildenv-debian-9.Dockerfile
index e106574..c3af421 100644
--- a/buildenv-debian-9.Dockerfile
+++ b/buildenv-debian-9.Dockerfile
@@ -29,6 +29,7 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
+ libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -50,7 +51,6 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
- libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-debian-sid.Dockerfile b/buildenv-debian-sid.Dockerfile
index c3a18be..a922457 100644
--- a/buildenv-debian-sid.Dockerfile
+++ b/buildenv-debian-sid.Dockerfile
@@ -29,6 +29,7 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
+ libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -50,7 +51,6 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
- libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-fedora-27.Dockerfile b/buildenv-fedora-27.Dockerfile
index 4e5173f..2f35a2e 100644
--- a/buildenv-fedora-27.Dockerfile
+++ b/buildenv-fedora-27.Dockerfile
@@ -27,6 +27,7 @@ ENV PACKAGES audit-libs-devel \
iproute \
iproute-tc \
iscsi-initiator-utils \
+ jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -71,7 +72,6 @@ ENV PACKAGES audit-libs-devel \
vim \
wireshark-devel \
xen-devel \
- yajl-devel \
zfs-fuse
RUN yum install -y ${PACKAGES} && \
yum autoremove -y && \
diff --git a/buildenv-fedora-28.Dockerfile b/buildenv-fedora-28.Dockerfile
index d051d65..f4f7198 100644
--- a/buildenv-fedora-28.Dockerfile
+++ b/buildenv-fedora-28.Dockerfile
@@ -26,6 +26,7 @@ ENV PACKAGES audit-libs-devel \
iproute \
iproute-tc \
iscsi-initiator-utils \
+ jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -71,7 +72,6 @@ ENV PACKAGES audit-libs-devel \
vim \
wireshark-devel \
xen-devel \
- yajl-devel \
zfs-fuse
RUN yum install -y ${PACKAGES} && \
yum autoremove -y && \
diff --git a/buildenv-fedora-rawhide.Dockerfile b/buildenv-fedora-rawhide.Dockerfile
index 56d59a1..189ea59 100644
--- a/buildenv-fedora-rawhide.Dockerfile
+++ b/buildenv-fedora-rawhide.Dockerfile
@@ -26,6 +26,7 @@ ENV PACKAGES audit-libs-devel \
iproute \
iproute-tc \
iscsi-initiator-utils \
+ jansson-devel \
libacl-devel \
libattr-devel \
libblkid-devel \
@@ -95,7 +96,6 @@ ENV PACKAGES audit-libs-devel \
vim \
wireshark-devel \
xen-devel \
- yajl-devel \
zfs-fuse
RUN yum install -y ${PACKAGES} && \
yum autoremove -y && \
diff --git a/buildenv-ubuntu-16.Dockerfile b/buildenv-ubuntu-16.Dockerfile
index d2ece05..bc387a1 100644
--- a/buildenv-ubuntu-16.Dockerfile
+++ b/buildenv-ubuntu-16.Dockerfile
@@ -29,6 +29,7 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
+ libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -51,7 +52,6 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
- libyajl-dev \
lvm2 \
make \
nfs-common \
diff --git a/buildenv-ubuntu-18.Dockerfile b/buildenv-ubuntu-18.Dockerfile
index fdf97eb..2a15f14 100644
--- a/buildenv-ubuntu-18.Dockerfile
+++ b/buildenv-ubuntu-18.Dockerfile
@@ -29,6 +29,7 @@ ENV PACKAGES augeas-tools \
libdevmapper-dev \
libfuse-dev \
libgnutls28-dev \
+ libjansson-dev \
libnetcf-dev \
libnl-3-dev \
libnl-route-3-dev \
@@ -51,7 +52,6 @@ ENV PACKAGES augeas-tools \
libxen-dev \
libxml2-dev \
libxml2-utils \
- libyajl-dev \
lvm2 \
make \
nfs-common \
--
2.17.1
6 years, 4 months
[libvirt] [jenkins-ci PATCH 0/4] guests: Replace yajl with jansson
by Andrea Bolognani
Andrea Bolognani (4):
guests: Install jansson for libvirt
guests: Don't install yajl for libvirt
guests: Remove yajl mapping
guests: Remove yajl kludge
guests/tasks/kludges.yml | 2 --
guests/vars/mappings.yml | 10 +++++-----
guests/vars/projects/libvirt.yml | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
--
2.17.1
6 years, 4 months
[libvirt] [PATCH v4] qemu: fix broken autostart symlink after renaming domain.
by Julio Faracco
If a domain is configured to start on boot, it has a symlink to the
domain definition inside the autostart directory. If you rename this
domain, the definition is renamed too. The symlink need to be pointed to
this renamed file. This commit recreates the symlink after renaming the
XML file.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1594985
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/qemu/qemu_driver.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 25170f6f26..09af231dfc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20917,6 +20917,8 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
char *old_dom_name = NULL;
char *new_dom_cfg_file = NULL;
char *old_dom_cfg_file = NULL;
+ char *new_dom_autostart_link = NULL;
+ char *old_dom_autostart_link = NULL;
virCheckFlags(0, ret);
@@ -20937,6 +20939,14 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
vm->def->name)))
goto cleanup;
+ if (vm->autostart) {
+ if (!(new_dom_autostart_link = virDomainConfigFile(cfg->autostartDir,
+ new_dom_name)) ||
+ !(old_dom_autostart_link = virDomainConfigFile(cfg->autostartDir,
+ vm->def->name)))
+ goto cleanup;
+ }
+
event_old = virDomainEventLifecycleNewFromObj(vm,
VIR_DOMAIN_EVENT_UNDEFINED,
VIR_DOMAIN_EVENT_UNDEFINED_RENAMED);
@@ -20949,6 +20959,23 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
if (virDomainSaveConfig(cfg->configDir, driver->caps, vm->def) < 0)
goto rollback;
+ if (vm->autostart) {
+ if (virFileIsLink(old_dom_autostart_link) &&
+ unlink(old_dom_autostart_link) < 0) {
+ virReportSystemError(errno,
+ _("Failed to delete symlink '%s'"),
+ old_dom_autostart_link);
+ goto rollback;
+ }
+
+ if (symlink(new_dom_cfg_file, new_dom_autostart_link) < 0) {
+ virReportSystemError(errno,
+ _("Failed to create symlink '%s to '%s'"),
+ new_dom_autostart_link, new_dom_cfg_file);
+ goto rollback;
+ }
+ }
+
if (virFileExists(old_dom_cfg_file) &&
unlink(old_dom_cfg_file) < 0) {
virReportSystemError(errno,
@@ -20963,6 +20990,8 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
ret = 0;
cleanup:
+ VIR_FREE(old_dom_autostart_link);
+ VIR_FREE(new_dom_autostart_link);
VIR_FREE(old_dom_cfg_file);
VIR_FREE(new_dom_cfg_file);
VIR_FREE(old_dom_name);
@@ -20982,6 +21011,11 @@ qemuDomainRenameCallback(virDomainObjPtr vm,
if (virFileExists(new_dom_cfg_file))
unlink(new_dom_cfg_file);
+ if (vm->autostart) {
+ if (virFileExists(new_dom_autostart_link))
+ unlink(new_dom_autostart_link);
+ }
+
goto cleanup;
}
--
2.17.1
6 years, 4 months
[libvirt] [dockerfiles PATCH] refresh: Add refresh script
by Andrea Bolognani
This calls lcitool, part of the libvirt-jenkins-ci
project, to refresh the Dockerfiles so that they
contain up to date information about build
requirements.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
refresh | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100755 refresh
diff --git a/refresh b/refresh
new file mode 100755
index 0000000..7aa2151
--- /dev/null
+++ b/refresh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+die() {
+ test "$1" && echo "$1" >&2
+ exit 1
+}
+
+me="$0"
+here=$(pwd)
+
+ci_repo="$1"
+
+cd "$ci_repo/guests/" >/dev/null 2>&1 || {
+ die "Usage: $me path/to/libvirt-jenkins-ci.git"
+}
+
+for host in $(./lcitool -a hosts)
+do
+ projects="libvirt"
+ dockerfile="$here/buildenv-${host#libvirt-}.Dockerfile"
+
+ case "$host" in
+ libvirt-fedora-rawhide) projects="libvirt,libvirt+mingw" ;;
+ libvirt-freebsd-*) continue ;;
+ esac
+
+ ./lcitool -a dockerfile -h "$host" -p "$projects" >"$dockerfile" || {
+ die "$me: Failed to refresh Dockerfile for $host"
+ }
+done
--
2.17.1
6 years, 4 months
[libvirt] CPU Support
by Hetz Ben Hamo
Hi,
I've been looking at the CPU list and although I see lots of CPU's, I
cannot find 2 CPU families:
* AMD Ryzen
* AMD Threadripper
Although EPYC has been added recently.
Are there any missing details which preventing adding those CPU's to the
list?
Thanks
6 years, 4 months
[libvirt] [RFC PATCHv2 00/10] x86 RDT Cache Monitoring Technology (CMT)
by Wang Huaqiang
This is the V2 of RFC and the POC source code for introducing x86 RDT CMT
feature, thanks Martin Kletzander for his review and constructive
suggestion for V1.
This series is trying to provide the similar functions of the perf event
based CMT, MBMT and MBML features in reporting cache occupancy, total
memory bandwidth utilization and local memory bandwidth utilization
information in livirt. Firstly we focus on cmt.
x86 RDT Cache Monitoring Technology (CMT) provides a medthod to track the
cache occupancy information per CPU thread. We are leveraging the
implementation of kernel resctrl filesystem and create our patches on top
of that.
Describing the functionality from a high level:
1. Extend the output of 'domstats' and report CMT inforamtion.
Comparing with perf event based CMT implementation in libvirt, this series
extends the output of command 'domstat' and reports cache occupancy
information like these:
<pre>
[root@dl-c200 libvirt]# virsh domstats vm3 --cpu-resource
Domain: 'vm3'
cpu.cacheoccupancy.vcpus_2.value=4415488
cpu.cacheoccupancy.vcpus_2.vcpus=2
cpu.cacheoccupancy.vcpus_1.value=7839744
cpu.cacheoccupancy.vcpus_1.vcpus=1
cpu.cacheoccupancy.vcpus_0,3.value=53796864
cpu.cacheoccupancy.vcpus_0,3.vcpus=0,3
</pre>
The vcpus have been arragned into three monitoring groups, these three
groups cover vcpu 1, vcpu 2 and vcpus 0,3 respectively. Take an example,
the 'cpu.cacheoccupancy.vcpus_0,3.value' reports the cache occupancy
information for vcpu 0 and vcpu 3, the 'cpu.cacheoccupancy.vcpus_0,3.vcpus'
represents the vcpu group information.
To address Martin's suggestion "beware as 1-4 is something else than 1,4 so
you need to differentiate that.", the content of 'vcpus'
(cpu.cacheoccupancy.<groupname>.vcpus=xxx) has been specially processed, if
vcpus is a continous range, e.g. 0-2, then the output of
cpu.cacheoccupancy.vcpus_0-2.vcpus will be like
'cpu.cacheoccupancy.vcpus_0-2.vcpus=0,1,2'
instead of
'cpu.cacheoccupancy.vcpus_0-2.vcpus=0-2'.
Please note that 'vcpus_0-2' is a name of this monitoring group, could be
specified any other word from the XML configuration file or lively changed
with the command introduced in following part.
2. A new command 'cpu-resource' for live changing CMT groups.
A virsh tool has been introduced in this series to dynamically create,
destroy monitoring groups as well as showing the existing grouping status.
The general command interface is like this:
<pre>
[root@dl-c200 libvirt]# virsh help cpu-resource
NAME
cpu-resource - get or set hardware CPU RDT monitoring group
SYNOPSIS
cpu-resource <domain> [--group-name <string>] [--vcpulist
<string>] [--create] [--destroy] [--live] [--config]
[--current]
DESCRIPTION
Create or destroy CPU resource monitoring group.
To get current CPU resource monitoring group status:
virsh # cpu-resource [domain]
OPTIONS
[--domain] <string> domain name, id or uuid
--group-name <string> group name to manipulate
--vcpulist <string> ids of vcpus to manipulate
--create Create CPU resctrl monitoring group for
functions such as monitoring cache occupancy
--destroy Destroy CPU resctrl monitoring group
--live modify/get running state
--config modify/get persistent configuration
--current affect current domain
</pre>
This command provides live interface of changing resource monitoring group
and keeping the result in persistent domain XML configuration file.
3. XML configuration changes for keeping CMT groups.
To keep the monitoring group information and monitoring CPU cache resource
utilization information at launch time, XML configuration file has been
changed by adding a new element
<resmongroup>:
<pre>
# Add a new element
<cputune>
<resmongroup vcpus='0-2'/>
<resmongroup vcpus='3'/>
</cputune>
</pre>
4. About the naming used in this series for RDT CMT technology.
About the wording and naming used in this series for Intel RDT CMT
technology, 'RDT', 'CMT' and 'resctrl' are currently used names in Intel
documents and kernel namespace in the context of CPU resource, but they
are pretty confusing for system administrator. But 'Resource Control' or
'Monitoring' is a not good choice either, the scope of these two phrases
are too big which normally cover lots of aspects other than CPU cache and
memory hbandwidth. Intel 'RDT' is technology emphasizing on the resource
allocation and monitoring within the scope CPU, I would like to use the
term 'cpu-resource' here to describe the technology that these patches' are
trying to address.
This series is focusing on CPU cache occupancy monitoring(CMT), and this
naming seems has a wider scope than CMT, we could add the similar resource
monitoring part for technologies of MBML and MBMT under the framework that
introduced in these patches. This naming is also applicable to technology
of CPU resource allocation, it is possible to add some command by adding
some arguments to allocate cache or memory bandwidth at run time.
5. About emulator and io threads CMT
Currently, it is not possible to allocate an dedicated amount of cache or
memory bandwidth for emulator or io threads. so the resource monitoring for
emulator or io threads is not considered in this series.
Could be planned in next stage.
Changes since v1:
A lot of things changed, mainly
* report cache occupancy information based on vcpu group instead of whole
domain.
* be possible to destroy vcpu group at run time
* XML configuration file changed
* change naming for describing 'RDT CMT' to 'cpu-resource'
Wang Huaqiang (10):
util: add Intel x86 RDT/CMT support
conf: introduce <resmongroup> element
tests: add tests for validating <resmongroup>
libvirt: add public APIs for resource monitoring group
qemu: enable resctrl monitoring at booting stage
remote: add remote protocol for resctrl monitoring
qemu: add interfaces for dynamically manupulating resctl mon groups
tool: add command cpuresource to interact with cpu resources
tools: show cpu cache occupancy information in domstats
news: add Intel x86 RDT CMT feature
docs/formatdomain.html.in | 17 +
docs/news.xml | 10 +
docs/schemas/domaincommon.rng | 14 +
include/libvirt/libvirt-domain.h | 14 +
src/conf/domain_conf.c | 320 ++++++++++++++++++
src/conf/domain_conf.h | 25 ++
src/driver-hypervisor.h | 13 +
src/libvirt-domain.c | 96 ++++++
src/libvirt_private.syms | 13 +
src/libvirt_public.syms | 6 +
src/qemu/qemu_driver.c | 357 +++++++++++++++++++++
src/qemu/qemu_process.c | 45 ++-
src/remote/remote_daemon_dispatch.c | 45 +++
src/remote/remote_driver.c | 4 +-
src/remote/remote_protocol.x | 31 +-
src/remote_protocol-structs | 16 +
src/util/virresctrl.c | 338 +++++++++++++++++++
src/util/virresctrl.h | 40 +++
tests/genericxml2xmlindata/cachetune-cdp.xml | 3 +
tests/genericxml2xmlindata/cachetune-small.xml | 2 +
tests/genericxml2xmlindata/cachetune.xml | 2 +
.../resmongroup-colliding-cachetune.xml | 34 ++
tests/genericxml2xmltest.c | 3 +
tools/virsh-domain-monitor.c | 7 +
tools/virsh-domain.c | 139 ++++++++
25 files changed, 1588 insertions(+), 6 deletions(-)
create mode 100644 tests/genericxml2xmlindata/resmongroup-colliding-cachetune.xml
--
2.7.4
6 years, 4 months