From patchwork Wed Dec 16 05:48:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sheng Yang X-Patchwork-Id: 68296 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixki005715 for ; Fri, 18 Dec 2009 04:45:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761553AbZLPFse (ORCPT ); Wed, 16 Dec 2009 00:48:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761318AbZLPFsb (ORCPT ); Wed, 16 Dec 2009 00:48:31 -0500 Received: from mga11.intel.com ([192.55.52.93]:64130 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761098AbZLPFs0 (ORCPT ); Wed, 16 Dec 2009 00:48:26 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 15 Dec 2009 21:43:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,403,1257148800"; d="scan'208";a="756615244" Received: from syang10-desktop.sh.intel.com (HELO syang10-desktop) ([10.239.36.76]) by fmsmga001.fm.intel.com with ESMTP; 15 Dec 2009 21:48:20 -0800 Received: from yasker by syang10-desktop with local (Exim 4.69) (envelope-from ) id 1NKmkK-0004za-Mi; Wed, 16 Dec 2009 13:48:24 +0800 From: Sheng Yang To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org, Sheng Yang , Ingo Molnar Subject: [PATCH 3/4] x86: Add IA32_TSC_AUX MSR Date: Wed, 16 Dec 2009 13:48:04 +0800 Message-Id: <1260942485-19156-4-git-send-email-sheng@linux.intel.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1260942485-19156-1-git-send-email-sheng@linux.intel.com> References: <1260942485-19156-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 4ffe09b..ac98d29 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -12,6 +12,7 @@ #define MSR_FS_BASE 0xc0000100 /* 64bit FS base */ #define MSR_GS_BASE 0xc0000101 /* 64bit GS base */ #define MSR_KERNEL_GS_BASE 0xc0000102 /* SwapGS GS shadow */ +#define MSR_TSC_AUX 0xc0000103 /* Auxiliary TSC */ /* EFER bits: */ #define _EFER_SCE 0 /* SYSCALL/SYSRET */ diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 7e2b6ba..e61fb87 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -240,9 +240,9 @@ do { \ #define checking_wrmsrl(msr, val) wrmsr_safe((msr), (u32)(val), \ (u32)((val) >> 32)) -#define write_tsc(val1, val2) wrmsr(0x10, (val1), (val2)) +#define write_tsc(val1, val2) wrmsr(MSR_IA32_TSC, (val1), (val2)) -#define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0) +#define write_rdtscp_aux(val) wrmsr(MSR_TSC_AUX, (val), 0) #ifdef CONFIG_SMP int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h);