From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmyHa-0006kn-1u for qemu-devel@nongnu.org; Thu, 22 Sep 2016 03:19:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmyHV-0004sn-Rb for qemu-devel@nongnu.org; Thu, 22 Sep 2016 03:18:57 -0400 Date: Thu, 22 Sep 2016 09:18:42 +0200 From: Thomas Huth Message-ID: <20160922091842.6ab56101@thh440s> In-Reply-To: <20160922073052.49560d19@thh440s> References: <75632046-c527-8d5f-6ac0-a40c28239579@redhat.com> <71298df5-d5de-e09f-5abd-9a8dbeefb16c@kaod.org> <3faff7d8-88f2-08c9-2d1d-6478872f4569@redhat.com> <07648f7a-24e2-9854-5d05-fe5dfb38c719@kaod.org> <37465716-edd3-de38-2b29-44a3093cf312@redhat.com> <20160922015715.GA2085@umbus.fritz.box> <20160922073052.49560d19@thh440s> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/PgBWJKvqHhkE3w2LvSiDlQX"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] [Qemu-ppc] KVM-PR is broken with current QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Anton Blanchard , qemu-ppc@nongnu.org, =?UTF-8?B?Q8OpZHJpYw==?= Le Goater , QEMU Developers --Sig_/PgBWJKvqHhkE3w2LvSiDlQX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 22 Sep 2016 07:30:52 +0200 Thomas Huth wrote: > On Thu, 22 Sep 2016 11:57:15 +1000 > David Gibson wrote: >=20 > > On Wed, Sep 21, 2016 at 10:22:11AM +0200, Thomas Huth wrote: > > > On 20.09.2016 16:39, C=C3=A9dric Le Goater wrote: > > > > On 09/20/2016 04:24 PM, Thomas Huth wrote: > > > >> On 20.09.2016 16:04, C=C3=A9dric Le Goater wrote: > > > [...] > > > >>> There are other issues after in the guest (kernel crashing). But = I think > > > >>> these are related to TM which is not supported in KVM-PR. I am no= t sure > > > >>> where we are on that point. > > > >> > > > >> There was a patch some months ago: > > > >> > > > >> https://lists.gnu.org/archive/html/qemu-ppc/2016-04/msg00046.html > > > >> > > > >> ... but I think it has never been included, as far as I can see. > > > >=20 > > > > and with that patch, the guest fully boots. But David had some conc= erns > > > > on the way it is done. It would be nice to put some cycle on this.= =20 > > >=20 > > > Looking at the mail thread, I think TM should be currently disabled f= or > > > both, KVM-PR and TCG, i.e. only enabled for KVM-HV. The TM support in > > > TCG is just fake, since TBEGIN always fails. > >=20 > > Right. So there's two questions here > >=20 > > 1) Is qemu correctly advertising availability of TM in the device > > tree? >=20 > If I've got that right, it's currently always advertising TM, even if > it's not really available (in TCG mode and PR mode). >=20 > > If not we need to fix that, which might involve adding a kernel > > capability for the PR case. > >=20 > > 2) Is the kvm unit test properly checking for availability of TM > > before executing? >=20 > Not yet. That's why it would be good to get a proper way for testing > for the availability of TM --> i.e. something like Anton's patch. >=20 > > > Once we've got proper TM support in TCG, this can be easily changed > > > within QEMU. And once we've got TM support in KVM-PR, I think we shou= ld > > > also introduce a capability flag to KVM which can be used to inform Q= EMU > > > about this. > > >=20 > > > So I think Anton's patch currently just lacks the check for TCG. > > > Anton, if you've got some spare minutes, could you maybe send an upda= ted > > > version of that patch? > >=20 > > Sorry, which patch of Anton's? >=20 > This one: > https://lists.gnu.org/archive/html/qemu-ppc/2016-04/msg00415.html Actually, looking at that whole pa-feature code in QEMU, I think there's some more work to do here: Everything that is not using mmu_model=3D=3DPOWERPC_MMU_2_06 is automatically getting pa_features_207. This is sometimes completely wrong, for example when running with KVM-PR, the mmu_model for POWER7 is POWERPC_MMU_2_06a instead. Or when running with TCG, I think it's also perfectly legal to run the pseries machine with a POWER5+ or PPC970 CPU - and we certainly do not want to use pa_features_207 there. So if you like, I can try to come up with a small patch series that cleans up this mess - and I could also include an updated versions of Anton's patch there unless he wants to redo the changes on his own...? Thomas --Sig_/PgBWJKvqHhkE3w2LvSiDlQX Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJX44XXAAoJEC7Z13T+cC21UjwP/ihaZ4xTQSV1yXiCNIv3V/LH bV10nup0EyqOcwuX/CnixMzXawPTGNgriS4sfswHKrX7cOaRhLVrMSSDV55OofOB vzf01lrhaVn9+2UCfH5Uf9IDP4o5dd6YJ9M/RZZpbn9cTSHqg8V3JcnrOQlYFDm0 MPMdf3U3RSa/aspD6bsG22AfHMBI5xbIqsDA4fX81LcKMpKkyAkIAWyQw/ZtmiQg CiQ9cELStAOV0IxPxVTS2+QJmy4jHxh3bwAyKuQ9YPt7rqfbX+F0kI5uIpmitMQD TtjPd6eRq7DGZ6wu+autNVXIlhHIsYOHTn1LRk/4Htyu1XFw950DPOcvRqKrTP55 nIR11IffYxSsC5cDhuiUGsccVNBPPZWm0Sa0BnTRliz0BimZOeY89tTGHbx+T7fl DPthsZuPpfV96Ky1G4dgV/o97vqcWmOPPuxwSpl5zwsCtIKHBFuW4JkwXEmifzNP bEqxkGls36DyWX6IOVegCGnT1KaDzab3vuc5M36y5W8ST0711GK4MU4BeCrvt9Bo +6hdxUfpvs8vKw4hWVE/WlwA1Q1X16f3qvV43dWKrFrF5ypapqizhavlmYG48FRg UBLVWZFZwRq96gIcJn7wWg2dW44XBi8S6wCqjrT8NPelk3NmfjEIbztXGCzLhHzG 0Pora+yVpVuB8ZGbBryC =OjvU -----END PGP SIGNATURE----- --Sig_/PgBWJKvqHhkE3w2LvSiDlQX--