Revision ef768138
b/target-i386/cpu.h | ||
---|---|---|
655 | 655 |
uint32_t cpuid_ext2_features; |
656 | 656 |
uint32_t cpuid_ext3_features; |
657 | 657 |
uint32_t cpuid_apic_id; |
658 |
int cpuid_vendor_override; |
|
658 | 659 |
|
659 | 660 |
/* MTRRs */ |
660 | 661 |
uint64_t mtrr_fixed[11]; |
b/target-i386/helper.c | ||
---|---|---|
116 | 116 |
uint32_t features, ext_features, ext2_features, ext3_features; |
117 | 117 |
uint32_t xlevel; |
118 | 118 |
char model_id[48]; |
119 |
int vendor_override; |
|
119 | 120 |
} x86_def_t; |
120 | 121 |
|
121 | 122 |
#define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE) |
... | ... | |
376 | 377 |
x86_cpu_def->vendor2 |= ((uint8_t)val[i + 4]) << (8 * i); |
377 | 378 |
x86_cpu_def->vendor3 |= ((uint8_t)val[i + 8]) << (8 * i); |
378 | 379 |
} |
380 |
x86_cpu_def->vendor_override = 1; |
|
379 | 381 |
} else if (!strcmp(featurestr, "model_id")) { |
380 | 382 |
pstrcpy(x86_cpu_def->model_id, sizeof(x86_cpu_def->model_id), |
381 | 383 |
val); |
... | ... | |
428 | 430 |
env->cpuid_vendor2 = CPUID_VENDOR_INTEL_2; |
429 | 431 |
env->cpuid_vendor3 = CPUID_VENDOR_INTEL_3; |
430 | 432 |
} |
433 |
env->cpuid_vendor_override = def->vendor_override; |
|
431 | 434 |
env->cpuid_level = def->level; |
432 | 435 |
if (def->family > 0x0f) |
433 | 436 |
env->cpuid_version = 0xf00 | ((def->family - 0x0f) << 20); |
... | ... | |
1506 | 1509 |
* isn't supported in compatibility mode on Intel. so advertise the |
1507 | 1510 |
* actuall cpu, and say goodbye to migration between different vendors |
1508 | 1511 |
* is you use compatibility mode. */ |
1509 |
if (kvm_enabled()) |
|
1512 |
if (kvm_enabled() && !env->cpuid_vendor_override)
|
|
1510 | 1513 |
host_cpuid(0, 0, NULL, ebx, ecx, edx); |
1511 | 1514 |
break; |
1512 | 1515 |
case 1: |
Also available in: Unified diff