From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: x86: properly update ready_for_interrupt_injection Date: Tue, 04 May 2010 12:30:11 +0300 Message-ID: <4BDFE923.6000201@redhat.com> References: <20100504020427.GA30374@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm , Gleb Natapov To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11357 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753401Ab0EDJaR (ORCPT ); Tue, 4 May 2010 05:30:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o449UCNN019992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 4 May 2010 05:30:17 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o449UBun025351 for ; Tue, 4 May 2010 05:30:12 -0400 In-Reply-To: <20100504020427.GA30374@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 05/04/2010 05:04 AM, Marcelo Tosatti wrote: > The recent changes to emulate string instructions without entering guest > mode exposed a bug where pending interrupts are not properly reflected > in ready_for_interrupt_injection. > > The result is that userspace overwrites a previously queued interrupt, > when irqchip's are emulated in qemu. > > Applied, thanks. > Fix by always updating state before returning to userspace. > Why are we even doing this if irqchip_in_kernel? -- error compiling committee.c: too many arguments to function