qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v4 03/12] isa: Provide set_state callback


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC v4 03/12] isa: Provide set_state callback
Date: Thu, 09 Jun 2011 12:39:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10

  Hi,

+const VMStateDescription vmstate_isa_device = {
+    .name = "ISADevice",
+    .version_id = 1,
+    .minimum_version_id = 1,
+    .fields = (VMStateField []) {
+        VMSTATE_BOOL(enabled, ISADevice),
+        VMSTATE_END_OF_LIST()
+    }
+};

That alone isn't enougth. You also need to save iobase and irq. And have a pre-load callback which disables the device + a post-load callback which re-enables them with the new settings.

I get the feeling that doing all this in the pc87312 emulation is easier as it needs to have this logic anyway for config register writes and you can probably reuse the code for loadvm pre- and postprocessing.

cheers,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]