Skip to contentSkip to conversation

Allow Dom0 to read patchlevel MSR

PATCH In review Christoph Egger 2 participants 3 messages Sep 16, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow Dom0 to read patchlevel MSR

Hi,

Allow Dom0 to read microcode patchlevel MSR.
Solaris needs this.

Signature · 12 lines
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy
xen/arch/x86/traps.c +6 -0
diff -r 087008dfb005 xen/arch/x86/traps.c
@@ -2242,6 +2242,12 @@ static int emulate_privileged_op(struct 
             if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
                 goto fail;
             break;
+        case MSR_AMD_PATCHLEVEL:
+            if ( boot_cpu_data.x86_vendor != X86_VENDOR_AMD )
+                goto fail;
+            if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
+                goto fail;
+            break;
         default:
             if ( rdmsr_hypervisor_regs(regs->ecx, &l, &h) )
             {

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 7 lines · Christoph Egger

Hi,

Allow Dom0 to read microcode patchlevel MSR.
Solaris needs this.

A pointless patch. The default case of the switch statement has equivalent effect.

I guess I'll keep the MSR labelled there just for documentation in case we tighten up RDMSR/WRMSR emulation in future.

-- Keir

#2 lore raw
Quoted 6 lines · On Tuesday 16 September 2008 14:15:10 Keir Fraser wrote:
Quoted 5 lines · Christoph Egger

Hi,

Allow Dom0 to read microcode patchlevel MSR.
Solaris needs this.

Quoted 7 lines
Quoted 1 line

A pointless patch. The default case of the switch statement has equivalent effect.

I guess I'll keep the MSR labelled there just for documentation in case we tighten up RDMSR/WRMSR emulation in future.

Tnx.

Signature · 12 lines
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy