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-changelog

[Xen-changelog] [xen-unstable] Hide RDTSCP feature flag from PV guests.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Hide RDTSCP feature flag from PV guests.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Feb 2007 10:45:13 -0800
Delivery-date: Fri, 02 Feb 2007 10:46:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1170432433 0
# Node ID 01ec7dba9ff805a5c74a0318997b747d3e3e3327
# Parent  1e56ac73b9b9d2a23d8d9b7b3382c372b38bc7b8
Hide RDTSCP feature flag from PV guests.

Linux 2.6.19 (x86-64) makes use of this feature if available, but Xen
(validly) fails the attempt to write the respective MSR. Hence the
feature must be hidden from PV guests.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/traps.c             |    5 +++++
 xen/include/asm-x86/cpufeature.h |    1 +
 2 files changed, 6 insertions(+)

diff -r 1e56ac73b9b9 -r 01ec7dba9ff8 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Fri Feb 02 16:04:11 2007 +0000
+++ b/xen/arch/x86/traps.c      Fri Feb 02 16:07:13 2007 +0000
@@ -596,6 +596,11 @@ static int emulate_forced_invalid_op(str
             clear_bit(X86_FEATURE_SEP, &d);
         if ( !IS_PRIV(current->domain) )
             clear_bit(X86_FEATURE_MTRR, &d);
+    }
+    else if ( regs->eax == 0x80000001 )
+    {
+        /* Modify Feature Information. */
+        clear_bit(X86_FEATURE_RDTSCP % 32, &d);
     }
     else
     {
diff -r 1e56ac73b9b9 -r 01ec7dba9ff8 xen/include/asm-x86/cpufeature.h
--- a/xen/include/asm-x86/cpufeature.h  Fri Feb 02 16:04:11 2007 +0000
+++ b/xen/include/asm-x86/cpufeature.h  Fri Feb 02 16:07:13 2007 +0000
@@ -49,6 +49,7 @@
 #define X86_FEATURE_MP         (1*32+19) /* MP Capable. */
 #define X86_FEATURE_NX         (1*32+20) /* Execute Disable */
 #define X86_FEATURE_MMXEXT     (1*32+22) /* AMD MMX extensions */
+#define X86_FEATURE_RDTSCP     (1*32+27) /* RDTSCP */
 #define X86_FEATURE_LM         (1*32+29) /* Long Mode (x86-64) */
 #define X86_FEATURE_3DNOWEXT   (1*32+30) /* AMD 3DNow! extensions */
 #define X86_FEATURE_3DNOW      (1*32+31) /* 3DNow! */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Hide RDTSCP feature flag from PV guests., Xen patchbot-unstable <=