All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Add support for RDTSCP in VMX
@ 2009-12-16  5:48 Sheng Yang
  2009-12-16  5:48 ` [PATCH 1/4] KVM: VMX: Remove redundant variable Sheng Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Sheng Yang @ 2009-12-16  5:48 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm

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

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

end of thread, other threads:[~2009-12-17 15:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-16  5:48 [PATCH 0/4] Add support for RDTSCP in VMX Sheng Yang
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

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.