Lines Matching +full:4 +full:- +full:cpu

2  * x86 host CPU functions, and "host" cpu type initialization
7 * See the COPYING file in the top-level directory.
11 #include "cpu.h"
12 #include "host-cpu.h"
14 #include "qemu/error-report.h"
17 /* Note: Only safe for use on x86(-64) hosts */
45 static void host_cpu_adjust_phys_bits(X86CPU *cpu) in host_cpu_adjust_phys_bits() argument
48 uint32_t phys_bits = cpu->phys_bits; in host_cpu_adjust_phys_bits()
56 " does not match phys-bits property (%u)", in host_cpu_adjust_phys_bits()
60 if (cpu->host_phys_bits) { in host_cpu_adjust_phys_bits()
63 if (cpu->host_phys_bits_limit && in host_cpu_adjust_phys_bits()
64 phys_bits > cpu->host_phys_bits_limit) { in host_cpu_adjust_phys_bits()
65 phys_bits = cpu->host_phys_bits_limit; in host_cpu_adjust_phys_bits()
69 cpu->phys_bits = phys_bits; in host_cpu_adjust_phys_bits()
74 X86CPU *cpu = X86_CPU(cs); in host_cpu_realizefn() local
75 CPUX86State *env = &cpu->env; in host_cpu_realizefn()
77 if (env->features[FEAT_8000_0001_EDX] & CPUID_EXT2_LM) { in host_cpu_realizefn()
78 host_cpu_adjust_phys_bits(cpu); in host_cpu_realizefn()
86 * Get CPUID model ID string from host CPU.
100 memcpy(str + i * 16 + 0, &eax, 4); in host_cpu_fill_model_id()
101 memcpy(str + i * 16 + 4, &ebx, 4); in host_cpu_fill_model_id()
102 memcpy(str + i * 16 + 8, &ecx, 4); in host_cpu_fill_model_id()
103 memcpy(str + i * 16 + 12, &edx, 4); in host_cpu_fill_model_id()
120 *model = ((eax >> 4) & 0x0F) | ((eax & 0xF0000) >> 12); in host_cpu_vendor_fms()
127 void host_cpu_instance_init(X86CPU *cpu) in host_cpu_instance_init() argument
129 X86CPUClass *xcc = X86_CPU_GET_CLASS(cpu); in host_cpu_instance_init()
131 if (xcc->model) { in host_cpu_instance_init()
137 object_property_set_str(OBJECT(cpu), "vendor", vendor, &error_abort); in host_cpu_instance_init()
141 void host_cpu_max_instance_init(X86CPU *cpu) in host_cpu_max_instance_init() argument
147 /* Use max host physical address bits if -cpu max option is applied */ in host_cpu_max_instance_init()
148 object_property_set_bool(OBJECT(cpu), "host-phys-bits", true, &error_abort); in host_cpu_max_instance_init()
153 object_property_set_str(OBJECT(cpu), "vendor", vendor, &error_abort); in host_cpu_max_instance_init()
154 object_property_set_int(OBJECT(cpu), "family", family, &error_abort); in host_cpu_max_instance_init()
155 object_property_set_int(OBJECT(cpu), "model", model, &error_abort); in host_cpu_max_instance_init()
156 object_property_set_int(OBJECT(cpu), "stepping", stepping, in host_cpu_max_instance_init()
158 object_property_set_str(OBJECT(cpu), "model-id", model_id, in host_cpu_max_instance_init()
166 xcc->host_cpuid_required = true; in host_cpu_class_init()
167 xcc->ordering = 8; in host_cpu_class_init()
168 xcc->model_description = in host_cpu_class_init()