spapr/xive: Rework error handling of kvmppc_xive_cpu_[gs]et_state()
commit5fa36b7ffbcb2056249929a7b1ee4e30c07dc67c
authorGreg Kurz <groug@kaod.org>
Mon, 10 Aug 2020 16:54:26 +0000 (10 18:54 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 13 Aug 2020 11:00:52 +0000 (13 21:00 +1000)
tree281e004db0f1997d2b703f1e2f8ed3f68fc0f842
parentb14adb4a27c80a255fb35451d7cb2bc70743e7f4
spapr/xive: Rework error handling of kvmppc_xive_cpu_[gs]et_state()

kvm_set_one_reg() returns a negative errno on failure, use that instead
of errno. Also propagate it to callers so they can use it to check
for failures and hopefully get rid of their local_err boilerplate.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159707846665.1489912.14267225652103441921.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive_kvm.c
include/hw/ppc/xive.h