From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8Yyk-000091-4H for qemu-devel@nongnu.org; Mon, 03 Sep 2012 11:54:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8Yyi-0001oH-QS for qemu-devel@nongnu.org; Mon, 03 Sep 2012 11:54:21 -0400 Received: from goliath.siemens.de ([192.35.17.28]:19500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8Yyi-0001lJ-Gd for qemu-devel@nongnu.org; Mon, 03 Sep 2012 11:54:20 -0400 Message-ID: <5044D2A7.7000609@siemens.com> Date: Mon, 03 Sep 2012 17:54:15 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1346640974-30974-1-git-send-email-mmogilvi_qemu@miniinfo.net> <1346640974-30974-6-git-send-email-mmogilvi_qemu@miniinfo.net> <50446D11.5050904@suse.de> <5044C10D.7050600@redhat.com> <87fw6z5d0e.fsf@elfo.mitica> <5044D243.3050506@redhat.com> In-Reply-To: <5044D243.3050506@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 5/5] i8259: fix dynamically masking slave IRQs with IMR register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Paolo Bonzini , Matthew Ogilvie , qemu-devel@nongnu.org, =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , quintela@redhat.com On 2012-09-03 17:52, Avi Kivity wrote: > On 09/03/2012 06:42 PM, Juan Quintela wrote: >> Avi Kivity wrote: >>> On 09/03/2012 11:40 AM, Andreas F=C3=A4rber wrote: >>>> Am 03.09.2012 04:56, schrieb Matthew Ogilvie: >>>>> diff --git a/hw/i8259_common.c b/hw/i8259_common.c >>>>> index ab3d98b..dcde5f2 100644 >>>>> --- a/hw/i8259_common.c >>>>> +++ b/hw/i8259_common.c >>>> [...] >>>>> @@ -111,6 +112,7 @@ static const VMStateDescription vmstate_pic_com= mon =3D { >>>>> VMSTATE_UINT8(isr, PICCommonState), >>>>> VMSTATE_UINT8(priority_add, PICCommonState), >>>>> VMSTATE_UINT8(irq_base, PICCommonState), >>>>> + VMSTATE_UINT8(icw3, PICCommonState), >>>>> VMSTATE_UINT8(read_reg_select, PICCommonState), >>>>> VMSTATE_UINT8(poll, PICCommonState), >>>>> VMSTATE_UINT8(special_mask, PICCommonState), >>>> >>>> Additional VMState needs to be versioned by incrementing .version_id= and >>>> by specifying the new version number here. Otherwise it breaks migra= tion. >> >> For the subsection, only sending this when icw3 !=3D 0 is enough? I a= m >> searching for a test about when we need to send it. >=20 > Looks like the optimal condition is ((s->icw3 & ~s->eclr) !=3D 0) (i.e. > bit set in icw3 but clear in eclr). The standard PC values are optimal: 4 for master, 2 for slave. Jan --=20 Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux