xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Kyle Huey <me@kylehuey.com>
To: xen-devel@lists.xen.org
Cc: Robert O'Callahan <robert@ocallahan.org>
Subject: [PATCH v2] x86/Intel: virtualize support for cpuid faulting
Date: Thu, 13 Oct 2016 14:09:25 -0700	[thread overview]
Message-ID: <20161013210927.4629-1-khuey@kylehuey.com> (raw)

rr (http://rr-project.org/), a Linux userspace record-and-replay reverse-
execution debugger, would like to trap and emulate the CPUID instruction.
This would allow us to a) mask away certain hardware features that rr does
not support (e.g. RDRAND) and b) enable trace portability across machines
by providing constant results. Patches for support in the Linux kernel are in
flight, and we'd like to be able to use this feature on virtualized Linux
instances as well.

Changes	since the previous version:
- Rebased.
- Exposed cpuid_faulting_enabled outside of cpu/intel.c, as suggested by
  Andrew Cooper. This is now patch 1, and the original changes are in
  patch 2.
- Various style nits from Andrew Cooper and Jan Beulich.
- Additional style changes not suggested (primarily replacing ternaries with
  if (condition) value |= BIT for futureproofing).
- Check guest_kernel_mode instead of ring_0 in emulate_privileged_op.
- Check cpuid_fault and guest_kernel_mode in emulate_forced_invalid_op.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

             reply	other threads:[~2016-10-13 21:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13 21:09 Kyle Huey [this message]
2016-10-13 21:09 ` [PATCH v2 1/2] x86/Intel: Expose cpuid_faulting_enabled so it can be used elsewhere Kyle Huey
2016-10-14 11:51   ` Jan Beulich
2016-10-13 21:09 ` [PATCH v2 2/2] x86/Intel: virtualize support for cpuid faulting Kyle Huey
2016-10-14 12:04   ` Jan Beulich
2016-10-14 14:46     ` Andrew Cooper
2016-10-14 17:05       ` Kyle Huey
2016-10-14 17:18         ` Andrew Cooper
2016-10-14 19:28           ` Kyle Huey
2016-10-17  9:23             ` Andrew Cooper
2016-10-14 19:36           ` Kyle Huey
2016-10-17 12:34             ` Andrew Cooper
2016-10-17 16:28               ` Kyle Huey
2016-10-17 16:39                 ` Andrew Cooper
2016-10-17 17:42                   ` Kyle Huey

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=20161013210927.4629-1-khuey@kylehuey.com \
    --to=me@kylehuey.com \
    --cc=robert@ocallahan.org \
    --cc=xen-devel@lists.xen.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).