[libvirt] [PATCH v2 0/5] Add QEMU SDL OpenGL support
by Maciej Wolny
This patch set adds support for accelerated graphics rendering with OpenGL
when using the SDL backend with QEMU. This takes advantage of the `-sdl gl`
option in QEMU.
Maciej Wolny (5):
qemu_command: Move SDL command line building into helper
qemu_command: Remove outdated comment
qemu: Add gl property to graphics of type sdl in domain config
qemu: Add QEMU_CAPS_SDL_GL to qemu capabilities
qemu: Add gl option to SDL graphics command line
docs/formatdomain.html.in | 6 ++
docs/schemas/domaincommon.rng | 8 +++
src/conf/domain_conf.c | 44 +++++++++++++-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 69 +++++++++++++++-------
.../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 9 +++
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 3 +-
.../qemuxml2argvdata/video-virtio-gpu-sdl-gl.args | 28 +++++++++
tests/qemuxml2argvdata/video-virtio-gpu-sdl-gl.xml | 38 ++++++++++++
tests/qemuxml2argvtest.c | 5 ++
.../qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.xml | 45 ++++++++++++++
tests/qemuxml2xmltest.c | 1 +
14 files changed, 237 insertions(+), 23 deletions(-)
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-sdl-gl.args
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-sdl-gl.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.xml
--
2.11.0
6 years, 5 months
[libvirt] [PATCH v4 00/11] Add support for TPM emulator
by Stefan Berger
This series of patches adds support for the TPM emulator backend that
is available in QEMU and based on swtpm + libtpms. It allows to attach a
TPM 1.2 or 2 to a QEMU VM. sVirt labels are used for labeling the swtpm
process, its Unix socket, and log file with the same label that the
QEMU process gets. Besides that swtpm is added to the emulator cgroup to
restrict its CPU usage.
The device XML can be changed from a TPM 1.2 to a TPM 2 and back to a
TPM 1.2. The device state is not removed during those changes but only
when the domain is undefined.
The swtpm needs persistent storage to store its state. For that I am
using the uuid of the VM as part of the path since the name of the VM
can be changed. Logfiles, PID files, and socket names are based on the
name of the VM, though.
Stefan
v3->v4:
- Addressed John Ferlan's comments
- Fixed bugs I found while testing
- rebased on latest tip
Stefan Berger (11):
conf: Add support for external swtpm TPM emulator to domain XML
qemu: Extend QEMU capabilities with 'tpm-emulator'
util: Implement virFileChownFiles()
security: Add DAC and SELinux security for tpm-emulator
qemu: Extend qemu_conf with tpm-emulator support
qemu: Extend QEMU with external TPM support
qemu: Add support for external swtpm TPM emulator
tests: Add test cases for external swtpm TPM emulator
security: Label the external swtpm with SELinux labels
tpm: Add support for choosing emulation of a TPM 2
qemu: Add swtpm to emulator cgroup
docs/formatdomain.html.in | 43 +
docs/schemas/domaincommon.rng | 17 +
libvirt.spec.in | 2 +
src/conf/domain_audit.c | 2 +
src/conf/domain_conf.c | 53 +-
src/conf/domain_conf.h | 13 +
src/libvirt_private.syms | 3 +
src/qemu/Makefile.inc.am | 10 +
src/qemu/libvirtd_qemu.aug | 5 +
src/qemu/qemu.conf | 8 +
src/qemu/qemu_capabilities.c | 5 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 36 +
src/qemu/qemu_cgroup.h | 2 +
src/qemu/qemu_command.c | 34 +-
src/qemu/qemu_conf.c | 43 +
src/qemu/qemu_conf.h | 6 +
src/qemu/qemu_domain.c | 3 +
src/qemu/qemu_driver.c | 5 +
src/qemu/qemu_extdevice.c | 177 ++++
src/qemu/qemu_extdevice.h | 59 ++
src/qemu/qemu_migration.c | 3 +
src/qemu/qemu_process.c | 16 +
src/qemu/qemu_tpm.c | 962 +++++++++++++++++++++
src/qemu/qemu_tpm.h | 56 ++
src/qemu/test_libvirtd_qemu.aug.in | 2 +
src/security/security_dac.c | 7 +
src/security/security_driver.h | 7 +
src/security/security_manager.c | 36 +
src/security/security_manager.h | 6 +
src/security/security_selinux.c | 172 ++++
src/security/security_stack.c | 40 +
src/util/virfile.c | 55 ++
src/util/virfile.h | 3 +
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 +
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 +
.../tpm-emulator-tpm2.x86_64-latest.args | 33 +
tests/qemuxml2argvdata/tpm-emulator-tpm2.xml | 30 +
.../tpm-emulator.x86_64-latest.args | 33 +
tests/qemuxml2argvdata/tpm-emulator.xml | 30 +
tests/qemuxml2argvtest.c | 16 +-
tests/qemuxml2xmloutdata/tpm-emulator-tpm2.xml | 34 +
tests/qemuxml2xmloutdata/tpm-emulator.xml | 34 +
tests/qemuxml2xmltest.c | 1 +
47 files changed, 2098 insertions(+), 10 deletions(-)
create mode 100644 src/qemu/qemu_extdevice.c
create mode 100644 src/qemu/qemu_extdevice.h
create mode 100644 src/qemu/qemu_tpm.c
create mode 100644 src/qemu/qemu_tpm.h
create mode 100644 tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/tpm-emulator-tpm2.xml
create mode 100644 tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/tpm-emulator.xml
create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator-tpm2.xml
create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator.xml
--
2.5.5
6 years, 5 months
[libvirt] [PATCH 00/12] Various storage_util adjustments
by John Ferlan
Essentially fallout and preparatory steps needed in order to alter
the code to allow using qemu-img for creation of qcow[2] encrypted
volume. The following series:
https://www.redhat.com/archives/libvir-list/2018-April/msg01578.html
is the impetus for these changes. What will follow once more testing
is done are the adjustments to be able to qemu-img create a qcow[2]
encrypted volume and changes to allow qemu-img convert to also work.
Currently create is broken for qcow[2] encryption and convert is
broken for both qcow[2] and luks encryption.
Patches 1&2 could be combined, but since some like separated adjustments
like that, I kept them separate.
John Ferlan (12):
storage_util: Some code cleanup
storage_util: Cleanup usage of target.encryption
storage_util: Remove unnecessary check
storage_util: Rename virQEMUBuildLuksOpts
storage_util: Generate the qcow secret earlier
storage_util: Move secretPath generation
storage_util: Remove luks distinction from secret path and alias
storage_util: Split backing_fmt set in storageBackendCreateQemuImgOpts
storage_util: Split preallocate set in storageBackendCreateQemuImgOpts
storage_util: Move @type into _virStorageBackendQemuImgInfo
storage_util: Introduce storageBackendCreateQemuImgSetInput
storage_util: Introduce storageBackendDoCreateQemuImg
src/libvirt_private.syms | 2 +-
src/storage/storage_util.c | 252 +++++++++++++++++++++++++++------------------
src/util/virqemu.c | 8 +-
src/util/virqemu.h | 6 +-
4 files changed, 158 insertions(+), 110 deletions(-)
--
2.14.3
6 years, 5 months
[libvirt] [PATCH 00/13] Fix XML for persistent reservations and refactor
by Peter Krempa
The XML design for the PR stuff is slightly weird so fix it and refactor
the code so that it will be much easier to use it with the blockdev
infrastructure.
Peter Krempa (13):
qemu: hotplug: Fix spacing around addition operator
qemu: alias: Allow passing alias of parent when generating PR manager
alias
qemu: command: Fix comment for qemuBuildPRManagerInfoProps
qemu: Move validation of PR manager support
util: storage: Drop pointless 'enabled' form PR definition
util: storage: Drop virStoragePRDefIsEnabled
util: storage: Allow passing <source> also for managed PR case
qemu: Assign managed PR path when preparing storage source
qemu: process: Change semantics of functions starting PR daemon
qemu: command: Move check whether PR manager object props need to be
built
conf: domain: Add helper to check whether a domain def requires use of
PR
util: storage: Store PR manager alias in the definition
qemu: hotplug: Replace qemuDomainDiskNeedRemovePR
docs/formatdomain.html.in | 21 ++--
docs/schemas/storagecommon.rng | 3 -
src/conf/domain_conf.c | 21 ++++
src/conf/domain_conf.h | 3 +
src/libvirt_private.syms | 2 +-
src/qemu/qemu_alias.c | 4 +-
src/qemu/qemu_alias.h | 2 +-
src/qemu/qemu_command.c | 61 +++-------
src/qemu/qemu_command.h | 6 +-
src/qemu/qemu_domain.c | 66 ++++++++---
src/qemu/qemu_domain.h | 3 +-
src/qemu/qemu_hotplug.c | 83 +++-----------
src/qemu/qemu_process.c | 40 ++-----
src/qemu/qemu_process.h | 5 +-
src/util/virstoragefile.c | 124 ++++++++-------------
src/util/virstoragefile.h | 5 +-
tests/qemustatusxml2xmldata/modern-in.xml | 4 +
.../disk-virtio-scsi-reservations.xml | 4 +-
tests/qemuxml2xmltest.c | 2 +-
19 files changed, 191 insertions(+), 268 deletions(-)
--
2.16.2
6 years, 5 months
[libvirt] [dbus PATCH] tests: Add test_storage.py into test_programs
by Pavel Hrdina
Commit <bc58af85e6> forgot to list the test.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed under trivial rule.
tests/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 089ade5..5e224f8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,7 +5,8 @@ test_helpers = \
test_programs = \
test_connect.py \
test_domain.py \
- test_network.py
+ test_network.py \
+ test_storage.py
EXTRA_DIST = \
$(test_helpers) \
--
2.17.0
6 years, 5 months
[libvirt] [jenkins-ci PATCH v2 0/3] Enable out-of-the-box parallel make
by Andrea Bolognani
Changes from [v1]:
* turns out some versions of ExtUtils::MakeMaker output Makefiles
that are not entirely compatible with parallel make, which forces
us to introduce an exception in the relevant template and shuffle
patches around.
[v1] https://www.redhat.com/archives/libvir-list/2018-May/msg00732.html
Andrea Bolognani (3):
jobs: Enable parallel make everywhere
jobs: Drop explicit parallel make usage
guests: Set MAKEFLAGS for out-of-the-box parallel make
guests/templates/bashrc | 2 ++
jobs/autotools.yaml | 10 +++++-----
jobs/defaults.yaml | 1 -
jobs/perl-makemaker.yaml | 12 +++++++-----
projects/libvirt.yaml | 4 ++--
projects/osinfo-db.yaml | 4 ++--
6 files changed, 18 insertions(+), 15 deletions(-)
--
2.17.0
6 years, 5 months
[libvirt] [PATCH] xenconfig: xm: Fix checking for extra in parser
by Filip Alac
Parser assumed extra was always present when root was specified.
Fixed by handling root and extra separately.
---
src/xenconfig/xen_xm.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c
index 8ef68bbc..4becb40b 100644
--- a/src/xenconfig/xen_xm.c
+++ b/src/xenconfig/xen_xm.c
@@ -91,10 +91,13 @@ xenParseXMOS(virConfPtr conf, virDomainDefPtr def)
if (xenConfigGetString(conf, "root", &root, NULL) < 0)
return -1;
- if (root) {
+ if (root && extra) {
if (virAsprintf(&def->os.cmdline, "root=%s %s", root, extra) < 0)
return -1;
- } else {
+ } else if (root) {
+ if (virAsprintf(&def->os.cmdline, "root=%s", root) < 0)
+ return -1;
+ } else if (extra) {
if (VIR_STRDUP(def->os.cmdline, extra) < 0)
return -1;
}
--
2.17.0
6 years, 5 months
[libvirt] [PATCH] virDomainMemoryDefParseXML: Don't leak discard
by Michal Privoznik
==1589== 7 bytes in 2 blocks are definitely lost in loss record 34 of 261
==1589== at 0x4C2AF0F: malloc (vg_replace_malloc.c:299)
==1589== by 0x8A82794: xmlStrndup (in /usr/lib64/libxml2.so.2.9.8)
==1589== by 0x5DD8392: virXMLPropString (virxml.c:510)
==1589== by 0x5E12427: virDomainMemoryDefParseXML (domain_conf.c:15704)
==1589== by 0x5E207DE: virDomainDefParseXML (domain_conf.c:20351)
==1589== by 0x5E2184F: virDomainDefParseNode (domain_conf.c:20636)
==1589== by 0x5E216A1: virDomainDefParse (domain_conf.c:20580)
==1589== by 0x5E21747: virDomainDefParseFile (domain_conf.c:20606)
==1589== by 0x112F5F: testCompareXMLToArgv (qemuxml2argvtest.c:493)
==1589== by 0x138780: virTestRun (testutils.c:180)
==1589== by 0x117129: mymain (qemuxml2argvtest.c:937)
==1589== by 0x13A83C: virTestMain (testutils.c:1120)
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/domain_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d38a775f21..338fbc0e61 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15710,6 +15710,7 @@ virDomainMemoryDefParseXML(virDomainXMLOptionPtr xmlopt,
def->discard = val;
}
+ VIR_FREE(tmp);
/* source */
if ((node = virXPathNode("./source", ctxt)) &&
--
2.16.1
6 years, 5 months
[libvirt] [PATCH] util: fix misleading command for virObjectLock
by Daniel P. Berrangé
It only accepts a virObjecLockable, not a virObjecRWLockable
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/util/virobject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virobject.c b/src/util/virobject.c
index 9fb0328d58..a597ff4f54 100644
--- a/src/util/virobject.c
+++ b/src/util/virobject.c
@@ -408,7 +408,7 @@ virObjectGetRWLockableObj(void *anyobj)
/**
* virObjectLock:
- * @anyobj: any instance of virObjectLockable or virObjectRWLockable
+ * @anyobj: any instance of virObjectLockable
*
* Acquire a lock on @anyobj. The lock must be released by
* virObjectUnlock.
--
2.17.0
6 years, 5 months
[libvirt] [PATCH] tests: Link mocks with libvirt.so
by Michal Privoznik
In a lot of our mocks (if not all of them) we use our internal
APIs (e.g. VIR_ALLOC). So far, we're relying on test binary that
links with the mock to drag in libvirt.so. Well, this works only
partially. Firstly, whatever binary we execute from tests will
fail (e.g. as Martin reported on the list ./qemucapsprobe fails
to execute qemu). Secondly, if there's a program that tries to
validate linking (like valgrind is doing) it fails because of
unresolved symbols.
Because of that we have to link our mocks with libvirt.so.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 621480dd0c..ac92190845 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -81,7 +81,8 @@ LDADDS = \
../src/libvirt.la
MOCKLIBS_LIBS = \
- $(GNULIB_LIBS)
+ $(GNULIB_LIBS) \
+ ../src/libvirt.la
EXTRA_DIST = \
.valgrind.supp \
--
2.16.1
6 years, 5 months