qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] Support configurable CPU Model-Specific Registers (MSRs) in cpudefs
@ 2012-01-15 15:39 Josh Triplett
  2012-01-15 15:39 ` [Qemu-devel] [PATCH 1/3] Add cpudef option to GPF on unknown MSRs Josh Triplett
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Josh Triplett @ 2012-01-15 15:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Paul Brook

This patch series adds configuration options allowing CPU definitions to
support rdmsr on arbitrary MSRs with corresponding values, and to GPF on
unknown MSRs.  This allows better emulation of CPU-specific behavior.  I plan
to use this to allow testing many of the CPU-specific tests in BITS
(http://biosbits.org/) via qemu/kvm rather than always via real systems with
the CPUs in question.

I've attached a sample configuration file for these new options, created
by copying the "Nehalem" CPU definition from the standard configuration
file and adding "NehalemGPF" and "NehalemMSR" definitions which take
advantage of the first and the first two patches, respectively.  This
sample configuration makes it easy to validate the behavior added by the
first two patches.

I used a QDict to store the map from MSR numbers to values.  Unfortunately,
QDict only supports strings as keys, so I had to format the MSR as a hex string
before looking it up.

The third patch in the series provides a bugfix for CPU definition parsing,
which will otherwise add a partial CPU definition (up to the parse failure) to
the list of CPU definitions.

Written on the plane to linux.conf.au.

Josh Triplett (3):
  Add cpudef option to GPF on unknown MSRs
  Support arbitrary additional MSRs in cpu definitions
  Handle parse failures in CPU definitions, and avoid adding a partial
    cpudef

 qemu-config.c           |    6 ++++
 target-i386/cpu.h       |    6 ++++
 target-i386/cpuid.c     |   59 ++++++++++++++++++++++++++++++++++++++++++++++-
 target-i386/op_helper.c |   36 +++++++++++++++++++++++++---
 4 files changed, 102 insertions(+), 5 deletions(-)

-- 
1.7.8.3

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

end of thread, other threads:[~2012-01-15 18:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-15 15:39 [Qemu-devel] [PATCH 0/3] Support configurable CPU Model-Specific Registers (MSRs) in cpudefs Josh Triplett
2012-01-15 15:39 ` [Qemu-devel] [PATCH 1/3] Add cpudef option to GPF on unknown MSRs Josh Triplett
2012-01-15 15:39 ` [Qemu-devel] [PATCH 2/3] Support arbitrary additional MSRs in cpu definitions Josh Triplett
2012-01-15 15:41 ` [Qemu-devel] [PATCH 3/3] Handle parse failures in CPU definitions, and avoid adding a partial cpudef Josh Triplett
2012-01-15 18:08 ` [Qemu-devel] [PATCH 0/3] Support configurable CPU Model-Specific Registers (MSRs) in cpudefs Andreas Färber

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