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.


mask out v8086 mode of flags register
Jack Lange [Wed, 13 Apr 2011 20:24:08 +0000 (15:24 -0500)]
palacios/include/palacios/vmm_instr_emulator.h

index 84b07a4..7559f05 100644 (file)
@@ -23,7 +23,7 @@
 
 #define MAKE_1OP_8FLAGS_INST(iname) static inline void iname##8(addr_t * dst,  addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
@@ -42,7 +42,7 @@
 
 #define MAKE_1OP_16FLAGS_INST(iname) static inline void iname##16(addr_t * dst,  addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
@@ -61,7 +61,7 @@
 
 #define MAKE_1OP_32FLAGS_INST(iname) static inline void iname##32(addr_t * dst,  addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
@@ -80,7 +80,7 @@
 
 #define MAKE_1OP_64FLAGS_INST(iname) static inline void iname##64(addr_t * dst,  addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushfq; "                                        \
 
 #define MAKE_2OP_64FLAGS_INST(iname) static inline void iname##64(addr_t * dst, addr_t * src, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushfq\r\n"                                      \
 
 #define MAKE_2OP_32FLAGS_INST(iname) static inline void iname##32(addr_t * dst, addr_t * src, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
 
 #define MAKE_2OP_16FLAGS_INST(iname) static inline void iname##16(addr_t * dst, addr_t * src, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
 
 #define MAKE_2OP_8FLAGS_INST(iname) static inline void iname##8(addr_t * dst, addr_t * src, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
                                                                addr_t * src, \
                                                                addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushfq; "                                        \
                                                                addr_t * src, \
                                                                addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
                                                                addr_t * src, \
                                                                addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
                                                              addr_t * src, \
                                                              addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
                                                                addr_t * src, \
                                                                addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushfq; "                                        \
                                                                addr_t * src, \
                                                                addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
                                                                addr_t * src, \
                                                                addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \
                                                              addr_t * src, \
                                                              addr_t * ecx, addr_t * flags) { \
        /* Some of the flags values are not copied out in a pushf, we save them here */ \
-       addr_t flags_rsvd = *flags & ~0xfffe7fff;                       \
+       addr_t flags_rsvd = *flags & ~0xfffc7fff;                       \
                                                                        \
        asm volatile (                                                  \
                      "pushf; "                                         \