ia64/xen-unstable

changeset 8833:3c091740f6ff

[IA64] different type of argument in vcpu_set_gr()

Fix Reserved Register/Field fault in sal_emulate().
This bug is occurred by a wrong type argument.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Fri Feb 17 14:57:19 2006 -0700 (2006-02-17)
parents 81aae0c1487e
children dcbe36ee2171
files xen/arch/ia64/xen/vcpu.c xen/include/asm-ia64/vcpu.h
line diff
     1.1 --- a/xen/arch/ia64/xen/vcpu.c	Fri Feb 17 14:49:58 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/vcpu.c	Fri Feb 17 14:57:19 2006 -0700
     1.3 @@ -81,7 +81,7 @@ unsigned long vcpu_verbose = 0;
     1.4  **************************************************************************/
     1.5  #ifdef XEN
     1.6  UINT64
     1.7 -vcpu_get_gr(VCPU *vcpu, unsigned reg)
     1.8 +vcpu_get_gr(VCPU *vcpu, unsigned long reg)
     1.9  {
    1.10  	REGS *regs = vcpu_regs(vcpu);
    1.11  	UINT64 val;
    1.12 @@ -90,7 +90,7 @@ vcpu_get_gr(VCPU *vcpu, unsigned reg)
    1.13  	return val;
    1.14  }
    1.15  IA64FAULT
    1.16 -vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val)
    1.17 +vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val)
    1.18  {
    1.19  	REGS *regs = vcpu_regs(vcpu);
    1.20      int nat;
    1.21 @@ -104,7 +104,7 @@ vcpu_get_gr_nat(VCPU *vcpu, unsigned reg
    1.22  //   IA64_ILLOP_FAULT if the register would cause an Illegal Operation fault
    1.23  //   IA64_NO_FAULT otherwise
    1.24  IA64FAULT
    1.25 -vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat)
    1.26 +vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat)
    1.27  {
    1.28  	REGS *regs = vcpu_regs(vcpu);
    1.29  	if (!reg) return IA64_ILLOP_FAULT;
    1.30 @@ -118,7 +118,7 @@ vcpu_set_gr(VCPU *vcpu, unsigned reg, UI
    1.31  //   IA64_ILLOP_FAULT if the register would cause an Illegal Operation fault
    1.32  //   IA64_NO_FAULT otherwise
    1.33  IA64FAULT
    1.34 -vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value)
    1.35 +vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value)
    1.36  {
    1.37  	REGS *regs = vcpu_regs(vcpu);
    1.38  	long sof = (regs->cr_ifs) & 0x7f;
     2.1 --- a/xen/include/asm-ia64/vcpu.h	Fri Feb 17 14:49:58 2006 -0700
     2.2 +++ b/xen/include/asm-ia64/vcpu.h	Fri Feb 17 14:57:19 2006 -0700
     2.3 @@ -34,9 +34,9 @@ struct privop_addr_count {
     2.4  #endif
     2.5  
     2.6  /* general registers */
     2.7 -extern UINT64 vcpu_get_gr(VCPU *vcpu, unsigned reg);
     2.8 -extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned reg, UINT64 *val);
     2.9 -extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned reg, UINT64 value, int nat);
    2.10 +extern UINT64 vcpu_get_gr(VCPU *vcpu, unsigned long reg);
    2.11 +extern IA64FAULT vcpu_get_gr_nat(VCPU *vcpu, unsigned long reg, UINT64 *val);
    2.12 +extern IA64FAULT vcpu_set_gr(VCPU *vcpu, unsigned long reg, UINT64 value, int nat);
    2.13  /* application registers */
    2.14  extern IA64FAULT vcpu_set_ar(VCPU *vcpu, UINT64 reg, UINT64 val);
    2.15  /* psr */