From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: [PATCH 0/4] Add support for RDTSCP in VMX Date: Wed, 16 Dec 2009 13:48:01 +0800 Message-ID: <1260942485-19156-1-git-send-email-sheng@linux.intel.com> Cc: kvm@vger.kernel.org To: Avi Kivity , Marcelo Tosatti Return-path: Received: from mga09.intel.com ([134.134.136.24]:1756 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754265AbZLPFsH (ORCPT ); Wed, 16 Dec 2009 00:48:07 -0500 Sender: kvm-owner@vger.kernel.org List-ID: 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(-)