diff options
author | Keir Fraser <keir@xen.org> | 2011-01-21 16:03:04 +0000 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2011-01-21 16:03:04 +0000 |
commit | 7e6076dabe2a0c00cbefc2536af6b965cf35d002 (patch) | |
tree | 5664403fa410ea9a57e5b5fc666ba90d51c05f69 | |
parent | adcc41a72a0425dc6280f2a8da92d8a9136128f8 (diff) | |
download | xen-7e6076dabe2a0c00cbefc2536af6b965cf35d002.tar.gz xen-7e6076dabe2a0c00cbefc2536af6b965cf35d002.tar.bz2 xen-7e6076dabe2a0c00cbefc2536af6b965cf35d002.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>
xen-unstable changeset: 22782:fe8a177ae9cb
xen-unstable date: Wed Jan 19 15:29:04 2011 +0000
-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)) ) |