Statistics
| Branch: | Revision:

root / target-i386 / cpuid.c @ 8c0d577e

History | View | Annotate | Download (39.6 kB)

# Date Author Comment
c6dc6f63 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: move CPUID functions into separate file

about half of target-i386/helper.c consist of CPUID related functions.
Only one of them is a real TCG helper function. So move the whole
CPUID stuff out of this into a separate file to get better
maintainable parts....

42673936 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: replace magic number with named constant

CPUID leaf Fn8000_0001.EDX contains a copy of many Fn0000_0001.EDX bits.
Define a name for this mask to improve readability and avoid typos.

Signed-off-by: Andre Przywara <>
Signed-off-by: Aurelien Jarno <>

4d067ed7 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: fix missing feature set bits

This one was accidently removed with commit
bb0300dc57c10b3721451b0ff566a03f9276cc77

Signed-off-by: Andre Przywara <>
Signed-off-by: Aurelien Jarno <>

bdde476a 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: moved host_cpuid function and remove prototype

the host_cpuid function was located at the end of the file and had
a prototype before it's first use. Move it up and remove the
prototype.

Signed-off-by: Andre Przywara <>
Signed-off-by: Aurelien Jarno <>

e117f772 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: add missing CPUID feature flag names

Some CPUID feature flags had no string value, so they could not be
switched on or off from the command line.
Add names for the missing ones mentioned in the current public CPUID
specification from both Intel and AMD. Those only mentioned in the...

ed2c54d4 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: add "host" to the list of supported CPU models

Signed-off-by: Andre Przywara <>
Signed-off-by: Aurelien Jarno <>

551a2dec 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: add TCG feature bit trimming

In KVM we trim the user provided CPUID bits to match the host CPU's
one. Introduce a similar feature to QEMU/TCG. Create a mask of TCG's
capabilities and apply it to the user bits.
This allows to let the CPU models reflect their native archetypes....

d3bf5915 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: Always expose 32 and 64-bit CPUs

Since 64-bit capability is just another CPUID bit we now properly
mask, there is no reason anymore to hide the 64-bit capable CPU
models from a 32-bit only QEMU. All 64-bit CPUs can be used
perfectly in 32-bit legacy mode anyway, so these models also make...

58012d66 03/13/2010 05:50 pm Andre Przywara

x86/cpuid: fix CPUID levels

Bump up the xlevel number for qemu32 to allow parsing of the processor
name string for this model.
Similiarly the 486 processor should have at least the feature bit
leaf enabled.

Signed-off-by: Andre Przywara <>...

8560efed 03/13/2010 05:50 pm Aurelien Jarno

x86/cpuid: Enable all features of real CPU

Enable all features of real CPU, unsupported features will be
trimmed depending on TCG or KVM capabilities.

Move the list of unsupported TCG features near the TCG capabilities
masks.

Signed-off-by: Aurelien Jarno <>

2f7a21c4 03/13/2010 05:50 pm Aurelien Jarno

x86/cpuid: fix indentation

Signed-off-by: Aurelien Jarno <>