From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH] x86_emulate: Emulate nop (0x90) instruction Date: Sat, 14 Jun 2008 15:26:36 +0200 Message-ID: <87bq24no4z.fsf@basil.nowhere.org> References: <52d4a3890806140450k14a13025i3dd3a60187940804@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@qumranet.com, riel@surriel.com To: "Mohammed Gamal" Return-path: Received: from smtp-out03.alice-dsl.net ([88.44.63.5]:37472 "EHLO smtp-out03.alice-dsl.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753938AbYFNN1v (ORCPT ); Sat, 14 Jun 2008 09:27:51 -0400 In-Reply-To: <52d4a3890806140450k14a13025i3dd3a60187940804@mail.gmail.com> (Mohammed Gamal's message of "Sat, 14 Jun 2008 14:50:59 +0300") Sender: kvm-owner@vger.kernel.org List-ID: "Mohammed Gamal" writes: > ByteOp | DstReg | SrcMem | Mov | MemAbs, DstReg | SrcMem | Mov | MemAbs, > @@ -1560,6 +1560,9 @@ special_insn: > if (rc != 0) > goto done; > break; > + case 0x90: /* nop */ > + if(! (c->rex_prefix & 1) ) > + break; > case 0x9c: /* pushf */ > c->src.val = (unsigned long) ctxt->eflags; > emulate_push(ctxt); Is falling through to pushf really correct? And not sure what the if checks. iirc it should be just case 0x90: /* nop */ break; BTW there are lots more nop encodings. -Andi