aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-01-19 15:29:04 +0000
committerKeir Fraser <keir@xen.org>2011-01-19 15:29:04 +0000
commit4535b2301dd123b8faf1b2110401017434f6b9bb (patch)
tree281890b014568ff4b214b2ea0e0b205c1bb9a734
parentf56daba7cf165d4e0d91224ecd5b898dfcdb4eb8 (diff)
downloadxen-4535b2301dd123b8faf1b2110401017434f6b9bb.tar.gz
xen-4535b2301dd123b8faf1b2110401017434f6b9bb.tar.bz2
xen-4535b2301dd123b8faf1b2110401017434f6b9bb.zip
x86_emulate: set the operand size for SMSW/reg writeback.
Otherwise it defaults to 0 bytes. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Signed-off-by: Keir Fraser <keir@xen.org>
-rw-r--r--xen/arch/x86/x86_emulate/x86_emulate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index d6586d6944..186cef2b9b 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3555,8 +3555,7 @@ x86_emulate(
goto done;
break;
case 4: /* smsw */
- if ( ea.type == OP_MEM )
- ea.bytes = 2;
+ ea.bytes = (ea.type == OP_MEM) ? 2 : op_bytes;
dst = ea;
fail_if(ops->read_cr == NULL);
if ( (rc = ops->read_cr(0, &dst.val, ctxt)) )