From: Gianni Tedesco <gianni@scaramanga.co.uk>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Patch: NE2000 savevm problem solved!
Date: Tue, 28 Sep 2004 03:34:19 +0100 [thread overview]
Message-ID: <1096338859.3582.11.camel@sherbert> (raw)
In-Reply-To: <Pine.LNX.4.58.0409280013120.26121@wgmdd8.biozentrum.uni-wuerzburg.de>
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
prev parent reply other threads:[~2004-09-28 2:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-24 10:07 [Qemu-devel] Patch: NE2000 savevm problem solved! Johannes Schindelin
2004-09-27 18:30 ` Gianni Tedesco
2004-09-27 22:23 ` Johannes Schindelin
2004-09-28 2:34 ` Gianni Tedesco [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1096338859.3582.11.camel@sherbert \
--to=gianni@scaramanga.co.uk \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).