From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [PATCH 04/21] MIPS: KVM: Fix CP0_EBASE KVM register id Date: Fri, 25 Apr 2014 20:22:40 +0100 Message-ID: <6139466.gSWQB3IZPa@radagast> References: <1398439204-26171-1-git-send-email-james.hogan@imgtec.com> <1398439204-26171-5-git-send-email-james.hogan@imgtec.com> <535A8F22.4090402@caviumnetworks.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1475874.trHGXRUAiO"; micalg="pgp-sha1"; protocol="application/pgp-signature" Cc: David Daney , Paolo Bonzini , Gleb Natapov , kvm@vger.kernel.org, Ralf Baechle , David Daney , Sanjay Lal To: linux-mips@linux-mips.org Return-path: Received: from mail-we0-f174.google.com ([74.125.82.174]:62174 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753015AbaDYTW6 (ORCPT ); Fri, 25 Apr 2014 15:22:58 -0400 Received: by mail-we0-f174.google.com with SMTP id w62so2763020wes.19 for ; Fri, 25 Apr 2014 12:22:57 -0700 (PDT) In-Reply-To: <535A8F22.4090402@caviumnetworks.com> Sender: kvm-owner@vger.kernel.org List-ID: --nextPart1475874.trHGXRUAiO Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Hi David, On Friday 25 April 2014 09:36:50 David Daney wrote: > On 04/25/2014 08:19 AM, James Hogan wrote: > > -#define KVM_REG_MIPS_CP0_EBASE=09=09MIPS_CP0_64(15, 1) > > +#define KVM_REG_MIPS_CP0_EBASE=09=09MIPS_CP0_32(15, 1) >=20 > According to: >=20 > MIPS=AE Architecture Reference Manual > Volume III: The MIPS64=AE and > microMIPS64TM Privileged Resource > Architecture >=20 > Document Number: MD00089 > Revision 5.02 > April 30, 2013 >=20 > In section 9.39 EBase Register (CP0 Register 15, Select 1), we see th= at > EBase can be either 32-bits or 64-bits wide. >=20 > I would recommend leaving this as a 64-bit wide register, so that CPU= > implementations with the wider EBase can be supported. Yes, you're quite right. I should have checked that one for carefully (= I did=20 think it was a bit odd for it to be 32bit on MIPS64). I'll drop this pa= tch. Thanks James >=20 > Alternately, probe for the width and use the appropriate 32-bit or > 64-bit to more closely reflect reality. >=20 > > #define KVM_REG_MIPS_CP0_CONFIG=09=09MIPS_CP0_32(16, 0) > > #define KVM_REG_MIPS_CP0_CONFIG1=09MIPS_CP0_32(16, 1) > > #define KVM_REG_MIPS_CP0_CONFIG2=09MIPS_CP0_32(16, 2) --nextPart1475874.trHGXRUAiO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTWrYOAAoJEKHZs+irPybfsrEP/3bnml+heYrpVKp+JGLiDNGm lD3n14J7Kzcaq8FWFINHXsAYc0nL+U23K3iPCN/nycc5fqQqpR+VTv/xkGPTa5g/ FUaFFNtH1Z7jUzTqwCmLL8X6gnhmXCP2tMV2nm0ltMCk+HloqwTS6eRo3/LISYOE ifW95Tji5yH/3im9Wz8nHaB5p7bRcOF3AdCYSW/MRhTnzTnwTe3LliWyTsa6rHhs UW/l7Y20WgdTWWA61NLpMUnP3UkscUjiRg4QK4utKKTzgbGWhEbNAt8DSPyjwXrg 3Ua54U63Oafx1M10LU/oWIo1aRGEswGjrfTCLhBd3L0hnTAUsbMzZfAqcEQzNlkI ptZQ8fZip06QdNkJWLONp8RF/Hv4IuzaNyEetoV+E9fxRzOp9FAMB/HNMJmknc77 Tlb0CJuKs8PuKf8lAsZL6aVEBDSZjorogL3X6sLJRR+fqR/AYm4UXw2X9h0ZCFL1 9b/Mg9/oLKYLe5uUqgNrZk9dlGuXJcO4MJUsfl4ZZDLvW9w+wNBMsX9wtJ366h+m I7e6X4di4Wpc/Ciyb/BSZZK4YF/zeSoIds+0tK/nt8GGD3L9+jfsJe+gJo6h8VSM /jeOM3CPz7SLbeBTPlZYUnYwgcQp19VttftUG/JCByNw1SsAbI2ja0BwSv+mJcyC aaGepKIq4ZtGO2scK2Ad =am+u -----END PGP SIGNATURE----- --nextPart1475874.trHGXRUAiO--