From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] monitor: Add port write command
Date: Tue, 14 Jul 2009 10:06:07 -0500 [thread overview]
Message-ID: <4A5C9EDF.3060705@codemonkey.ws> (raw)
In-Reply-To: <4A5C3FBB.10306@siemens.com>
Jan Kiszka wrote:
> Useful for testing hardware emulations or manipulating its state to
> stress guest drivers.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
Patch looks good.
Makes me think of an idea I had a while ago. It's a rather radical
change but I think we could target it for 0.12. Today, the vast
majority of our save/restore code looks like:
save:
// version checks
qemu_put_type(f, &field);
...
load:
// version checks
qemu_get_type(f, &field);
...
// optional depending on version
qemu_get_type(f, &field);
device_reset(s);
We could convert this to something this to be largely data drive. For
instance,
SaveVMFields fields[] = {
{ offsetof(DeviceState, field), "field", TYPE, VERSION },
{},
};
SaveVMDescription desc = {
.fields = fields,
.version = CURRENT_VERSION,
.reset = device_reset,
};
What would be really cool about this change is that we could introduce a
new set of commands to manipulate device state. We could save/restore
individual device state and that would allow us to dump device state via
the monitor and to manipulate individual fields of the device state. I
think this could be pretty useful for debugging.
I'm curious if anyone else is interested in this sort of change.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-07-14 15:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 8:20 [Qemu-devel] [PATCH] monitor: Add port write command Jan Kiszka
2009-07-14 15:06 ` Anthony Liguori [this message]
[not found] ` <m31voj47ht.fsf@neno.mitica>
2009-07-14 15:49 ` [Qemu-devel] " Anthony Liguori
2009-07-14 18:57 ` [Qemu-devel] " Blue Swirl
2009-07-14 19:30 ` Paul Brook
2009-07-14 20:03 ` Anthony Liguori
2009-07-14 20:37 ` [Qemu-devel] " Jan Kiszka
2009-07-15 7:34 ` [Qemu-devel] " Gleb Natapov
2009-07-15 10:14 ` Paul Brook
2009-07-15 10:40 ` Jan Kiszka
2009-07-15 11:14 ` Gleb Natapov
2009-07-15 11:12 ` Gleb Natapov
2009-07-15 12:36 ` Anthony Liguori
2009-07-15 14:38 ` Paul Brook
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=4A5C9EDF.3060705@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--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).