[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: 陳韋任
Subject: Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub
Date: Fri, 18 May 2012 10:56:49 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

> > 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. 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.


Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

reply via email to

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