Skip to contentSkip to conversation

allow all MSRs for dom0

PATCH In review John Levon 3 participants 3 messages Oct 19, 2006 – Oct 20, 2006

lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 allow all MSRs for dom0

# HG changeset patch
# User [email protected]
# Date 1161299603 25200
# Node ID b67c721ced1d27a880cf155dc10f2381d2ee9bb9 # Parent 36c60bff1213a1844b56114b216f99ffce9f2230 allow dom0 to access MSRs

xen/arch/x86/traps.c +10 -0
@@ -1406,6 +1406,11 @@ static int emulate_privileged_op(struct 
             break;
 #endif
         default:
+            if (v->domain == dom0) {
+                if ( wrmsr_safe(regs->ecx, regs->eax, regs->edx) )
+                    goto fail;
+                break;
+            }
             if ( wrmsr_hypervisor_regs(regs->ecx, regs->eax, regs->edx) )
                 break;
 
@@ -1440,6 +1445,11 @@ static int emulate_privileged_op(struct 
                 goto fail;
             break;
         default:
+            if (v->domain == dom0) {
+                if ( rdmsr_safe(regs->ecx, regs->eax, regs->edx) )
+                    goto fail;
+                break;
+            }
             if ( rdmsr_hypervisor_regs(regs->ecx, &l, &h) )
             {
                 regs->eax = l;
#1 lore raw
Quoted 7 lines · John Levon

# HG changeset patch
# User [email protected]
# Date 1161299603 25200
# Node ID b67c721ced1d27a880cf155dc10f2381d2ee9bb9 # Parent 36c60bff1213a1844b56114b216f99ffce9f2230 allow dom0 to access MSRs

Should this be dom0 or a "privileged domain"?

Cheers,
Muli