[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] monitor: Add port write command
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH] monitor: Add port write command |
Date: |
Tue, 14 Jul 2009 21:57:16 +0300 |
On 7/14/09, Anthony Liguori <address@hidden> wrote:
> Jan Kiszka wrote:
>
> > Useful for testing hardware emulations or manipulating its state to
> > stress guest drivers.
> >
> > Signed-off-by: Jan Kiszka <address@hidden>
> >
> >
>
> 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.
Excellent idea!
- [Qemu-devel] [PATCH] monitor: Add port write command, Jan Kiszka, 2009/07/14
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Anthony Liguori, 2009/07/14
- Message not available
- Re: [Qemu-devel] [PATCH] monitor: Add port write command,
Blue Swirl <=
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Paul Brook, 2009/07/14
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Gleb Natapov, 2009/07/15
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Paul Brook, 2009/07/15
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Jan Kiszka, 2009/07/15
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Gleb Natapov, 2009/07/15
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Gleb Natapov, 2009/07/15
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Anthony Liguori, 2009/07/15
- Re: [Qemu-devel] [PATCH] monitor: Add port write command, Paul Brook, 2009/07/15