From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [RFC PATCH] Emulate MOVBE Date: Wed, 10 Apr 2013 02:03:26 +0200 Message-ID: <20130410000326.GA3768@nazgul.tnic> References: <20130409234602.GI5077@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Andre Przywara , =?utf-8?B?SsO2cmcgUsO2ZGVs?= , "H. Peter Anvin" , x86-ml To: kvm@vger.kernel.org Return-path: Received: from mail.skyhub.de ([78.46.96.112]:47571 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759219Ab3DJAD1 (ORCPT ); Tue, 9 Apr 2013 20:03:27 -0400 Content-Disposition: inline In-Reply-To: <20130409234602.GI5077@pd.tnic> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Apr 10, 2013 at 01:46:02AM +0200, Borislav Petkov wrote: > +static int em_movbe(struct x86_emulate_ctxt *ctxt) > +{ > + char *valptr = ctxt->src.valptr; > + > + switch (ctxt->op_bytes) { > + case 2: > + *(u16 *)valptr = swab16(*(u16 *)valptr); > + break; > + case 4: > + *(u32 *)valptr = swab32(*(u32 *)valptr); Note to self: this destroys the src operand but it shouldn't. Fix it tomorrow. -- Regards/Gruss, Boris.