From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8I7m-0001eC-Ok for qemu-devel@nongnu.org; Sun, 13 Dec 2015 20:40:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8I7l-0004U1-5V for qemu-devel@nongnu.org; Sun, 13 Dec 2015 20:40:26 -0500 Date: Mon, 14 Dec 2015 12:26:30 +1100 From: David Gibson Message-ID: <20151214012630.GK22783@voom.fritz.box> References: <1449792685-17000-1-git-send-email-david@gibson.dropbear.id.au> <1449792685-17000-10-git-send-email-david@gibson.dropbear.id.au> <566AA0BB.9090202@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huBJOJF9BsF479P6" Content-Disposition: inline In-Reply-To: <566AA0BB.9090202@redhat.com> Subject: Re: [Qemu-devel] [PATCH 09/11] pseries: Clean up error handling in xics_system_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: lvivier@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, agraf@suse.de, armbru@redhat.com, qemu-ppc@nongnu.org --huBJOJF9BsF479P6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 11, 2015 at 11:08:59AM +0100, Thomas Huth wrote: > On 11/12/15 01:11, David Gibson wrote: > > Use the error handling infrastructure to pass an error out from > > try_create_xics() instead of assuming &error_abort - the caller is in a > > better position to decide on error handling policy. > >=20 > > Signed-off-by: David Gibson > > --- > > hw/ppc/spapr.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > >=20 > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index 546d2f5..c376748 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -111,7 +111,7 @@ static XICSState *try_create_xics(const char *type,= int nr_servers, > > } > > =20 > > static XICSState *xics_system_init(MachineState *machine, > > - int nr_servers, int nr_irqs) > > + int nr_servers, int nr_irqs, Error = **errp) > > { > > XICSState *icp =3D NULL; > > =20 > > @@ -129,7 +129,7 @@ static XICSState *xics_system_init(MachineState *ma= chine, > > } > > =20 > > if (!icp) { > > - icp =3D try_create_xics(TYPE_XICS, nr_servers, nr_irqs, &error= _abort); > > + icp =3D try_create_xics(TYPE_XICS, nr_servers, nr_irqs, errp); > > } > > =20 > > return icp; > > @@ -1808,7 +1808,7 @@ static void ppc_spapr_init(MachineState *machine) > > spapr->icp =3D xics_system_init(machine, > > DIV_ROUND_UP(max_cpus * kvmppc_smt_t= hreads(), > > smp_threads), > > - XICS_IRQS); > > + XICS_IRQS, &error_fatal); > > =20 > > if (smc->dr_lmb_enabled) { > > spapr_validate_node_memory(machine, &error_fatal); > >=20 >=20 > Could you maybe explain in the patch description why you changed the > behavior in case of errors from "error_abort" into "error_fatal" ? Ah, yes, meant to do that but forgot. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --huBJOJF9BsF479P6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWbhrGAAoJEGw4ysog2bOS4t0P/iTGLCLV7d1yh9XYsVhNc2Id SViFS9PgfTUfXyUAAj/gUxSHzH3/2USwQMY+nIX8QOLiGxdxRgFWVUTCPpYZkcGL CfX3lkYObPL9cRJkHktn6K13aR0LMns8Bwm/6YqBv+B6wDJKyeWbpdTyn3gVk9Qg DQIVHP+pZvmUWbYWxbHANFRPM5OOpwnMDbvD1SbTDVFcVKnToPKnqEHiBL2CxQSd 87PBmNET1Pxo07Mcum4uuPBdnICEkyfAK4jOqQ8OvnJTdmAHwPQ42YoooHLGOC72 xx9fqR9b+PYUPyf99LjveyfgklOqvDAyaw9j/WpVeVS3l6bzK/mjGEscxcJw+K+p ozzb/sHK/yo0KW+EMp+e4k94oiNl3LQ/1jUrdDE9MYr0QI+/htl/Iyz05jptjngM LH18byOVfAQ4jqmee60DpU/Xkba4XGZh6qkZUFQV5781eXRl93LQQl4Qh8FNWfmM B4JdVfEcomrzweBUFJaWq7s2K8VJwzSJTrEw4QtFL0y5JfsgSO2QQozs4F5JujXG ZGfa2ghdKMJCjDbybeXDzlNllGJu+cvYALWCkoQn0+Hb6yq0iBGVLuOoCb4l7zFO MbDpnm0AWcfg2hhCN89B7yUCYxxZ9zzIPO6mPfSDRpYP536c1k7LFXW5g5Fbp+S5 wbDBJlQ97CTsSlk/yQCa =BpJI -----END PGP SIGNATURE----- --huBJOJF9BsF479P6--