diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-03 13:56:00 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-10-03 13:56:00 +0000 |
commit | 30ca2aab8e7419d2c8cf597743633a6477840277 (patch) | |
tree | 5692e8dfdb7f3745c4b9e8af3fa149c0af124d5a /hw/pci.c | |
parent | 8a8a608f6e2dc3d258bd765afa0aea6e1c33475c (diff) |
ne2000 savevm support (Johannes Schindelin)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1092 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pci.c')
-rw-r--r-- | hw/pci.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -62,6 +62,24 @@ static PCIBus *pci_register_bus(void) return bus; } +void generic_pci_save(QEMUFile* f, void *opaque) +{ + PCIDevice* s=(PCIDevice*)opaque; + + qemu_put_buffer(f, s->config, 256); +} + +int generic_pci_load(QEMUFile* f, void *opaque, int version_id) +{ + PCIDevice* s=(PCIDevice*)opaque; + + if (version_id != 1) + return -EINVAL; + + qemu_get_buffer(f, s->config, 256); + return 0; +} + /* -1 for devfn means auto assign */ PCIDevice *pci_register_device(PCIBus *bus, const char *name, int instance_size, int devfn, @@ -558,6 +576,8 @@ void piix3_init(PCIBus *bus) d = (PIIX3State *)pci_register_device(bus, "PIIX3", sizeof(PIIX3State), -1, NULL, NULL); + register_savevm("PIIX3", 0, 1, generic_pci_save, generic_pci_load, d); + piix3_state = d; pci_conf = d->dev.config; |