From: Anthony Liguori <anthony@codemonkey.ws>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Alexander Graf <agraf@suse.de>
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
"Paul Mackerras" <paulus@samba.org>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [RFC PATCH] powerpc: add PVR mask support
Date: Thu, 15 Aug 2013 08:12:29 -0500 [thread overview]
Message-ID: <87vc37qerm.fsf@codemonkey.ws> (raw)
In-Reply-To: <1376548221.4255.103.camel@pasglop>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On Thu, 2013-08-15 at 08:03 +0200, Alexander Graf wrote:
>
>> >> How does the user select that he wants a v2.3 p7 cpu with this
>> patch?
>> >
>> > Why would he want that? The behaviour would not change because of
>> the
>> > version - all definitions use the same POWERPC_FAMILY(POWER7) and
>> PVR is
>> > not virtualized anyway.
>>
>> Quite frankly I don't know what to say here. Are you trying to play
>> dumb or are you just one of those totally sloppy people who don't care
>> about anything outside of their own scope of work?
>
> Can you stop the bloody personal attacks on Alexey ? It's becoming
> tiresome.
First, everyone needs to tone it down a couple levels. This isn't LKML
and Jonathan Corbet doesn't read qemu-devel so pithy remarks aren't
going to get you a quote of the week.
Everyone is talking past each other and no one is addressing the real
problem. There are two distinct issues here:
1) We have two ABIs that cannot be changed unless there's a very good
reason to. Alexey's original patch breaks both. The guest ABI
cannot change given a fixed command line.
IOW, the exposed PVR value for -cpu POWER7 cannot change across
versions of QEMU or when running on different hardware. This breaks
live migration and save/resume.
We also cannot break the command line interface. If the last version
of QEMU supported -cpu POWER7_v2.1, then we must continue to support
that.
If there's a good reason to break either of these, that's fine but
that justification needs be up front in the patch commit message.
2) The only "-cpu" that makes sense is "-cpu host" for KVM on HV (or
whatever ya'll call it). POWER does not have the ability to
virtualize the hardware PVR value. There is a virtual PVR in the
device tree but that's orthogonal to what we think of as the VCPU (it
essentially means IIUC that the cpu is compatible with that PVR).
We should explicitly disallow any -cpu value when KVM on HV is
enabled other than host.
The implementation of "-cpu host" is also goofy on PPC. -cpu host
does a match on existing CPU models meaning that we have to define a
CPU model for any possible CPU we run on. This would require having
every possible CPU model implemented in QEMU which is silly.
Instead, we should have a passthrough CPU model for use with "-cpu
host" which is essentially what Alexey's patch turns -cpu POWER7
into.
Regards,
Anthony Liguori
>
> He makes a very valid point. The ability to specify a specific revision
> of the processor is pointless for pretty much any use case we have in
> mind at the moment, and is even more pointless as long as we emulate
> them all exactly the same way.
>
> Besides, we can probably still organize the table from "more precise" to
> "less precise" entries and match that way if you *really* want to have
> specific entries for obscure revision of the chip.
>
> Ben.
>
>> With HV KVM we can not trap PVR, yes. With PR KVM we do trap PVR and
>> we emulate it. With TCG we do trap PVR and we emulate it.
>>
>> > May be (may be) ppc_cpu_class_by_name() needs to be fixed to try to
>> find
>> > the PPC CPU class with the biggest mask to choose (for example)
>> > 004a0201/ffffffff rather than more common 004a0000/ffff0000 (if
>> 004a0201 is
>> > added to the list separately from the common definition for some
>> reason).
>>
>> I think the class split as Linux has it should work just fine, no?
>>
>>
>> Alex
next prev parent reply other threads:[~2013-08-15 13:12 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 3:35 [Qemu-devel] [RFC PATCH] powerpc: add PVR mask support Alexey Kardashevskiy
2013-08-15 5:21 ` Alexander Graf
2013-08-15 5:44 ` Alexey Kardashevskiy
2013-08-15 6:03 ` Alexander Graf
2013-08-15 6:30 ` Benjamin Herrenschmidt
2013-08-15 6:39 ` Alexander Graf
2013-08-15 13:12 ` Anthony Liguori [this message]
2013-08-15 13:33 ` Alexander Graf
2013-08-15 15:11 ` Andreas Färber
2013-08-15 15:30 ` Alexander Graf
2013-08-15 15:48 ` Andreas Färber
2013-08-15 15:58 ` Alexander Graf
2013-08-15 16:22 ` Andreas Färber
2013-08-15 17:01 ` Alexander Graf
2013-08-15 16:04 ` Anthony Liguori
2013-08-15 5:54 ` Benjamin Herrenschmidt
2013-08-15 6:10 ` Alexander Graf
2013-08-15 6:28 ` Benjamin Herrenschmidt
2013-08-15 6:37 ` Alexander Graf
2013-08-15 6:00 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2013-08-15 6:43 ` [Qemu-devel] [_R_F_C_ PATCH v2] " Alexey Kardashevskiy
2013-08-15 6:57 ` Alexander Graf
2013-08-15 7:45 ` [Qemu-devel] [RFC PATCH v3] " Alexey Kardashevskiy
2013-08-15 7:55 ` Alexander Graf
2013-08-15 8:06 ` Alexey Kardashevskiy
2013-08-15 8:45 ` Alexander Graf
2013-08-15 10:52 ` Andreas Färber
2013-08-15 11:03 ` Alexander Graf
2013-08-15 11:48 ` Andreas Färber
2013-08-15 11:59 ` Alexander Graf
2013-08-19 17:13 ` Andreas Färber
2013-08-15 13:55 ` Alexey Kardashevskiy
2013-08-15 14:47 ` Andreas Färber
2013-08-15 15:29 ` Alexander Graf
2013-08-15 15:43 ` Andreas Färber
2013-08-15 15:51 ` Alexander Graf
2013-08-15 16:08 ` Andreas Färber
2013-08-15 16:17 ` Alexander Graf
2013-08-16 0:20 ` Benjamin Herrenschmidt
2013-08-16 0:28 ` Anthony Liguori
2013-08-16 0:30 ` Benjamin Herrenschmidt
2013-08-19 17:34 ` Andreas Färber
2013-08-16 8:07 ` Alexey Kardashevskiy
2013-08-19 4:06 ` [Qemu-devel] [RFC PATCH v4] " Alexey Kardashevskiy
2013-08-26 13:04 ` Alexander Graf
2013-08-26 14:32 ` Andreas Färber
2013-08-28 10:31 ` Alexey Kardashevskiy
2013-08-28 10:34 ` Andreas Färber
2013-08-15 14:43 ` [Qemu-devel] [RFC PATCH v3] " Alexey Kardashevskiy
2013-08-15 15:17 ` Alexander Graf
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=87vc37qerm.fsf@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=benh@kernel.crashing.org \
--cc=paulus@samba.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.