# HG changeset patch
# User john.levon@sun.com
# Date 1161299603 25200
# Node ID b67c721ced1d27a880cf155dc10f2381d2ee9bb9
# Parent 36c60bff1213a1844b56114b216f99ffce9f2230
allow dom0 to access MSRs
Signed-off-by: Mark Johnson <mark.johnson@sun.com>
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@lists.xensource.com
http://lists.xensource.com/xen-devel