Statistics
| Branch: | Revision:

root / target-i386 / cpu.c @ f7b2429f

History | View | Annotate | Download (58.5 kB)

# Date Author Comment
09faecf2 06/22/2012 12:34 pm Stefan Weil

target-i386: Use QEMU instead of Qemu

This new 'QEmu' was recently added.
Replace it by the official all upper case 'QEMU'.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

93bfef4c 06/19/2012 09:36 pm Crístian Viana

Allow machines to configure the QEMU_VERSION that's exposed via hardware

QEMU exposes its version to the guest's hardware and in some cases that is wrong
(e.g. Windows prints messages about driver updates when you switch
the QEMU version).
There is a new field now on the struct QEmuMachine, hw_version, which may...

fa029887 06/08/2012 05:11 pm Andreas Färber

target-i386: Use uint32 visitor for [x]level properties

This simplifies the code and resolves TODOs.

Signed-off-by: Andreas Färber <>
Reviewed-by: Michael Roth <>

13526728 05/30/2012 05:28 am Eduardo Habkost

Expose CPUID leaf 7 only for -cpu host

Changes v2 -> v3;
- Check for kvm_enabled() before setting cpuid_7_0_ebx_features

Changes v1 -> v2:
- Use kvm_arch_get_supported_cpuid() instead of host_cpuid() on
cpu_x86_fill_host().

We should use GET_SUPPORTED_CPUID for all bits on "-cpu host"...
7a059953 05/12/2012 03:17 pm Andreas Färber

target-i386: Defer MCE init

Commit de024815e3b523addf58f1f79846b7fe74643678 (target-i386: QOM'ify
CPU init) moved mce_init() call from helper.c:cpu_x86_init() into
X86CPU's cpu.c:x86_cpu_initfn().
mce_init() checks for a family >= 6 though, so we could end up with a...

16b93aa8 04/25/2012 11:51 am Andreas Färber

target-i386: Introduce "xlevel" property for X86CPU

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

d480e1af 04/25/2012 11:51 am Andreas Färber

target-i386: Prepare "vendor" property for X86CPU

Using it now would incur converting the three x86_def_t vendor words
into a string for object_property_set_str(), then back to three words
in the "vendor" setter.
The built-in CPU definitions use numeric preprocessor defines to...

89e48965 04/25/2012 11:51 am Andreas Färber

target-i386: Introduce "tsc-frequency" property for X86CPU

Use Hz as unit.

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

61dcd775 04/25/2012 11:51 am Andreas Färber

target-i386: Pass X86CPU to cpu_x86_register()

Avoids an x86_env_get_cpu() call there, to work with QOM properties.

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

a88a677f 04/25/2012 11:51 am Andreas Färber

target-i386: Add range check for -cpu ,family=x

A family field value of 0xf and extended family field value of 0xff is
the maximum representable unsigned family number.
All other CPUID property values are bounds-checked, so add a check here
for symmetry before we adopt it in a property setter....

71ad61d3 04/25/2012 11:51 am Andreas Färber

target-i386: Add "family" property to X86CPU

Add the property early in the initfn so that it can be used in helpers
such as mce_init().

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
[AF: Add an error_free(), spotted by Michael Roth]...

c5291a4f 04/25/2012 11:51 am Andreas Färber

target-i386: Add "model" property to X86CPU

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

036e2222 04/25/2012 11:51 am Andreas Färber

target-i386: Add "stepping" property to X86CPU

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

938d4c25 04/25/2012 11:51 am Andreas Färber

target-i386: Add "model-id" property to X86CPU

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

95b8519d 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU family

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

67e30c83 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU model

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>
Reviewed-by: Michael Roth <>

35112e41 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU stepping

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

63e886eb 04/25/2012 11:51 am Andreas Färber

target-i386: Add property getter for CPU model-id

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

8e1898bf 04/25/2012 11:51 am Andreas Färber

target-i386: Introduce "level" property for X86CPU

Signed-off-by: Andreas Färber <>
Reviewed-by: Eduardo Habkost <>
Reviewed-by: Igor Mammedov <>

d0a6acf4 04/25/2012 11:45 am Andreas Färber

target-i386: Fix x86_cpuid_set_model_id()

Don't assume zeroed cpuid_model[] fields.

This didn't break anything yet but QOM properties should be able to set
the value to something else without setting an intermediate zero string.

Reviewed-by: Eduardo Habhost <>...

30471bc9 04/10/2012 06:10 pm Andreas Färber

target-i386: Rename cpuid.c

Name it cpu.c to align with other QOM'ified targets.

Signed-off-by: Andreas Färber <>

5fd2087a 04/10/2012 06:10 pm Andreas Färber

target-i386: QOM'ify CPU

Embed CPUX86State as first member of X86CPU.
Distinguish between "x86_64-cpu" and "i386-cpu".
Drop cpu_x86_close() in favor of calling object_delete() directly.

For now let CPUClass::reset() call cpu_state_reset().

Signed-off-by: Andreas Färber <>

de024815 04/10/2012 06:10 pm Andreas Färber

target-i386: QOM'ify CPU init

Move code from cpu_x86_init() to new QOM x86_cpu_initfn().
Also move mce_init() to cpu.c since it's used nowhere else.

Signed-off-by: Andreas Färber <>

c1958aea 04/10/2012 06:10 pm Andreas Färber

target-i386: QOM'ify CPU reset

Move code from cpu_state_reset() into QOM x86_cpu_reset(),
fixing style issues for FPU init.

Signed-off-by: Andreas Färber <>