On 06.11.2013, at 04:02, Paul Mackerras <pau...@samba.org> wrote: > On Tue, Nov 05, 2013 at 05:16:33PM +0100, Andreas Färber wrote: >> Am 05.11.2013 07:05, schrieb Alexander Graf: >>> >>> >>> Am 05.11.2013 um 05:00 schrieb Paul Mackerras <pau...@samba.org>: >>> >>>> On Mon, Nov 04, 2013 at 10:05:58AM +0100, Alexander Graf wrote: >>>>> >>>>> Yeah, we really need to check that guest vpcu == host vcpu for HV KVM. >>>> >>>> In general I agree, but the one difficulty I see is that a check for >>>> exact equality will interact badly with qemu's habit of picking a >>>> specific processor version when the user specifies something general >>>> like "POWER7". So if the user does -cpu POWER7 on a machine with >>>> (for example) a POWER7 v2.1 processor, but qemu arbitrarily picks the >>>> PVR for POWER7 v2.3, then it will fail, which will be completely >>>> puzzling to the user -- "I asked for POWER7, and it is a POWER7, >>>> what's the problem??". >>>> >>>> Maybe if the user asks for a non-specific processor type, and the >>>> host's PVR matches the request, then qemu should take the host's PVR >>>> rather than just picking some arbitrary processor version. >>> >>> Yup. >> >> But then it's no longer generally reproducible: "POWER7" won't be >> "POWER7" on another machine. > > There aren't any observable differences between POWER7 versions that > have been sold to customers, as far as I have been able to ascertain > (other than the PVR value, of course). So this whole business of > carefully distinguishing between POWER7 v2.2 and POWER7 v2.3 is > largely a waste of time as far as I can see. > > I admit that in the past we (IBM) did a silly thing in releasing the > POWER5+ v3.0 chip with some architecturally new features (64k pages > and some other MMU changes). That was a mistake and I don't think > we'll do it again. > > I think the default assumption should be that versions of a given IBM > POWER chip (identified by the upper 16 bits of the PVR) are > architecturally identical, and behaviourally identical at the level > at which QEMU models the chip. Differences between chips would > normally be limited to bug fixes and performance improvements. Then > we just need a way to cope with POWER5+ v3.0. > >> One thing I original did iirc was to hide the aliases from QMP. You can >> always do stupid things on the command line and then we can blame you, >> but if libvirt and upper layers don't offer "POWER7" to the end user >> then we don't need to worry about the average user misinterpreting its >> semantics. > > Given that the only difference between POWER7 v2.2 and POWER7 v2.3 > (say) will be which set of host systems you get an error on, there > doesn't seem to me to be a lot of point.
Given that for HV KVM the only possible cpu type that is ever guaranteed to work is -cpu host, why bother with a database that maintains compatibility flags between different versions? Just tell the user to use -cpu host and call it a day, no? Alex