From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: buggy emulate_int_real Date: Sun, 10 Apr 2011 11:30:25 +0300 Message-ID: <4DA16AA1.7010108@redhat.com> References: <20110408210900.GA26787@hallyn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: KVM mailing list To: "Serge E. Hallyn" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51596 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755254Ab1DJIa3 (ORCPT ); Sun, 10 Apr 2011 04:30:29 -0400 In-Reply-To: <20110408210900.GA26787@hallyn.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/09/2011 12:09 AM, Serge E. Hallyn wrote: > Hi, > > at https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/747090, it was > found that emulate_int_real() sometimes pushes the wrong eip when doing a > int. Whereas with non-kvm qemu we push the next instruction after the > int, with kvm we push the addr of the instruction itself. > The code says: c->src.val = c->eip; emulate_push(ctxt, ops); rc = writeback(ctxt, ops); if (rc != X86EMUL_CONTINUE) return rc; which appears to be the address of the next instruction from my reading of the code (see how insn_fetch() increments c->eip). -- error compiling committee.c: too many arguments to function