[PATCH] qemu_domain: Modify access to a NVMe disk iff needed
by Michal Privoznik
If a domain has a NVMe disk it already has the access configured.
Trying to configure it again on a commit or some other operation
is wrong and condemned to failure.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 72f03c3a35..b0e90f818d 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11676,13 +11676,13 @@ qemuDomainStorageSourceAccessModify(virQEMUDriverPtr driver,
revoke_lockspace = true;
- if (qemuDomainStorageSourceAccessModifyNVMe(driver, vm, src, false) < 0)
- goto revoke;
-
- revoke_nvme = true;
-
/* When modifying access of existing @src namespace does not need update */
if (!(flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_MODIFY_ACCESS)) {
+ if (qemuDomainStorageSourceAccessModifyNVMe(driver, vm, src, false) < 0)
+ goto revoke;
+
+ revoke_nvme = true;
+
if (qemuDomainNamespaceSetupDisk(vm, src) < 0)
goto revoke;
--
2.24.1
4 years, 10 months
[libvirt PATCH v2 0/8] qemu: Add support for the armvtimer timer
by Andrea Bolognani
This new timer model can be used to control the behavior of the
virtual timer for KVM ARM/virt guests.
Changes from [v1]:
* redesign the XML interface completely, notably moving the
configuration knob from <cpu> to <clock>.
[v1] https://www.redhat.com/archives/libvir-list/2020-January/msg01475.html
Andrea Bolognani (8):
qemu: Use switch statement in qemuBuildCpuCommandLine()
qemu: Add the QEMU_CAPS_CPU_KVM_NO_ADJVTIME capability
conf: Introduce VIR_DOMAIN_TIMER_NAME_ARMVTIMER
qemu: Validate configuration for the armvtimer timer
qemu: Format the armvtimer timer on the command line
tests: Add test case for the armvtimer timer
docs: List the armvtimer timer among all others
news: Mention the armvtimer timer
docs/formatdomain.html.in | 6 +--
docs/news.xml | 10 ++++
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 1 +
src/conf/domain_conf.h | 1 +
src/libxl/libxl_conf.c | 1 +
src/libxl/xen_common.c | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 49 +++++++++++++++----
src/qemu/qemu_domain.c | 36 ++++++++++++++
.../caps_5.0.0.aarch64.xml | 1 +
.../clock-timer-armvtimer.aarch64-latest.args | 32 ++++++++++++
.../clock-timer-armvtimer.xml | 27 ++++++++++
tests/qemuxml2argvtest.c | 2 +
.../clock-timer-armvtimer.aarch64-latest.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
17 files changed, 160 insertions(+), 13 deletions(-)
create mode 100644 tests/qemuxml2argvdata/clock-timer-armvtimer.aarch64-latest.args
create mode 100644 tests/qemuxml2argvdata/clock-timer-armvtimer.xml
create mode 120000 tests/qemuxml2xmloutdata/clock-timer-armvtimer.aarch64-latest.xml
--
2.24.1
4 years, 10 months
[PULL 00/10] Ui 20200212 patches
by Gerd Hoffmann
The following changes since commit e18e5501d8ac692d32657a3e1ef545b14e72b730:
Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20200210' into staging (2020-02-10 18:09:14 +0000)
are available in the Git repository at:
git://git.kraxel.org/qemu tags/ui-20200212-pull-request
for you to fetch changes up to 483644c25b932360018d15818d8bcd8c85ba70b8:
ui/cocoa: Drop workarounds for pre-10.12 OSX (2020-02-12 13:27:08 +0100)
----------------------------------------------------------------
gtk: refresh rate fix.
cocoa: drop pre-10.12 support.
ui: rework show-cursor option.
----------------------------------------------------------------
Gerd Hoffmann (7):
ui: add show-cursor option
ui: wire up legacy -show-cursor option
ui/sdl: switch to new show-cursor option
ui/cocoa: switch to new show-cursor option
ui/gtk: implement show-cursor option
ui: drop curor_hide global variable.
ui: deprecate legacy -show-cursor option
Peter Maydell (1):
ui/cocoa: Drop workarounds for pre-10.12 OSX
Philippe Mathieu-Daudé (2):
ui/gtk: Update gd_refresh_rate_millihz() to handle VirtualConsole
ui/gtk: Fix gd_refresh_rate_millihz() when widget window is not
realized
include/sysemu/sysemu.h | 1 -
ui/gtk.c | 27 +++++++++++-------
ui/sdl2.c | 16 +++++------
vl.c | 16 +++++++++--
qapi/ui.json | 3 ++
qemu-deprecated.texi | 5 ++++
ui/cocoa.m | 63 +++--------------------------------------
7 files changed, 51 insertions(+), 80 deletions(-)
--
2.18.2
4 years, 10 months
[rust PATCH 0/3] Implement virStoragePoolListVolumes and virStoragePoolListAllVolumes
by mathias@pius.io
From: Mathias Pius <mathias(a)pius.io>
This patch implements virStoragePoolListAllVolumes and virStoragePoolListVolumes for the StoragePool object. I'm not too familiar with the libvirt codebase, so I've used similar functions from connect.rs and domain.rs for so the implementations should (hopefully) be as correct as those. I've taken the liberty of using Vec::with_capacity when allocating vectors to store the result of these operations in, to prevent reallocations while converting the object types from the internal type to StorageVol and Strings.
Feedback is very welcome!
Mathias Pius (3):
Implement virStoragePoolListAllVolumes and virStoragePoolListVolumes
for StoragePool
cargo fmt
Newline at end of file
src/storage_pool.rs | 55 ++++++++++++++++++++++++++++++++++++++++++-
tests/storage_pool.rs | 34 ++++++++++++++++++++++++++
2 files changed, 88 insertions(+), 1 deletion(-)
--
2.25.0
4 years, 10 months
[PATCH v2 0/7] Couple of apparmor fixes
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2020-January/msg01068.html
diff to v1:
- Keep old paths to virt-aa-helper in profiles as SUSE still uses it.
- patch 7/7 is new
Michal Prívozník (7):
apparmor: Fix parthelper, iohelper and virt-aa-helper paths in
profiles
apparmor: Allow libvirt to spawn virt-aa-helper and libvirt_lxc
docs: Fix virt-aa-helper location
apparmor: Rename virt-aa-helper profile
apparmor: Sort paths in blocks in libvirt-qemu profile
apparmor: Allow some more BIOS/UEFI paths
apparmor: Drop 'Last modified' comment from profiles
docs/drvqemu.html.in | 2 +-
src/security/Makefile.inc.am | 10 +--
src/security/apparmor/libvirt-lxc | 2 -
src/security/apparmor/libvirt-qemu | 80 +++++++++----------
...t-aa-helper => usr.libexec.virt-aa-helper} | 7 +-
src/security/apparmor/usr.sbin.libvirtd | 7 +-
6 files changed, 53 insertions(+), 55 deletions(-)
rename src/security/apparmor/{usr.lib.libvirt.virt-aa-helper => usr.libexec.virt-aa-helper} (88%)
--
2.24.1
4 years, 10 months
[libvirt PATCH v2] qemu: drop support for monitor connections on PTYs
by Daniel P. Berrangé
Libvirt switched to using a UNIX socket for monitors in
2009 for version 0.7.0. It seems unlikely that there is
a running QEMU process that hasn't been restarted for
11 years while also taking a libvirt upgrade. Therefore
we can drop support for opening a PTY for the QEMU
monitor.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
In v2:
- Now with all changes actually committed
src/qemu/qemu_monitor.c | 60 +++++++----------------------------------
1 file changed, 9 insertions(+), 51 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 802ad20aa1..008d4a0e75 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -77,7 +77,6 @@ struct _qemuMonitor {
* = 0: not registered
* < 0: an error occurred during the registration of @fd */
int watch;
- int hasSendFD;
virDomainObjPtr vm;
@@ -303,21 +302,6 @@ qemuMonitorOpenUnix(const char *monitor,
}
-static int
-qemuMonitorOpenPty(const char *monitor)
-{
- int monfd;
-
- if ((monfd = open(monitor, O_RDWR)) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to open monitor path %s"), monitor);
- return -1;
- }
-
- return monfd;
-}
-
-
/* This method processes data that has been received
* from the monitor. Looking for async events and
* replies/errors.
@@ -434,12 +418,6 @@ qemuMonitorIOWrite(qemuMonitorPtr mon)
if (!mon->msg || mon->msg->txOffset == mon->msg->txLength)
return 0;
- if (mon->msg->txFD != -1 && !mon->hasSendFD) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Monitor does not support sending of file descriptors"));
- return -1;
- }
-
buf = mon->msg->txBuffer + mon->msg->txOffset;
len = mon->msg->txLength - mon->msg->txOffset;
if (mon->msg->txFD == -1)
@@ -707,7 +685,6 @@ qemuMonitorIO(int watch, int fd, int events, void *opaque)
static qemuMonitorPtr
qemuMonitorOpenInternal(virDomainObjPtr vm,
int fd,
- bool hasSendFD,
qemuMonitorCallbacksPtr cb,
void *opaque)
{
@@ -736,7 +713,6 @@ qemuMonitorOpenInternal(virDomainObjPtr vm,
goto cleanup;
}
mon->fd = fd;
- mon->hasSendFD = hasSendFD;
mon->vm = virObjectRef(vm);
mon->waitGreeting = true;
mon->cb = cb;
@@ -810,7 +786,6 @@ qemuMonitorOpen(virDomainObjPtr vm,
void *opaque)
{
int fd = -1;
- bool hasSendFD = false;
qemuMonitorPtr ret = NULL;
timeout += QEMU_DEFAULT_MONITOR_WAIT;
@@ -819,28 +794,18 @@ qemuMonitorOpen(virDomainObjPtr vm,
* deleted until the monitor gets its own reference. */
virObjectRef(vm);
- switch (config->type) {
- case VIR_DOMAIN_CHR_TYPE_UNIX:
- hasSendFD = true;
- virObjectUnlock(vm);
- fd = qemuMonitorOpenUnix(config->data.nix.path,
- vm->pid, retry, timeout);
- virObjectLock(vm);
- break;
-
- case VIR_DOMAIN_CHR_TYPE_PTY:
- virObjectUnlock(vm);
- fd = qemuMonitorOpenPty(config->data.file.path);
- virObjectLock(vm);
- break;
-
- default:
+ if (config->type != VIR_DOMAIN_CHR_TYPE_UNIX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unable to handle monitor type: %s"),
virDomainChrTypeToString(config->type));
- break;
+ goto cleanup;
}
+ virObjectUnlock(vm);
+ fd = qemuMonitorOpenUnix(config->data.nix.path,
+ vm->pid, retry, timeout);
+ virObjectLock(vm);
+
if (fd < 0)
goto cleanup;
@@ -850,7 +815,7 @@ qemuMonitorOpen(virDomainObjPtr vm,
goto cleanup;
}
- ret = qemuMonitorOpenInternal(vm, fd, hasSendFD, cb, opaque);
+ ret = qemuMonitorOpenInternal(vm, fd, cb, opaque);
cleanup:
if (!ret)
VIR_FORCE_CLOSE(fd);
@@ -865,7 +830,7 @@ qemuMonitorOpenFD(virDomainObjPtr vm,
qemuMonitorCallbacksPtr cb,
void *opaque)
{
- return qemuMonitorOpenInternal(vm, sockfd, true, cb, opaque);
+ return qemuMonitorOpenInternal(vm, sockfd, cb, opaque);
}
@@ -2675,13 +2640,6 @@ qemuMonitorSendFileHandle(qemuMonitorPtr mon,
return -1;
}
- if (!mon->hasSendFD) {
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("qemu is not using a unix socket monitor, "
- "cannot send fd %s"), fdname);
- return -1;
- }
-
return qemuMonitorJSONSendFileHandle(mon, fdname, fd);
}
--
2.24.1
4 years, 10 months
[PATCH 1/2] qemu: monitor:Prevent a NULl pointer from being accessed
by Yi Wang
From: Huang Zijiang <huang.zijiang(a)zte.com.cn>
virJSONValueObjectGetObject maybe return NULL if the key is
missing or if value is not the correct TYPE, so we have to prevent
a NULl pointer from being accessed.
Signed-off-by: Huang Zijiang <huang.zijiang(a)zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59(a)zte.com.cn>
---
src/qemu/qemu_monitor_json.c | 89 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 88 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e5164d2..51b40e0 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1697,7 +1697,12 @@ qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
-
+ if (!data){
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-status reply was missing return data"));
+ return -1;
+ }
+
if (virJSONValueObjectGetBoolean(data, "running", running) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("query-status reply was missing running state"));
@@ -2018,6 +2023,11 @@ int qemuMonitorJSONGetVirtType(qemuMonitorPtr mon,
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-kvm reply was missing return data"));
+ return -1;
+ }
if (virJSONValueObjectGetBoolean(data, "enabled", &val) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -2179,6 +2189,11 @@ qemuMonitorJSONGetBalloonInfo(qemuMonitorPtr mon,
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-balloon reply was missing return data"));
+ return -1;
+ }
if (virJSONValueObjectGetNumberUlong(data, "actual", &mem) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -2280,6 +2295,11 @@ int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon,
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("reply was missing return data"));
+ return -1;
+ }
if (!(statsdata = virJSONValueObjectGet(data, "stats"))) {
VIR_DEBUG("data does not include 'stats'");
@@ -3478,6 +3498,11 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValuePtr reply,
const char *tmp;
ret = virJSONValueObjectGetObject(reply, "return");
+ if (!ret) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("info migration reply was missing return data"));
+ return -1;
+ }
if (!(statusstr = virJSONValueObjectGetString(ret, "status"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -3787,6 +3812,11 @@ qemuMonitorJSONQueryDump(qemuMonitorPtr mon,
goto cleanup;
result = virJSONValueObjectGetObject(reply, "return");
+ if (!result) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-dump reply was missing return data"));
+ return -1;
+ }
ret = qemuMonitorJSONExtractDumpStats(result, stats);
@@ -3824,6 +3854,11 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitorPtr mon,
goto cleanup;
caps = virJSONValueObjectGetObject(reply, "return");
+ if (!caps) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-dump-guest-memory-capability reply was missing return data"));
+ return -1;
+ }
if (!(formats = virJSONValueObjectGetArray(caps, "formats"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -4676,6 +4711,11 @@ qemuMonitorJSONDiskNameLookupOne(virJSONValuePtr image,
return NULL;
if (top != target) {
backing = virJSONValueObjectGetObject(image, "backing-image");
+ if (!backing) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("reply was missing return backing-image "));
+ return -1;
+ }
return qemuMonitorJSONDiskNameLookupOne(backing, top->backingStore,
target);
}
@@ -5519,6 +5559,12 @@ int qemuMonitorJSONGetVersion(qemuMonitorPtr mon,
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-version reply was missing return data"));
+ return -1;
+ }
+
if (!(qemu = virJSONValueObjectGetObject(data, "qemu"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -5972,6 +6018,11 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon,
return -1;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-cpu-model-expansion reply was missing return data"));
+ return -1;
+ }
if (qemuMonitorJSONParseCPUModelData(data, "query-cpu-model-expansion",
fail_no_props, &cpu_model, &cpu_props,
@@ -6027,6 +6078,11 @@ qemuMonitorJSONGetCPUModelBaseline(qemuMonitorPtr mon,
return -1;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-cpu-model-baseline reply was missing return data"));
+ return -1;
+ }
if (qemuMonitorJSONParseCPUModelData(data, "query-cpu-model-baseline",
false, &cpu_model, &cpu_props,
@@ -6067,6 +6123,11 @@ qemuMonitorJSONGetCPUModelComparison(qemuMonitorPtr mon,
return -1;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-cpu-model-comparison reply was missing return data"));
+ return -1;
+ }
if (!(data_result = virJSONValueObjectGetString(data, "result"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -6342,6 +6403,11 @@ int qemuMonitorJSONGetKVMState(qemuMonitorPtr mon,
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("qemu-kvm reply was missing return data"));
+ return -1;
+ }
if (virJSONValueObjectGetBoolean(data, "enabled", enabled) < 0 ||
virJSONValueObjectGetBoolean(data, "present", present) < 0) {
@@ -6823,6 +6889,11 @@ qemuMonitorJSONGetTargetArch(qemuMonitorPtr mon)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-target reply was missing return data"));
+ return -1;
+ }
if (!(arch = virJSONValueObjectGetString(data, "arch"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -7090,6 +7161,11 @@ qemuMonitorJSONGetSEVCapabilities(qemuMonitorPtr mon,
goto cleanup;
caps = virJSONValueObjectGetObject(reply, "return");
+ if (!caps) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-sev-capabilities reply was missing return data"));
+ return -1;
+ }
if (virJSONValueObjectGetNumberUint(caps, "cbitpos", &cbitpos) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -7555,6 +7631,12 @@ qemuMonitorJSONAttachCharDev(qemuMonitorPtr mon,
if (chr->type == VIR_DOMAIN_CHR_TYPE_PTY) {
virJSONValuePtr data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("chardev-add reply was missing return data"));
+ return -1;
+ }
+
const char *path;
if (!(path = virJSONValueObjectGetString(data, "pty"))) {
@@ -9006,6 +9088,11 @@ qemuMonitorJSONGetSEVMeasurement(qemuMonitorPtr mon)
goto cleanup;
data = virJSONValueObjectGetObject(reply, "return");
+ if (!data) {
+ (VIR_ERR_INTERNAL_ERROR, "%s",
+ _("query-sev-launch-measure reply was missing return data"));
+ return -1;
+ }
if (!(tmp = virJSONValueObjectGetString(data, "data")))
goto cleanup;
--
1.9.1
4 years, 10 months
[PATCH] util: Prevent a NULl pointer from being accessed
by Yi Wang
From: Huang Zijiang <huang.zijiang(a)zte.com.cn>
virJSONValueObjectGetObject maybe return NULL if the key is
missing or if value is not the correct TYPE, so we have to prevent
a NULl pointer from being accessed.
Signed-off-by: Huang Zijiang <huang.zijiang(a)zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59(a)zte.com.cn>
---
src/util/virstoragefile.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index e46ac99..53224b5 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -3378,6 +3378,11 @@ virStorageSourceParseBackingJSONSheepdog(virStorageSourcePtr src,
const char *filename;
const char *vdi = virJSONValueObjectGetString(json, "vdi");
virJSONValuePtr server = virJSONValueObjectGetObject(json, "server");
+ if (!server) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("missing server in JSON backing volume definition"));
+ return -1;
+ }
/* legacy URI based syntax passed via 'filename' option */
if ((filename = virJSONValueObjectGetString(json, "filename"))) {
--
1.9.1
4 years, 10 months
[PATCH] util: Prevent a NULl pointer from being accessed
by Yi Wang
From: Huang Zijiang <huang.zijiang(a)zte.com.cn>
virJSONValueObjectGetObject maybe return NULL if the key is
missing or if value is not the correct TYPE, so we have to prevent
a NULl pointer from being accessed.
Signed-off-by: Huang Zijiang <huang.zijiang(a)zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59(a)zte.com.cn>
---
src/util/virqemu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/util/virqemu.c b/src/util/virqemu.c
index f3a233a..29fbe4e 100644
--- a/src/util/virqemu.c
+++ b/src/util/virqemu.c
@@ -257,6 +257,11 @@ virQEMUBuildObjectCommandlineFromJSON(virBufferPtr buf,
const char *type = virJSONValueObjectGetString(objprops, "qom-type");
const char *alias = virJSONValueObjectGetString(objprops, "id");
virJSONValuePtr props = virJSONValueObjectGetObject(objprops, "props");
+ if (!props) {
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("reply was missing return props data"));
+ return -1;
+ }
return virQEMUBuildObjectCommandlineFromJSONInternal(buf, type, alias, props);
}
--
1.9.1
4 years, 10 months
[PATCH v3 0/7] ui: rework -show-cursor option
by Gerd Hoffmann
Add -display {sdl,gtk,cocoa},show-cursor=on as replacement for
-show-cursor. sdl + cocoa are switched over (no change in behavior),
gtk support is added.
Gerd Hoffmann (7):
ui: add show-cursor option
ui: wire up legacy -show-cursor option
ui/sdl: switch to new show-cursor option
ui/cocoa: switch to new show-cursor option
ui/gtk: implement show-cursor option
ui: drop curor_hide global variable.
ui: deprecate legacy -show-cursor option
include/sysemu/sysemu.h | 1 -
ui/gtk.c | 8 ++++++--
ui/sdl2.c | 16 ++++++++--------
vl.c | 16 ++++++++++++++--
qapi/ui.json | 3 +++
qemu-deprecated.texi | 5 +++++
ui/cocoa.m | 4 ++++
7 files changed, 40 insertions(+), 13 deletions(-)
--
2.18.1
4 years, 10 months