qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Patch: NE2000 savevm problem solved!


From: Johannes Schindelin
Subject: [Qemu-devel] Patch: NE2000 savevm problem solved!
Date: Fri, 24 Sep 2004 12:07:13 +0200 (CEST)

Hi,

With the attached patch, Win98 guest resumes -user-net properly after
loadvm'ming.

It adds savevm functions for NE2000State and PCIDevice, which I created by
"perl qemu-struct2savevm.pl NE2000State ne2000 < hw/ne2000.c" and
"perl qemu-struct2savevm.pl PCIDevice generic_pci < hw/ne2000.c".

Two issues remain:
- *Every* PCIDevice is now savevm'ed, because the savevm handler is
  registered in pci_register_device.
- the savevm handler is therefore registered with the name passed to
  pci_register_device. It would be probably better to prefix that with
  "pci_" (note that it only works at the moment because vga registers
  a "vga" savevm handler, while the PCI device is registered as "VGA").

I am willing to fix those issues when you tell me what solution you
prefer.

BTW, it would be sufficient to add savevm handlers for ne2000, its
PCIDevice, and piix3_state. Leave one out and you break user networking.
Knoppix only resumes properly, because it does not modify the irq of the
ne2000 card, and is much more clever about the internal state of that
card being possibly randomly reset.

Ciao,
Dscho

P.S.: If somebody cares for a technical description of savevm handlers, I
will write what I learnt so far.

Attachment: qemu-ne2000-savevm.patch
Description: Text document

Attachment: qemu-struct2savevm.pl
Description: Perl program


reply via email to

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