* [PULL 1/7] spapr/pci: Correct "does not support hotplugging error messages
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
@ 2023-11-17 9:53 ` Markus Armbruster
2023-11-17 9:53 ` [PULL 2/7] hmp: Improve sync-profile error message Markus Armbruster
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2023-11-17 9:53 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, Daniel Henrique Barboza
When dynamic-reconfiguration is off, hot plug / unplug can fail with
"Bus 'spapr-pci-host-bridge' does not support hotplugging".
spapr-pci-host-bridge is a device, not a bus. Report the name of the
bus it provides instead: 'pci.0'.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-2-armbru@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/ppc/spapr_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index a27024e45a..6760823e13 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1555,7 +1555,7 @@ static void spapr_pci_pre_plug(HotplugHandler *plug_handler,
*/
if (plugged_dev->hotplugged) {
error_setg(errp, QERR_BUS_NO_HOTPLUG,
- object_get_typename(OBJECT(phb)));
+ phb->parent_obj.bus->qbus.name);
return;
}
}
@@ -1676,7 +1676,7 @@ static void spapr_pci_unplug_request(HotplugHandler *plug_handler,
if (!phb->dr_enabled) {
error_setg(errp, QERR_BUS_NO_HOTPLUG,
- object_get_typename(OBJECT(phb)));
+ phb->parent_obj.bus->qbus.name);
return;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 2/7] hmp: Improve sync-profile error message
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
2023-11-17 9:53 ` [PULL 1/7] spapr/pci: Correct "does not support hotplugging error messages Markus Armbruster
@ 2023-11-17 9:53 ` Markus Armbruster
2023-11-17 9:53 ` [PULL 3/7] qga: Improve guest-exec-status " Markus Armbruster
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2023-11-17 9:53 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, Philippe Mathieu-Daudé, Dr . David Alan Gilbert
Improve
(qemu) sync-profile of
Error: Invalid parameter 'of'
to
Error: invalid parameter 'of', expecting 'on', 'off', or 'reset'
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-3-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
---
monitor/hmp-cmds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 6c559b48c8..871898ac46 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -24,7 +24,6 @@
#include "qapi/qapi-commands-control.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qerror.h"
#include "qemu/cutils.h"
#include "hw/intc/intc.h"
#include "qemu/log.h"
@@ -138,7 +137,8 @@ void hmp_sync_profile(Monitor *mon, const QDict *qdict)
} else {
Error *err = NULL;
- error_setg(&err, QERR_INVALID_PARAMETER, op);
+ error_setg(&err, "invalid parameter '%s',"
+ " expecting 'on', 'off', or 'reset'", op);
hmp_handle_error(mon, err);
}
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 3/7] qga: Improve guest-exec-status error message
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
2023-11-17 9:53 ` [PULL 1/7] spapr/pci: Correct "does not support hotplugging error messages Markus Armbruster
2023-11-17 9:53 ` [PULL 2/7] hmp: Improve sync-profile error message Markus Armbruster
@ 2023-11-17 9:53 ` Markus Armbruster
2023-11-17 9:53 ` [PULL 4/7] ui/qmp-cmds: Improve two error messages Markus Armbruster
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2023-11-17 9:53 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, Konstantin Kostiuk, Philippe Mathieu-Daudé
When the PID passed to guest-exec-status does not exist, we report
"Invalid parameter 'pid'"
Improve this to
"PID 1234 does not exist"
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-4-armbru@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
qga/commands.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/commands.c b/qga/commands.c
index ce172edd2d..88c1c99fe5 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -154,7 +154,7 @@ GuestExecStatus *qmp_guest_exec_status(int64_t pid, Error **errp)
gei = guest_exec_info_find(pid);
if (gei == NULL) {
- error_setg(errp, QERR_INVALID_PARAMETER, "pid");
+ error_setg(errp, "PID " PRId64 " does not exist");
return NULL;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 4/7] ui/qmp-cmds: Improve two error messages
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
` (2 preceding siblings ...)
2023-11-17 9:53 ` [PULL 3/7] qga: Improve guest-exec-status " Markus Armbruster
@ 2023-11-17 9:53 ` Markus Armbruster
2023-11-17 9:53 ` [PULL 5/7] net: Fix a misleading error message Markus Armbruster
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2023-11-17 9:53 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, Philippe Mathieu-Daudé
set_password with "protocol": "vnc" supports only "connected": "keep".
Any other value is rejected with
Invalid parameter 'connected'
Improve this to
parameter 'connected' must be 'keep' when 'protocol' is 'vnc'
client_migrate_info requires "port" or "tls-port". When both are
missing, it fails with
Parameter 'port/tls-port' is missing
Improve this to
parameter 'port' or 'tls-port' is required
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-5-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
ui/ui-qmp-cmds.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/ui-qmp-cmds.c b/ui/ui-qmp-cmds.c
index d772e1cb7f..74fa6c6ec5 100644
--- a/ui/ui-qmp-cmds.c
+++ b/ui/ui-qmp-cmds.c
@@ -44,7 +44,8 @@ void qmp_set_password(SetPasswordOptions *opts, Error **errp)
assert(opts->protocol == DISPLAY_PROTOCOL_VNC);
if (opts->connected != SET_PASSWORD_ACTION_KEEP) {
/* vnc supports "connected=keep" only */
- error_setg(errp, QERR_INVALID_PARAMETER, "connected");
+ error_setg(errp, "parameter 'connected' must be 'keep'"
+ " when 'protocol' is 'vnc'");
return;
}
/*
@@ -195,7 +196,7 @@ void qmp_client_migrate_info(const char *protocol, const char *hostname,
}
if (!has_port && !has_tls_port) {
- error_setg(errp, QERR_MISSING_PARAMETER, "port/tls-port");
+ error_setg(errp, "parameter 'port' or 'tls-port' is required");
return;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 5/7] net: Fix a misleading error message
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
` (3 preceding siblings ...)
2023-11-17 9:53 ` [PULL 4/7] ui/qmp-cmds: Improve two error messages Markus Armbruster
@ 2023-11-17 9:53 ` Markus Armbruster
2023-11-17 9:53 ` [PULL 6/7] balloon: " Markus Armbruster
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2023-11-17 9:53 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha
The error message
$ qemu-system-x86_64 -netdev user,id=net0,ipv6-net=fec0::0/
qemu-system-x86_64: -netdev user,id=net0,ipv6-net=fec0::0/: Parameter 'ipv6-prefixlen' expects a number
points to ipv6-prefixlen instead of ipv6-net. Fix:
qemu-system-x86_64: -netdev user,id=net0,ipv6-net=fec0::0/: parameter 'ipv6-net' expects a number after '/'
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-6-armbru@redhat.com>
---
net/net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/net.c b/net/net.c
index c0c0cbe99e..8e67a20abc 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1227,7 +1227,7 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp)
int ret = -1;
Visitor *v = opts_visitor_new(opts);
- /* Parse convenience option format ip6-net=fec0::0[/64] */
+ /* Parse convenience option format ipv6-net=fec0::0[/64] */
const char *ip6_net = qemu_opt_get(opts, "ipv6-net");
if (ip6_net) {
@@ -1247,8 +1247,8 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp)
if (substrings[1] &&
qemu_strtoul(substrings[1], NULL, 10, &prefix_len))
{
- error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
- "ipv6-prefixlen", "a number");
+ error_setg(errp,
+ "parameter 'ipv6-net' expects a number after '/'");
goto out;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 6/7] balloon: Fix a misleading error message
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
` (4 preceding siblings ...)
2023-11-17 9:53 ` [PULL 5/7] net: Fix a misleading error message Markus Armbruster
@ 2023-11-17 9:53 ` Markus Armbruster
2023-11-17 9:53 ` [PULL 7/7] target/i386/cpu: Improve error message for property "vendor" Markus Armbruster
2023-11-20 14:39 ` [PULL 0/7] Error reporting patches for 2023-11-17 Stefan Hajnoczi
7 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2023-11-17 9:53 UTC (permalink / raw)
To: qemu-devel
Cc: stefanha, David Hildenbrand, Michael S . Tsirkin, Mario Casquero
The error message
{"execute": "balloon", "arguments":{"value": -1}}
{"error": {"class": "GenericError", "desc": "Parameter 'target' expects a size"}}
points to 'target' instead of 'value'. Fix:
{"error": {"class": "GenericError", "desc": "Parameter 'value' expects a size"}}
Root cause: qmp_balloon()'s parameter is named @target. Rename it to
@value to match the QAPI schema.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-7-armbru@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Mario Casquero <mcasquer@redhat.com>
---
system/balloon.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/system/balloon.c b/system/balloon.c
index e0e8969a4b..fda7af832e 100644
--- a/system/balloon.c
+++ b/system/balloon.c
@@ -90,17 +90,17 @@ BalloonInfo *qmp_query_balloon(Error **errp)
return info;
}
-void qmp_balloon(int64_t target, Error **errp)
+void qmp_balloon(int64_t value, Error **errp)
{
if (!have_balloon(errp)) {
return;
}
- if (target <= 0) {
- error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "target", "a size");
+ if (value <= 0) {
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "value", "a size");
return;
}
- trace_balloon_event(balloon_opaque, target);
- balloon_event_fn(balloon_opaque, target);
+ trace_balloon_event(balloon_opaque, value);
+ balloon_event_fn(balloon_opaque, value);
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 7/7] target/i386/cpu: Improve error message for property "vendor"
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
` (5 preceding siblings ...)
2023-11-17 9:53 ` [PULL 6/7] balloon: " Markus Armbruster
@ 2023-11-17 9:53 ` Markus Armbruster
2023-11-20 14:39 ` [PULL 0/7] Error reporting patches for 2023-11-17 Stefan Hajnoczi
7 siblings, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2023-11-17 9:53 UTC (permalink / raw)
To: qemu-devel; +Cc: stefanha, Philippe Mathieu-Daudé
Improve
$ qemu-system-x86_64 -device max-x86_64-cpu,vendor=me
qemu-system-x86_64: -device max-x86_64-cpu,vendor=me: Property '.vendor' doesn't take value 'me'
to
qemu-system-x86_64: -device max-x86_64-cpu,vendor=0123456789abc: value of property 'vendor' must consist of exactly 12 characters
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231031111059.3407803-8-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[Typo corrected]
---
target/i386/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 358d9c0a65..cd16cb893d 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5192,7 +5192,8 @@ static void x86_cpuid_set_vendor(Object *obj, const char *value,
int i;
if (strlen(value) != CPUID_VENDOR_SZ) {
- error_setg(errp, QERR_PROPERTY_VALUE_BAD, "", "vendor", value);
+ error_setg(errp, "value of property 'vendor' must consist of"
+ " exactly " stringify(CPUID_VENDOR_SZ) " characters");
return;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PULL 0/7] Error reporting patches for 2023-11-17
2023-11-17 9:53 [PULL 0/7] Error reporting patches for 2023-11-17 Markus Armbruster
` (6 preceding siblings ...)
2023-11-17 9:53 ` [PULL 7/7] target/i386/cpu: Improve error message for property "vendor" Markus Armbruster
@ 2023-11-20 14:39 ` Stefan Hajnoczi
7 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2023-11-20 14:39 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel, stefanha
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread