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-4.0-testing] x86/hvm: Don't expose CPUID time leaf

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86/hvm: Don't expose CPUID time leaf when not using PVRDTSCP
From: Xen patchbot-4.0-testing <patchbot@xxxxxxx>
Date: Sat, 09 Jul 2011 13:44:09 +0100
Delivery-date: Sat, 09 Jul 2011 05:44:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Paul Durrant <paul.durrant@xxxxxxxxxx>
# Date 1310112123 -3600
# Node ID a353b8304f7a630fd3160fd88e31133fa0fc7bd2
# Parent  a9c73a1e746adb4ace5628083f2b5ab5338c3570
x86/hvm: Don't expose CPUID time leaf when not using PVRDTSCP

Some versions of Oracle's Solaris PV drivers make a check that the
maximal Xen hypervisor CPUID leaf is <= base leaf + 2 and refuse to
work if this is not the case.  The addition of the time leaf makes the
maximal leaf == base leaf + 3 so this patch introduces a workaround
that obscures the time leaf unless PVRDTSCP is in operation.

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
xen-unstable changeset:   23661:8fe6f4be18aa
xen-unstable date:        Fri Jul 08 08:31:10 2011 +0100
---


diff -r a9c73a1e746a -r a353b8304f7a xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Fri Jul 08 09:01:08 2011 +0100
+++ b/xen/arch/x86/traps.c      Fri Jul 08 09:02:03 2011 +0100
@@ -686,15 +686,23 @@
     struct domain *d = current->domain;
     /* Optionally shift out of the way of Viridian architectural leaves. */
     uint32_t base = is_viridian_domain(d) ? 0x40000100 : 0x40000000;
+    uint32_t limit;
 
     idx -= base;
-    if ( idx > 3 ) 
+
+    /*
+     * Some Solaris PV drivers fail if max > base + 2. Help them out by
+     * hiding the PVRDTSCP leaf if PVRDTSCP is disabled.
+     */
+    limit = (d->arch.tsc_mode < TSC_MODE_PVRDTSCP) ? 2 : 3;
+
+    if ( idx > limit ) 
         return 0;
 
     switch ( idx )
     {
     case 0:
-        *eax = base + 3; /* Largest leaf */
+        *eax = base + limit; /* Largest leaf */
         *ebx = XEN_CPUID_SIGNATURE_EBX;
         *ecx = XEN_CPUID_SIGNATURE_ECX;
         *edx = XEN_CPUID_SIGNATURE_EDX;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] x86/hvm: Don't expose CPUID time leaf when not using PVRDTSCP, Xen patchbot-4 . 0-testing <=