From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afZVl-000313-GX for qemu-devel@nongnu.org; Mon, 14 Mar 2016 16:54:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afZVh-0005Zn-G9 for qemu-devel@nongnu.org; Mon, 14 Mar 2016 16:54:45 -0400 References: <1457974600-13828-1-git-send-email-clg@fr.ibm.com> <1457974600-13828-15-git-send-email-clg@fr.ibm.com> From: Thomas Huth Message-ID: <56E7250C.6060301@redhat.com> Date: Mon, 14 Mar 2016 21:54:36 +0100 MIME-Version: 1.0 In-Reply-To: <1457974600-13828-15-git-send-email-clg@fr.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 14/17] ppc: Add dummy write to VTB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 14.03.2016 17:56, C=C3=A9dric Le Goater wrote: > From: Benjamin Herrenschmidt >=20 > The Hypervisor can write it. We don't handle that properly yet but > at least let's not blow up when it is written. >=20 > Signed-off-by: Benjamin Herrenschmidt > --- > target-ppc/translate_init.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) >=20 > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > index 2fac6ea58698..28a9c2e73156 100644 > --- a/target-ppc/translate_init.c > +++ b/target-ppc/translate_init.c > @@ -300,6 +300,12 @@ static void spr_write_purr(DisasContext *ctx, int = gprn, int sprn) > /* Temporary placeholder */ > } > =20 > +__attribute__ ((unused)) > +static void spr_write_vtb(DisasContext *ctx, int gprn, int sprn) > +{ > + /* Temporary placeholder */ > +} Why "__attribute__ ((unused))" here (again)? > #endif > #endif > =20 > @@ -8089,10 +8095,11 @@ static void gen_spr_power8_ebb(CPUPPCState *env= ) > /* Virtual Time Base */ > static void gen_spr_vtb(CPUPPCState *env) > { > - spr_register(env, SPR_VTB, "VTB", > - SPR_NOACCESS, SPR_NOACCESS, > - &spr_read_tbl, SPR_NOACCESS, > - 0x00000000); > + spr_register_hv(env, SPR_VTB, "VTB", > + SPR_NOACCESS, SPR_NOACCESS, > + &spr_read_tbl, SPR_NOACCESS, > + &spr_read_tbl, spr_write_vtb, > + 0x00000000); > } I think it would also be possible to use spr_access_nop() for now instead of introducing more dummy functions like spr_write_vtb. Thomas