Revision 95b8519d

b/target-i386/cpu.c
599 599
    return rv;
600 600
}
601 601

  
602
static void x86_cpuid_version_get_family(Object *obj, Visitor *v, void *opaque,
603
                                         const char *name, Error **errp)
604
{
605
    X86CPU *cpu = X86_CPU(obj);
606
    CPUX86State *env = &cpu->env;
607
    int64_t value;
608

  
609
    value = (env->cpuid_version >> 8) & 0xf;
610
    if (value == 0xf) {
611
        value += (env->cpuid_version >> 20) & 0xff;
612
    }
613
    visit_type_int(v, &value, name, errp);
614
}
615

  
602 616
static void x86_cpuid_version_set_family(Object *obj, Visitor *v, void *opaque,
603 617
                                         const char *name, Error **errp)
604 618
{
......
1538 1552
    cpu_exec_init(env);
1539 1553

  
1540 1554
    object_property_add(obj, "family", "int",
1541
                        NULL,
1555
                        x86_cpuid_version_get_family,
1542 1556
                        x86_cpuid_version_set_family, NULL, NULL, NULL);
1543 1557
    object_property_add(obj, "model", "int",
1544 1558
                        NULL,

Also available in: Unified diff