qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "Anton Blanchard" <anton@ozlabs.org>,
	qemu-ppc@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] KVM-PR is broken with current QEMU
Date: Thu, 22 Sep 2016 09:18:42 +0200	[thread overview]
Message-ID: <20160922091842.6ab56101@thh440s> (raw)
In-Reply-To: <20160922073052.49560d19@thh440s>

[-- Attachment #1: Type: text/plain, Size: 3163 bytes --]

On Thu, 22 Sep 2016 07:30:52 +0200
Thomas Huth <thuth@redhat.com> wrote:

> On Thu, 22 Sep 2016 11:57:15 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
> 
> > On Wed, Sep 21, 2016 at 10:22:11AM +0200, Thomas Huth wrote:
> > > On 20.09.2016 16:39, Cédric Le Goater wrote:
> > > > On 09/20/2016 04:24 PM, Thomas Huth wrote:
> > > >> On 20.09.2016 16:04, Cédric 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 not 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 concerns
> > > > on the way it is done. It would be nice to put some cycle on this. 
> > > 
> > > 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 in
> > > 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 should
> > > 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 updated
> > > version of that patch?
> > 
> > Sorry, which patch of Anton's?
> 
> 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==POWERPC_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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-09-22  7:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 11:44 [Qemu-devel] KVM-PR is broken with current QEMU Thomas Huth
2016-09-20 12:24 ` Cédric Le Goater
2016-09-20 14:04   ` [Qemu-devel] [Qemu-ppc] " Cédric Le Goater
2016-09-20 14:24     ` Thomas Huth
2016-09-20 14:39       ` Cédric Le Goater
2016-09-21  8:22         ` Thomas Huth
2016-09-22  1:57           ` David Gibson
2016-09-22  5:30             ` Thomas Huth
2016-09-22  7:18               ` Thomas Huth [this message]
2016-09-22  9:46                 ` Cédric Le Goater
2016-09-22  9:57                 ` Anton Blanchard
2016-09-20 21:45 ` [Qemu-devel] " Benjamin Herrenschmidt
2016-09-21  7:45   ` Thomas Huth
2016-09-22  6:25   ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160922091842.6ab56101@thh440s \
    --to=thuth@redhat.com \
    --cc=anton@ozlabs.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).