From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agKIW-0000mN-J8 for qemu-devel@nongnu.org; Wed, 16 Mar 2016 18:52:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agKIS-0005rH-Eo for qemu-devel@nongnu.org; Wed, 16 Mar 2016 18:52:12 -0400 Date: Thu, 17 Mar 2016 09:28:46 +1100 From: David Gibson Message-ID: <20160316222846.GH9032@voom> References: <1457974600-13828-1-git-send-email-clg@fr.ibm.com> <1457974600-13828-17-git-send-email-clg@fr.ibm.com> <20160316011446.GY9032@voom> <56E8FC01.4040700@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T+d4WTH4wtHHX3b6" Content-Disposition: inline In-Reply-To: <56E8FC01.4040700@redhat.com> Subject: Re: [Qemu-devel] [PATCH 16/17] ppc: Add dummy CIABR SPR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: =?iso-8859-1?Q?C=E9dric?= Le Goater , qemu-ppc@nongnu.org, qemu-devel@nongnu.org --T+d4WTH4wtHHX3b6 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 16, 2016 at 07:24:01AM +0100, Thomas Huth wrote: > On 16.03.2016 02:14, David Gibson wrote: > > On Mon, Mar 14, 2016 at 05:56:39PM +0100, C=E9dric Le Goater wrote: > >> From: Benjamin Herrenschmidt > >> > >> We should implement HW breakpoint/watchpoint, qemu supports them... > >> > >> Signed-off-by: Benjamin Herrenschmidt > >=20 > > Reviewed-by: David Gibson > >=20 > > But I'm assuming 2.7, not 2.6. >=20 > Looks like this register can be set by the guest using the H_SET_MODE > hypercall, too (search for H_SET_MODE_RESOURCE_SET_CIABR in the KVM > kernel sources), similar to the DAWR register. > And this patch is using KVM_REG_PPC_CIABR to link this register with the > KVM code in the kernel ... so I think this patch should still go into > 2.6 to make sure that the register is migrated properly. Good point, not sure how I missed that. >=20 > Thomas >=20 > >> --- > >> target-ppc/cpu.h | 1 + > >> target-ppc/translate_init.c | 5 +++++ > >> 2 files changed, 6 insertions(+) > >> > >> diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h > >> index 5203cc6a3bfb..9e1ef10b7dc6 100644 > >> --- a/target-ppc/cpu.h > >> +++ b/target-ppc/cpu.h > >> @@ -1400,6 +1400,7 @@ static inline int cpu_mmu_index (CPUPPCState *en= v, bool ifetch) > >> #define SPR_DAWR (0x0B4) > >> #define SPR_MPPR (0x0B8) > >> #define SPR_RPR (0x0BA) > >> +#define SPR_CIABR (0x0BB) > >> #define SPR_DAWRX (0x0BC) > >> #define SPR_HFSCR (0x0BE) > >> #define SPR_VRSAVE (0x100) > >> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > >> index cfb1bc088950..f88bdf7b3cd1 100644 > >> --- a/target-ppc/translate_init.c > >> +++ b/target-ppc/translate_init.c > >> @@ -7603,6 +7603,11 @@ static void gen_spr_book3s_207_dbg(CPUPPCState = *env) > >> SPR_NOACCESS, SPR_NOACCESS, > >> &spr_read_generic, &spr_write_generic, > >> KVM_REG_PPC_DAWRX, 0x00000000); > >> + spr_register_kvm_hv(env, SPR_CIABR, "CIABR", > >> + SPR_NOACCESS, SPR_NOACCESS, > >> + SPR_NOACCESS, SPR_NOACCESS, > >> + &spr_read_generic, &spr_write_generic, > >> + KVM_REG_PPC_CIABR, 0x00000000); > >> } > >> =20 > >> static void gen_spr_970_dbg(CPUPPCState *env) > >=20 >=20 >=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 --T+d4WTH4wtHHX3b6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW6d4dAAoJEGw4ysog2bOSSFUQAJmdKEHOpVlR2VCilhHvqcw8 mflQaRgzzsf08o5RFci9U2WQTvk9DvFzYVI1AfIzvpB+GCmkKxwBrE/A8/JSXEpB gJgEGnj/PAPd/Xjky+/GniGzyJjfAx4V6OlLK+kBsrKjEDKo34vXgv6hN5jj1wz5 XJT4r9hMicZZG2sjhRwWVroJ7T310K5HWFXGpPhWitQOtBRrSd7WZ8uDCY1aZ3vc 81wIRdW5T9dK5qsSAySmCu3LCzYIWhOff7TyOx7VQrcg3JD2A3/vmrj4nFivz9NW RlbOXJ2sN1WrKNpat2RL/tX4olTMV6+IoAPmp/Ehyo0FvVmN8Qkotv9/5Hf/2Hp6 icv/jWlgQPiZlXtq7krrdd69xiBfu7XYa187zrpomrfvxq40M2kPqq6iYVduhbaU RUNdX604aWQDoBcWCLmpIN2madOLw59pAD+zF5GX1nz3gK6nX4mLlgedNYcWDGdQ x6u9536Uhv+EoCBXmMSzD1+U3CjEhtuJYouSTsI85ta+YJjjyaxK9Q5wX2UbX2t8 HzTBmBoaDX+D5VGPFY6e82R9tyGfhN7U1VNQIAOymPSG4456V/B+xn31L+0hLZRW K0qSGIwW8n7sh2jbt0bgI7q5RmeHsC+60fTQbS6vjGdV+zfUCx1NwnGBsMvLVe73 Snz3rYaSUpDvXrFKIBuT =Uqhb -----END PGP SIGNATURE----- --T+d4WTH4wtHHX3b6--