From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0as-0008FN-HA for qemu-devel@nongnu.org; Thu, 22 Sep 2016 05:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn0ao-0006bo-Bu for qemu-devel@nongnu.org; Thu, 22 Sep 2016 05:47:01 -0400 Received: from mo69.mail-out.ovh.net ([178.32.228.69]:33032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn0ao-0006av-1b for qemu-devel@nongnu.org; Thu, 22 Sep 2016 05:46:58 -0400 Received: from player779.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id 20AF3100866D for ; Thu, 22 Sep 2016 11:46:57 +0200 (CEST) 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> <20160922091842.6ab56101@thh440s> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <05ac76e7-0c1d-c610-46f5-37f4d6c64d97@kaod.org> Date: Thu, 22 Sep 2016 11:46:50 +0200 MIME-Version: 1.0 In-Reply-To: <20160922091842.6ab56101@thh440s> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Thomas Huth , David Gibson Cc: Anton Blanchard , qemu-ppc@nongnu.org, QEMU Developers On 09/22/2016 09:18 AM, Thomas Huth wrote: > On Thu, 22 Sep 2016 07:30:52 +0200 > Thomas Huth wrote: >=20 >> On Thu, 22 Sep 2016 11:57:15 +1000 >> David Gibson wrote: >> >>> 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. >>>>> >>>>> 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 >>>> >>>> Looking at the mail thread, I think TM should be currently disabled = for >>>> both, KVM-PR and TCG, i.e. only enabled for KVM-HV. The TM support i= n >>>> TCG is just fake, since TBEGIN always fails. >>> >>> Right. So there's two questions here >>> >>> 1) Is qemu correctly advertising availability of TM in the device >>> tree? >> >> 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). >> >>> If not we need to fix that, which might involve adding a kernel >>> capability for the PR case. >>> >>> 2) Is the kvm unit test properly checking for availability of TM >>> before executing? >> >> 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. >> >>>> 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 sho= uld >>>> also introduce a capability flag to KVM which can be used to inform = QEMU >>>> about this. >>>> >>>> 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 upd= ated >>>> version of that patch? >>> >>> Sorry, which patch of Anton's? >> >> This one: >> https://lists.gnu.org/archive/html/qemu-ppc/2016-04/msg00415.html >=20 > 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_20= 7. > 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. >=20 > 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...? >=20 > Thomas >=20 That would be nice. I just gave a quick try on a f24/le kvm-pr running=20 under a f24/le kvm-hv running under powernv. Only your couple of patches=20 plus Anton's are needed to make it work. Thanks, C.