[libvirt] Xen + libvirt + TPM
by Arthur Borsboom
Hello,
I am trying to get TPM 2.0 pass through to work with Xen and libvirt, but I
can't get it to work.
According to the following sites both Xen and libirt have TPM 2.0 support.
https://wiki.xen.org/wiki/Virtual_Trusted_Platform_Module_(vTPM)
https://libvirt.org/formatdomain.html#elementsTpm
However, when I add a TPM device to a VM (by virt-manager), the VM guest
XML does contain the TPM configuration, but the VM guest (linux) does not
show any TPM device.
Also, when looking in /var/log/libvirt/libxl/vmguest.log there is no
mention of tpm in the (converted libvirt XML to libxl) vm structure.
Is this because libvirt only supports TPM with QEMU?
If so, are there any development plans for TPM support with XEN?
Is there a workaround for the time being?
Best regards,
Arthur Borsboom.
4 years, 10 months
[libvirt] [PATCHv2 0/2] Introduce the support of Intel RDT-MBM
by Wang Huaqiang
This is a followup to Daniel's review in thread https://www.redhat.com/archives/libvir-list/2019-December/msg00978.html.
Hi Daniel,
In this series, patch 1/2 is trying to fix a bug that using the 64bit,
instead of the current 32bit, interface, to hold cache monitor value
reported by underlying 64bit counter.
In last series, you have suggested
of adding a new field such as "cpu.cache.monitor.%zu.bank.%zu.bytes64"
for new 64bit counter result, and keep the old but already exported 32bit
field, to avoid reporting a truncated cache monitor result to user.
But considering the fact that, in reality, CPU cache size will never
exceed 4GB in size, it is safe to truccate a 64bit counter to 32 bit
since the counter is counting for the cache size that vcpus are using.
Change List:
v2:
* Using old "cpu.cache.monitor.%zu.bank.%zu.bytes" field for cache
monitor result, and keeping the interface consistent.
* Add 'virsh domstats --memory' document in file 'virsh.rst'
Wang Huaqiang (2):
util, resctrl: using 64bit interface instead of 32bit for counters
Introduce command 'virsh domstats --memory' for reporting memory BW
docs/manpages/virsh.rst | 22 +++++-
include/libvirt/libvirt-domain.h | 1 +
src/libvirt-domain.c | 21 ++++++
src/qemu/qemu_driver.c | 118 ++++++++++++++++++++++++++++++-
src/util/virfile.c | 40 +++++++++++
src/util/virfile.h | 2 +
src/util/virresctrl.c | 6 +-
src/util/virresctrl.h | 2 +-
tools/virsh-domain-monitor.c | 7 ++
9 files changed, 211 insertions(+), 8 deletions(-)
--
2.23.0
4 years, 10 months
[libvirt] [PATCH 0/2] qemu_firmware: Try to autofill for old style UEFI specification
by Michal Privoznik
See 2/2 for info.
Michal Prívozník (2):
qemu_firmware: Pass virDomainDef into qemuFirmwareFillDomain()
qemu_firmware: Try to autofill for old style UEFI specification
src/qemu/qemu_firmware.c | 90 +++++++++++++++++++++++++++++++++-------
src/qemu/qemu_firmware.h | 2 +-
src/qemu/qemu_process.c | 2 +-
3 files changed, 78 insertions(+), 16 deletions(-)
--
2.24.1
4 years, 10 months
[libvirt] [jenkins-ci PATCH 0/2] CentOS fixes
by Fabiano Fidêncio
This series consists in two simple patches:
- Mention CentOS8 as a valid OS version;
- Only install OpenVZ on CentOS 7;
Fabiano Fidêncio (2):
guests: Mention CentOS8 as a valid OS version
guests: Only install OpenVZ on CentOS 7
guests/playbooks/update/tasks/base.yml | 1 +
guests/vars/mappings.yml | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
--
2.23.0
4 years, 10 months
[libvirt] [PATCH] ci: Fetch list of available container images dynamically
by Andrea Bolognani
Any static list of images is destined to become outdated eventually,
so let's start generating it dynamically instead.
Unfortunately there doesn't seem to be a straightforward way to get
Podman/Docker to list all repositories under quay.io/libvirt, so we
have to resort to searching and filtering manually; and since the
two tools behave slightly differently in that regard, it's more
sane to have the logic in a separate shell script than it would be
to keep it inline in the Makefile with all the annoying escaping
that would entail.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
ci/Makefile | 37 +++++++++++++------------------------
ci/list-images.sh | 26 ++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 24 deletions(-)
create mode 100644 ci/list-images.sh
diff --git a/ci/Makefile b/ci/Makefile
index 27c1049b38..acb655941c 100644
--- a/ci/Makefile
+++ b/ci/Makefile
@@ -238,6 +238,17 @@ ci-build@%:
ci-check@%:
$(MAKE) -C $(CI_ROOTDIR) ci-build@$* CI_MAKE_ARGS="check"
+ci-list-images:
+ @echo
+ @echo "Available x86 container images:"
+ @echo
+ @sh list-images.sh "$(CI_ENGINE)" "$(CI_IMAGE_PREFIX)" | grep -v cross
+ @echo
+ @echo "Available cross-compiler container images:"
+ @echo
+ @sh list-images.sh "$(CI_ENGINE)" "$(CI_IMAGE_PREFIX)" | grep cross
+ @echo
+
ci-help:
@echo "Build libvirt inside containers used for CI"
@echo
@@ -246,30 +257,8 @@ ci-help:
@echo " ci-build@\$$IMAGE - run a default 'make'"
@echo " ci-check@\$$IMAGE - run a 'make check'"
@echo " ci-shell@\$$IMAGE - run an interactive shell"
- @echo
- @echo "Available x86 container images:"
- @echo
- @echo " centos-7"
- @echo " debian-9"
- @echo " debian-10"
- @echo " debian-sid"
- @echo " fedora-29"
- @echo " fedora-30"
- @echo " fedora-rawhide"
- @echo " ubuntu-16"
- @echo " ubuntu-18"
- @echo
- @echo "Available cross-compiler container images:"
- @echo
- @echo " debian-{9,10,sid}-cross-aarch64"
- @echo " debian-{9,10,sid}-cross-armv6l"
- @echo " debian-{9,10,sid}-cross-armv7l"
- @echo " debian-{10,sid}-cross-i686"
- @echo " debian-{9,10,sid}-cross-mips64el"
- @echo " debian-{9,10,sid}-cross-mips"
- @echo " debian-{9,10,sid}-cross-mipsel"
- @echo " debian-{9,10,sid}-cross-ppc64le"
- @echo " debian-{9,10,sid}-cross-s390x"
+ @echo " ci-list-images - list available images"
+ @echo " ci-help - show this help message"
@echo
@echo "Available make variables:"
@echo
diff --git a/ci/list-images.sh b/ci/list-images.sh
new file mode 100644
index 0000000000..35efdb6982
--- /dev/null
+++ b/ci/list-images.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+engine="$1"
+prefix="$2"
+
+do_podman() {
+ # Podman freaks out if the search term ends with a dash, which ours
+ # by default does, so let's strip it. The repository name is the
+ # second field in the output, and it already starts with the registry
+ podman search --limit 100 "${prefix%-}" | while read _ repo _; do
+ echo "$repo"
+ done
+}
+
+do_docker() {
+ # Docker doesn't include the registry name in the output, so we have
+ # to add it. The repository name is the first field in the output
+ registry="${prefix%%/*}"
+ docker search --limit 100 "$prefix" | while read repo _; do
+ echo "$registry/$repo"
+ done
+}
+
+"do_$engine" | grep "^$prefix" | sed "s,^$prefix,,g" | while read repo; do
+ echo " $repo"
+done | sort -u
--
2.23.0
4 years, 10 months
[libvirt] [PATCH 0/2] vircgroupv2devices: Avoid double close on map FD
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
vircgroupv2devices: Unexport virCgroupV2DevicesAttachProg()
vircgroupv2devices: Avoid double close on map FD
src/libvirt_private.syms | 1 -
src/util/vircgroupv2devices.c | 29 +++++------------------------
src/util/vircgroupv2devices.h | 5 -----
3 files changed, 5 insertions(+), 30 deletions(-)
--
2.24.1
4 years, 10 months
[libvirt] [PATCH] qemu: backup: Move capability check after inactive check
by Peter Krempa
Inactive VM doesn't have qemuCaps set thus we'd never properly report
that VM backups are supported only for running VMs.
Move the capability check after the active check.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_backup.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index c0445e0869..86b10a2b8a 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -750,12 +750,6 @@ qemuBackupBegin(virDomainObjPtr vm,
virCheckFlags(VIR_DOMAIN_BACKUP_BEGIN_REUSE_EXTERNAL, -1);
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
- _("incremental backup is not supported yet"));
- return -1;
- }
-
if (!(def = virDomainBackupDefParseString(backupXML, priv->driver->xmlopt, 0)))
return -1;
@@ -793,6 +787,12 @@ qemuBackupBegin(virDomainObjPtr vm,
goto endjob;
}
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP)) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("incremental backup is not supported yet"));
+ goto endjob;
+ }
+
if (priv->backup) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("another backup job is already running"));
--
2.24.1
4 years, 10 months
[libvirt] [PATCH] util: time: Fix comment for virTimeFieldsNow
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/virtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Trivial.
diff --git a/src/util/virtime.c b/src/util/virtime.c
index 54466b2f39..13f899cb91 100644
--- a/src/util/virtime.c
+++ b/src/util/virtime.c
@@ -223,7 +223,7 @@ int virTimeMillisNow(unsigned long long *now)
/**
- * virTimeFieldsNowRaw:
+ * virTimeFieldsNow:
* @fields: filled with current time fields
*
* Retrieves the current time, in broken-down field format.
--
2.24.1
4 years, 10 months
[libvirt] [PATCH 00/23] Take 64 gnulib modules, eliminate 14, to give 50 remaining
by Daniel P. Berrangé
In the last days before the xmas break I took some time to
eliminate 14 more gnulib modules, bringing us down to just
50 left to go. They're getting harder to eliminate as we go
on, but to give some hints, I've annotated every module in
bootstrap.conf with a suggested replacement strategy.
Daniel P. Berrangé (23):
build: set min version for CLang to 3.4 / XCode CLang to 5.1
docs: expand macOS platform support coverage
travis: add macOS Xcode 11.3 testing
util: add note about event file descriptors on Windows
src: always pull in glib/gstdio.h header
src: switch to use g_setenv/g_unsetenv
util: add compat wrapper for g_fsync
src: use g_fsync for portability
util: introduce virFileDataSync
src: use g_lstat() instead of lstat()
src: switch from fnmatch to g_pattern_match_simple
src: replace clock_gettime()/gettimeofday() with g_get_real_time()
src: replace last_component() with g_path_get_basename()
util: replace IS_ABSOLUTE_FILE_NAME with g_path_is_absolute
src: replace mdir_name() with g_path_get_dirname()
src: remove unused imports of dirname.h
src: replace getcwd() with g_get_current_dir()
util: use realpath/g_canonicalize_filename
util: replace gethostname() with g_get_hostname()
src: replace WSAStartup with g_networking_init()
src: replace strptime()/timegm()/mktime() with GDateTime APIs set
bootstrap: remove now unused gnulib modules
bootstrap: annotate with info about desired replacement
.travis.yml | 15 ++
bootstrap.conf | 173 +++++++++++++++---------
build-aux/syntax-check.mk | 4 +-
config-post.h | 18 ++-
docs/platforms.html.in | 13 +-
include/libvirt/libvirt-event.h | 4 +
m4/virt-glib.m4 | 2 +-
src/conf/domain_conf.c | 32 ++---
src/conf/moment_conf.c | 7 +-
src/conf/node_device_conf.c | 6 +-
src/esx/esx_vi_types.c | 71 +---------
src/internal.h | 4 +-
src/libvirt.c | 25 +---
src/libvirt_private.syms | 2 +
src/libxl/libxl_driver.c | 21 +--
src/locking/lock_driver_sanlock.c | 6 +-
src/node_device/node_device_udev.c | 12 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 2 +-
src/qemu/qemu_backup.c | 5 +-
src/qemu/qemu_command.c | 1 -
src/qemu/qemu_domain.c | 14 +-
src/qemu/qemu_driver.c | 7 +-
src/qemu/qemu_firmware.c | 4 +-
src/qemu/qemu_tpm.c | 33 +----
src/remote/libvirtd.conf.in | 8 +-
src/rpc/virnetsaslcontext.c | 11 +-
src/rpc/virnetsocket.c | 5 +-
src/rpc/virnettlscontext.c | 10 +-
src/security/security_dac.c | 2 +-
src/security/virt-aa-helper.c | 8 +-
src/storage/storage_backend_disk.c | 9 +-
src/storage/storage_driver.c | 1 -
src/storage/storage_util.c | 11 +-
src/test/test_driver.c | 51 ++-----
src/util/glibcompat.c | 13 ++
src/util/glibcompat.h | 6 +
src/util/iohelper.c | 2 +-
src/util/vircgroupv1.c | 4 +-
src/util/virevent.c | 7 +
src/util/virfile.c | 49 ++++---
src/util/virfile.h | 2 +
src/util/virlog.c | 22 +--
src/util/virmdev.c | 12 +-
src/util/virnetdev.c | 5 +-
src/util/virpci.c | 17 ++-
src/util/virstoragefile.c | 13 +-
src/util/virsystemd.c | 4 +-
src/util/virtime.c | 22 +--
src/util/virutil.c | 12 +-
src/vbox/vbox_XPCOMCGlue.c | 4 +-
src/vmware/vmware_conf.c | 7 +-
src/vz/vz_sdk.c | 10 +-
tests/eventtest.c | 18 +--
tests/libxlxml2domconfigtest.c | 4 +-
tests/lxcxml2xmltest.c | 2 +-
tests/qemudomaincheckpointxml2xmltest.c | 2 +-
tests/qemudomainsnapshotxml2xmltest.c | 2 +-
tests/qemufirmwaretest.c | 2 +-
tests/qemuhotplugtest.c | 2 +-
tests/qemumemlocktest.c | 2 +-
tests/qemusecuritytest.c | 4 +-
tests/qemuvhostusertest.c | 2 +-
tests/qemuxml2argvtest.c | 24 ++--
tests/qemuxml2xmltest.c | 4 +-
tests/securityselinuxhelper.c | 4 +-
tests/testutils.c | 15 +-
tests/testutils.h | 6 +-
tests/testutilsqemu.c | 4 +-
tests/vircgrouptest.c | 16 +--
tests/virconfdata/libvirtd.conf | 8 +-
tests/virconfdata/libvirtd.out | 8 +-
tests/virfilemock.c | 12 +-
tests/virfiletest.c | 4 +-
tests/virhostdevtest.c | 2 +-
tests/virnettlscontexttest.c | 2 +-
tests/virnettlssessiontest.c | 2 +-
tests/virpcimock.c | 3 +-
tests/virpcitest.c | 2 +-
tests/virportallocatortest.c | 2 +-
tests/virstoragetest.c | 1 -
tests/virsystemdtest.c | 46 +++----
tests/virtimetest.c | 4 +-
tools/virsh-domain.c | 10 +-
tools/virt-login-shell-helper.c | 17 ++-
tools/vsh.c | 27 +---
tools/vsh.h | 1 -
86 files changed, 470 insertions(+), 602 deletions(-)
--
2.24.1
4 years, 10 months