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(-)
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to