qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/21] cpuid: cleanup, fixes and some enhancements
@ 2009-09-18 11:47 Andre Przywara
  2009-09-18 11:47 ` [Qemu-devel] [PATCH v2 01/21] cpuid: move CPUID functions into separate file Andre Przywara
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Andre Przywara @ 2009-09-18 11:47 UTC (permalink / raw)
  To: qemu-devel

Hi,

an updated version of my last week's series.
Changes from v1 -> v2:
- fix build for non-i386 targets (thanks Anthony for spotting this)
- replace strtok() with QEMU's get_opt_name() (inspired by Amit Shah)
  (please see the notes below)
- fix multicore setup on Intel (thanks Dietmar Maurer for spotting this)
- removed unnecessary header file inclusions from cpuid.c
- fix and add various CPU models
- add kvm32 CPU model (for 32bit only migration)
- always expose all CPU models (regardless of the bitness)
----------------

The following patchset cleans up CPUID bit handling and adds some smaller
features.
The most prominent change is to move all CPUID related functions to a
separate file. About 40% of helper.c was actually CPUID related, so say
hello to cpuid.c. While at it, I fixed some formatting issues. (Patch 1-5)
Patch 6 replaces the awkward strtok() with the better get_opt_name().
  Please note: This renders the gotos useless. Shall they be removed?
  Second note: I pulled get_opt_name() from qemu-option.h into the file,
  because it did not work with linux-user due to a name clash:
  linux-user/mmap.c:qemu_malloc() and qemu-malloc.c:qemu_malloc()
  If anyone has a better solution, I am all ears.
Patch 7 & 8 add the CPUID feature flag names to the output of -cpu ?.
Patch 9 & 10 simplifies some code.
Patch 11 allows more CPUID leafs to be propagated to guests when -cpu host
is used, this should now reflect the host CPU's cache size.
Patch 12 fixes a bug with the multicore injection to the guest, where
the Linux kernel on Intel hosts would not recognize multiple cores.
Patch 13 adds a trimming feature (similar to KVM) to QEMU/TCG. The goal
is to describe CPU models more precisely by reflecting the feature bits of
the real hardware. Features that QEMU does not support are then masked.
If we add features to QEMU, we only need to adjust it in one location.
Patch 14 adjusts the size of the L2 cache described by leaf 4 to a more
conservative value of one megabyte. This prevents guests assuming too large
caches if they use optimized algorithms.
Patch 15-19 changes the CPU models to describe the actual CPUID bits
of the real silicon (checked with actual machines, x86info examples and
datasheets). Unsupported features will be masked.
Patch 20 adds a kvm32 CPU model, which is useful for migration.
Patch 21 finally exposes both the 32- and 64-bit CPU model also to QEMU32,
since the LM bit will be masked out.

Please review, comment and apply!
Thanks and Regards,
Andre.

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448 3567 12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd; Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-10-02 17:44 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-18 11:47 [Qemu-devel] [PATCH v2 00/21] cpuid: cleanup, fixes and some enhancements Andre Przywara
2009-09-18 11:47 ` [Qemu-devel] [PATCH v2 01/21] cpuid: move CPUID functions into separate file Andre Przywara
2009-09-18 11:47 ` [Qemu-devel] [PATCH v2 02/21] cpuid: fix over-long lines Andre Przywara
2009-09-18 11:47 ` [Qemu-devel] [PATCH v2 03/21] cpuid: replace magic number with named constant Andre Przywara
2009-09-18 11:47 ` [Qemu-devel] [PATCH v2 04/21] cpuid: fix comments Andre Przywara
2009-09-18 11:47 ` [Qemu-devel] [PATCH v2 05/21] cpuid: moved host_cpuid function and remove prototype Andre Przywara
2009-09-18 11:47 ` [Qemu-devel] [PATCH v2 06/21] cpuid: Replace strtok with get_opt_name Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 07/21] cpuid: add missing CPUID feature flag names Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 08/21] cpuid: list all known x86 CPUID feature flags Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 09/21] cpuid: remove unnecessary kvm_trim function Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 10/21] cpuid: simplify CPUID flag search function Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 11/21] cpuid: propagate further CPUID leafs when -cpu host Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 12/21] cpuid: Fix multicore setup on Intel Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 13/21] cpuid: add TCG feature bit trimming Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 14/21] cpuid: decrease L2 cache for Intel and add comments Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 15/21] cpuid: Adjust feature bit constants Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 16/21] cpuid: Update qemu64/32 CPU models Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 17/21] cpuid: Fix CPU models to use new feature set names Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 18/21] cpuid: Fix 486 CPU model Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 19/21] cpuid: Add athlon64 " Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 20/21] cpuid: Add kvm32 " Andre Przywara
2009-09-18 11:48 ` [Qemu-devel] [PATCH v2 21/21] cpuid: Always expose 32 and 64-bit CPUs Andre Przywara
2009-10-02 17:44 ` [Qemu-devel] [PATCH v2 00/21] cpuid: cleanup, fixes and some enhancements Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).