Skip to contentSkip to conversation

x86_emulate: set the operand size for SMSW/reg writeback.

PATCH New Tim Deegan 1 participant 1 message Jan 19, 2011

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

PATCH 1/1 x86_emulate: set the operand size for SMSW/reg writeback.

x86_emulate: set the operand size for SMSW/reg writeback. Otherwise it defaults to 0 bytes.

xen/arch/x86/x86_emulate/x86_emulate.c +2 -0
diff -r d1631540bcc4 xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3557,6 +3557,8 @@ x86_emulate(
         case 4: /* smsw */
             if ( ea.type == OP_MEM )
                 ea.bytes = 2;
+            else
+                ea.bytes = op_bytes;
             dst = ea;
             fail_if(ops->read_cr == NULL);
             if ( (rc = ops->read_cr(0, &dst.val, ctxt)) )