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 decoder support for cr0 write handler
[palacios.git] / palacios / src / palacios / vmm_decoder.c
index 77ece9b..6d1299a 100644 (file)
@@ -1,37 +1,10 @@
 #include <palacios/vmm_decoder.h>
 
 
-
-/* The full blown instruction parser... */
-int v3_parse_instr(struct guest_info * info,
-                  char * instr_ptr,
-                  uint_t * instr_length, 
-                  addr_t * opcode,
-                  uint_t * opcode_length,
-                  struct x86_prefix_list * prefixes,
-                  struct x86_operand * src_operand,
-                  struct x86_operand * dst_operand,
-                  struct x86_operand * extra_operand) {
-
-  V3_ASSERT(src_operand != NULL);
-  V3_ASSERT(dst_operand != NULL);
-  V3_ASSERT(extra_operand != NULL);
-  V3_ASSERT(instr_length != NULL);
-  V3_ASSERT(info != NULL);
-
-  
-  // Ignore prefixes for now
-  while (is_prefix_byte(*instr_ptr)) {
-    instr_ptr++;
-    *instr_length++;
+int opcode_cmp(const uchar_t * op1, const uchar_t * op2) {
+  if (op1[0] != op2[0]) {
+    return op1[0] - op2[0];;
+  } else {
+    return memcmp(op1 + 1, op2 + 1, op1[0]);
   }
-
-
-  // Opcode table lookup, see xen/kvm
-
-
-
-
-
-  return 0;
 }