[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 21/23] Port PCIDevice state to VMState
From: |
Juan Quintela |
Subject: |
[Qemu-devel] Re: [PATCH 21/23] Port PCIDevice state to VMState |
Date: |
Fri, 21 Aug 2009 11:01:34 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Gerd Hoffmann <address@hidden> wrote:
> On 08/20/09 19:42, Juan Quintela wrote:
>> This uses a variant of buffer, with extra checks. Also uses the new
>> support for cheking that a read value is less or equal than a field.
>
> Hmm, why you are hopping through all these loops?
>
> I'd just keep the existing pci_device_{save,load} functions. load
> anyway for backward compatibility. save also for devices not yet
> converted to vmstate. I think alot of the complex stuff you are
> building up here isn't needed then, unless I missed something ...
In this specific case, I think that sending:
size + number of things
it is safe. I agree that the INT32_EQUAL is a bad idea. But that is how
the current code is done.
> Beside that we'll have to think about how to handle versioning of
> structs. Do we want vmstate_pci_device (and all others) have its own
> version? Probably makes sense. Handling this should go into the
> generic code then and not be hacked into each structure using
> VMSTATE_INT32_LE().
Proper solution here is to use subsections.
Each time that you call VMSTATE_PCI_DEVICE() it sends a subsection
there. Then we get the versioning by free. This is how I am thinking
it is the right way to do it.
virtio stuff: the more than I think about it, the easier way is to just
get rid of the whole mess and do something that is sensible.
Later, Juan.
> cheers,
> Gerd
- Re: [Qemu-devel] [PATCH 16/23] Port PCI Bus to VMState design, (continued)
[Qemu-devel] [PATCH 14/23] Add VMState support for int32_t check value, Juan Quintela, 2009/08/20
[Qemu-devel] [PATCH 18/23] Port PS2 devices to VMState design, Juan Quintela, 2009/08/20
[Qemu-devel] [PATCH 17/23] Add VMState support for static sized buffers (uint_8), Juan Quintela, 2009/08/20
[Qemu-devel] [PATCH 19/23] Add VMState support for int32_t check value, Juan Quintela, 2009/08/20
[Qemu-devel] [PATCH 22/23] Add VMState support to run a function after load, Juan Quintela, 2009/08/20
[Qemu-devel] [PATCH 21/23] Port PCIDevice state to VMState, Juan Quintela, 2009/08/20
[Qemu-devel] [PATCH 20/23] Add version_id to PCIDevice., Juan Quintela, 2009/08/20
[Qemu-devel] [PATCH 23/23] Port ACPI to VMState, Juan Quintela, 2009/08/20
Re: [Qemu-devel] [PATCH 00/23] New VMState table based load/save infrastructure, Gerd Hoffmann, 2009/08/21