typedef enum { V3_INVALID_OP,
V3_OP_MOVCR2, V3_OP_MOV2CR, V3_OP_SMSW, V3_OP_LMSW, V3_OP_CLTS,
V3_OP_INVLPG,
+ /* 441-tm: adding CMP, POP, JLE, CALL, TEST*/
+ V3_OP_CMP, V3_OP_POP, V3_OP_JLE, V3_OP_CALL, V3_OP_TEST, V3_OP_PUSH,
+ V3_OP_JAE, V3_OP_JMP, V3_OP_JNZ, V3_OP_JZ, V3_OP_LEA, V3_OP_IMUL,
+ V3_OP_RET, V3_OP_JL, V3_OP_CMOVZ, V3_OP_MOVSXD, V3_OP_JNS,
+ V3_OP_CMOVS, V3_OP_SHL,
+
V3_OP_ADC, V3_OP_ADD, V3_OP_AND, V3_OP_OR, V3_OP_XOR, V3_OP_SUB,
V3_OP_INC, V3_OP_DEC, V3_OP_NEG, V3_OP_MOV, V3_OP_NOT, V3_OP_XCHG,
V3_OP_SETB, V3_OP_SETBE, V3_OP_SETL, V3_OP_SETLE, V3_OP_SETNB,
case LONG:
return 0xffffffffffffffffLL;
default:
- PrintError("Unsupported Address Mode\n");
+ PrintError(info->vm_info, info, "Unsupported Address Mode\n");
return -1;
}
}
static inline addr_t get_addr_linear(struct guest_info * info, addr_t addr, struct v3_segment * seg) {
switch (info->cpu_mode) {
- case REAL:
- // It appears that the segment values are computed and cached in the vmcb structure
- // We Need to check this for Intel
- /* return addr + (seg->selector << 4);
- break;*/
-
+ case REAL: {
+ return ((seg->selector & 0xffff) << 4) + (addr & 0xffff);
+ break;
+ }
case PROTECTED:
case PROTECTED_PAE:
case LONG_32_COMPAT:
}
case LONG_16_COMPAT:
default:
- PrintError("Unsupported CPU Mode: %d\n", info->cpu_mode);
+ PrintError(info->vm_info, info,"Unsupported CPU Mode: %d\n", info->cpu_mode);
return -1;
}
}