mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
migration: extend VMStateInfo
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com> Message-Id: <1484852453-12728-2-git-send-email-duanj@linux.vnet.ibm.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
d7fc72ceb5
commit
2c21ee769e
22 changed files with 262 additions and 105 deletions
|
@ -56,7 +56,7 @@ static const VMStateDescription vmstate_tlb_entry = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static int get_psr(QEMUFile *f, void *opaque, size_t size)
|
||||
static int get_psr(QEMUFile *f, void *opaque, size_t size, VMStateField *field)
|
||||
{
|
||||
SPARCCPU *cpu = opaque;
|
||||
CPUSPARCState *env = &cpu->env;
|
||||
|
@ -69,7 +69,8 @@ static int get_psr(QEMUFile *f, void *opaque, size_t size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void put_psr(QEMUFile *f, void *opaque, size_t size)
|
||||
static int put_psr(QEMUFile *f, void *opaque, size_t size, VMStateField *field,
|
||||
QJSON *vmdesc)
|
||||
{
|
||||
SPARCCPU *cpu = opaque;
|
||||
CPUSPARCState *env = &cpu->env;
|
||||
|
@ -78,6 +79,7 @@ static void put_psr(QEMUFile *f, void *opaque, size_t size)
|
|||
val = cpu_get_psr(env);
|
||||
|
||||
qemu_put_be32(f, val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const VMStateInfo vmstate_psr = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue