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: Tue, 28 Sep 2004 03:34:19 +0100

On Tue, 2004-09-28 at 00:23 +0200, Johannes Schindelin wrote:
> > 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.

Yeah, the PCI subsystem is really nice, but if you look at each system
(pc, ppc, etc..), there has to be some code there to hook up PIC's,
timers, etc...

As more hardware is added (lets say we get SMP support in future), the
possible number of configurations become greater, and the more twisted
that code there will get.

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

Yeah, I'm more talking about adding and removing NIC's for example.. Or
when I get around to finishing USB support, allowing a digital camera on
the host to be added to the guest system at runtime :)

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

Yeah, that's perfect from my POV. But it's Fabrices opinion that really
matters ;)

-- 
// 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]