diff options
author | Keir Fraser <keir@xen.org> | 2011-01-19 15:29:04 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-01-19 15:29:04 +0000 |
commit | 4535b2301dd123b8faf1b2110401017434f6b9bb (patch) | |
tree | 281890b014568ff4b214b2ea0e0b205c1bb9a734 /xen/arch/x86/x86_emulate | |
parent | f56daba7cf165d4e0d91224ecd5b898dfcdb4eb8 (diff) | |
download | xen-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>
Diffstat (limited to 'xen/arch/x86/x86_emulate')
-rw-r--r-- | xen/arch/x86/x86_emulate/x86_emulate.c | 3 |
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)) ) |