diff options
author | Jan Beulich <jbeulich@suse.com> | 2012-10-04 09:05:24 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2012-10-04 09:05:24 +0200 |
commit | ceedb8abf06b98fd42cc9ae979d0d53acc7de2dd (patch) | |
tree | 23fc995b86e965ab403d4eeba14cd034f37a3689 /xen/arch/x86/hvm/hvm.c | |
parent | f06fabda84d6a6e61d45d7444eeb5fdca9f71b3f (diff) | |
download | xen-ceedb8abf06b98fd42cc9ae979d0d53acc7de2dd.tar.gz xen-ceedb8abf06b98fd42cc9ae979d0d53acc7de2dd.tar.bz2 xen-ceedb8abf06b98fd42cc9ae979d0d53acc7de2dd.zip |
x86: consolidate frame state manipulation functions
Rather than doing this in multiple places, have a single central
function (decode_register()) to be used by all other code.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/hvm/hvm.c')
-rw-r--r-- | xen/arch/x86/hvm/hvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 3571916965..a5a1bcfd9d 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1585,7 +1585,7 @@ int hvm_mov_to_cr(unsigned int cr, unsigned int gpr) struct vcpu *curr = current; unsigned long val, *reg; - if ( (reg = get_x86_gpr(guest_cpu_user_regs(), gpr)) == NULL ) + if ( (reg = decode_register(gpr, guest_cpu_user_regs(), 0)) == NULL ) { gdprintk(XENLOG_ERR, "invalid gpr: %u\n", gpr); goto exit_and_crash; @@ -1627,7 +1627,7 @@ int hvm_mov_from_cr(unsigned int cr, unsigned int gpr) struct vcpu *curr = current; unsigned long val = 0, *reg; - if ( (reg = get_x86_gpr(guest_cpu_user_regs(), gpr)) == NULL ) + if ( (reg = decode_register(gpr, guest_cpu_user_regs(), 0)) == NULL ) { gdprintk(XENLOG_ERR, "invalid gpr: %u\n", gpr); goto exit_and_crash; |