From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwioc-000589-W5 for qemu-devel@nongnu.org; Wed, 11 Nov 2015 22:44:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zwiob-0004d2-GA for qemu-devel@nongnu.org; Wed, 11 Nov 2015 22:44:50 -0500 Date: Thu, 12 Nov 2015 14:42:41 +1100 From: David Gibson Message-ID: <20151112034241.GL5852@voom.redhat.com> References: <20151111171135.4328.41819.stgit@aravindap> <20151111171530.4328.37008.stgit@aravindap> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Jbyekxk18hnEXT0m" Content-Disposition: inline In-Reply-To: <20151111171530.4328.37008.stgit@aravindap> Subject: Re: [Qemu-devel] [PATCH 2/4] spapr: Register and handle HCALL to receive updated RTAS region List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aravinda Prasad Cc: benh@au1.ibm.com, aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, paulus@samba.org, sam.bobroff@au1.ibm.com --Jbyekxk18hnEXT0m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 11, 2015 at 10:45:30PM +0530, Aravinda Prasad wrote: > Receive updates from SLOF about the updated rtas-base. > A separate patch for SLOF [1] adds functionality to invoke > a private HCALL whenever OS issues instantiate-rtas with > a new rtas-base. >=20 > This is required as QEMU needs to know the updated rtas-base > as it allocates error reporting structure in RTAS space upon > a machine check exception. >=20 > [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2014-August/120386.ht= ml >=20 > Signed-off-by: Aravinda Prasad Reviewed-by: David Gibson With the obvious proviso that the SLOF update needs to be merged (both to SLOF and to qemu) first. > --- > hw/ppc/spapr_hcall.c | 8 ++++++++ > include/hw/ppc/spapr.h | 3 ++- > 2 files changed, 10 insertions(+), 1 deletion(-) >=20 > diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c > index 652ddf6..9703ed2 100644 > --- a/hw/ppc/spapr_hcall.c > +++ b/hw/ppc/spapr_hcall.c > @@ -580,6 +580,13 @@ static target_ulong h_rtas(PowerPCCPU *cpu, sPAPRMac= hineState *spapr, > nret, rtas_r3 + 12 + 4*nargs); > } > =20 > +static target_ulong h_rtas_update(PowerPCCPU *cpu, sPAPRMachineState *sp= apr, > + target_ulong opcode, target_ulong *arg= s) > +{ > + spapr->rtas_addr =3D args[0]; > + return 0; > +} > + > static target_ulong h_logical_load(PowerPCCPU *cpu, sPAPRMachineState *s= papr, > target_ulong opcode, target_ulong *ar= gs) > { > @@ -1008,6 +1015,7 @@ static void hypercall_register_types(void) > =20 > /* qemu/KVM-PPC specific hcalls */ > spapr_register_hypercall(KVMPPC_H_RTAS, h_rtas); > + spapr_register_hypercall(KVMPPC_H_RTAS_UPDATE, h_rtas_update); > =20 > spapr_register_hypercall(H_SET_MODE, h_set_mode); > =20 > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h > index 91a61ab..b5cadd7 100644 > --- a/include/hw/ppc/spapr.h > +++ b/include/hw/ppc/spapr.h > @@ -347,7 +347,8 @@ struct sPAPRMachineState { > #define KVMPPC_H_LOGICAL_MEMOP (KVMPPC_HCALL_BASE + 0x1) > /* Client Architecture support */ > #define KVMPPC_H_CAS (KVMPPC_HCALL_BASE + 0x2) > -#define KVMPPC_HCALL_MAX KVMPPC_H_CAS > +#define KVMPPC_H_RTAS_UPDATE (KVMPPC_HCALL_BASE + 0x3) > +#define KVMPPC_HCALL_MAX KVMPPC_H_RTAS_UPDATE > =20 > typedef struct sPAPRDeviceTreeUpdateHeader { > uint32_t version_id; >=20 --=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 --Jbyekxk18hnEXT0m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWRAqxAAoJEGw4ysog2bOS6HsP/2rrwGe3lBC2borMDWRRwcHl 5uQm2ChNYt9qisQLXqGkQWim55sLZVTSi6g10Wj5FMDuX34Lq3KKdoFwvZngj6h5 7jkXnC3PJDqnlYRQhdv1XZf97IqDDxWQ7n3VJGv+BO36snN77sNkdzPou6OMzPcl dE8KQUx35UTxu/0jxD4RO982ynO/OT3E3KckpfnC9k6d5LicGH3K8Iput4p3DYhh e1YPR8gebg3qm9cjE7fPDK2sUNSSQXXnMu5+pPxvA+hXM/W/Cphp5v6V2fJFbR/e 9IsvkG+ihFe4J859bao/nJC/UTAjRdDmXWesyOmHqV3fdtCjQvfAR5iFJRmtDKUn KUwzlIv76vlj1H4v0Y1duBjCGGHLXH9ndQs0EZN0rmJ0hPXxI7PMwLwT6ztpMlng fmevAOeM+fUnw2SQZBMd6ut2Zivo0mvA+sO8lukJ9knWW8C20Obqam3pAWcWxifC 2fsYWHTA5A7T8JahTugudUJV6V898kt8I3BNG2YLCFV8RvA4SKPWu1tNcT1TaIQk zUReoxxkG9Fr10XQnSNAu4eEzxgIxHNwy8zxDHb1t+pqvMq8+T1UAmsyDM/KUaBG g64C0GoZoH6E3UAEpO+wb7CUuD7Y4iK14R1ScTjp6fCeFesREkhaW4rUFcqR4Xzf g/ajQDIMurtstTkEEtwn =L8Fj -----END PGP SIGNATURE----- --Jbyekxk18hnEXT0m--