WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Saving/Restoring IA32_TSC_AUX MSR

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Saving/Restoring IA32_TSC_AUX MSR
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Wed, 9 Dec 2009 08:41:53 -0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Delivery-date: Wed, 09 Dec 2009 08:44:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acp47oNCUW49G3yCSYSvWZtR2kFSog==
Thread-topic: Saving/Restoring IA32_TSC_AUX MSR
I see the code like (in arch/x86/time.c), and wondering how IA32_TSC_AUX MSR is 
saved/restored at domain switch time.

    if ( (d->arch.tsc_mode ==  TSC_MODE_PVRDTSCP) &&
         boot_cpu_has(X86_FEATURE_RDTSCP) )
        write_rdtscp_aux(d->arch.incarnation);

BTW,

include/asm-x86/msr.h
#define write_rdtscp_aux(val) wrmsr(0xc0000103, (val), 0)

We should write like wrmsr(MSR_TSC_AUX, (val), 0) by adding 
+#define MSR_TSC_AUX            0xc0000103 /* Auxiliary TSC */
in include/asm-x86/msr-index.h

Thanks,
Jun
---
Intel Open Source Technology Center


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel