On 23 February 2016 at 10:02, hitmoon <zxq_yx_...@163.com> wrote: > I still can NOT understand your intention properly. Can you explain more > clearly?
VMState structures should generally mirror the structs they are saving/restoring. The M48txxISAState has an entry that just says "state is an M48t59State struct. Your VMState for M48txxISAState should therefore also have an entry saying "state is an M48t59State struct", it should not manually include all the fields in state. If you look for uses of VMSTATE_STRUCT in the codebase you'll find some examples. You also need to be able to test that migration works if you save data on a QEMU built before you make this change and then reload the data after it. So you need to find a test setup which uses this device (ie a working command line for a machine that uses it, preferably with a real guest) and make sure you can do vmsave/load. thanks -- PMM