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: Johannes Schindelin
Subject: Re: [Qemu-devel] Patch: NE2000 savevm problem solved!
Date: Tue, 28 Sep 2004 00:23:49 +0200 (CEST)

Hi,

On Mon, 27 Sep 2004, Gianni Tedesco wrote:

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

Yes, it is better not to make it a default, I agree. I tested with a
standard configuration using Win98 guest, i.e. Cirrus VGA, NE2000, etc. As
nothing broke, I decided to use it as a default for a quick fix, and find
a better solution later.

> 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).

I find that a lot of that is there already. There may not be a base
prototype for the constructor, but the savevm mechanism works quite well
(You register support for it in the "ctor" by register_savevm, where you
supply a load and a save function which comply with a prototype), and what
I saw from PCI looked fine by me. And there exist sort of constructors for
every device, i.e. pci_ne2000_init() for the network card.

> 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.

Well, as for the GUI thing... A normal user would probably need just a way
to change the CD or the floppy with a nice File Chooser.

Anyway, what I wanted to achieve was to find out why network was a
netunwork after loadvm'ing, and maybe fix it. That I did. Would it be okay
for you if I keep the generic_pci_load/save(), but add a prototype and let
piix and ne2000 handle the register_savevm() themselves?

Ciao,
Dscho





reply via email to

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