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.


added copyright tags
[palacios.git] / palacios / include / palacios / vmm_decoder.h
index 2617913..0d4fbba 100644 (file)
@@ -1,3 +1,6 @@
+/* Northwestern University */
+/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+
 #ifndef __VMM_EMULATE_H
 #define __VMM_EMULATE_H
 
@@ -47,6 +50,15 @@ struct x86_instr {
 };
 
 
+struct basic_instr_info {
+  uint_t instr_length;
+  uint_t op_size;
+  uint_t str_op    : 1;
+  uint_t has_rep : 1;
+};
+
+
+
   /************************/
  /* EXTERNAL DECODER API */
 /************************/
@@ -84,11 +96,12 @@ int v3_encode(struct guest_info * info, struct x86_instr * instr, char * instr_b
  * Gets the operand size for a memory operation
  *
  */
-int v3_basic_mem_decode(struct guest_info * info, addr_t instr_ptr, uint_t * size, uint_t * instr_len);
-
+int v3_basic_mem_decode(struct guest_info * info, addr_t instr_ptr, struct basic_instr_info * instr_info);
 
 
 
+/* Removes a rep prefix in place */
+void strip_rep_prefix(uchar_t * instr, int length);