From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOx7Y-0000I3-UO for qemu-devel@nongnu.org; Mon, 10 Aug 2015 20:08:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOx7V-0004mg-NB for qemu-devel@nongnu.org; Mon, 10 Aug 2015 20:08:48 -0400 Date: Mon, 10 Aug 2015 22:24:56 +1000 From: David Gibson Message-ID: <20150810122456.GC18650@voom.redhat.com> References: <1438918413-8247-1-git-send-email-gwshan@linux.vnet.ibm.com> <1438918413-8247-3-git-send-email-gwshan@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wLAMOaPNJ0fu1fTG" Content-Disposition: inline In-Reply-To: <1438918413-8247-3-git-send-email-gwshan@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v3 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gavin Shan Cc: aik@ozlabs.ru, qemu-ppc@nongnu.org, qemu-devel@nongnu.org --wLAMOaPNJ0fu1fTG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 07, 2015 at 01:33:32PM +1000, Gavin Shan wrote: > The patch supports RTAS calls "ibm,{open,close}-errinjct" to > manupliate the token, which is passed to RTAS call "ibm,errinjct" > to indicate the valid context for error injection. Each VM is > permitted to have only one token at once and we simply have one > random number for that. >=20 > Signed-off-by: Gavin Shan > --- > hw/ppc/spapr.c | 5 ++++ > hw/ppc/spapr_rtas.c | 66 ++++++++++++++++++++++++++++++++++++++++++++= ++++++ > include/hw/ppc/spapr.h | 10 +++++++- > 3 files changed, 80 insertions(+), 1 deletion(-) >=20 > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index dfd808f..1ebd0b2 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1225,6 +1225,11 @@ static const VMStateDescription vmstate_spapr =3D { > VMSTATE_UINT64_TEST(rtc_offset, sPAPRMachineState, version_befor= e_3), > =20 > VMSTATE_PPC_TIMEBASE_V(tb, sPAPRMachineState, 2), > + > + /* Error injection token */ > + VMSTATE_BOOL(is_errinjct_opened, sPAPRMachineState), > + VMSTATE_UINT32(errinjct_next_token, sPAPRMachineState), Because you're adding fields to the vmstate you'll need to define a new version number and make these fields only considered in the new version. Technically you only need to transfer whether the token is open, and *if* it is open the current token value. Not sure if it's worth restricting to that though. --=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 --wLAMOaPNJ0fu1fTG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVyJgXAAoJEGw4ysog2bOSwiAP/1WzsWx3aNy0mLtC2iDaYos4 5GW4HS8kDQvsR2ZpyVQu1A7LWv0kanIbIvh/T+adhDsIdSadrpr/CxMBXodW0dQC gY6JjLOCRTKAsO1L+m9ZJJ+S7hdQJKjh8/0iY6qM750FFVCoKH1Hdc+hIOl0vbhh i8HzwaUkRMQrMeI/4jSTDTaqL3kG34jFRKDNoarC/VCNR4Ek/4w0p9twE1TED2bC k03mwmdFVU3q/p5ZfC8IBvI2YmofD/JTeb567F+tuJyV9klpao0kTa9vCYs6laBV iBNJIoq2EVR8gdB+lpVVIW/lUr8MD3tx6j1W2GqmmMPQsuD9QIFvhJWvJWWAQx01 RpvEyIn9pN/vNDhEL3w5ePI18mtfyxdXUtbjbUPL6NVJcdrhoGOxvB6MM29Im3XY 5SvAXCuin5QuG9MMSDhTrK9C/6NExWTAGwa90+hQm0UlhNQ1lIi/Iz/leSj2dtBC mW7EHlExz02u0fcQtwomFQkuOE9Nzrp47fCi7bc8aqEq1qnL/VXTy3BkLh/flIjr 0vA/tIuDIMlgzRI097ghrHuib4urGheIBLuY9nzvrJaOqfdSXbFogHfq0MZfiB/R pWWL0oarqmBxde47/D6Cs3FaYC+adH7e86tAtYGFUT7SjFcxDhRcl7M5J8B7WSsJ 8XMSoUr0xkFW81xPkoOH =rra3 -----END PGP SIGNATURE----- --wLAMOaPNJ0fu1fTG--