[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub
Date: Sun, 20 May 2012 16:14:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0

Am 18.05.2012 04:56, schrieb 陳韋任:
>>> This is a mix of two ways of doing the same thing. You should only use
>>> VMState for new code.
>> did you mean I should not use QEMUFile?
>   I guess what Andreas means is there are two ways to do cpu_save/cpu_load,
> the one you wrote is the old style. For the brand new target, you should use
> VMState completely.

Exactly what I meant. Although I'm working towards making that even
easier by leveraging code from Juan's vmstate series and having the CPUs
just store a pointer to their VMStateDescription like devices do.


> You can take target-lm32/machine.c as an example.
> ---
> void cpu_save(QEMUFile *f, void *opaque)
> {
>     vmstate_save_state(f, &vmstate_cpu, opaque);
> }
> int cpu_load(QEMUFile *f, void *opaque, int version_id)
> {
>     return vmstate_load_state(f, &vmstate_cpu, opaque, version_id);
> }
> ---
>   Leave to vmstate_save_state/vmstate_load_state (savevm.c) do the real 
> things.
> Regards,
> chenwj

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]