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, Sheng Yang <sheng@linux.intel.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: [PATCH 3/4] x86: Add IA32_TSC_AUX MSR
Date: Wed, 16 Dec 2009 13:48:04 +0800	[thread overview]
Message-ID: <1260942485-19156-4-git-send-email-sheng@linux.intel.com> (raw)
In-Reply-To: <1260942485-19156-1-git-send-email-sheng@linux.intel.com>

Also replaced the hardcode value in write_tsc() and write_tscp_aux().

CC: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
 arch/x86/include/asm/msr-index.h |    1 +
 arch/x86/include/asm/msr.h       |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

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);
-- 
1.5.4.5


  parent 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 [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 ` Sheng Yang [this message]
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-4-git-send-email-sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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.