On 12/20/2011 09:56 PM, Anthony Liguori wrote:
As always, you can implement that in many ways. However, I think the
point of using Visitors is not to remove QEMUFile.
Yes, it is.
The point of using Visitors is to provide a standard representation of
device state. QEMUFile is but one consumer of that representation,
along with any other migration filter.
We need something like a migration filter capability where we can
encapsulate this kind of logic such that we can ween VMState away
from these things (and ultimately switch to an IDL compiler).
We can't do a migration filter until we have something like Michael's
series.
Agreed. I'm saying that the QEMUFile serialization should be the first
example of a migration filter. Mike's patch add a layer of indirection
in the code, but not in the data. We can't do a migration filter until
we have device state represented as introspectable data.
Yes, this is accurate, but I see the goals differently. We should:
(1) First and foremost, provide a backend-independent representation
of device state so that we can add other backends later.
And Mike's series does this, no?
No.
(2) Serialize this with QEMUFile, both for backwards-compatibility and
to ensure that the whole thing works.
Mike's series also does this, no?
It serializes device state directly, without going through a
backend-independent representation. It doesn't provide a place in which
you can plug a filter.
Paolo