Skip to content

x86/cpuid: cleanups and fixes

Andre Przywara qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13x86/cpuid: move CPUID functions into separate fileMakefile.target target-i386/cpu.h target-i386/cpuid.c +1 more+1146 -11150 replies
2/13x86/cpuid: replace magic number with named constanttarget-i386/cpuid.c+6 -50 replies
3/13x86/cpuid: fix missing feature set bitstarget-i386/cpuid.c+1 -00 replies
4/13x86/cpuid: moved host_cpuid function and remove prototypetarget-i386/cpuid.c+34 -370 replies
5/13x86/cpuid: add missing CPUID feature flag namestarget-i386/cpuid.c+8 -80 replies
6/13x86/cpuid: add "host" to the list of supported CPU modelstarget-i386/cpuid.c+3 -00 replies
7/13x86/cpuid: remove unnecessary kvm_trim functiontarget-i386/kvm.c+6 -210 replies
8/13x86/cpuid: propagate further CPUID leafs when -cpu hosttarget-i386/cpu.h target-i386/cpuid.c+29 -90 replies
9/13x86/cpuid: add TCG feature bit trimmingtarget-i386/cpuid.c+24 -00 replies
10/13x86/cpuid: Always expose 32 and 64-bit CPUstarget-i386/cpuid.c+0 -20 replies
11/13x86/cpuid: Add kvm32 CPU modeltarget-i386/cpuid.c+14 -00 replies
12/13x86/cpuid: fix CPUID levelstarget-i386/cpuid.c+2 -20 replies
13/13x86/cpuid: Update qemu64/32 CPU modelstarget-i386/cpuid.c+13 -121 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/13] x86/cpuid: cleanups and fixes

Hi,

a rebased and refined version of my CPUID cleanup series. This should now apply on top of git head. Compared to the last post this leaves out the bits already done by John Cooper's patch. Also I added a separate patch to deal with an accidently removed line (patch 3/13).

This patchset cleans up the CPUID handling code in QEMU. The biggest change is obviously the move of the CPUID function to a separate file (cpuid.c). This helps to split up a rather large source file, which's name (helper.c) is also a bit misleading.
Additionally the rest of the patches beautifies or simplifies some code. Feature additions are:
5/13: add missing CPUID feature bit names (updated)
8/13: -cpu host propagates more CPUID leafs, so that the cache topology
will be visibile in the guest
9/13: add CPUID feature bit trimming for TCG: Features not supported by
the emulator will be masked out.
10/13: always show all CPU types: also expose the newer (64bit) CPU types
for the i386 emulator. 64bit features will be masked out due to 9/13.
11/13: add kvm32 CPU model: Per popular request add a counterpart to kvm64
describing a basic hardware virtualization capable CPU for migration purposes.
13/13: Set the feature bits of qemu{32,64} to the set supported by TCG.

The last patch is actually debatable, as it changes the default CPUID bits seen by guest. On the other hand it is only consequent to do so, as qemu{32,64} are meant to be artifical CPUs.

More details in the commit messages.

Please review, comment and apply.

Regards,
Andre.