qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] spapr: Improve error reporting in spapr_caps.c
@ 2020-06-11 13:40 Greg Kurz
  2020-06-11 13:40 ` [PATCH v3 1/4] spapr: Simplify some warning printing paths " Greg Kurz
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Greg Kurz @ 2020-06-11 13:40 UTC (permalink / raw)
  To: David Gibson
  Cc: Laurent Vivier, Vladimir Sementsov-Ogievskiy, qemu-ppc,
	qemu-devel, Markus Armbruster

Spapr capabilities are checked at machine init. If a capability cannot
be used, an error message is printed and QEMU exits. In most places,
the error message also contains an hint for the user. But we should
use error_append_hint() for that, as explained in the "qapi/error.h"
header.

This is already the case for cap_fwnmi_apply() and we now want to add 
a similar check for nested KVM-HV. Unfortunately, spapr_caps_apply()
passes &error_fatal to all apply hooks and error_append_hint() is
never called. 

So this reuses previous work from Vladimir Sementsov-Ogievskiy to
address that.

v3: - Add preliminary patch to use warn_report() instead of
      a convoluted error_setg()+warn_report_err() sequence
v2: - Fix indentation and add some missing \n in patch 2
    - Add ERRP_AUTO_PROPAGATE() to cap_nested_kvm_hv_apply() in
      patch 2 instead of patch 3

---

Greg Kurz (3):
      spapr: Simplify some warning printing paths in spapr_caps.c
      spapr: Use error_append_hint() in spapr_caps.c
      spapr: Forbid nested KVM-HV in pre-power9 compat mode

Vladimir Sementsov-Ogievskiy (1):
      error: auto propagated local_err


 hw/ppc/spapr_caps.c  |  127 ++++++++++++++++---------------
 include/qapi/error.h |  205 ++++++++++++++++++++++++++++++++++++++++++--------
 2 files changed, 239 insertions(+), 93 deletions(-)

--
Greg



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-07-16  2:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 13:40 [PATCH v3 0/4] spapr: Improve error reporting in spapr_caps.c Greg Kurz
2020-06-11 13:40 ` [PATCH v3 1/4] spapr: Simplify some warning printing paths " Greg Kurz
2020-06-11 14:37   ` Vladimir Sementsov-Ogievskiy
2020-06-11 15:33   ` Laurent Vivier
2020-06-12  9:46   ` David Gibson
2020-06-11 13:40 ` [PATCH v3 2/4] error: auto propagated local_err Greg Kurz
2020-06-13  7:12   ` David Gibson
2020-06-15  6:42     ` Greg Kurz
2020-06-11 13:40 ` [PATCH v3 3/4] spapr: Use error_append_hint() in spapr_caps.c Greg Kurz
2020-06-11 15:35   ` Laurent Vivier
2020-06-11 13:40 ` [PATCH v3 4/4] spapr: Forbid nested KVM-HV in pre-power9 compat mode Greg Kurz
2020-06-13  7:18   ` David Gibson
2020-06-15  9:20     ` Greg Kurz
2020-06-18 23:59       ` David Gibson
2020-07-03 14:19       ` Greg Kurz
2020-07-13  4:53         ` David Gibson
2020-07-15 11:14           ` Greg Kurz
2020-07-15 23:26             ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).