qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC for-next 0/2] QOM VMStateDescription remix


From: Andreas Färber
Subject: Re: [Qemu-devel] [RFC for-next 0/2] QOM VMStateDescription remix
Date: Mon, 02 Sep 2013 13:28:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Am 29.07.2013 04:03, schrieb Andreas Färber:
> Hello,
> 
> Based on a comment from mst, this mini-series proposes to change semantics of
> VMStateDescription registration to be more similar to those of static 
> properties.
> 
> Today, a device has one VMStateDescription, the last assignment to dc->vmsd 
> wins.
> This means that a device must take care to include state of its parent type.
> To avoid dealing with individual fields, VMSTATE_STRUCT() and wrappers have
> been used. Such fields often require access of the deprecated QOM parent 
> field.
> 
> The proposal is that, e.g., TYPE_CPU assigns its own VMStateDescription and
> derived types (e.g., TYPE_ALPHA_CPU) register a VMStateDescription with name
> and versions to be used and only the fields specific to that type.
> In this v1, versions of the parents' vmsd are ignored, so someone changing 
> CPU's
> DeviceClass::vmsd (as opposed to DeviceClass::vmsd->fields[0].vmsd) would need
> to assure appropriate .field_exists tests or bump the version of derived 
> types'
> vmsd as if a field had been added there.

Ping?

Andreas

> 
> Only rudimentarily tested: I've run some machines that didn't crash on 
> startup.
> 
> Regards,
> Andreas
> 
> Cc: Michael S. Tsirkin <address@hidden>
> Cc: Juan Quintela <address@hidden>
> Cc: Anthony Liguori <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> 
> Andreas Färber (2):
>   qdev: Construct VMStateDescription from type hierarchy
>   cpu: Move VMSTATE_CPU() into TYPE_CPU VMStateDescription
> 
>  hw/core/qdev.c            | 102 
> +++++++++++++++++++++++++++++++++++++++++-----
>  include/hw/qdev-core.h    |   1 +
>  include/qom/cpu.h         |   4 --
>  qom/cpu.c                 |  10 +++++
>  stubs/vmstate.c           |   1 +
>  target-alpha/machine.c    |   1 -
>  target-openrisc/machine.c |   1 -
>  7 files changed, 103 insertions(+), 17 deletions(-)
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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