From: Keir Fraser Date: Wed, 19 Jan 2011 15:29:04 +0000 (+0000) Subject: x86_emulate: set the operand size for SMSW/reg writeback. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10903 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4535b2301dd123b8faf1b2110401017434f6b9bb;p=xen.git x86_emulate: set the operand size for SMSW/reg writeback. Otherwise it defaults to 0 bytes. Signed-off-by: Tim Deegan Signed-off-by: Keir Fraser --- 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)) )