From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvBqu-0003Rj-DE for qemu-devel@nongnu.org; Tue, 15 Jan 2013 14:07:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvBqr-0006wP-SX for qemu-devel@nongnu.org; Tue, 15 Jan 2013 14:07:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvBqr-0006wL-L2 for qemu-devel@nongnu.org; Tue, 15 Jan 2013 14:07:13 -0500 Message-ID: <50F5A951.7020706@redhat.com> Date: Tue, 15 Jan 2013 20:09:05 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1358207252-23852-1-git-send-email-lersek@redhat.com> <50F58992.90005@redhat.com> In-Reply-To: <50F58992.90005@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: blauwirbel@gmail.com, akong@redhat.com, qemu-devel@nongnu.org On 01/15/13 17:53, Paolo Bonzini wrote: > Il 15/01/2013 00:47, Laszlo Ersek ha scritto: >> @@ -442,12 +455,14 @@ static void piix3_reset(void *opaque) >> pci_conf[0xae] = 0x00; >> >> d->pic_levels = 0; >> + d->rcr = 0; >> } >> >> static int piix3_post_load(void *opaque, int version_id) >> { >> PIIX3State *piix3 = opaque; >> piix3_update_irq_levels(piix3); >> + piix3->rcr &= 2; /* keep System Reset type only */ >> return 0; >> } >> >> @@ -464,7 +479,7 @@ static void piix3_pre_save(void *opaque) >> >> static const VMStateDescription vmstate_piix3 = { >> .name = "PIIX3", >> - .version_id = 3, >> + .version_id = 4, >> .minimum_version_id = 2, >> .minimum_version_id_old = 2, >> .post_load = piix3_post_load, >> @@ -473,15 +488,46 @@ static const VMStateDescription vmstate_piix3 = { >> VMSTATE_PCI_DEVICE(dev, PIIX3State), >> VMSTATE_INT32_ARRAY_V(pci_irq_levels_vmstate, PIIX3State, >> PIIX_NUM_PIRQS, 3), >> + VMSTATE_UINT8_V(rcr, PIIX3State, 4), >> VMSTATE_END_OF_LIST() >> } > > It would be nice to put this in a subsection, since it should be almost > always 0. OK, "docs/migration.txt" seems to explain subsections nicely. I'll try to figure it out. I agree that rcr will be almost always 0 and should not impede newer-to-older migration if possible. > Otherwise, the patch looks good. Thanks for the review! Laszlo