qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gianni Tedesco <gianni@scaramanga.co.uk>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Patch: NE2000 savevm problem solved!
Date: Mon, 27 Sep 2004 19:30:49 +0100	[thread overview]
Message-ID: <1096309850.14214.10.camel@sherbert> (raw)
In-Reply-To: <Pine.LNX.4.58.0409241152070.12373@wgmdd8.biozentrum.uni-wuerzburg.de>

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	other threads:[~2004-09-27 18:39 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 [this message]
2004-09-27 22:23   ` Johannes Schindelin
2004-09-28  2:34     ` Gianni Tedesco

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