qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [PATCH] Revert "target-ppc: Create versionless CPU cla


From: Andreas Färber
Subject: Re: [Qemu-stable] [PATCH] Revert "target-ppc: Create versionless CPU class per family if KVM"
Date: Mon, 02 Mar 2015 15:07:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Am 02.03.2015 um 14:51 schrieb Alexander Graf:
> On 02.03.15 14:42, Andreas Färber wrote:
>> Am 02.03.2015 um 14:37 schrieb Alexander Graf:
>>> On 01.03.15 01:31, Andreas Färber wrote:
>>>> This reverts commit 5b79b1cadd3e565b6d1a5ba59764bd47af58b271 to avoid
>>>> double-registration of types:
>>>>
>>>>   Registering `POWER5+-powerpc64-cpu' which already exists
>>>>
>>>> Taking the textual description of a CPU type as part of a new type name
>>>> is plain wrong, and so is unconditionally registering a new type here.
>>>>
>>>> Cc: Alexey Kardashevskiy <address@hidden>
>>>> Cc: address@hidden
>>>> Signed-off-by: Andreas Färber <address@hidden>
>>>
>>> Doesn't this break p8 support?
>>
>> Maybe, but p5 support was in longer and this is definitely a regression
>> and really really wrong. If you know a way to fix it without handing it
>> back to the IBM guys for more thought, feel free to give it a shot.
> 
> I honestly don't fully remember what this was about. Wasn't this our
> special KVM class that we use to create a compatible cpu type on the fly?

No, the class I create on the fly is a few lines above:

    pvr_pcc = ppc_cpu_class_by_pvr(host_pvr);
    if (pvr_pcc == NULL) {
        pvr_pcc = ppc_cpu_class_by_pvr_mask(host_pvr);
    }
    if (pvr_pcc == NULL) {
        return -1;
    }
    type_info.parent = object_class_get_name(OBJECT_CLASS(pvr_pcc));
    type_register(&type_info);

So, if no matching class is returned, we never reach the offending code.

Here, a second type with the same parent was being created in the
kvm_ppc_register_host_cpu_type() function that is supposed to create
that host CPU type. Why? The host CPU type by definition should already
have the right PVR taken from the host. kvmppc_host_cpu_class_init():

    /* Now fix up the class with information we can query from the host */
    pcc->pvr = mfpvr();

> Alexey, please take a look at it.

Thanks,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]