From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQaAo-0005tb-2f for qemu-devel@nongnu.org; Thu, 20 Mar 2014 06:26:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQaAg-0000fZ-Qy for qemu-devel@nongnu.org; Thu, 20 Mar 2014 06:26:06 -0400 Received: from [217.156.133.130] (port=55859 helo=imgpgp01.kl.imgtec.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQaAg-0000fH-Hg for qemu-devel@nongnu.org; Thu, 20 Mar 2014 06:25:58 -0400 Message-ID: <532ABE38.60806@imgtec.com> Date: Thu, 20 Mar 2014 10:08:56 +0000 From: James Hogan MIME-Version: 1.0 References: <1394801281-18997-1-git-send-email-james.hogan@imgtec.com> <1394801281-18997-5-git-send-email-james.hogan@imgtec.com> <5329C6D1.7020904@redhat.com> In-Reply-To: <5329C6D1.7020904@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qlRlhWGdS79FpujbApgaE4CWugDvieGn4" Subject: Re: [Qemu-devel] [PATCH v4 04/10] target-mips: get_physical_address: Add KVM awareness List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Aurelien Jarno , Gleb Natapov , qemu-devel@nongnu.org, kvm@vger.kernel.org, Sanjay Lal --qlRlhWGdS79FpujbApgaE4CWugDvieGn4 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 19/03/14 16:33, Paolo Bonzini wrote: > Il 14/03/2014 13:47, James Hogan ha scritto: >> + if (kvm_enabled()) { >> + /* KVM T&E adds guest kernel segments in useg */ >> + if (real_address >=3D KVM_KSEG0_BASE) { >> + if (real_address < KVM_KSEG2_BASE) { >> + /* kseg0 */ >> + address +=3D KSEG0_BASE - KVM_KSEG0_BASE; >> + } else if (real_address <=3D USEG_LIMIT) { >> + /* kseg2/3 */ >> + address +=3D KSEG2_BASE - KVM_KSEG2_BASE; >> + } >> + } >> + } >=20 > Besides changing the segment bases, is there anything else to do to run= > KVM-enabled kernels under TCG? (I know nothing about MIPS and it > shows). We should consider adding a knob to run them in TCG mode. >=20 > This is not blocking this series, and I'm okay with helping or even > doing the work, if somebody tells me what to do. :) That's a good idea. It's pretty much just the extra segments I think. In TCG mode the bootloader wouldn't even need to do anything different since it can translate fine from the reset vector in kseg1 (where a KVM guest cannot execute from) and it'll still jump to the kernel entry point from the ELF. I'll add it to my list :) Cheers James --qlRlhWGdS79FpujbApgaE4CWugDvieGn4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQIcBAEBAgAGBQJTKr44AAoJEGwLaZPeOHZ6rOMP/i5W5nlIepoGuRZ1CnX8CcUZ zjKRBjC4AH4wCE/BdOjIZGYK57WQ2t943ncjOh5sOv6Ovf5YIBUIO1aS1ASBjmNp 5ExklbKOU9uBd6aGtA4Kkm2yR/JBmDufknX3sBSKyZEmvx/fL9aWsrItcPoU2RG3 UtbSAzGC9yWGBur4nJRnuZdf4lVVWOGnfr4R+S7Xqpwrw2erp06TECURFQn3Qg1y 6Fq3thJL+DaZJhckTCLf+MDnuOi4QCEABVRPVRkiDm9PIfXerAeenpKcoCbLn50W bEWs5vbwJBOEOsQklDcjn3L5kJjOK71KCqJe5tPR0roxhRH72H383hH8LtBd9bUJ y8+cwDtCLVE+ABOTQ02oeOPUpyuNVKAi5n8b5Qc5zWs9VLnjUx2NbgDb6RNDS4Tv y+5PWvywjETifiuZJ2q8/pXeEin+akLmyftvDXGN002qNHwSXoDsKFw8i/uRwDyC 1fKkoKm0haatpXw9+U3mPKgsNU7rU1P0TG7ox8X+6IGhbnmvaxrT2jZTSZeCgGSG b7cYaR+UP6osmw9pQ+q/mTt59+OksaRetD17XCKFvpDdWjOxU1yt8M3LFr4hm51B hupRNalW9AmkeBgXaIMlLPilinMUv8wxKg1ygXI/WaKoL5NhJJ5uB+ltaDRZvYFt AQt1FYPXhHM7ItpEhJkY =V3ks -----END PGP SIGNATURE----- --qlRlhWGdS79FpujbApgaE4CWugDvieGn4--