[libvirt] [PATCH v2 00/16] Add vhost-user-gpu support
by Cole Robinson
v1: https://www.redhat.com/archives/libvir-list/2019-June/msg00102.html
This is v2 of Marc-André's series with minor changes. I'm not taking over
this series, I just fixed these as part of the patch rebase so I can review
it :)
Changes since v1:
- rebase to master
- if test file build by dropping LDADDS usage
- syntax-check issues:
* use #pragma once
* if () bracket issues
* jump label indent issues
* error message %s usage
* size_t for loops
I didn't know much about vhost-user-gpu before this series, here's what
I've learned.
vhost-user is a generic mechanism that allows implementing virtio device
dataplane handling in a separate userspace process. vhost-user-gpu here
notably moves the virgl 3d handling out of the main qemu process. The
external process will be /usr/libexec/vhost-user-gpu, which comes from
qemu.git contrib/vhost-user-gpu code, first released in qemu-4.1.
Part of this series deals with discovering the location on disk of the
vhost-user-gpu binary, and what capabilities it provides. This uses a
similar mechanism to firmware.json, described in qemu
docs/interop/vhost-user.json
https://github.com/qemu/qemu/blob/master/docs/interop/vhost-user.json
qemu 4.1 ships a 50-qemu-gpu.json to match. I believe virtio-fs
will use a similar mechanism when it lands in upstream qemu, as
virtiofsd is a separate process that communicates with qemu over
vhost-user.
For a bit more background on vhost-user-gpu process handling and
the json interop motivation, here's some of the qemu discussion:
https://lists.nongnu.org/archive/html/qemu-devel/2018-08/msg02610.html
https://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg00807.html
For this series, the XML to enable this is:
<video model='virtio' vhostuser='yes'>
<acceleration accel3d='yes' rendernode='/path/to/rendernode'/>
</video>
rendernode is optional
qemu_vhost_user.c handles vhost-user.json
qemu_vhost_user_gpu.c handles the process management for
vhost-user-gpu
Marc-André Lureau (16):
qemu: extract out qemuFetchConfigs from firmware
domain: add "vhostuser" attribute to virtio video model
domain: add rendernode attribute on <accel>
qemu-cgroup: allow accel rendernode access
qemu: add vhost-user-gpu capabilities checks
qemu: check that qemu is vhost-user-vga capable
qemu: validate virtio-gpu with vhost-user
qemu: restrict 'virgl=' option to non-vhostuser video type
qemu: add vhost-user helpers
qemu: add qemuSecurityStartVhostUserGPU helper
qemu: add vhost-user-gpu helper unit
qemu: prepare domain for vhost-user GPU
qemu: start/stop the vhost-user-gpu external device
qemu: build vhost-user GPU devices
tests: mock execv/execve
tests: add vhost-user-gpu xml2argv tests
docs/formatdomain.html.in | 11 +
docs/schemas/domaincommon.rng | 16 +-
src/conf/device_conf.c | 1 +
src/conf/device_conf.h | 2 +
src/conf/domain_conf.c | 32 +-
src/conf/domain_conf.h | 2 +
src/qemu/Makefile.inc.am | 6 +
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_cgroup.c | 24 ++
src/qemu/qemu_command.c | 54 ++-
src/qemu/qemu_configs.c | 183 ++++++++
src/qemu/qemu_configs.h | 28 ++
src/qemu/qemu_domain.c | 11 +-
src/qemu/qemu_extdevice.c | 75 +++-
src/qemu/qemu_extdevice.h | 5 +
src/qemu/qemu_firmware.c | 144 +------
src/qemu/qemu_process.c | 18 +-
src/qemu/qemu_security.c | 47 +++
src/qemu/qemu_security.h | 6 +
src/qemu/qemu_vhost_user.c | 394 ++++++++++++++++++
src/qemu/qemu_vhost_user.h | 48 +++
src/qemu/qemu_vhost_user_gpu.c | 305 ++++++++++++++
src/qemu/qemu_vhost_user_gpu.h | 50 +++
tests/Makefile.am | 9 +
.../caps_4.1.0.x86_64.xml | 2 +
.../etc/qemu/vhost-user/40-gpu.json | 1 +
.../etc/qemu/vhost-user/50-gpu.json | 0
.../qemu/vhost-user/test-vhost-user-gpu | 11 +
.../usr/share/qemu/vhost-user/30-gpu.json | 1 +
.../usr/share/qemu/vhost-user/50-gpu.json | 8 +
.../usr/share/qemu/vhost-user/60-gpu.json | 1 +
tests/qemuvhostusertest.c | 132 ++++++
.../vhost-user-gpu-secondary.args | 38 ++
.../vhost-user-gpu-secondary.xml | 44 ++
tests/qemuxml2argvdata/vhost-user-vga.args | 35 ++
tests/qemuxml2argvdata/vhost-user-vga.xml | 41 ++
tests/qemuxml2argvtest.c | 21 +
tests/virfilewrapper.c | 22 +
39 files changed, 1676 insertions(+), 158 deletions(-)
create mode 100644 src/qemu/qemu_configs.c
create mode 100644 src/qemu/qemu_configs.h
create mode 100644 src/qemu/qemu_vhost_user.c
create mode 100644 src/qemu/qemu_vhost_user.h
create mode 100644 src/qemu/qemu_vhost_user_gpu.c
create mode 100644 src/qemu/qemu_vhost_user_gpu.h
create mode 120000 tests/qemuvhostuserdata/etc/qemu/vhost-user/40-gpu.json
create mode 100644 tests/qemuvhostuserdata/etc/qemu/vhost-user/50-gpu.json
create mode 100755 tests/qemuvhostuserdata/usr/libexec/qemu/vhost-user/test-vhost-user-gpu
create mode 120000 tests/qemuvhostuserdata/usr/share/qemu/vhost-user/30-gpu.json
create mode 100644 tests/qemuvhostuserdata/usr/share/qemu/vhost-user/50-gpu.json
create mode 120000 tests/qemuvhostuserdata/usr/share/qemu/vhost-user/60-gpu.json
create mode 100644 tests/qemuvhostusertest.c
create mode 100644 tests/qemuxml2argvdata/vhost-user-gpu-secondary.args
create mode 100644 tests/qemuxml2argvdata/vhost-user-gpu-secondary.xml
create mode 100644 tests/qemuxml2argvdata/vhost-user-vga.args
create mode 100644 tests/qemuxml2argvdata/vhost-user-vga.xml
--
2.21.0
5 years, 3 months
[libvirt] [PATCH 0/3] qemu: Fix formatting of (some) unsigned long long values to JSON (blockdev-add saga)
by Peter Krempa
Currently, libvirt would regress to computer-middle-ages by not being
able to use more than 4GiB images for snapshots without corrupting data.
Fix it by using the proper formatting modifier.
Peter Krempa (3):
qemu: block: Use correct type when creating image size JSON entries
tests: qemublock: Use bigger numbers as dummy capacity/physical
qemu: monitor: Fix formatting of 'offset' in qemuMonitorJSONSaveMemory
src/qemu/qemu_block.c | 12 ++++++------
src/qemu/qemu_monitor_json.c | 2 +-
tests/qemublocktest.c | 4 ++--
.../qemublocktestdata/imagecreate/luks-encopts.json | 4 ++--
tests/qemublocktestdata/imagecreate/luks-noopts.json | 4 ++--
.../imagecreate/network-gluster-qcow2.json | 4 ++--
.../imagecreate/network-rbd-qcow2.json | 4 ++--
.../imagecreate/network-sheepdog-qcow2.json | 4 ++--
.../imagecreate/network-ssh-qcow2.json | 4 ++--
.../imagecreate/qcow2-backing-luks.json | 4 ++--
.../imagecreate/qcow2-backing-raw-nbd.json | 4 ++--
.../imagecreate/qcow2-backing-raw.json | 4 ++--
.../imagecreate/qcow2-luks-encopts-backing.json | 4 ++--
.../imagecreate/qcow2-luks-encopts.json | 4 ++--
.../imagecreate/qcow2-luks-noopts.json | 4 ++--
tests/qemublocktestdata/imagecreate/qcow2.json | 4 ++--
tests/qemublocktestdata/imagecreate/raw.json | 2 +-
17 files changed, 36 insertions(+), 36 deletions(-)
--
2.21.0
5 years, 3 months
[libvirt] [PATCH for 5.7.0 0/3] qemu_blockjob: Restore seclabels more frequently
by Michal Privoznik
At some points in blockjob code we were not restoring seclabels on
backing chain qemu deceased to use. This leads to perms/XATTRs leak
problem.
Michal Prívozník (3):
qemu_blockjob: Move active commit failed state handling into a
function
qemu_blockjob: Print image path on failed security metadata move too
qemu_blockjob: Restore seclabels more frequently on job events
src/qemu/qemu_blockjob.c | 46 ++++++++++++++++++++++++++++++++++------
1 file changed, 40 insertions(+), 6 deletions(-)
--
2.21.0
5 years, 3 months
[libvirt] [PATCH] vircgroupv2: fix abort in VIR_AUTOFREE
by Pavel Hrdina
Introduced by commit <c854e0bd33c7a5afb04a36465bf04f861b2efef5> that
tried to fix an issue where we would fail to parse values from files.
We cannot change the original pointer that is going to be used by
VIR_AUTOFREE.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1747440
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Sigh, shame on me!
src/util/vircgroupv2.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index c62ee0d933..2aca4e5d62 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -849,6 +849,7 @@ virCgroupV2GetBlkioDeviceWeight(virCgroupPtr group,
VIR_AUTOFREE(char *) path = NULL;
VIR_AUTOFREE(char *) str = NULL;
VIR_AUTOFREE(char *) value = NULL;
+ char *tmp;
if (virCgroupV2PathOfController(group, VIR_CGROUP_CONTROLLER_BLKIO,
"io.weight", &path) < 0) {
@@ -869,7 +870,7 @@ virCgroupV2GetBlkioDeviceWeight(virCgroupPtr group,
if (!str) {
*weight = 0;
- } else if (virStrToLong_ui(str, &str, 10, weight) < 0) {
+ } else if (virStrToLong_ui(str, &tmp, 10, weight) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Unable to parse '%s' as an integer"),
str);
@@ -1576,6 +1577,7 @@ virCgroupV2GetCpuCfsQuota(virCgroupPtr group,
long long *cfs_quota)
{
VIR_AUTOFREE(char *) str = NULL;
+ char *tmp;
if (virCgroupGetValueStr(group, VIR_CGROUP_CONTROLLER_CPU,
"cpu.max", &str) < 0) {
@@ -1587,7 +1589,7 @@ virCgroupV2GetCpuCfsQuota(virCgroupPtr group,
return 0;
}
- if (virStrToLong_ll(str, &str, 10, cfs_quota) < 0) {
+ if (virStrToLong_ll(str, &tmp, 10, cfs_quota) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to parse value '%s' from cpu.max."), str);
return -1;
--
2.21.0
5 years, 3 months
[libvirt] [PATCH v1 0/3] unplug timeout QEMU configuration
by Daniel Henrique Barboza
At this moment, the unplug timeout Libvirt uses is 5
seconds. Which is good enough for most cases, but can
be troublesome for cases in which it is not enough. For
example, PowerPC guests with lots of vcpus can experience
the 'vcpu unplug request timed out' message depending on the
guest workload. What happens is that the user doesn't know
if there was a problem in the unplug operation in QEMU, or
the process took a bit longer than 5 seconds and Libvirt
timed out, with QEMU carrying on the unplug operation
regardless.
This series implements a new 'unplug_timeout' attribute
to allow the user to set this parameter, allowing users
to set bigger timeouts, if so they choose. The existing
5 seconds timeout is the default value if the attribute
isn't set. 5 seconds is also the minimal timeout
allowed.
Daniel Henrique Barboza (3):
adding unplug_timeout QEMU conf
qemu_hotplug: use qemu_driver->unplugTimeout in device removal
qemu: Remove qemu_hotplugpriv.h
src/qemu/Makefile.inc.am | 1 -
src/qemu/libvirtd_qemu.aug | 3 +++
src/qemu/qemu.conf | 4 ++++
src/qemu/qemu_conf.c | 26 ++++++++++++++++++++++++
src/qemu/qemu_conf.h | 5 +++++
src/qemu/qemu_driver.c | 2 ++
src/qemu/qemu_hotplug.c | 15 +++++---------
src/qemu/qemu_hotplugpriv.h | 32 ------------------------------
src/qemu/test_libvirtd_qemu.aug.in | 1 +
tests/qemuhotplugtest.c | 3 +--
10 files changed, 47 insertions(+), 45 deletions(-)
delete mode 100644 src/qemu/qemu_hotplugpriv.h
--
2.21.0
5 years, 3 months
[libvirt] [PATCH trivial] qemu_conf.c: removing unused virQEMUDriverConfigPtr variable
by Daniel Henrique Barboza
'virQEMUDriverConfigPtr cfg' is declared, initiated, but never
used in virQEMUDriverCreateCapabilities().
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
Accidental discovery while reading code.
src/qemu/qemu_conf.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 89c183e46a..d771bb6916 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1266,7 +1266,6 @@ virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver)
virSecurityManagerPtr *sec_managers = NULL;
/* Security driver data */
const char *doi, *model, *lbl, *type;
- virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
const int virtTypes[] = {VIR_DOMAIN_VIRT_KVM,
VIR_DOMAIN_VIRT_QEMU,};
@@ -1313,13 +1312,11 @@ virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver)
}
VIR_FREE(sec_managers);
- virObjectUnref(cfg);
return caps;
error:
VIR_FREE(sec_managers);
virObjectUnref(caps);
- virObjectUnref(cfg);
return NULL;
}
--
2.21.0
5 years, 3 months
[libvirt] [PATCH 0/6] security_selinux: Don't store XATTRs if FS fakes SELinux
by Michal Privoznik
For full explanation see 6/6, but here's a digest:
GlusterFS via FUSE supports XATTRs but doesn't allow any SELinux label
change (which is fortunate for us because migrations work at least).
However, we need to treat this situation as "don't remember any
seclabels" because if the source sets XATTRs and the migration
destination tries to set different label this fails.
Michal Prívozník (6):
virSecuritySELinuxGetProcessLabel: Fix comment
virSecuritySELinuxSetFileconImpl: Drop @optional argument
security_selinux: DropvirSecuritySELinuxSetFileconOptional()
security_selinux: Drop @optional from _virSecuritySELinuxContextItem
security_selinux: Drop virSecuritySELinuxSetFileconHelper
security_selinux: Play nicely with network FS that only emulates
SELinux
src/security/security_selinux.c | 141 ++++++++++++++++----------------
1 file changed, 70 insertions(+), 71 deletions(-)
--
2.21.0
5 years, 3 months
[libvirt] [PATCH] qemu: use 'bochs' video type by default for UEFI domains
by Jonathon Jongsma
The 'bochs' video device doesn't have any legacy vga emulation so the
attack surface is much lower. It works with OVMF, so UEFI guests should
not see any functional difference to VGA.
https://bugzilla.redhat.com/show_bug.cgi?id=1707119
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
NOTE:
You may run into an error when trying to use the bochs video device. For
example:
error: internal error: process exited while connecting to monitor:
2019-08-28T21:32:20.134546Z qemu-system-x86_64: -device
bochs-display,id=video0,vgamem=16384k,bus=pcie.0,addr=0x1: failed to find
romfile "vgabios-bochs-display.bin"
This should be solved in e.g. Fedora 31 with newer releases of seabios/qemu. As
a temporary workaround, you can symlink the appropriate vgabios file under
/usr/share/qemu/.
src/qemu/qemu_domain.c | 19 +++++----
src/qemu/qemu_domain.h | 1 +
.../video-default-nouefi.x86_64-latest.args | 36 +++++++++++++++++
.../qemuxml2argvdata/video-default-nouefi.xml | 20 ++++++++++
.../video-default-uefi.x86_64-latest.args | 40 +++++++++++++++++++
tests/qemuxml2argvdata/video-default-uefi.xml | 22 ++++++++++
tests/qemuxml2argvtest.c | 2 +
7 files changed, 133 insertions(+), 7 deletions(-)
create mode 100644 tests/qemuxml2argvdata/video-default-nouefi.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/video-default-nouefi.xml
create mode 100644 tests/qemuxml2argvdata/video-default-uefi.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/video-default-uefi.xml
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 4998474dc9..7ecb89ac84 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4584,6 +4584,14 @@ qemuDomainValidateCpuCount(const virDomainDef *def,
}
+static bool
+qemuDomainDefIsUEFI(const virDomainDef *def)
+{
+ return ((def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_EFI ||
+ (def->os.loader && def->os.loader->type ==
+ VIR_DOMAIN_LOADER_TYPE_PFLASH)));
+}
+
static int
qemuDomainDefValidate(const virDomainDef *def,
virCapsPtr caps ATTRIBUTE_UNUSED,
@@ -4606,10 +4614,7 @@ qemuDomainDefValidate(const virDomainDef *def,
}
/* On x86, UEFI requires ACPI */
- if ((def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_EFI ||
- (def->os.loader &&
- def->os.loader->type == VIR_DOMAIN_LOADER_TYPE_PFLASH)) &&
- ARCH_IS_X86(def->os.arch) &&
+ if (qemuDomainDefIsUEFI(def) && ARCH_IS_X86(def->os.arch) &&
def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ON) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("UEFI requires ACPI on this architecture"));
@@ -4619,9 +4624,7 @@ qemuDomainDefValidate(const virDomainDef *def,
/* On aarch64, ACPI requires UEFI */
if (def->features[VIR_DOMAIN_FEATURE_ACPI] == VIR_TRISTATE_SWITCH_ON &&
def->os.arch == VIR_ARCH_AARCH64 &&
- (def->os.firmware != VIR_DOMAIN_OS_DEF_FIRMWARE_EFI &&
- (!def->os.loader ||
- def->os.loader->type != VIR_DOMAIN_LOADER_TYPE_PFLASH))) {
+ !qemuDomainDefIsUEFI(def)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("ACPI requires UEFI on this architecture"));
goto cleanup;
@@ -7452,6 +7455,8 @@ qemuDomainDeviceVideoDefPostParse(virDomainVideoDefPtr video,
qemuDomainIsRISCVVirt(def) ||
ARCH_IS_S390(def->os.arch))
video->type = VIR_DOMAIN_VIDEO_TYPE_VIRTIO;
+ else if (qemuDomainDefIsUEFI(def))
+ video->type = VIR_DOMAIN_VIDEO_TYPE_BOCHS;
else
video->type = VIR_DOMAIN_VIDEO_TYPE_CIRRUS;
}
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 37a00323a7..c6deab1c52 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -923,6 +923,7 @@ bool qemuDomainHasBuiltinIDE(const virDomainDef *def);
bool qemuDomainNeedsFDC(const virDomainDef *def);
bool qemuDomainSupportsPCI(virDomainDefPtr def,
virQEMUCapsPtr qemuCaps);
+bool qemuDomainIsUEFI(const virDomainDef *def);
void qemuDomainUpdateCurrentMemorySize(virDomainObjPtr vm);
diff --git a/tests/qemuxml2argvdata/video-default-nouefi.x86_64-latest.args b/tests/qemuxml2argvdata/video-default-nouefi.x86_64-latest.args
new file mode 100644
index 0000000000..f0c9e36594
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-default-nouefi.x86_64-latest.args
@@ -0,0 +1,36 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-guest/master-key.aes \
+-machine q35,accel=tcg,usb=off,dump-guest-core=off \
+-cpu Haswell \
+-m 1024 \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 26b73eb7-f8c4-4541-ae6f-06607a1b21c3 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,\
+multifunction=on,addr=0x2 \
+-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
+-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device cirrus-vga,id=video0,bus=pcie.0,addr=0x1 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/video-default-nouefi.xml b/tests/qemuxml2argvdata/video-default-nouefi.xml
new file mode 100644
index 0000000000..7db2bedf6c
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-default-nouefi.xml
@@ -0,0 +1,20 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>26b73eb7-f8c4-4541-ae6f-06607a1b21c3</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ </os>
+ <features>
+ <acpi/>
+ </features>
+ <cpu mode='custom'>
+ <model>Haswell</model>
+ </cpu>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <memballoon model='none'/>
+ <video/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/video-default-uefi.x86_64-latest.args b/tests/qemuxml2argvdata/video-default-uefi.x86_64-latest.args
new file mode 100644
index 0000000000..75c599f321
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-default-uefi.x86_64-latest.args
@@ -0,0 +1,40 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-guest/master-key.aes \
+-machine q35,accel=tcg,usb=off,dump-guest-core=off \
+-cpu Haswell \
+-drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,\
+readonly=on \
+-drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,\
+unit=1 \
+-m 1024 \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 26b73eb7-f8c4-4541-ae6f-06607a1b21c3 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,\
+multifunction=on,addr=0x2 \
+-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
+-device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device bochs-display,id=video0,vgamem=16384k,bus=pcie.0,addr=0x1 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/video-default-uefi.xml b/tests/qemuxml2argvdata/video-default-uefi.xml
new file mode 100644
index 0000000000..59e880c78c
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-default-uefi.xml
@@ -0,0 +1,22 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>26b73eb7-f8c4-4541-ae6f-06607a1b21c3</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
+ <nvram>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
+ </os>
+ <features>
+ <acpi/>
+ </features>
+ <cpu mode='custom'>
+ <model>Haswell</model>
+ </cpu>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <memballoon model='none'/>
+ <video/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 9395cc19a2..671e79e631 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2045,6 +2045,8 @@ mymain(void)
DO_TEST("video-none-device",
QEMU_CAPS_VNC);
DO_TEST_PARSE_ERROR("video-invalid-multiple-devices", NONE);
+ DO_TEST_CAPS_LATEST("video-default-uefi");
+ DO_TEST_CAPS_LATEST("video-default-nouefi");
DO_TEST("virtio-rng-default",
QEMU_CAPS_DEVICE_VIRTIO_RNG,
--
2.21.0
5 years, 3 months
[libvirt] [ocaml PATCH 0/4] Minor cleanups/fixes
by Pino Toscano
Small cleanups in the build system, no changes in the code/binding.
Pino Toscano (4):
build: stop generating a config.h
build: drop broken NSIS leftovers
build: remove manual OCaml dependencies
build: remove the list_secrets binary on clean
.gitignore | 2 --
MANIFEST | 1 -
Makefile.in | 26 ++------------------------
configure.ac | 1 -
libvirt/Makefile.in | 6 ------
libvirt/generator.pl | 2 --
6 files changed, 2 insertions(+), 36 deletions(-)
--
2.21.0
5 years, 3 months