aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/emulate.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-10 08:24:07 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-10 08:24:07 +0100
commit3605c8aee0a454e91ceac1cb58b2ef1f32ff3fb5 (patch)
tree9d7e6d7434d07452aa55cdad9c8fb565e3010106 /xen/arch/x86/hvm/emulate.c
parentb1f87cc667c359dc7c2666d093702ee1ab66e6da (diff)
downloadxen-3605c8aee0a454e91ceac1cb58b2ef1f32ff3fb5.tar.gz
xen-3605c8aee0a454e91ceac1cb58b2ef1f32ff3fb5.tar.bz2
xen-3605c8aee0a454e91ceac1cb58b2ef1f32ff3fb5.zip
x86 hvm: msr-handling cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'xen/arch/x86/hvm/emulate.c')
-rw-r--r--xen/arch/x86/hvm/emulate.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index b3db91fec3..1ebe08bc6e 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -825,16 +825,7 @@ static int hvmemul_read_msr(
uint64_t *val,
struct x86_emulate_ctxt *ctxt)
{
- struct cpu_user_regs _regs;
- int rc;
-
- _regs.ecx = (uint32_t)reg;
-
- if ( (rc = hvm_msr_read_intercept(&_regs)) != X86EMUL_OKAY )
- return rc;
-
- *val = ((uint64_t)(uint32_t)_regs.edx << 32) | (uint32_t)_regs.eax;
- return X86EMUL_OKAY;
+ return hvm_msr_read_intercept(reg, val);
}
static int hvmemul_write_msr(
@@ -842,13 +833,7 @@ static int hvmemul_write_msr(
uint64_t val,
struct x86_emulate_ctxt *ctxt)
{
- struct cpu_user_regs _regs;
-
- _regs.edx = (uint32_t)(val >> 32);
- _regs.eax = (uint32_t)val;
- _regs.ecx = (uint32_t)reg;
-
- return hvm_msr_write_intercept(&_regs);
+ return hvm_msr_write_intercept(reg, val);
}
static int hvmemul_wbinvd(