qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH 0/3] Support configurable CPU Model-Specific Registers (MSRs) in cpudefs
Date: Mon, 16 Jan 2012 02:39:15 +1100	[thread overview]
Message-ID: <cover.1326641605.git.josh@joshtriplett.org> (raw)

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

             reply	other threads:[~2012-01-15 15:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 15:39 Josh Triplett [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1326641605.git.josh@joshtriplett.org \
    --to=josh@joshtriplett.org \
    --cc=aliguori@us.ibm.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).