qemu-devel
[Top][All Lists]
Advanced

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

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


From: Gianni Tedesco
Subject: Re: [Qemu-devel] Patch: NE2000 savevm problem solved!
Date: Mon, 27 Sep 2004 19:30:49 +0100

On Fri, 2004-09-24 at 12:07 +0200, Johannes Schindelin wrote:
> 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.

I'm not sure how well your pci_generic_{load,save} will work. What
devices did you test it on? Perhaps it would be a better idea to not
make it default, but allow devices to use them if they know they will
work.

As an aside. I think it's generally a good idea to make the hardware
more object oriented in nature. ie. all devices have common methods
(ctor, dtor, load, save) and all bussess with (ctor, dtor, add, remove).

That would pave the way for having a nice GUI that allows user to
configure a machine, and in the future to configure it at run-time with
hot-swap. That would also be useful for OS developers to test their hot-
swap subsystems.

-- 
// Gianni Tedesco (gianni at scaramanga dot co dot uk)
lynx --source www.scaramanga.co.uk/scaramanga.asc | gpg --import
8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D





reply via email to

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