[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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]