From: Tim Deegan Subject: [PATCH] x86_emulate: set the operand size for SMSW/reg writeback. Date: Wed, 19 Jan 2011 11:37:35 +0000 Message-ID: <20110119113735.GA8286@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org x86_emulate: set the operand size for SMSW/reg writeback. Otherwise it defaults to 0 bytes. Signed-off-by: Tim Deegan diff -r d1631540bcc4 xen/arch/x86/x86_emulate/x86_emulate.c --- a/xen/arch/x86/x86_emulate/x86_emulate.c Tue Jan 18 17:23:24 2011 +0000 +++ b/xen/arch/x86/x86_emulate/x86_emulate.c Wed Jan 19 11:34:22 2011 +0000 @@ -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)) )