aboutsummaryrefslogtreecommitdiff
path: root/hw/piix_pci.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-17 10:46:34 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-08-17 10:46:34 +0000
commit1941d19c657a8084603e88d7860786baa40c0e80 (patch)
treee40f3b80ebfe96c335e594678218ae8b0eb726bc /hw/piix_pci.c
parent89b6b508929d63b2a3dda18692fcb724afb43336 (diff)
PCI save/restore changes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2115 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/piix_pci.c')
-rw-r--r--hw/piix_pci.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 1f7ad94c65..672b736ad0 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -181,6 +181,20 @@ static void piix3_reset(PCIDevice *d)
pci_conf[0xae] = 0x00;
}
+static void piix_save(QEMUFile* f, void *opaque)
+{
+ PCIDevice *d = opaque;
+ pci_device_save(d, f);
+}
+
+static int piix_load(QEMUFile* f, void *opaque, int version_id)
+{
+ PCIDevice *d = opaque;
+ if (version_id != 2)
+ return -EINVAL;
+ return pci_device_load(d, f);
+}
+
int piix3_init(PCIBus *bus)
{
PCIDevice *d;
@@ -188,7 +202,7 @@ int piix3_init(PCIBus *bus)
d = pci_register_device(bus, "PIIX3", sizeof(PCIDevice),
-1, NULL, NULL);
- register_savevm("PIIX3", 0, 1, generic_pci_save, generic_pci_load, d);
+ register_savevm("PIIX3", 0, 2, piix_save, piix_load, d);
piix3_dev = d;
pci_conf = d->config;