All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: [PATCH 0/4] Add support for RDTSCP in VMX
Date: Wed, 16 Dec 2009 13:48:01 +0800	[thread overview]
Message-ID: <1260942485-19156-1-git-send-email-sheng@linux.intel.com> (raw)

After discussion with Avi, we decided to take this chance to extend the shared
MSR framework, discard the limitation of "All CPU should have same value for
the MSRs". But the limitation of "The MSRs' value shouldn't be modified after
they were read" still apply.

I have tested this patchset using 2.6.32. It can boot well with "rdtscp"
feature(-cpu core2duo,+rdtscp) after patching, and a simple "rdtscp" userspace
program can running in the guest(it's too simple that can only prove the
instruction won't cause #UD, can't guarantee the result, so I think it's not
necessary to get it in the unit test). In the past, this would result in guest
kernel crash on vsyscall initialization (due to access MSR_TSC_AUX result in
#GP fault).

--
regards
Yang, Sheng

--
 arch/x86/include/asm/kvm_host.h  |    1 +
 arch/x86/include/asm/msr-index.h |    1 +
 arch/x86/include/asm/msr.h       |    4 +-
 arch/x86/include/asm/vmx.h       |    1 +
 arch/x86/kvm/svm.c               |    6 +++
 arch/x86/kvm/vmx.c               |   33 ++++++++++++++++---
 arch/x86/kvm/x86.c               |   67 +++++++++++++++++++++++++-------------
 7 files changed, 83 insertions(+), 30 deletions(-)

             reply	other threads:[~2009-12-16  5:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16  5:48 Sheng Yang [this message]
2009-12-16  5:48 ` [PATCH 1/4] KVM: VMX: Remove redundant variable Sheng Yang
2009-12-16  5:48 ` [PATCH 2/4] KVM: Extended shared_msr_global to per CPU Sheng Yang
2009-12-16  9:21   ` Avi Kivity
2009-12-17  9:32     ` Sheng Yang
2009-12-17 10:32       ` Avi Kivity
2009-12-17 15:01         ` Sheng Yang
2009-12-17 15:06           ` Avi Kivity
2009-12-16  5:48 ` [PATCH 3/4] x86: Add IA32_TSC_AUX MSR Sheng Yang
2009-12-16  8:20   ` [tip:x86/urgent] x86: Add IA32_TSC_AUX MSR and use it tip-bot for Sheng Yang
2009-12-16  5:48 ` [PATCH 4/4] KVM: VMX: Add instruction rdtscp support for guest Sheng Yang
2009-12-16  9:47   ` Avi Kivity
2009-12-17  9:33     ` Sheng Yang
2009-12-17 10:39       ` Avi Kivity
2009-12-17 14:52         ` Sheng Yang

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=1260942485-19156-1-git-send-email-sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.