From patchwork Thu Apr 2 12:51:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 15917 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n32CpuUv011581 for ; Thu, 2 Apr 2009 12:51:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758780AbZDBMvv (ORCPT ); Thu, 2 Apr 2009 08:51:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757567AbZDBMvu (ORCPT ); Thu, 2 Apr 2009 08:51:50 -0400 Received: from mx2.redhat.com ([66.187.237.31]:37172 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760142AbZDBMvt (ORCPT ); Thu, 2 Apr 2009 08:51:49 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n32CpmqU015689 for ; Thu, 2 Apr 2009 08:51:48 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n32CpmSZ032715; Thu, 2 Apr 2009 08:51:48 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n32CpkZZ026538; Thu, 2 Apr 2009 08:51:47 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 587) id 927DC18D41D; Thu, 2 Apr 2009 15:51:46 +0300 (IDT) Date: Thu, 2 Apr 2009 15:51:46 +0300 From: Gleb Natapov To: avi@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH] fix call near emulation Message-ID: <20090402125146.GD29619@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The length of pushed on to the stack return address depends on operand size not address size. Signed-off-by: Gleb Natapov --- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index ca91749..d7c9f6f 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -1792,7 +1792,6 @@ special_insn: } c->src.val = (unsigned long) c->eip; jmp_rel(c, rel); - c->op_bytes = c->ad_bytes; emulate_push(ctxt); break; }