From patchwork Wed Jun 2 16:58:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 103841 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o52GwYjM013775 for ; Wed, 2 Jun 2010 16:58:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932559Ab0FBQ6c (ORCPT ); Wed, 2 Jun 2010 12:58:32 -0400 Received: from qmta07.emeryville.ca.mail.comcast.net ([76.96.30.64]:37397 "EHLO qmta07.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752875Ab0FBQ6b (ORCPT ); Wed, 2 Jun 2010 12:58:31 -0400 Received: from omta05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by qmta07.emeryville.ca.mail.comcast.net with comcast id R0Gq1e0030vp7WLA74yWlh; Wed, 02 Jun 2010 16:58:30 +0000 Received: from localhost.localdomain ([75.71.122.219]) by omta05.emeryville.ca.mail.comcast.net with comcast id R4yV1e00J4k7Kz78R4yVFD; Wed, 02 Jun 2010 16:58:30 +0000 From: Alex Williamson Subject: [PATCH] acpi_piix4: save gpe and pci hotplug slot status To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, quintela@redhat.com, alex.williamson@redhat.com Date: Wed, 02 Jun 2010 10:58:29 -0600 Message-ID: <20100602165806.9089.28740.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 02 Jun 2010 16:58:34 +0000 (UTC) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 0fce958..091cdcd 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -282,9 +282,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, @@ -296,6 +320,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() } };