qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] replace cpuid_*features fields with a featue word array (v2)
@ 2012-12-12 22:22 Eduardo Habkost
  2012-12-12 22:22 ` [Qemu-devel] [PATCH 1/3] target-i386: add EXT2_PPRO_FEATURES #define Eduardo Habkost
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Eduardo Habkost @ 2012-12-12 22:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Igor Mammedov, Andreas Färber

Changes in v2:
 - Rebased on top of:
   Subject: [PATCH 0/2] target-i386: move CPU object creation to cpu.c (v2)
 - Wrote a sed script that can be used to reproduce exactly the same changes
   from patch 3:
   https://gist.github.com/4271991

Git tree for testing:
  git://github.com/ehabkost/qemu-hacks.git x86-cpu-feature-array.v2
  https://github.com/ehabkost/qemu-hacks/tree/x86-cpu-feature-array.v2


Original description:

I was planning to implement this only after we finished the rest of the work,
the changes are a bit intrusive. But now it looks like the CPUID feature bits
are getting into our way (e.g. the feature word array will allow us to simplify
the -cpu host and -cpu check/enforce code a lot, making it easier to convert
that code to use CPU subclasses), so I decided to submit it now.


Eduardo Habkost (3):
  target-i386: add EXT2_PPRO_FEATURES #define
  target-i386/cpu.c: coding style fix
  target-i386: replace cpuid_*features fields with a feature word array

 hw/kvm/clock.c            |   2 +-
 linux-user/elfload.c      |   2 +-
 linux-user/main.c         |   4 +-
 target-i386/cpu.c         | 582 +++++++++++++++++++++++-----------------------
 target-i386/cpu.h         |  30 +--
 target-i386/helper.c      |   4 +-
 target-i386/kvm.c         |   5 +-
 target-i386/misc_helper.c |  14 +-
 target-i386/translate.c   |  10 +-
 9 files changed, 334 insertions(+), 319 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 0/3] replace cpuid_*features fields with a featue word array (v3)
@ 2012-12-18 16:29 Eduardo Habkost
  2012-12-18 16:29 ` [Qemu-devel] [PATCH 3/3] target-i386: replace cpuid_*features fields with a feature word array Eduardo Habkost
  0 siblings, 1 reply; 22+ messages in thread
From: Eduardo Habkost @ 2012-12-18 16:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: Riku Voipio, Blue Swirl, malc, Igor Mammedov, Andreas Färber,
	Aurelien Jarno


I would like to give emphasis to the following, from description of patch 3:

This should also help avoid bugs like the ones introduced when we added
cpuid_7_0_ebx_features. Today, adding a new feature word to the code
requires chaning 5 or 6 different places in the code, and it's very easy
to miss a problem when we forget to update one of those parts. See, for
example:

 * The bug solved by commit ffa8c11f0bbf47e1b7a3a62f97bc1da591c6734a;
 * The fact that check_features_against_host() still doesn't check all
   feature words as it is supposed to.


Changes in v3:
 - Removed the EXT2_PPRO_FEATURES patch
 - Rebased on top of:
   - afaerber's qom-cpu-next (commit cb97b7f), plus
   - Igor's "[PATCH 00/20 v2] x86 CPU cleanup (wave 2)"
     (but only patches 1-6 and 12)
   (See git tree below)
 - I tried to choose the patches that I find likely to be included soon,
   to try to reduce the need to rebase this patch again, but I know I
   probably haven't guessed correctly and a new rebase is probably going to
   be necessary.
 - Added "target-i386/cpu.c: remove last TAB character from the source"

Changes in v2:
 - Rebased on top of:
   Subject: [PATCH 0/2] target-i386: move CPU object creation to cpu.c (v2)
 - Wrote a sed script that can be used to reproduce exactly the same changes
   from patch 3:
   https://gist.github.com/4271991

Git tree for testing:
  git://github.com/ehabkost/qemu-hacks.git x86-cpu-feature-array.v3
  https://github.com/ehabkost/qemu-hacks/tree/x86-cpu-feature-array.v3


Original description:

I was planning to implement this only after we finished the rest of the work,
the changes are a bit intrusive. But now it looks like the CPUID feature bits
are getting into our way (e.g. the feature word array will allow us to simplify
the -cpu host and -cpu check/enforce code a lot, making it easier to convert
that code to use CPU subclasses), so I decided to submit it now.

Eduardo Habkost (3):
  target-i386/cpu.c: coding style fix
  target-i386/cpu.c: remove last TAB character from the source
  target-i386: replace cpuid_*features fields with a feature word array

 hw/kvm/clock.c            |   2 +-
 linux-user/elfload.c      |   2 +-
 linux-user/main.c         |   4 +-
 target-i386/cpu.c         | 586 ++++++++++++++++++++++++----------------------
 target-i386/cpu.h         |  30 ++-
 target-i386/helper.c      |   4 +-
 target-i386/kvm.c         |   5 +-
 target-i386/misc_helper.c |  14 +-
 target-i386/translate.c   |  10 +-
 9 files changed, 338 insertions(+), 319 deletions(-)

-- 
1.7.11.7

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

end of thread, other threads:[~2012-12-18 16:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-12 22:22 [Qemu-devel] [PATCH 0/3] replace cpuid_*features fields with a featue word array (v2) Eduardo Habkost
2012-12-12 22:22 ` [Qemu-devel] [PATCH 1/3] target-i386: add EXT2_PPRO_FEATURES #define Eduardo Habkost
2012-12-14  9:44   ` Igor Mammedov
2012-12-14 11:44   ` Andreas Färber
2012-12-14 12:15     ` Eduardo Habkost
2012-12-12 22:22 ` [Qemu-devel] [PATCH 2/3] target-i386/cpu.c: coding style fix Eduardo Habkost
2012-12-12 23:36   ` Igor Mammedov
2012-12-13 13:16     ` Eduardo Habkost
2012-12-12 22:22 ` [Qemu-devel] [PATCH 3/3] target-i386: replace cpuid_*features fields with a feature word array Eduardo Habkost
2012-12-14  9:38   ` Igor Mammedov
2012-12-14 12:27     ` Eduardo Habkost
2012-12-14 13:52       ` Igor Mammedov
2012-12-14 14:02         ` Eduardo Habkost
2012-12-14 14:53       ` Andreas Färber
2012-12-14 17:16         ` Eduardo Habkost
2012-12-14 15:14   ` Andreas Färber
2012-12-14 16:52     ` Eduardo Habkost
2012-12-14 17:20       ` Andreas Färber
2012-12-14 17:36         ` Eduardo Habkost
2012-12-14 17:47           ` Igor Mammedov
2012-12-14 18:32             ` Eduardo Habkost
  -- strict thread matches above, loose matches on Subject: below --
2012-12-18 16:29 [Qemu-devel] [PATCH 0/3] replace cpuid_*features fields with a featue word array (v3) Eduardo Habkost
2012-12-18 16:29 ` [Qemu-devel] [PATCH 3/3] target-i386: replace cpuid_*features fields with a feature word array Eduardo Habkost

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).