From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59090 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOGjt-0001Jb-Jo for qemu-devel@nongnu.org; Mon, 14 Jun 2010 16:59:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOGji-00080b-Rm for qemu-devel@nongnu.org; Mon, 14 Jun 2010 16:58:30 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:56474) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOGji-0007ly-P3 for qemu-devel@nongnu.org; Mon, 14 Jun 2010 16:58:26 -0400 Received: by mail-iw0-f173.google.com with SMTP id 10so4582648iwn.4 for ; Mon, 14 Jun 2010 13:58:26 -0700 (PDT) Message-ID: <4C1697F3.3090107@codemonkey.ws> Date: Mon, 14 Jun 2010 15:58:27 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RESEND PATCH] acpi_piix4: save gpe and pci hotplug slot status References: <20100614202803.5259.85808.stgit@localhost.localdomain> In-Reply-To: <20100614202803.5259.85808.stgit@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, quintela@redhat.com On 06/14/2010 03:28 PM, Alex Williamson wrote: > PCI hotplug currently doesn't work after a migration because > we don't migrate the enable bits of the GPE state. Pull hotplug > structs into vmstate. > > Signed-off-by: Alex Williamson > Applied. Thanks. Regards, Anthony Liguori > --- > > hw/acpi_piix4.c | 29 ++++++++++++++++++++++++++++- > 1 files changed, 28 insertions(+), 1 deletions(-) > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > index a87286b..8d1a628 100644 > --- a/hw/acpi_piix4.c > +++ b/hw/acpi_piix4.c > @@ -283,9 +283,33 @@ static int vmstate_acpi_post_load(void *opaque, int version_id) > return 0; > } > > +static const VMStateDescription vmstate_gpe = { > + .name = "gpe", > + .version_id = 1, > + .minimum_version_id = 1, > + .minimum_version_id_old = 1, > + .fields = (VMStateField []) { > + VMSTATE_UINT16(sts, struct gpe_regs), > + VMSTATE_UINT16(en, struct gpe_regs), > + VMSTATE_END_OF_LIST() > + } > +}; > + > +static const VMStateDescription vmstate_pci_status = { > + .name = "pci_status", > + .version_id = 1, > + .minimum_version_id = 1, > + .minimum_version_id_old = 1, > + .fields = (VMStateField []) { > + VMSTATE_UINT32(up, struct pci_status), > + VMSTATE_UINT32(down, struct pci_status), > + VMSTATE_END_OF_LIST() > + } > +}; > + > static const VMStateDescription vmstate_acpi = { > .name = "piix4_pm", > - .version_id = 1, > + .version_id = 2, > .minimum_version_id = 1, > .minimum_version_id_old = 1, > .post_load = vmstate_acpi_post_load, > @@ -297,6 +321,9 @@ static const VMStateDescription vmstate_acpi = { > VMSTATE_STRUCT(apm, PIIX4PMState, 0, vmstate_apm, APMState), > VMSTATE_TIMER(tmr_timer, PIIX4PMState), > VMSTATE_INT64(tmr_overflow_time, PIIX4PMState), > + VMSTATE_STRUCT(gpe, PIIX4PMState, 2, vmstate_gpe, struct gpe_regs), > + VMSTATE_STRUCT(pci0_status, PIIX4PMState, 2, vmstate_pci_status, > + struct pci_status), > VMSTATE_END_OF_LIST() > } > }; > > > >