# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID da942e577e5e965275644909d91d4a26528c9dba
# Parent 997bd5fcf30739c12a12563683fa9a632775dfe9
[IA64] Instruction emulation patch
This patch fixes the instruction emulation issue, e.g. when executing
such instruction "ld.1 r31=[r32]", the loaded value should be zero
extended and placed in r31, but more than lowest 8 bits of r31 are set.
Signed-off-by: Xinmei Huang <Xinmei.huang@xxxxxxxxx>
---
xen/arch/ia64/vmx/mmio.c | 12 +-----------
1 files changed, 1 insertion(+), 11 deletions(-)
diff -r 997bd5fcf307 -r da942e577e5e xen/arch/ia64/vmx/mmio.c
--- a/xen/arch/ia64/vmx/mmio.c Thu Sep 21 15:34:24 2006 -0600
+++ b/xen/arch/ia64/vmx/mmio.c Thu Sep 21 15:35:45 2006 -0600
@@ -428,7 +428,7 @@ void emulate_io_inst(VCPU *vcpu, u64 pad
IA64_BUNDLE bundle;
int slot, dir=0, inst_type;
size_t size;
- u64 data, value,post_update, slot1a, slot1b, temp;
+ u64 data, post_update, slot1a, slot1b, temp;
INST64 inst;
regs=vcpu_regs(vcpu);
if (IA64_RETRY == __vmx_get_domain_bundle(regs->cr_iip, &bundle)) {
@@ -454,7 +454,6 @@ void emulate_io_inst(VCPU *vcpu, u64 pad
vcpu_get_gr_nat(vcpu,inst.M4.r2,&data);
}else if((inst.M1.x6>>2)<0xb){ // read
dir=IOREQ_READ;
- vcpu_get_gr_nat(vcpu,inst.M1.r1,&value);
}
}
// Integer Load + Reg update
@@ -462,7 +461,6 @@ void emulate_io_inst(VCPU *vcpu, u64 pad
inst_type = SL_INTEGER;
dir = IOREQ_READ; //write
size = (inst.M2.x6&0x3);
- vcpu_get_gr_nat(vcpu,inst.M2.r1,&value);
vcpu_get_gr_nat(vcpu,inst.M2.r3,&temp);
vcpu_get_gr_nat(vcpu,inst.M2.r2,&post_update);
temp += post_update;
@@ -485,7 +483,6 @@ void emulate_io_inst(VCPU *vcpu, u64 pad
}else if((inst.M3.x6>>2)<0xb){ // read
dir=IOREQ_READ;
- vcpu_get_gr_nat(vcpu,inst.M3.r1,&value);
vcpu_get_gr_nat(vcpu,inst.M3.r3,&temp);
post_update = (inst.M3.i<<7)+inst.M3.imm7;
if(inst.M3.s)
@@ -597,13 +594,6 @@ void emulate_io_inst(VCPU *vcpu, u64 pad
mmio_access(vcpu, padr, &data, size, ma, dir);
}else{
mmio_access(vcpu, padr, &data, size, ma, dir);
- if(size==1)
- data = (value & 0xffffffffffffff00U) | (data & 0xffU);
- else if(size==2)
- data = (value & 0xffffffffffff0000U) | (data & 0xffffU);
- else if(size==4)
- data = (value & 0xffffffff00000000U) | (data & 0xffffffffU);
-
if(inst_type==SL_INTEGER){ //gp
vcpu_set_gr(vcpu,inst.M1.r1,data,0);
}else{
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|