[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] allow all MSRs for dom0



# HG changeset patch
# User john.levon@xxxxxxx
# Date 1161299603 25200
# Node ID b67c721ced1d27a880cf155dc10f2381d2ee9bb9
# Parent  36c60bff1213a1844b56114b216f99ffce9f2230
allow dom0 to access MSRs

Signed-off-by: Mark Johnson <mark.johnson@xxxxxxx>

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -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;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.