Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


decoder fixes
[palacios.git] / palacios / include / palacios / vmm_instr_decoder.h
index 5c47a99..623ca4d 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <palacios/vmm_types.h>
 
-
 /* .... Giant fucking switch tables */
 
 
@@ -262,6 +261,8 @@ static int get_operand_width(struct guest_info * info, struct x86_instr * instr,
                case LONG:
                    if (instr->prefixes.rex_op_size) {
                        return 8;
+                   } else {
+                       return 4;
                    }
                case PROTECTED:
                case PROTECTED_PAE:
@@ -334,6 +335,7 @@ static int get_operand_width(struct guest_info * info, struct x86_instr * instr,
            return -1;
        
     }
+
     return 0;
 }
 
@@ -450,7 +452,7 @@ static inline int decode_cr(struct guest_info * core,
 
     struct v3_ctrl_regs * crs = &(core->ctrl_regs);
 
-    PrintDebug("\t Ctrl regs %d\n", reg_code);
+//    PrintDebug("\t Ctrl regs %d\n", reg_code);
 
     switch (reg_code) {
        case 0:
@@ -779,7 +781,7 @@ static int decode_rm_operand32(struct guest_info * core,
        }
        
        operand->operand = ADDR_MASK(get_addr_linear(core, base_addr, seg), 
-                               get_addr_width(core, instr));
+                                    get_addr_width(core, instr));
     }
 
 
@@ -1039,7 +1041,7 @@ int decode_rm_operand64(struct guest_info * core, uint8_t * modrm_instr,
        */
 
        operand->operand = ADDR_MASK(get_addr_linear(core, base_addr, seg), 
-                               get_addr_width(core, instr));
+                                    get_addr_width(core, instr));
     }