From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43687) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy7TF-0007d3-8y for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:26:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy7TD-000712-LA for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:26:09 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:57761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy7TD-00070x-IX for qemu-devel@nongnu.org; Mon, 29 Aug 2011 15:26:07 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e4.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p7TJ2kqM008751 for ; Mon, 29 Aug 2011 15:02:46 -0400 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p7TJQ2Js151766 for ; Mon, 29 Aug 2011 15:26:02 -0400 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p7TDPvkb009538 for ; Mon, 29 Aug 2011 07:25:57 -0600 Message-ID: <4E5BE7C5.60705@us.ibm.com> Date: Mon, 29 Aug 2011 14:25:57 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E58FC3F.6080809@web.de> In-Reply-To: <4E58FC3F.6080809@web.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] pc: Clean up PIC-to-APIC IRQ path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Lucas Meneghel Rodrigues , Marcelo Tosatti , Gerd Hoffmann , qemu-devel , Avi Kivity On 08/27/2011 09:16 AM, Jan Kiszka wrote: > From: Jan Kiszka > > The master PIC is connected to the LINTIN0 of the APICs. As the APIC > currently does not track the state of that line, we have to ask the PIC > to re-inject its IRQ after the CPU picked up an event from the APIC. > > Adds the proper state tracking so that we can already re-assert the CPU > IRQ at APIC level if there is a pending PIC IRQ. This allows to remove > all the old workarounds. > > The patch also fixes some failures of the kvm unit tests apic and > eventinj by enabling a proper CPU IRQ deassert when the guest masks some > pending IRQs at PIC level. > > Signed-off-by: Jan Kiszka > --- > > It turned out that this patch from a larger cleanup series has no > dependencies and can be applied directly to master to fix the observed > bug. > > hw/apic.c | 4 +++- > hw/i8259.c | 10 ++-------- > hw/pc.c | 3 --- > hw/pc.h | 1 - > 4 files changed, 5 insertions(+), 13 deletions(-) > > diff --git a/hw/apic.c b/hw/apic.c > index d8f56c8..22ad635 100644 > --- a/hw/apic.c > +++ b/hw/apic.c > @@ -104,6 +104,7 @@ struct APICState { > QEMUTimer *timer; > int sipi_vector; > int wait_for_sipi; > + int pic_level; > }; Does this need to be save/restored for migration? Regards, Anthony Liguori