From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8SXu-0006TY-5D for qemu-devel@nongnu.org; Mon, 03 Sep 2012 05:02:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8SXk-0001G0-K8 for qemu-devel@nongnu.org; Mon, 03 Sep 2012 05:02:14 -0400 Received: from mout.web.de ([212.227.17.11]:53719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8SPY-0007VJ-Tx for qemu-devel@nongnu.org; Mon, 03 Sep 2012 04:53:37 -0400 Message-ID: <5044700C.9090906@web.de> Date: Mon, 03 Sep 2012 10:53:32 +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> <50446F9A.4070809@web.de> In-Reply-To: <50446F9A.4070809@web.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4C611126E749FDF9D90FE41E" 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: Matthew Ogilvie Cc: Paolo Bonzini , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4C611126E749FDF9D90FE41E Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2012-09-03 10:51, Jan Kiszka wrote: >> 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 >> @@ -33,6 +33,7 @@ void pic_reset_common(PICCommonState *s) >> s->isr =3D 0; >> s->priority_add =3D 0; >> s->irq_base =3D 0; >> + s->icw3 =3D 0; >> s->read_reg_select =3D 0; >> s->poll =3D 0; >> s->special_mask =3D 0; >> @@ -111,6 +112,7 @@ static const VMStateDescription vmstate_pic_common= =3D { >> VMSTATE_UINT8(isr, PICCommonState), >> VMSTATE_UINT8(priority_add, PICCommonState), >> VMSTATE_UINT8(irq_base, PICCommonState), >> + VMSTATE_UINT8(icw3, PICCommonState), >=20 > Let's add this as an optional subsection, only written when it's not > 0x04 (for a master) or 0x2 (for a slave). See target-i386/machine.c for= > examples, or read docs/migration.txt. That will mean you need to set > icw3 to 0x4 before loading a vmstate (=3D> pre_load handler). Oh, and this code affects also the kvm-pic. So you have to maintain icw3 for that model as well, setting it to the PC defaults. Please test KVM after your changes, including migration. Jan --------------enig4C611126E749FDF9D90FE41E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBEcAwACgkQitSsb3rl5xSwZwCfS5OnnlwJkFIHEJtdaMh/d4UL QqYAn12r//O/bCODn31ctIwnxr61BVSQ =HVK8 -----END PGP SIGNATURE----- --------------enig4C611126E749FDF9D90FE41E--