> > 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. Regards, chenwj -- 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