VMState port of all cpus
v5 cover VMState port of all cpus
This repository contains all the changes:
git://repo.or.cz/qemu/quintela.git vmstate-cpus-v4
[v5]
- rebase on top
- sparc psr change behaviour: old behaviour was unintended, thanks Blu
- alexander agreed with ppc changes
- patch missing already included for ppc
Anthony, please pull.
[v4]
- rebase to top
- adapt to vmstate.h change
- adapt to CPUState -> CPU$archState rename
- integrate arm changes in the meantime
- add QEMU contributors to the copyright notice of ppc & sparc
[v3]
- rebase to top
- fix sparc/arm/i386 changes in upstream
- all reviews were positive, Anthony, please pull
[v2] Changes since v1
- preserve arm comment that was missing (pbrook)
- add copyright notice to the files that were empty
- new patches:
* fix formating for i386
* remove unneeded includes
* rename machine.c to vmstate.c
[v1]
This series port all cpus to use vmstate.
- 1st patch is a fix of vmstate.
- I discussed the arm changes over irc with Peter, he agreed that some simplification could be good, but he didn't saw the patches O:-)
- mips: no pci chipset has been ported, so migration don't work there. I have embedded a couple of structs to improve vmstate checking. Notice that they were always allocated, so there shouldn't be any problem.
- sparc: I changed the format a little bit to be able to use normal arrays.
- sparc: If we always send the whole register windows, we don't need VMSTATE_VARRAY_MULTIPLY. As that array is quite big (520 elements), I am not sure what is best.
- cpsr_vmstate on arm: I am not sure if I could "abuse" uncached_cpsr for that purpose?
I have only tested on x86, for the rest, I double checked, but it is possible that I missed something. I expect all patches to be integrated by Anthony in one go. Architecture maintainers are CC'd for an ACK/NACK/comments.
Juan Quintela (35):
vmstate: Simplify test for CPU_SAVE_VERSION
vmstate: make all architectures export a way to migrate cpu's
vmstate: unicore32 don't support cpu migration
vmstate: use new cpu style for x86
vmstate: use new style for lm32 cpus
vmstate: make microblaze cpus not migrateable
vmstate: port cris cpu to vmstate
vmstate: introduce float32 arrays
vmstate: introduce float64 arrays
vmstate: introduce CPU_DoubleU arrays
vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST
vmstate: port ppc cpu
vmstate: introduce VMSTATE_VARRAY_MULTIPLY
vmstate: define vmstate_info_uinttls
vmstate: port sparc cpu
vmstate: make incompatible change for sparc
mips_fulong2e: cpu vmstate already registered in cpu_exec_init
mips: make mvp an embedded struct instead of a pointer
mips: make tlb an embedded struct instead of a pointer
mips: bump migration version to 4
vmstate: port mips cpu
arm: save always 32 fpu registers
vmstate: port arm cpu
vmstate: all cpus converted
vmstate: fix vmstate formating for i386
vmstate: remove unneeded includes from target-*/machine.c
vmstate: rename machine.c to vmstate-cpu.c
vmstate: Add copyright info for alpha processor
vmstate: Add copyright info for lm32 processor
vmstate: Add copyright info for cris processor
vmstate: Add copyright info for arm processor
vmstate: Add copyright info for i386 processor
vmstate: Add copyright info for mips processor
vmstate: Add copyright info for ppc processor
vmstate: Add copyright info for sparc processor
Makefile.target | 3 +-
exec.c | 7 +-
hw/hw.h | 2 +
hw/mips_fulong2e.c | 1 -
hw/mips_malta.c | 4 +-
hw/mips_timer.c | 2 +-
hw/sun4u.c | 20 --
qemu-common.h | 4 -
savevm.c | 80 +++++++
target-alpha/{machine.c => vmstate-cpu.c} | 28 ++-
target-arm/cpu.h | 5 +-
target-arm/machine.c | 233 ---------------------
target-arm/vmstate-cpu.c | 191 +++++++++++++++++
target-cris/cpu.h | 13 +-
target-cris/machine.c | 90 --------
target-cris/vmstate-cpu.c | 74 +++++++
target-i386/cpu.h | 2 -
target-i386/{machine.c => vmstate-cpu.c} | 64 ++++---
target-lm32/cpu.h | 2 -
target-lm32/{machine.c => vmstate-cpu.c} | 32 ++--
target-m68k/vmstate-cpu.c | 21 ++
target-microblaze/cpu.h | 2 -
target-microblaze/machine.c | 11 -
target-microblaze/vmstate-cpu.c | 21 ++
target-mips/cpu.h | 11 +-
target-mips/helper.c | 30 ++-
target-mips/machine.c | 308 ----------------------------
target-mips/op_helper.c | 70 ++++---
target-mips/translate.c | 22 ++-
target-mips/translate_init.c | 36 ++--
target-mips/vmstate-cpu.c | 225 ++++++++++++++++++++
target-ppc/cpu.h | 5 +-
target-ppc/machine.c | 173 ----------------
target-ppc/vmstate-cpu.c | 130 ++++++++++++
target-s390x/{machine.c => vmstate-cpu.c} | 14 +-
target-sh4/vmstate-cpu.c | 21 ++
target-sparc/cpu.h | 9 +-
target-sparc/machine.c | 217 -------------------
target-sparc/vmstate-cpu.c | 175 ++++++++++++++++
target-unicore32/cpu.h | 2 -
target-xtensa/{machine.c => vmstate-cpu.c} | 14 +-
vmstate.h | 60 +++++-
42 files changed, 1185 insertions(+), 1249 deletions(-)
rename target-alpha/{machine.c => vmstate-cpu.c} (85%)
delete mode 100644 target-arm/machine.c
create mode 100644 target-arm/vmstate-cpu.c
delete mode 100644 target-cris/machine.c
create mode 100644 target-cris/vmstate-cpu.c
rename target-i386/{machine.c => vmstate-cpu.c} (89%)
rename target-lm32/{machine.c => vmstate-cpu.c} (58%)
delete mode 100644 target-m68k/machine.c
create mode 100644 target-m68k/vmstate-cpu.c
delete mode 100644 target-microblaze/machine.c
create mode 100644 target-microblaze/vmstate-cpu.c
delete mode 100644 target-mips/machine.c
create mode 100644 target-mips/vmstate-cpu.c
delete mode 100644 target-ppc/machine.c
create mode 100644 target-ppc/vmstate-cpu.c
rename target-s390x/{machine.c => vmstate-cpu.c} (79%)
delete mode 100644 target-sh4/machine.c
create mode 100644 target-sh4/vmstate-cpu.c
delete mode 100644 target-sparc/machine.c
create mode 100644 target-sparc/vmstate-cpu.c
rename target-xtensa/{machine.c => vmstate-cpu.c} (88%)Signature · 1 line
1.7.7.6
PATCH v5 1/35 vmstate: Simplify test for CPU_SAVE_VERSION
Some cpu's definitions define CPU_SAVE_VERSION, others not, but they have defined cpu_save/load.
--- exec.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
exec.c +4 -2
@@ -650,7 +650,7 @@ void cpu_exec_init_all(void)#endif } -#if defined(CPU_SAVE_VERSION ) && !defined(CONFIG_USER_ONLY ) +#if !defined(CONFIG_USER_ONLY )static int cpu_common_post_load (void *opaque,int version_id) {
@@ -717,11 +717,13 @@ void cpu_exec_init(CPUArchState *env)#if defined(CONFIG_USER_ONLY )cpu_list_unlock ();#endif -#if defined(CPU_SAVE_VERSION ) && !defined(CONFIG_USER_ONLY ) +#if !defined(CONFIG_USER_ONLY )vmstate_register (NULL , cpu_index, &vmstate_cpu_common, env); +#if defined(CPU_SAVE_VERSION )register_savevm (NULL ,"cpu" , cpu_index,CPU_SAVE_VERSION , cpu_save, cpu_load, env);#endif +#endif }/* Allocate a new translation block. Flush the translation buffer if
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 01/35] vmstate: Simplify test for CPU_SAVE_VERSION
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 1 line
Some cpu's definitions define
CPU_SAVE_VERSION, others not, but they have
"CPUs' definitions"?
Quoted 1 line
defined cpu_save/load.
This commit message sounds wrong. Use of cpu_save/load is still coupled to CPU_SAVE_VERSION AFAICS.
What really changes is that vmstate_cpu_common is now registered whether or not the target supports loading/saving the target-specific parts, isn't it? Is that really useful? Either way, the commit message should be updated.
Andreas
Quoted 34 lines
Signed-off-by Juan Quintela <[email protected]>--- exec.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)exec.c +4
-2@@ -650,7 +650,7 @@ void cpu_exec_init_all(void)#endif } -#if defined(CPU_SAVE_VERSION ) && !defined(CONFIG_USER_ONLY ) +#if !defined(CONFIG_USER_ONLY )static int cpu_common_post_load (void *opaque,int version_id) {@@ -717,11 +717,13 @@ void cpu_exec_init(CPUArchState *env)#if defined(CONFIG_USER_ONLY )cpu_list_unlock ();#endif -#if defined(CPU_SAVE_VERSION ) && !defined(CONFIG_USER_ONLY ) +#if !defined(CONFIG_USER_ONLY )vmstate_register (NULL , cpu_index, &vmstate_cpu_common, env); +#if defined(CPU_SAVE_VERSION )register_savevm (NULL ,"cpu" , cpu_index,CPU_SAVE_VERSION , cpu_save, cpu_load, env);#endif +#endif }/* Allocate a new translation block. Flush the translation buffer if
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH 01/35] vmstate: Simplify test for CPU_SAVE_VERSION
Quoted 7 lines · Andreas Färber
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 1 line
Some cpu's definitions define
CPU_SAVE_VERSION, others not, but they have"CPUs' definitions"?
Quoted 1 line
defined cpu_save/load.
Quoted 7 lines
This commit message sounds wrong. Use of cpu_save/load is still coupled to
CPU_SAVE_VERSIONAFAICS.What really changes is that
vmstate_cpu_commonis now registered whether or not the target supports loading/saving the target-specific parts, isn't it? Is that really useful? Either way, the commit message should be updated.
For the cpus that weren't using CPU_SAVE_VERSION, we now register the system as unmigratable, so this don't matter. For the cpus that support migration, it was always sent. Code now is trivial to understand:
#if !defined(CONFIG_USER_ONLY)
vmstate_register(NULL, cpu_index, &vmstate_cpu_common, env);
vmstate_register(NULL, cpu_index, &vmstate_cpu, env);#endif
Befor it was a maze of ifdefs. No change of behaviour with what we had before. For either cpus that had[not] support for migration or not.
Re: [Qemu-devel] [PATCH 01/35] vmstate: Simplify test for CPU_SAVE_VERSION
Am 04.05.2012 13:59, schrieb Juan Quintela:
Quoted 16 lines
Quoted 7 lines · Andreas Färber
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 1 line
Some cpu's definitions define
CPU_SAVE_VERSION, others not, but they have"CPUs' definitions"?
Quoted 1 line
defined cpu_save/load.
Quoted 7 lines
This commit message sounds wrong. Use of cpu_save/load is still coupled to
CPU_SAVE_VERSIONAFAICS.What really changes is that
vmstate_cpu_commonis now registered whether or not the target supports loading/saving the target-specific parts, isn't it? Is that really useful? Either way, the commit message should be updated.
Quoted 8 lines
For the cpus that weren't using
CPU_SAVE_VERSION, we now register the system as unmigratable, so this don't matter. For the cpus that support migration, it was always sent. Code now is trivial to understand:#if !defined(CONFIG_USER_ONLY) vmstate_register(NULL, cpu_index, &vmstate_cpu_common, env); vmstate_register(NULL, cpu_index, &vmstate_cpu, env);#endif
No, that's not what's in the patch.
Quoted 2 lines
Befor it was a maze of ifdefs. No change of behaviour with what we had before. For either cpus that had[not] support for migration or not.
Please look at the patch again - it turns the one-ifdef block into two nested ifdefs. So therefore it is my understanding that - in lack of unmigratable VMSDs this patch - possibly temporarily, not all patches have arrived yet - changes the migration format in an odd way. In that case we should consider reordering the patch within the series.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH v5 2/35 vmstate: make all architectures export a way to migrate cpu's
In reply to Juan QuintelaThis makes several changes:
- exports VMStateDescription vmstate_cpu non-static.
- makes sure that every cpu has a vmstate_cpu or cpu_save/load defined
- for the architecture that had nothing, it just register the cpu as unmigratable.
- Depending on CPU_SAVE_VERSION we register old/new migration style
- Add copyrights to the new files
--- exec.c | 2 ++ target-alpha/machine.c | 12 +----------- target-i386/machine.c | 2 +- target-lm32/machine.c | 2 +- target-m68k/machine.c | 21 +++++++++++++++++++++ target-s390x/machine.c | 14 ++++++-------- target-sh4/machine.c | 21 +++++++++++++++++++++ target-xtensa/machine.c | 14 ++++++-------- vmstate.h | 2 ++ 9 files changed, 61 insertions(+), 29 deletions(-)
exec.c +2 -0
@@ -722,6 +722,8 @@ void cpu_exec_init(CPUArchState *env)#if defined(CPU_SAVE_VERSION )register_savevm (NULL ,"cpu" , cpu_index,CPU_SAVE_VERSION , cpu_save, cpu_load, env); +#else +vmstate_register (NULL , cpu_index, &vmstate_cpu, env);#endif #endif }
target-alpha/machine.c +1 -11
@@ -68,20 +68,10 @@ static VMStateField vmstate_cpu_fields[] = { VMSTATE_END_OF_LIST() }; -static const VMStateDescription vmstate_cpu = { +const VMStateDescription vmstate_cpu = { .name ="cpu" , .version_id =1 , .minimum_version_id =1 , .minimum_version_id_old =1 , .fields = vmstate_cpu_fields, }; - -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); -}
target-i386/machine.c +1 -1
@@ -346,7 +346,7 @@ static const VMStateDescription vmstate_msr_ia32_misc_enable = { } }; -static const VMStateDescription vmstate_cpu = { +const VMStateDescription vmstate_cpu = { .name ="cpu" , .version_id =CPU_SAVE_VERSION , .minimum_version_id =3 ,
target-lm32/machine.c +1 -1
@@ -1,7 +1,7 @@#include "hw/hw.h" #include "hw/boards.h" -static const VMStateDescription vmstate_cpu = { +const VMStateDescription vmstate_cpu = { .name ="cpu" , .version_id =CPU_SAVE_VERSION , .minimum_version_id =1 ,
target-m68k/machine.c +21 -0
@@ -0,0 +1,21 @@ +/* +* Migration support for m68k cpus +* +* Copyright (C) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or +* later. See the COPYING file in the top-level directory. +*/ + +#include "hw/hw.h" + +/* To make this architecture migratable, we need to define cpu state +here. Other things need to be done elsewhere */ + +const VMStateDescription vmstate_cpu = { + .name ="cpu" , + .unmigratable =1 , +};
target-s390x/machine.c +6 -8
@@ -18,13 +18,11 @@*/ #include "hw/hw.h" -#include "hw/boards.h" -void cpu_save (QEMUFile *f,void *opaque) -{ -} +/* To make this architecture migratable, we need to define cpu state +here. Other things need to be done elsewhere */ -int cpu_load (QEMUFile *f,void *opaque,int version_id) -{ -return 0 ; -} +const VMStateDescription vmstate_cpu = { + .name ="cpu" , + .unmigratable =1 , +};
target-sh4/machine.c +21 -0
@@ -0,0 +1,21 @@ +/* +* Migration support for sh4 cpus +* +* Copyright (C) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or +* later. See the COPYING file in the top-level directory. +*/ + +#include "hw/hw.h" + +/* To make this architecture migratable, we need to define cpu state +here. Other things need to be done elsewhere */ + +const VMStateDescription vmstate_cpu = { + .name ="cpu" , + .unmigratable =1 , +};
target-xtensa/machine.c +6 -8
@@ -26,13 +26,11 @@*/ #include "hw/hw.h" -#include "hw/boards.h" -void cpu_save (QEMUFile *f,void *opaque) -{ -} +/* To make this architecture migratable, we need to define cpu state +here. Other things need to be done elsewhere */ -int cpu_load (QEMUFile *f,void *opaque,int version_id) -{ -return 0 ; -} +const VMStateDescription vmstate_cpu = { + .name ="cpu" , + .unmigratable =1 , +};
vmstate.h +2 -0
@@ -134,6 +134,8 @@ extern const VMStateInfo vmstate_info_timer;extern const VMStateInfo vmstate_info_buffer;extern const VMStateInfo vmstate_info_unused_buffer; +extern const VMStateDescription vmstate_cpu; +#define type_check_array (t1,t2,n) ((t1(*)[n])0 - (t2*)0)#define type_check_pointer (t1,t2) ((t1**)0 - (t2*)0)
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 25 lines
This makes several changes:
- exports VMStateDescriptionvmstate_cpunon-static.
- makes sure that every cpu has avmstate_cpuor cpu_save/load defined
- for the architecture that had nothing, it just register the cpu as unmigratable.
- Depending onCPU_SAVE_VERSIONwe register old/new migration style
- Add copyrights to the new filesSigned-off-by Juan Quintela <[email protected]>--- exec.c | 2 ++ target-alpha/machine.c | 12 +----------- target-i386/machine.c | 2 +- target-lm32/machine.c | 2 +- target-m68k/machine.c | 21 +++++++++++++++++++++ target-s390x/machine.c | 14 ++++++-------- target-sh4/machine.c | 21 +++++++++++++++++++++ target-xtensa/machine.c | 14 ++++++-------- vmstate.h | 2 ++ 9 files changed, 61 insertions(+), 29 deletions(-)exec.c +0
-0
exec.c void cpu_exec_init(CPUArchState *env) · line 729
Quoted 8 lines
exec.c +2
-0@@ -722,6 +722,8 @@ void cpu_exec_init(CPUArchState *env)#if defined(CPU_SAVE_VERSION )register_savevm (NULL ,"cpu" , cpu_index,CPU_SAVE_VERSION , cpu_save, cpu_load, env); +#else +vmstate_register (NULL , cpu_index, &vmstate_cpu, env);#endif #endif }
We have QOM CPUState now, so please add a vmsd field to CPUClass instead of exporting global vmstate_cpu variables. It then matches what we do for former qdev devices and will in the future allow to compile this code only twice.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's
Am 04.05.2012 18:16, schrieb Andreas Färber:
Quoted 20 lines
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 19 lines
This makes several changes:
- exports VMStateDescriptionvmstate_cpunon-static.
- makes sure that every cpu has avmstate_cpuor cpu_save/load defined
- for the architecture that had nothing, it just register the cpu as unmigratable.
- Depending onCPU_SAVE_VERSIONwe register old/new migration style
- Add copyrights to the new filesSigned-off-by Juan Quintela <[email protected]>--- exec.c | 2 ++ target-alpha/machine.c | 12 +----------- target-i386/machine.c | 2 +- target-lm32/machine.c | 2 +- target-m68k/machine.c | 21 +++++++++++++++++++++ target-s390x/machine.c | 14 ++++++-------- target-sh4/machine.c | 21 +++++++++++++++++++++ target-xtensa/machine.c | 14 ++++++-------- vmstate.h | 2 ++ 9 files changed, 61 insertions(+), 29 deletions(-)
[...]
Quoted 2 lines
We have QOM CPUState now, so please add a vmsd field to CPUClass instead of exporting global
vmstate_cpuvariables.
Thinking more about this, I see that we will need to assign it in cpu.c:xxx_class_init() (translate_init.c for ppc) as opposed to machine.c.
The declaration still shouldn't go into vmstate.h so that it remains a target-local decision how to model this (think CPU subclasses).
I'd hate to #include "machine.c" in cpu.c.
Having the declaration in cpu.h is the least intrusive solution I see. Moving the code into cpu.c would match qdev but would bloat the files.
What do you think?
Quoted 3 lines
It then matches what we do
for former qdev devices and will in the future allow to compile this code only twice.
BTW the easiest way to address my comment on 01/35 would be to simply squash the two commits. :)
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH v5 3/35 vmstate: unicore32 don't support cpu migration
In reply to Juan Quintela--- target-unicore32/cpu.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
target-unicore32/cpu.h +0 -2
@@ -135,8 +135,6 @@ int uc32_cpu_signal_handler(int host_signum, void *pinfo, void *puc);int uc32_cpu_handle_mmu_fault (CPUUniCore32State *env,target_ulong address,int rw,int mmu_idx); -#define CPU_SAVE_VERSION 2 -/* MMU modes definitions */ #define MMU_MODE0_SUFFIX _kernel#define MMU_MODE1_SUFFIX _user
Signature · 1 line
1.7.7.6
PATCH v5 4/35 vmstate: use new cpu style for x86
In reply to Juan Quintela--- target-i386/cpu.h | 2 -- target-i386/machine.c | 12 +----------- 2 files changed, 1 insertions(+), 13 deletions(-)
target-i386/cpu.h +0 -2
@@ -965,8 +965,6 @@ uint64_t cpu_get_tsc(CPUX86State *env);#define cpu_list_id x86_cpu_list#define cpudef_setup x86_cpudef_setup -#define CPU_SAVE_VERSION 12 -/* MMU modes definitions */ #define MMU_MODE0_SUFFIX _kernel#define MMU_MODE1_SUFFIX _user
target-i386/machine.c +1 -11
@@ -348,7 +348,7 @@ static const VMStateDescription vmstate_msr_ia32_misc_enable = {const VMStateDescription vmstate_cpu = { .name ="cpu" , - .version_id =CPU_SAVE_VERSION , + .version_id =12 , .minimum_version_id =3 , .minimum_version_id_old =3 , .pre_save = cpu_pre_save,
@@ -467,13 +467,3 @@ const VMStateDescription vmstate_cpu = { } } }; - -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); -}
Signature · 1 line
1.7.7.6
PATCH v5 5/35 vmstate: use new style for lm32 cpus
In reply to Juan Quintela--- target-lm32/cpu.h | 2 -- target-lm32/machine.c | 14 ++------------ 2 files changed, 2 insertions(+), 14 deletions(-)
target-lm32/cpu.h +0 -2
@@ -205,8 +205,6 @@ void cpu_lm32_set_phys_msb_ignore(CPULM32State *env, int value);#define cpu_gen_code cpu_lm32_gen_code#define cpu_signal_handler cpu_lm32_signal_handler -#define CPU_SAVE_VERSION 1 -int cpu_lm32_handle_mmu_fault (CPULM32State *env,target_ulong address,int rw,int mmu_idx);#define cpu_handle_mmu_fault cpu_lm32_handle_mmu_fault
target-lm32/machine.c +2 -12
@@ -3,10 +3,10 @@const VMStateDescription vmstate_cpu = { .name ="cpu" , - .version_id =CPU_SAVE_VERSION , + .version_id =1 , .minimum_version_id =1 , .minimum_version_id_old =1 , - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINT32_ARRAY (regs, CPULM32State,32 ),VMSTATE_UINT32 (pc, CPULM32State),VMSTATE_UINT32 (ie, CPULM32State),
@@ -21,13 +21,3 @@ const VMStateDescription vmstate_cpu = { VMSTATE_END_OF_LIST() } }; - -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); -}
Signature · 1 line
1.7.7.6
PATCH v5 6/35 vmstate: make microblaze cpus not migrateable
In reply to Juan Quintela--- target-microblaze/cpu.h | 2 -- target-microblaze/machine.c | 26 ++++++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-)
target-microblaze/cpu.h +0 -2
@@ -296,8 +296,6 @@ enum {#define cpu_gen_code cpu_mb_gen_code#define cpu_signal_handler cpu_mb_signal_handler -#define CPU_SAVE_VERSION 1 -/* MMU modes definitions */ #define MMU_MODE0_SUFFIX _nommu#define MMU_MODE1_SUFFIX _kernel
target-microblaze/machine.c +18 -8
@@ -1,11 +1,21 @@ +/* +* Migration support for microblaze cpus +* +* Copyright (C) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or +* later. See the COPYING file in the top-level directory. +*/ +#include "hw/hw.h" -#include "hw/boards.h" -void cpu_save (QEMUFile *f,void *opaque) -{ -} +/* To make this architecture migratable, we need to define cpu state +here. Other things need to be done elsewhere */ -int cpu_load (QEMUFile *f,void *opaque,int version_id) -{ -return 0 ; -} +const VMStateDescription vmstate_cpu = { + .name ="cpu" , + .unmigratable =1 , +};
Signature · 1 line
1.7.7.6
PATCH v5 7/35 vmstate: port cris cpu to vmstate
In reply to Juan QuintelaHave to define TLBSet struct.
Multidimensional arrays in C are a mess, just unroll them.
--- target-cris/cpu.h | 13 ++--- target-cris/machine.c | 138 +++++++++++++++++++------------------------------ 2 files changed, 60 insertions(+), 91 deletions(-)
target-cris/cpu.h +6 -7
@@ -104,6 +104,11 @@#define NB_MMU_MODES 2 +typedef struct { +uint32_t hi; +uint32_t lo; +}TLBSet ; + typedef struct CPUCRISState { uint32_t regs[16]; /* P0 - P15 are referred to as special registers in the docs. */
@@ -157,11 +162,7 @@ typedef struct CPUCRISState {* * One for I and another for D. */ -struct - { -uint32_t hi; -uint32_t lo; - } tlbsets[2 ][4 ][16 ]; +TLBSet tlbsets[2 ][4 ][16 ];CPU_COMMON
@@ -221,8 +222,6 @@ enum {#define cpu_gen_code cpu_cris_gen_code#define cpu_signal_handler cpu_cris_signal_handler -#define CPU_SAVE_VERSION 1 -/* MMU modes definitions */ #define MMU_MODE0_SUFFIX _kernel#define MMU_MODE1_SUFFIX _user
target-cris/machine.c +54 -84
144 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH v5 8/35 vmstate: introduce float32 arrays
In reply to Juan Quintela--- savevm.c | 25 +++++++++++++++++++++++++ vmstate.h | 5 +++++ 2 files changed, 30 insertions(+), 0 deletions(-)
savevm.c +25 -0
@@ -1082,6 +1082,31 @@ const VMStateInfo vmstate_info_uint16_equal = { .put = put_uint16, }; +/* 32 bit float */ + +static int get_float32 (QEMUFile *f,void *pv,size_t size) +{ +float32 *v = pv; +uint32_t u; +qemu_get_be32s (f, &u); + *v =make_float32 (u); +return 0 ; +} + +static void put_float32 (QEMUFile *f,void *pv,size_t size) +{ +float32 *v = pv; +uint32_t u; + u =float32_val (*v); +qemu_put_be32s (f, &u); +} + +const VMStateInfo vmstate_info_float32 = { + .name ="float32" , + .get = get_float32, + .put = put_float32, +}; +/* timers */ static int get_timer (QEMUFile *f,void *pv,size_t size)
vmstate.h +5 -0
@@ -130,6 +130,8 @@ extern const VMStateInfo vmstate_info_uint16;extern const VMStateInfo vmstate_info_uint32;extern const VMStateInfo vmstate_info_uint64; +extern const VMStateInfo vmstate_info_float32; +extern const VMStateInfo vmstate_info_timer;extern const VMStateInfo vmstate_info_buffer;extern const VMStateInfo vmstate_info_unused_buffer;
@@ -559,6 +561,9 @@ extern const VMStateDescription vmstate_cpu;#define VMSTATE_INT64_ARRAY (_f, _s, _n) \ VMSTATE_INT64_ARRAY_V(_f, _s, _n, 0) +#define VMSTATE_FLOAT32_ARRAY (_f, _s, _n) \ + VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float32, float32) +#define VMSTATE_BUFFER_V (_f, _s, _v) \ VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 08/35] vmstate: introduce float32 arrays
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 56 lines
Signed-off-by Juan Quintela <[email protected]>--- savevm.c | 25 +++++++++++++++++++++++++ vmstate.h | 5 +++++ 2 files changed, 30 insertions(+), 0 deletions(-)savevm.c +25
-0@@ -1082,6 +1082,31 @@ const VMStateInfo vmstate_info_uint16_equal = { .put = put_uint16, }; +/* 32 bit float */ + +static int get_float32 (QEMUFile *f,void *pv,size_t size) +{ +float32 *v = pv; +uint32_t u; +qemu_get_be32s (f, &u); + *v =make_float32 (u); +return 0 ; +} + +static void put_float32 (QEMUFile *f,void *pv,size_t size) +{ +float32 *v = pv; +uint32_t u; + u =float32_val (*v); +qemu_put_be32s (f, &u); +} + +const VMStateInfo vmstate_info_float32 = { + .name ="float32" , + .get = get_float32, + .put = put_float32, +}; +/* timers */ static int get_timer (QEMUFile *f,void *pv,size_t size)vmstate.h +2
-0@@ -130,6 +130,8 @@ extern const VMStateInfo vmstate_info_uint16;extern const VMStateInfo vmstate_info_uint32;extern const VMStateInfo vmstate_info_uint64; +extern const VMStateInfo vmstate_info_float32; +extern const VMStateInfo vmstate_info_timer;extern const VMStateInfo vmstate_info_buffer;extern const VMStateInfo vmstate_info_unused_buffer;
vmstate.h extern const VMStateDescription vmstate_cpu; · line 565
Quoted 5 lines
vmstate.h +2
-0@@ -559,6 +561,9 @@ extern const VMStateDescription vmstate_cpu;#define VMSTATE_INT64_ARRAY (_f, _s, _n) \ VMSTATE_INT64_ARRAY_V(_f, _s, _n, 0) +#define VMSTATE_FLOAT32_ARRAY (_f, _s, _n) \ + VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float32, float32)
Why isn't there a VMSTATE_FLOAT32_ARRAY_V for symmetry? Otherwise looks fine.
/-F
Quoted 4 lines
vmstate.h +1
-0+#define VMSTATE_BUFFER_V (_f, _s, _v) \ VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH v5 9/35 vmstate: introduce float64 arrays
In reply to Juan Quintela--- savevm.c | 25 +++++++++++++++++++++++++ vmstate.h | 4 ++++ 2 files changed, 29 insertions(+), 0 deletions(-)
savevm.c +25 -0
@@ -1107,6 +1107,31 @@ const VMStateInfo vmstate_info_float32 = { .put = put_float32, }; +/* 64 bit float */ + +static int get_float64 (QEMUFile *f,void *pv,size_t size) +{ +float64 *v = pv; +uint64_t u; +qemu_get_be64s (f, &u); + *v =make_float64 (u); +return 0 ; +} + +static void put_float64 (QEMUFile *f,void *pv,size_t size) +{ +float64 *v = pv; +uint64_t u; + u =float64_val (*v); +qemu_put_be64s (f, &u); +} + +const VMStateInfo vmstate_info_float64 = { + .name ="float64" , + .get = get_float64, + .put = put_float64, +}; +/* timers */ static int get_timer (QEMUFile *f,void *pv,size_t size)
vmstate.h +4 -0
@@ -131,6 +131,7 @@ extern const VMStateInfo vmstate_info_uint32;extern const VMStateInfo vmstate_info_uint64;extern const VMStateInfo vmstate_info_float32; +extern const VMStateInfo vmstate_info_float64;extern const VMStateInfo vmstate_info_timer;extern const VMStateInfo vmstate_info_buffer;
@@ -564,6 +565,9 @@ extern const VMStateDescription vmstate_cpu;#define VMSTATE_FLOAT32_ARRAY (_f, _s, _n) \ VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float32, float32) +#define VMSTATE_FLOAT64_ARRAY (_f, _s, _n) \ + VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float64, float64) +#define VMSTATE_BUFFER_V (_f, _s, _v) \ VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 09/35] vmstate: introduce float64 arrays
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 55 lines
Signed-off-by Juan Quintela <[email protected]>--- savevm.c | 25 +++++++++++++++++++++++++ vmstate.h | 4 ++++ 2 files changed, 29 insertions(+), 0 deletions(-)savevm.c +25
-0@@ -1107,6 +1107,31 @@ const VMStateInfo vmstate_info_float32 = { .put = put_float32, }; +/* 64 bit float */ + +static int get_float64 (QEMUFile *f,void *pv,size_t size) +{ +float64 *v = pv; +uint64_t u; +qemu_get_be64s (f, &u); + *v =make_float64 (u); +return 0 ; +} + +static void put_float64 (QEMUFile *f,void *pv,size_t size) +{ +float64 *v = pv; +uint64_t u; + u =float64_val (*v); +qemu_put_be64s (f, &u); +} + +const VMStateInfo vmstate_info_float64 = { + .name ="float64" , + .get = get_float64, + .put = put_float64, +}; +/* timers */ static int get_timer (QEMUFile *f,void *pv,size_t size)vmstate.h +1
-0@@ -131,6 +131,7 @@ extern const VMStateInfo vmstate_info_uint32;extern const VMStateInfo vmstate_info_uint64;extern const VMStateInfo vmstate_info_float32; +extern const VMStateInfo vmstate_info_float64;extern const VMStateInfo vmstate_info_timer;extern const VMStateInfo vmstate_info_buffer;
vmstate.h extern const VMStateDescription vmstate_cpu; · line 569
Quoted 5 lines
vmstate.h +2
-0@@ -564,6 +565,9 @@ extern const VMStateDescription vmstate_cpu;#define VMSTATE_FLOAT32_ARRAY (_f, _s, _n) \ VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float32, float32) +#define VMSTATE_FLOAT64_ARRAY (_f, _s, _n) \ + VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float64, float64)
Same comment as for float32:
Why not _FLOAT64_ARRAY -> _FLOAT64_ARRAY_V -> _ARRAY?
/-F
Quoted 4 lines
vmstate.h +1
-0+#define VMSTATE_BUFFER_V (_f, _s, _v) \ VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH v5 10/35 vmstate: introduce CPU_DoubleU arrays
In reply to Juan Quintela--- savevm.c | 24 ++++++++++++++++++++++++ vmstate.h | 4 ++++ 2 files changed, 28 insertions(+), 0 deletions(-)
savevm.c +24 -0
@@ -1132,6 +1132,30 @@ const VMStateInfo vmstate_info_float64 = { .put = put_float64, }; +/* 64 bit CPUDouble */ + +static int get_cpudouble (QEMUFile *f,void *pv,size_t size) +{ +CPU_DoubleU *v = pv; + +qemu_get_be32s (f, &v->l.upper); +qemu_get_be32s (f, &v->l.lower); +return 0 ; +} + +static void put_cpudouble (QEMUFile *f,void *pv,size_t size) +{ +CPU_DoubleU *v = pv; +qemu_put_be32s (f, &v->l.upper); +qemu_put_be32s (f, &v->l.lower); +} + +const VMStateInfo vmstate_info_cpudouble = { + .name ="CPU_Double_U" , + .get = get_cpudouble, + .put = put_cpudouble, +}; +/* timers */ static int get_timer (QEMUFile *f,void *pv,size_t size)
vmstate.h +4 -0
@@ -132,6 +132,7 @@ extern const VMStateInfo vmstate_info_uint64;extern const VMStateInfo vmstate_info_float32;extern const VMStateInfo vmstate_info_float64; +extern const VMStateInfo vmstate_info_cpudouble;extern const VMStateInfo vmstate_info_timer;extern const VMStateInfo vmstate_info_buffer;
@@ -568,6 +569,9 @@ extern const VMStateDescription vmstate_cpu;#define VMSTATE_FLOAT64_ARRAY (_f, _s, _n) \ VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float64, float64) +#define VMSTATE_CPUDOUBLE_ARRAY (_f, _s, _n) \ + VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_cpudouble, CPU_DoubleU) +#define VMSTATE_BUFFER_V (_f, _s, _v) \ VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
Signature · 1 line
1.7.7.6
PATCH v5 11/35 vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST
In reply to Juan QuintelaWe have an array of structs whose size is an int32 in the same struct that depends on a test value to know if it is there or not.
--- vmstate.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
vmstate.h +10 -0
@@ -309,6 +309,16 @@ extern const VMStateDescription vmstate_cpu; .offset = offsetof(_state, _field), \ } +#define VMSTATE_STRUCT_VARRAY_INT32_TEST (_field, _state, _field_num, _test, _vmsd, _type) { \ + .name = (stringify(_field)), \ + .num_offset = vmstate_offset_value(_state, _field_num, int32_t), \ + .vmsd = &(_vmsd), \ + .field_exists = (_test), \ + .size = sizeof(_type), \ + .flags = VMS_STRUCT|VMS_VARRAY_INT32, \ + .offset = offsetof(_state, _field), \ +} +#define VMSTATE_STRUCT_VARRAY_POINTER_INT32 (_field, _state, _field_num, _vmsd, _type) { \ .name = (stringify(_field)), \ .version_id = 0, \
Signature · 1 line
1.7.7.6
PATCH v5 12/35 vmstate: port ppc cpu
In reply to Juan QuintelaAdded sdr1_vmstate because storing the value requires calling ppc_store_sdr1(). The position when the function is called also changes (I think it is save).
--- target-ppc/cpu.h | 5 +- target-ppc/machine.c | 245 ++++++++++++++++++-------------------------------- 2 files changed, 90 insertions(+), 160 deletions(-)
target-ppc/cpu.h +3 -2
@@ -1064,6 +1064,9 @@ struct CPUPPCState {*/ uint8_t fit_period[4 ];uint8_t wdt_period[4 ]; + +/* Fields needed as intermediate for vmstate */ +target_ulong sdr1_vmstate; };#define SET_FIT_PERIOD (a_, b_, c_, d_) \
@@ -1220,8 +1223,6 @@ int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, uint32_t val);#define cpu_signal_handler cpu_ppc_signal_handler#define cpu_list ppc_cpu_list -#define CPU_SAVE_VERSION 4 -/* MMU modes definitions */ #define MMU_MODE0_SUFFIX _user#define MMU_MODE1_SUFFIX _kernel
target-ppc/machine.c +87 -158
259 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH v5 13/35 vmstate: introduce VMSTATE_VARRAY_MULTIPLY
In reply to Juan QuintelaThis allows to sent a partial array where the size is another structure field multiplied by a constant.
--- savevm.c | 6 ++++++ vmstate.h | 35 +++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 12 deletions(-)
savevm.c +6 -0
@@ -1509,6 +1509,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, }else if (field->flags &VMS_VARRAY_UINT8 ) { n_elems = *(uint8_t *)(opaque+field->num_offset); } +if (field->flags &VMS_MULTIPLY_ELEMENTS ) { + n_elems *= field->num; + }if (field->flags &VMS_POINTER ) { base_addr = *(void **)base_addr + field->start; }
@@ -1573,6 +1576,9 @@ void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd, }else if (field->flags &VMS_VARRAY_UINT8 ) { n_elems = *(uint8_t *)(opaque+field->num_offset); } +if (field->flags &VMS_MULTIPLY_ELEMENTS ) { + n_elems *= field->num; + }if (field->flags &VMS_POINTER ) { base_addr = *(void **)base_addr + field->start; }
vmstate.h +23 -12
@@ -64,18 +64,19 @@ struct VMStateInfo { };enum VMStateFlags { -VMS_SINGLE =0x001 , -VMS_POINTER =0x002 , -VMS_ARRAY =0x004 , -VMS_STRUCT =0x008 , -VMS_VARRAY_INT32 =0x010 ,/* Array with size in int32_t field*/ -VMS_BUFFER =0x020 ,/* static sized buffer */ -VMS_ARRAY_OF_POINTER =0x040 , -VMS_VARRAY_UINT16 =0x080 ,/* Array with size in uint16_t field */ -VMS_VBUFFER =0x100 ,/* Buffer with size in int32_t field */ -VMS_MULTIPLY =0x200 ,/* multiply "size" field by field_size */ -VMS_VARRAY_UINT8 =0x400 ,/* Array with size in uint8_t field*/ -VMS_VARRAY_UINT32 =0x800 ,/* Array with size in uint32_t field*/ +VMS_SINGLE =0x001 , +VMS_POINTER =0x002 , +VMS_ARRAY =0x004 , +VMS_STRUCT =0x008 , +VMS_VARRAY_INT32 =0x010 ,/* Array with size in int32_t field*/ +VMS_BUFFER =0x020 ,/* static sized buffer */ +VMS_ARRAY_OF_POINTER =0x040 , +VMS_VARRAY_UINT16 =0x080 ,/* Array with size in uint16_t field */ +VMS_VBUFFER =0x100 ,/* Buffer with size in int32_t field */ +VMS_MULTIPLY =0x200 ,/* multiply "size" field by field_size */ +VMS_VARRAY_UINT8 =0x400 ,/* Array with size in uint8_t field*/ +VMS_VARRAY_UINT32 =0x800 ,/* Array with size in uint32_t field*/ +VMS_MULTIPLY_ELEMENTS =0x1000 ,/* multiply "size" field by field_size */ }; typedef struct {
@@ -200,6 +201,16 @@ extern const VMStateDescription vmstate_cpu; .offset = vmstate_offset_array(_state, _field, _type, _num), \ } +#define VMSTATE_VARRAY_MULTIPLY (_field, _state, _field_num, _multiply, _info, _type) { \ + .name = (stringify(_field)), \ + .num_offset = vmstate_offset_value(_state, _field_num, uint32_t),\ + .num = (_multiply), \ + .info = &(_info), \ + .size = sizeof(_type), \ + .flags = VMS_VARRAY_UINT32|VMS_MULTIPLY_ELEMENTS, \ + .offset = offsetof(_state, _field), \ +} +#define VMSTATE_ARRAY_TEST (_field, _state, _num, _test, _info, _type) {\ .name = (stringify(_field)), \ .field_exists = (_test), \
Signature · 1 line
1.7.7.6
PATCH v5 14/35 vmstate: define vmstate_info_uinttls
In reply to Juan QuintelaWe are going to define arrays of this type, so we need the integer type.
--- hw/hw.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
hw/hw.h +2 -0
@@ -52,11 +52,13 @@ int qemu_boot_set(const char *boot_devices); VMSTATE_UINT64_V(_f, _s, _v)#define VMSTATE_UINTTL_ARRAY_V (_f, _s, _n, _v) \ VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v) +#define vmstate_info_uinttls vmstate_info_uint64#else #define VMSTATE_UINTTL_V (_f, _s, _v) \ VMSTATE_UINT32_V(_f, _s, _v)#define VMSTATE_UINTTL_ARRAY_V (_f, _s, _n, _v) \ VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v) +#define vmstate_info_uinttls vmstate_info_uint32#endif #define VMSTATE_UINTTL (_f, _s) \ VMSTATE_UINTTL_V(_f, _s, 0)
Signature · 1 line
1.7.7.6
PATCH v5 15/35 vmstate: port sparc cpu
In reply to Juan Quintela--- hw/sun4u.c | 20 -- target-sparc/cpu.h | 9 +- target-sparc/machine.c | 474 ++++++++++++++++++++++++++++-------------------- 3 files changed, 283 insertions(+), 220 deletions(-)
hw/sun4u.c +0 -20
@@ -338,26 +338,6 @@ typedef struct ResetData {uint64_t prom_addr; } ResetData; -void cpu_put_timer (QEMUFile *f,CPUTimer *s) -{ -qemu_put_be32s (f, &s->frequency); -qemu_put_be32s (f, &s->disabled); -qemu_put_be64s (f, &s->disabled_mask); -qemu_put_sbe64s (f, &s->clock_offset); - -qemu_put_timer (f, s->qtimer); -} - -void cpu_get_timer (QEMUFile *f,CPUTimer *s) -{ -qemu_get_be32s (f, &s->frequency); -qemu_get_be32s (f, &s->disabled); -qemu_get_be64s (f, &s->disabled_mask); -qemu_get_sbe64s (f, &s->clock_offset); - -qemu_get_timer (f, s->qtimer); -} -static CPUTimer *cpu_timer_create (const char * name,CPUSPARCState *env,QEMUBHFunc *cb,uint32_t frequency,uint64_t disabled_mask)
target-sparc/cpu.h +3 -6
@@ -374,10 +374,6 @@ struct CPUTimertypedef struct CPUTimer CPUTimer ; -struct QEMUFile ; -void cpu_put_timer (struct QEMUFile *f,CPUTimer *s); -void cpu_get_timer (struct QEMUFile *f,CPUTimer *s); -typedef struct CPUSPARCState CPUSPARCState ;struct CPUSPARCState {
@@ -509,6 +505,9 @@ struct CPUSPARCState {/* Leon3 cache control */ uint32_t cache_control; + +/* Fields needed as intermediate for vmstate */ +uint32_t psr_vmstate; };#ifndef NO_CPU_IO_DEFS
@@ -596,8 +595,6 @@ int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc);#define cpu_signal_handler cpu_sparc_signal_handler#define cpu_list sparc_cpu_list -#define CPU_SAVE_VERSION 7 -/* MMU modes definitions */ #if defined (TARGET_SPARC64 )#define MMU_USER_IDX 0
target-sparc/machine.c +280 -194
494 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH v5 16/35 vmstate: make incompatible change for sparc
In reply to Juan QuintelaWith this change, we sent arrays as arrays, making state description much simpler. The change is incompatible, but as far as I know, sparc don't care about migration compatibility beteween versions.
--- target-sparc/machine.c | 172 +++--------------------------------------------- 1 files changed, 9 insertions(+), 163 deletions(-)
target-sparc/machine.c +9 -163
@@ -74,9 +74,9 @@ static int cpu_post_load(void *opaque, int version_id)const VMStateDescription vmstate_cpu = { .name ="cpu" , - .version_id =7 , - .minimum_version_id =7 , - .minimum_version_id_old =7 , + .version_id =8 , + .minimum_version_id =8 , + .minimum_version_id_old =8 , .pre_save = cpu_pre_save, .post_load = cpu_post_load, .fields = (VMStateField []) {
@@ -106,166 +106,12 @@ const VMStateDescription vmstate_cpu = {VMSTATE_UINT64_ARRAY (mmubpregs, CPUSPARCState,4 ), #elseVMSTATE_UINT64 (lsu, CPUSPARCState), -VMSTATE_UINT64 (immuregs[0 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[0 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[1 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[1 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[2 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[2 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[3 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[3 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[4 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[4 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[5 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[5 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[6 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[6 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[7 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[7 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[8 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[8 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[9 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[9 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[10 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[10 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[11 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[11 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[12 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[12 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[13 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[13 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[14 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[14 ], CPUSPARCState), -VMSTATE_UINT64 (immuregs[15 ], CPUSPARCState), -VMSTATE_UINT64 (dmmuregs[15 ], CPUSPARCState), -VMSTATE_STRUCT (itlb[0 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[0 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[1 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[1 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[2 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[2 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[3 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[3 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[4 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[4 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[5 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[5 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[6 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[6 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[7 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[7 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[8 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[8 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[9 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[9 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[10 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[10 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[11 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[11 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[12 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[12 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[13 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[13 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[14 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[14 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[15 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[15 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[16 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[16 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[17 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[17 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[18 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[18 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[19 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[19 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[20 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[20 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[21 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[21 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[22 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[22 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[23 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[23 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[24 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[24 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[25 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[25 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[26 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[26 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[27 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[27 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[28 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[28 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[29 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[29 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[30 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[30 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[31 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[31 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[32 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[32 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[33 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[33 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[34 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[34 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[35 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[35 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[36 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[36 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[37 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[37 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[38 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[38 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[39 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[39 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[40 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[40 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[41 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[41 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[42 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[42 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[43 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[43 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[44 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[44 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[45 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[45 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[46 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[46 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[47 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[47 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[48 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[48 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[49 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[49 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[50 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[50 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[51 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[51 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[52 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[52 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[53 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[53 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[54 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[54 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[55 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[55 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[56 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[56 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[57 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[57 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[58 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[58 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[59 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[59 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[60 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[60 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[61 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[61 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[62 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[62 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (itlb[63 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), -VMSTATE_STRUCT (dtlb[63 ], CPUSPARCState,0 , vmstate_tlb_entry, SparcTLBEntry), +VMSTATE_UINT64_ARRAY (immuregs, CPUSPARCState,16 ), +VMSTATE_UINT64_ARRAY (dmmuregs, CPUSPARCState,16 ), +VMSTATE_STRUCT_ARRAY (itlb, CPUSPARCState,64 ,0 , + vmstate_tlb_entry, SparcTLBEntry), +VMSTATE_STRUCT_ARRAY (dtlb, CPUSPARCState,64 ,0 , + vmstate_tlb_entry, SparcTLBEntry),VMSTATE_UINT32 (mmu_version, CPUSPARCState),VMSTATE_STRUCT_ARRAY (ts, CPUSPARCState,MAXTL_MAX ,0 , vmstate_trap_state, trap_state),
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 1 line
With this change, we sent arrays as arrays, making state description
"send"?
Quoted 2 lines
much simpler. The change is incompatible, but as far as I know, sparc don't care about migration compatibility beteween versions.
"the SPARC targets don't" (or "sparc doesn't")
"between"
Quoted 2 lines
Signed-off-by Juan Quintela <[email protected]>
It appears once again none of these patches are actually cc'ing the proper maintainers. Not even Acked-by (or is git-send-email case-sensitive? it's spelled "Acked-By" in lm32 patch).
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc
Quoted 3 lines · Andreas Färber
It appears once again none of these patches are actually cc'ing the proper maintainers. Not even Acked-by (or is git-send-email case-sensitive? it's spelled "Acked-By" in lm32 patch).
FWIW, git-send-email is not case-sensitive when looking for things indicating it should CC people. However it will only add CCs for CC: and Signed-off-by:, not the others like Acked-by:, Reported-by:, etc.
-- PMM
Re: [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc
Am 04.05.2012 15:00, schrieb Peter Maydell:
Quoted 8 lines · Andreas Färber
Quoted 2 lines
Not even [cc'ing] Acked-by (or is git-send-email case-sensitive? it's spelled "Acked-By" in lm32 patch).
FWIW, git-send-email is not case-sensitive when looking for things indicating it should CC people. However it will only add CCs for CC: and Signed-off-by:, not the others like Acked-by:, Reported-by:, etc.
Ah sorry, I had noticed Acked-by not getting cc'ed myself recently. Seems like there's no config option to cc beyond Cc, Signed-off-by and From, so that we'd have to write a custom cc-cmd script to both cc the maintainers and Reported-by, Suggested-by, Reviewed-by, Acked-by, Tested-by, etc. if we wanted to. (Obviously the first two are only sensible on first submission where depending on length of patch series one could just use --cc.)
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc
In reply to Juan QuintelaQuoted 5 lines · Juan Quintela
With this change, we sent arrays as arrays, making state description much simpler. The change is incompatible, but as far as I know, sparc don't care about migration compatibility beteween versions.
Signed-off-by Juan Quintela <[email protected]>
Quoted 198 lines
---
target-sparc/machine.c | 172 +++---------------------------------------------1 files changed, 9 insertions(+), 163 deletions(-)target-sparc/machine.c +9
-164@@ -74,9 +74,9 @@ static int cpu_post_load(void *opaque, int version_id) const VMStateDescription vmstate_cpu = { .name = "cpu", - .version_id = 7, - .minimum_version_id = 7, - .minimum_version_id_old = 7, + .version_id = 8, + .minimum_version_id = 8, + .minimum_version_id_old = 8, .pre_save = cpu_pre_save, .post_load = cpu_post_load, .fields = (VMStateField[]) {@@ -106,166 +106,12 @@ const VMStateDescription vmstate_cpu = { VMSTATE_UINT64_ARRAY(mmubpregs, CPUSPARCState, 4), #else VMSTATE_UINT64(lsu, CPUSPARCState), - VMSTATE_UINT64(immuregs[0], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[0], CPUSPARCState), - VMSTATE_UINT64(immuregs[1], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[1], CPUSPARCState), - VMSTATE_UINT64(immuregs[2], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[2], CPUSPARCState), - VMSTATE_UINT64(immuregs[3], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[3], CPUSPARCState), - VMSTATE_UINT64(immuregs[4], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[4], CPUSPARCState), - VMSTATE_UINT64(immuregs[5], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[5], CPUSPARCState), - VMSTATE_UINT64(immuregs[6], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[6], CPUSPARCState), - VMSTATE_UINT64(immuregs[7], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[7], CPUSPARCState), - VMSTATE_UINT64(immuregs[8], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[8], CPUSPARCState), - VMSTATE_UINT64(immuregs[9], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[9], CPUSPARCState), - VMSTATE_UINT64(immuregs[10], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[10], CPUSPARCState), - VMSTATE_UINT64(immuregs[11], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[11], CPUSPARCState), - VMSTATE_UINT64(immuregs[12], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[12], CPUSPARCState), - VMSTATE_UINT64(immuregs[13], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[13], CPUSPARCState), - VMSTATE_UINT64(immuregs[14], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[14], CPUSPARCState), - VMSTATE_UINT64(immuregs[15], CPUSPARCState), - VMSTATE_UINT64(dmmuregs[15], CPUSPARCState), - VMSTATE_STRUCT(itlb[0], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[0], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[1], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[1], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[2], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[2], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[3], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[3], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[4], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[4], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[5], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[5], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[6], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[6], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[7], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[7], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[8], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[8], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[9], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[9], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[10], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[10], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[11], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[11], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[12], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[12], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[13], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[13], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[14], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[14], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[15], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[15], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[16], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[16], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[17], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[17], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[18], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[18], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[19], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[19], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[20], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[20], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[21], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[21], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[22], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[22], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[23], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[23], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[24], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[24], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[25], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[25], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[26], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[26], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[27], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[27], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[28], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[28], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[29], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[29], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[30], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[30], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[31], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[31], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[32], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[32], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[33], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[33], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[34], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[34], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[35], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[35], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[36], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[36], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[37], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[37], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[38], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[38], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[39], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[39], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[40], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[40], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[41], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[41], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[42], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[42], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[43], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[43], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[44], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[44], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[45], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[45], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[46], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[46], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[47], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[47], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[48], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[48], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[49], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[49], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[50], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[50], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[51], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[51], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[52], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[52], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[53], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[53], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[54], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[54], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[55], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[55], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[56], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[56], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[57], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[57], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[58], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[58], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[59], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[59], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[60], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[60], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[61], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[61], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[62], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[62], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[63], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[63], CPUSPARCState, 0, vmstate_tlb_entry, SparcTLBEntry), + VMSTATE_UINT64_ARRAY(immuregs, CPUSPARCState, 16), + VMSTATE_UINT64_ARRAY(dmmuregs, CPUSPARCState, 16), + VMSTATE_STRUCT_ARRAY(itlb, CPUSPARCState, 64, 0, + vmstate_tlb_entry, SparcTLBEntry), + VMSTATE_STRUCT_ARRAY(dtlb, CPUSPARCState, 64, 0, + vmstate_tlb_entry, SparcTLBEntry), VMSTATE_UINT32(mmu_version, CPUSPARCState), VMSTATE_STRUCT_ARRAY(ts, CPUSPARCState, MAXTL_MAX, 0, vmstate_trap_state, trap_state), --1.7.7.6
PATCH v5 17/35 mips_fulong2e: cpu vmstate already registered in cpu_exec_init
In reply to Juan QuintelaThis is the second place that register cpu migration code, it is done in general in cpu_exec_init(), just remove this call.
--- hw/mips_fulong2e.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
hw/mips_fulong2e.c +0 -1
@@ -284,7 +284,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,exit (1 ); } -register_savevm (NULL ,"cpu" ,0 ,3 , cpu_save, cpu_load, env);qemu_register_reset (main_cpu_reset, env);/* fulong 2e has 256M ram. */
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 17/35] mips_fulong2e: cpu vmstate already registered in cpu_exec_init
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 4 lines
This is the second place that register cpu migration code, it is done in general in
cpu_exec_init(), just remove this call.Signed-off-by Juan Quintela <[email protected]>
Thanks, I've queued this for qom-1.1 (with extended commit message):
http://repo.or.cz/w/qemu/afaerber.git/shortlog/refs/heads/qom-1.1
Quoted 9 lines
--- hw/mips_fulong2e.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)hw/mips_fulong2e.c +0
-0
hw/mips_fulong2e.c static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, · line 289
Quoted 7 lines
hw/mips_fulong2e.c +0
-1@@ -284,7 +284,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,exit (1 ); } -register_savevm (NULL ,"cpu" ,0 ,3 , cpu_save, cpu_load, env);qemu_register_reset (main_cpu_reset, env);/* fulong 2e has 256M ram. */
This conflicts with my main_cpu_reset change in the qom-cpu-reset series, I'll apply this to qom-next too and will rebase mine on it.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH v5 18/35 mips: make mvp an embedded struct instead of a pointer
In reply to Juan QuintelaAdjust all callers.
--- hw/mips_malta.c | 4 ++-- target-mips/cpu.h | 4 ++-- target-mips/machine.c | 12 ++++++------ target-mips/op_helper.c | 30 +++++++++++++++++------------- target-mips/translate.c | 6 +++--- target-mips/translate_init.c | 14 ++++++-------- 6 files changed, 36 insertions(+), 34 deletions(-)
hw/mips_malta.c +2 -2
@@ -745,8 +745,8 @@ static int64_t load_kernel (void)static void malta_mips_config (CPUMIPSState *env) { - env->mvp->CP0_MVPConf0 |= ((smp_cpus -1 ) <<CP0MVPC0_PVPE ) | - ((smp_cpus * env->nr_threads -1 ) <<CP0MVPC0_PTC ); + env->mvp.CP0_MVPConf0 |= ((smp_cpus -1 ) <<CP0MVPC0_PVPE ) | + ((smp_cpus * env->nr_threads -1 ) <<CP0MVPC0_PTC ); }static void main_cpu_reset (void *opaque)
target-mips/cpu.h +2 -2
@@ -466,7 +466,7 @@ struct CPUMIPSState {CPU_COMMON - CPUMIPSMVPContext *mvp; + CPUMIPSMVPContext mvp;#if !defined(CONFIG_USER_ONLY )CPUMIPSTLBContext *tlb;#endif
@@ -670,7 +670,7 @@ static inline int mips_vpe_active(CPUMIPSState *env)int active =1 ;/* Check that the VPE is enabled. */ -if (!(env->mvp->CP0_MVPControl & (1 << CP0MVPCo_EVP))) { +if (!(env->mvp.CP0_MVPControl & (1 << CP0MVPCo_EVP))) { active =0 ; }/* Check that the VPE is activated. */
target-mips/machine.c +6 -6
@@ -52,9 +52,9 @@ void cpu_save(QEMUFile *f, void *opaque)save_fpu (f, &env->active_fpu);/* Save MVP */ -qemu_put_sbe32s (f, &env->mvp->CP0_MVPControl); -qemu_put_sbe32s (f, &env->mvp->CP0_MVPConf0); -qemu_put_sbe32s (f, &env->mvp->CP0_MVPConf1); +qemu_put_sbe32s (f, &env->mvp.CP0_MVPControl); +qemu_put_sbe32s (f, &env->mvp.CP0_MVPConf0); +qemu_put_sbe32s (f, &env->mvp.CP0_MVPConf1);/* Save TLB */ qemu_put_be32s (f, &env->tlb->nb_tlb);
@@ -203,9 +203,9 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)load_fpu (f, &env->active_fpu);/* Load MVP */ -qemu_get_sbe32s (f, &env->mvp->CP0_MVPControl); -qemu_get_sbe32s (f, &env->mvp->CP0_MVPConf0); -qemu_get_sbe32s (f, &env->mvp->CP0_MVPConf1); +qemu_get_sbe32s (f, &env->mvp.CP0_MVPControl); +qemu_get_sbe32s (f, &env->mvp.CP0_MVPConf0); +qemu_get_sbe32s (f, &env->mvp.CP0_MVPConf1);/* Load TLB */ qemu_get_be32s (f, &env->tlb->nb_tlb);
target-mips/op_helper.c +17 -13
@@ -908,17 +908,17 @@ static void sync_c0_entryhi(CPUMIPSState *cpu, int tc)/* CP0 helpers */ target_ulong helper_mfc0_mvpcontrol (void ) { -return env->mvp->CP0_MVPControl; +return env->mvp.CP0_MVPControl; }target_ulong helper_mfc0_mvpconf0 (void ) { -return env->mvp->CP0_MVPConf0; +return env->mvp.CP0_MVPConf0; }target_ulong helper_mfc0_mvpconf1 (void ) { -return env->mvp->CP0_MVPConf1; +return env->mvp.CP0_MVPConf1; }target_ulong helper_mfc0_random (void )
@@ -1171,13 +1171,14 @@ void helper_mtc0_mvpcontrol (target_ulong arg1)if (env->CP0_VPEConf0 & (1 <<CP0VPEC0_MVP )) mask |= (1 << CP0MVPCo_CPA) | (1 << CP0MVPCo_VPC) | (1 << CP0MVPCo_EVP); -if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) +if (env->mvp.CP0_MVPControl & (1 << CP0MVPCo_VPC)) { mask |= (1 << CP0MVPCo_STLB); - newval = (env->mvp->CP0_MVPControl & ~mask) | (arg1 & mask); + } + newval = (env->mvp.CP0_MVPControl & ~mask) | (arg1 & mask);// TODO: Enable/disable shared TLB, enable/disable VPEs. - env->mvp->CP0_MVPControl = newval; + env->mvp.CP0_MVPControl = newval; }void helper_mtc0_vpecontrol (target_ulong arg1)
@@ -1265,9 +1266,10 @@ void helper_mtc0_vpeconf1 (target_ulong arg1)uint32_t mask =0 ;uint32_t newval; -if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) +if (env->mvp.CP0_MVPControl & (1 << CP0MVPCo_VPC)) { mask |= (0xff <<CP0VPEC1_NCX ) | (0xff <<CP0VPEC1_NCP2 ) | (0xff <<CP0VPEC1_NCP1 ); + } newval = (env->CP0_VPEConf1 & ~mask) | (arg1 & mask);/* UDI not implemented. */
@@ -1324,8 +1326,9 @@ void helper_mtc0_tcbind (target_ulong arg1)uint32_t mask = (1 << CP0TCBd_TBE);uint32_t newval; -if (env->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) +if (env->mvp.CP0_MVPControl & (1 << CP0MVPCo_VPC)) { mask |= (1 << CP0TCBd_CurVPE); + } newval = (env->active_tc.CP0_TCBind & ~mask) | (arg1 & mask); env->active_tc.CP0_TCBind = newval; }
@@ -1337,8 +1340,9 @@ void helper_mttc0_tcbind (target_ulong arg1)uint32_t newval;CPUMIPSState *other =mips_cpu_map_tc (&other_tc); -if (other->mvp->CP0_MVPControl & (1 << CP0MVPCo_VPC)) +if (other->mvp.CP0_MVPControl & (1 << CP0MVPCo_VPC)) { mask |= (1 << CP0TCBd_CurVPE); + }if (other_tc == other->current_tc) { newval = (other->active_tc.CP0_TCBind & ~mask) | (arg1 & mask); other->active_tc.CP0_TCBind = newval;
@@ -1909,12 +1913,12 @@ target_ulong helper_emt(void)target_ulong helper_dvpe (void ) {CPUMIPSState *other_cpu = first_cpu; -target_ulong prev = env->mvp->CP0_MVPControl; +target_ulong prev = env->mvp.CP0_MVPControl; do { /* Turn off all VPEs except the one executing the dvpe. */ if (other_cpu != env) { - other_cpu->mvp->CP0_MVPControl &= ~(1 << CP0MVPCo_EVP); + other_cpu->mvp.CP0_MVPControl &= ~(1 << CP0MVPCo_EVP); mips_vpe_sleep(other_cpu); } other_cpu = other_cpu->next_cpu;
@@ -1925,14 +1929,14 @@ target_ulong helper_dvpe(void)target_ulong helper_evpe (void ) {CPUMIPSState *other_cpu = first_cpu; -target_ulong prev = env->mvp->CP0_MVPControl; +target_ulong prev = env->mvp.CP0_MVPControl; do { if (other_cpu != env /* If the VPE is WFI, don't disturb its sleep. */ && !mips_vpe_is_wfi(other_cpu)) { /* Enable the VPE. */ - other_cpu->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP); + other_cpu->mvp.CP0_MVPControl |= (1 << CP0MVPCo_EVP); mips_vpe_wake(other_cpu); /* And wake it up. */ } other_cpu = other_cpu->next_cpu;
target-mips/translate.c +3 -3
@@ -5526,7 +5526,7 @@ static void gen_mftr(CPUMIPSState *env, DisasContext *ctx, int rt, int rd, (env->active_tc.CP0_TCBind & (0xf << CP0TCBd_CurVPE))))tcg_gen_movi_tl (t0,-1 ); else if ((env->CP0_VPEControl & (0xff << CP0VPECo_TargTC)) > - (env->mvp->CP0_MVPConf0 & (0xff << CP0MVPC0_PTC))) + (env->mvp.CP0_MVPConf0 & (0xff << CP0MVPC0_PTC)))tcg_gen_movi_tl (t0,-1 ); else if (u == 0) {switch (rt) {
@@ -5744,7 +5744,7 @@ static void gen_mttr(CPUMIPSState *env, DisasContext *ctx, int rd, int rt, (env->active_tc.CP0_TCBind & (0xf << CP0TCBd_CurVPE))))/* NOP */ ; else if ((env->CP0_VPEControl & (0xff << CP0VPECo_TargTC)) > - (env->mvp->CP0_MVPConf0 & (0xff << CP0MVPC0_PTC))) + (env->mvp.CP0_MVPConf0 & (0xff << CP0MVPC0_PTC)))/* NOP */ ; else if (u == 0) {switch (rd) {
@@ -12821,7 +12821,7 @@ void cpu_state_reset(CPUMIPSState *env)if (!env->cpu_index) {/* VPE0 starts up enabled. */ - env->mvp->CP0_MVPControl |= (1 << CP0MVPCo_EVP); + env->mvp.CP0_MVPControl |= (1 << CP0MVPCo_EVP); env->CP0_VPEConf0 |= (1 <<CP0VPEC0_MVP ) | (1 <<CP0VPEC0_VPA );/* TC0 starts up unhalted. */
target-mips/translate_init.c +6 -8
@@ -568,27 +568,25 @@ static void fpu_init (CPUMIPSState *env, const mips_def_t *def)static void mvp_init (CPUMIPSState *env,const mips_def_t *def) { - env->mvp =g_malloc0 (sizeof (CPUMIPSMVPContext)); -/* MVPConf1 implemented, TLB sharable, no gating storage support, programmable cache partitioning implemented, number of allocatable and sharable TLB entries, MVP has allocatable TCs, 2 VPEs implemented, 5 TCs implemented. */ - env->mvp->CP0_MVPConf0 = (1 <<CP0MVPC0_M ) | (1 <<CP0MVPC0_TLBS ) | - (0 <<CP0MVPC0_GS ) | (1 <<CP0MVPC0_PCP ) | + env->mvp.CP0_MVPConf0 = (1 <<CP0MVPC0_M ) | (1 <<CP0MVPC0_TLBS ) | + (0 <<CP0MVPC0_GS ) | (1 <<CP0MVPC0_PCP ) |// TODO: actually do 2 VPEs. // (1 << CP0MVPC0_TCA) | (0x1 << CP0MVPC0_PVPE) | // (0x04 << CP0MVPC0_PTC); - (1 <<CP0MVPC0_TCA ) | (0x0 <<CP0MVPC0_PVPE ) | - (0x00 <<CP0MVPC0_PTC ); + (1 <<CP0MVPC0_TCA ) | (0x0 <<CP0MVPC0_PVPE ) | + (0x00 <<CP0MVPC0_PTC );#if !defined(CONFIG_USER_ONLY )/* Usermode has no TLB support */ - env->mvp->CP0_MVPConf0 |= (env->tlb->nb_tlb <<CP0MVPC0_PTLBE ); + env->mvp.CP0_MVPConf0 |= (env->tlb->nb_tlb <<CP0MVPC0_PTLBE );#endif /* Allocatable CP1 have media extensions, allocatable CP1 have FP support, no UDI implemented, no CP2 implemented, 1 CP1 implemented. */ - env->mvp->CP0_MVPConf1 = (1 <<CP0MVPC1_CIM ) | (1 <<CP0MVPC1_CIF ) | + env->mvp.CP0_MVPConf1 = (1 <<CP0MVPC1_CIM ) | (1 <<CP0MVPC1_CIF ) | (0x0 <<CP0MVPC1_PCX ) | (0x0 <<CP0MVPC1_PCP2 ) | (0x1 <<CP0MVPC1_PCP1 ); }
Signature · 1 line
1.7.7.6
PATCH v5 19/35 mips: make tlb an embedded struct instead of a pointer
In reply to Juan QuintelaAdjust all callers.
--- hw/mips_timer.c | 2 +- target-mips/cpu.h | 2 +- target-mips/helper.c | 30 +++++++++++++--------- target-mips/machine.c | 56 +++++++++++++++++++++--------------------- target-mips/op_helper.c | 40 +++++++++++++++--------------- target-mips/translate.c | 16 +++++++---- target-mips/translate_init.c | 24 ++++++++--------- 7 files changed, 89 insertions(+), 81 deletions(-)
hw/mips_timer.c +1 -1
@@ -35,7 +35,7 @@ uint32_t cpu_mips_get_random (CPUMIPSState *env)/* Don't return same value twice, so get another value */ do { lfsr = (lfsr >>1 ) ^ (-(lfsr &1u ) &0xd0000001u ); - idx = lfsr % (env->tlb->nb_tlb - env->CP0_Wired) + env->CP0_Wired; + idx = lfsr % (env->tlb.nb_tlb - env->CP0_Wired) + env->CP0_Wired; }while (idx == prev_idx); prev_idx = idx;return idx;
target-mips/cpu.h +1 -1
@@ -468,7 +468,7 @@ struct CPUMIPSState {CPUMIPSMVPContext mvp;#if !defined(CONFIG_USER_ONLY ) -CPUMIPSTLBContext *tlb; +CPUMIPSTLBContext tlb;#endif const mips_def_t *cpu_model;
target-mips/helper.c +18 -12
@@ -69,8 +69,8 @@ int r4k_map_address (CPUMIPSState *env, target_phys_addr_t *physical, int *prot,uint8_t ASID = env->CP0_EntryHi &0xFF ;int i; -for (i =0 ; i < env->tlb->tlb_in_use; i++) { -r4k_tlb_t *tlb = &env->tlb->mmu.r4k.tlb[i]; +for (i =0 ; i < env->tlb.tlb_in_use; i++) { +r4k_tlb_t *tlb = &env->tlb.mmu.r4k.tlb[i];/* 1k pages are not supported. */ target_ulong mask = tlb->PageMask | ~(TARGET_PAGE_MASK <<1 );target_ulong tag = address & ~mask;
@@ -124,13 +124,15 @@ static int get_physical_address (CPUMIPSState *env, target_phys_addr_t *physical *physical = address &0xFFFFFFFF ; *prot =PAGE_READ |PAGE_WRITE ; }else { - ret = env->tlb->map_address (env, physical, prot, address, rw, access_type); + ret = env->tlb.map_address (env, physical, prot, address, rw, + access_type); }#if defined(TARGET_MIPS64 ) } else if (address < 0x4000000000000000ULL) {/* xuseg */ if (UX && address <= (0x3FFFFFFFFFFFFFFFULL & env->SEGMask)) { - ret = env->tlb->map_address (env, physical, prot, address, rw, access_type); + ret = env->tlb.map_address (env, physical, prot, address, rw, + access_type); }else { ret =TLBRET_BADADDR ; }
@@ -138,7 +140,8 @@ static int get_physical_address (CPUMIPSState *env, target_phys_addr_t *physical/* xsseg */ if ((supervisor_mode || kernel_mode) &&SX && address <= (0x7FFFFFFFFFFFFFFFULL & env->SEGMask)) { - ret = env->tlb->map_address (env, physical, prot, address, rw, access_type); + ret = env->tlb.map_address (env, physical, prot, address, rw, + access_type); }else { ret =TLBRET_BADADDR ; }
@@ -155,7 +158,8 @@ static int get_physical_address (CPUMIPSState *env, target_phys_addr_t *physical/* xkseg */ if (kernel_mode &&KX && address <= (0xFFFFFFFF7FFFFFFFULL & env->SEGMask)) { - ret = env->tlb->map_address (env, physical, prot, address, rw, access_type); + ret = env->tlb.map_address (env, physical, prot, address, rw, + access_type); }else { ret =TLBRET_BADADDR ; }
@@ -179,7 +183,8 @@ static int get_physical_address (CPUMIPSState *env, target_phys_addr_t *physical }else if (address < (int32_t )0xE0000000UL ) {/* sseg (kseg2) */ if (supervisor_mode || kernel_mode) { - ret = env->tlb->map_address (env, physical, prot, address, rw, access_type); + ret = env->tlb.map_address (env, physical, prot, address, rw, + access_type); }else { ret =TLBRET_BADADDR ; }
@@ -187,7 +192,8 @@ static int get_physical_address (CPUMIPSState *env, target_phys_addr_t *physical/* kseg3 */ /* XXX: debug segment is not emulated */ if (kernel_mode) { - ret = env->tlb->map_address (env, physical, prot, address, rw, access_type); + ret = env->tlb.map_address (env, physical, prot, address, rw, + access_type); }else { ret =TLBRET_BADADDR ; }
@@ -645,19 +651,19 @@ void r4k_invalidate_tlb (CPUMIPSState *env, int idx, int use_extra)uint8_t ASID = env->CP0_EntryHi &0xFF ;target_ulong mask; - tlb = &env->tlb->mmu.r4k.tlb[idx]; + tlb = &env->tlb.mmu.r4k.tlb[idx];/* The qemu TLB is flushed when the ASID changes, so no need to flush these entries again. */ if (tlb->G ==0 && tlb->ASID !=ASID ) {return ; } -if (use_extra && env->tlb->tlb_in_use <MIPS_TLB_MAX ) { +if (use_extra && env->tlb.tlb_in_use <MIPS_TLB_MAX ) {/* For tlbwr, we can shadow the discarded entry into a new (fake) TLB entry, as long as the guest can not tell that it's there. */ - env->tlb->mmu.r4k.tlb[env->tlb->tlb_in_use] = *tlb; - env->tlb->tlb_in_use++; + env->tlb.mmu.r4k.tlb[env->tlb.tlb_in_use] = *tlb; + env->tlb.tlb_in_use++;return ; }
target-mips/machine.c +28 -28
79 lines not on this page · raw message
target-mips/op_helper.c +20 -20
@@ -1154,7 +1154,7 @@ target_ulong helper_dmfc0_watchlo (uint32_t sel)void helper_mtc0_index (target_ulong arg1) {int num =1 ; -unsigned int tmp = env->tlb->nb_tlb; +unsigned int tmp = env->tlb.nb_tlb; do { tmp >>= 1;
@@ -1485,7 +1485,7 @@ void helper_mtc0_pagegrain (target_ulong arg1)void helper_mtc0_wired (target_ulong arg1) { - env->CP0_Wired = arg1 % env->tlb->nb_tlb; + env->CP0_Wired = arg1 % env->tlb.nb_tlb; }void helper_mtc0_srsconf0 (target_ulong arg1)
@@ -1988,14 +1988,14 @@ static void cpu_mips_tlb_flush (CPUMIPSState *env, int flush_global) {/* Flush qemu's TLB and discard all shadowed entries. */ tlb_flush (env, flush_global); - env->tlb->tlb_in_use = env->tlb->nb_tlb; + env->tlb.tlb_in_use = env->tlb.nb_tlb; }static void r4k_mips_tlb_flush_extra (CPUMIPSState *env,int first) {/* Discard entries from env->tlb[first] onwards. */ -while (env->tlb->tlb_in_use > first) { -r4k_invalidate_tlb (env, --env->tlb->tlb_in_use,0 ); +while (env->tlb.tlb_in_use > first) { +r4k_invalidate_tlb (env, --env->tlb.tlb_in_use,0 ); } }
@@ -2004,7 +2004,7 @@ static void r4k_fill_tlb (int idx)r4k_tlb_t *tlb;/* XXX: detect conflicting TLBs and raise a MCHECK exception when needed */ - tlb = &env->tlb->mmu.r4k.tlb[idx]; + tlb = &env->tlb.mmu.r4k.tlb[idx]; tlb->VPN = env->CP0_EntryHi & (TARGET_PAGE_MASK <<1 );#if defined(TARGET_MIPS64 ) tlb->VPN &= env->SEGMask;
@@ -2026,12 +2026,12 @@ void r4k_helper_tlbwi (void) {int idx; - idx = (env->CP0_Index & ~0x80000000 ) % env->tlb->nb_tlb; + idx = (env->CP0_Index & ~0x80000000 ) % env->tlb.nb_tlb;/* Discard cached TLB entries. We could avoid doing this if the tlbwi is just upgrading access permissions on the current entry; that might be a further win. */ -r4k_mips_tlb_flush_extra (env, env->tlb->nb_tlb); +r4k_mips_tlb_flush_extra (env, env->tlb.nb_tlb);r4k_invalidate_tlb (env, idx,0 );r4k_fill_tlb (idx);
@@ -2055,8 +2055,8 @@ void r4k_helper_tlbp (void)int i;ASID = env->CP0_EntryHi &0xFF ; -for (i =0 ; i < env->tlb->nb_tlb; i++) { - tlb = &env->tlb->mmu.r4k.tlb[i]; +for (i =0 ; i < env->tlb.nb_tlb; i++) { + tlb = &env->tlb.mmu.r4k.tlb[i];/* 1k pages are not supported. */ mask = tlb->PageMask | ~(TARGET_PAGE_MASK <<1 ); tag = env->CP0_EntryHi & ~mask;
@@ -2068,10 +2068,10 @@ void r4k_helper_tlbp (void)break ; } } -if (i == env->tlb->nb_tlb) { +if (i == env->tlb.nb_tlb) {/* No match. Discard any shadow entries, if any of them match. */ -for (i = env->tlb->nb_tlb; i < env->tlb->tlb_in_use; i++) { - tlb = &env->tlb->mmu.r4k.tlb[i]; +for (i = env->tlb.nb_tlb; i < env->tlb.tlb_in_use; i++) { + tlb = &env->tlb.mmu.r4k.tlb[i];/* 1k pages are not supported. */ mask = tlb->PageMask | ~(TARGET_PAGE_MASK <<1 ); tag = env->CP0_EntryHi & ~mask;
@@ -2094,14 +2094,14 @@ void r4k_helper_tlbr (void)int idx;ASID = env->CP0_EntryHi &0xFF ; - idx = (env->CP0_Index & ~0x80000000 ) % env->tlb->nb_tlb; - tlb = &env->tlb->mmu.r4k.tlb[idx]; + idx = (env->CP0_Index & ~0x80000000 ) % env->tlb.nb_tlb; + tlb = &env->tlb.mmu.r4k.tlb[idx];/* If this will change the current ASID, flush qemu's TLB. */ if (ASID != tlb->ASID)cpu_mips_tlb_flush (env,1 ); -r4k_mips_tlb_flush_extra (env, env->tlb->nb_tlb); +r4k_mips_tlb_flush_extra (env, env->tlb.nb_tlb); env->CP0_EntryHi = tlb->VPN | tlb->ASID; env->CP0_PageMask = tlb->PageMask;
@@ -2113,22 +2113,22 @@ void r4k_helper_tlbr (void)void helper_tlbwi (void ) { - env->tlb->helper_tlbwi (); + env->tlb.helper_tlbwi (); }void helper_tlbwr (void ) { - env->tlb->helper_tlbwr (); + env->tlb.helper_tlbwr (); }void helper_tlbp (void ) { - env->tlb->helper_tlbp (); + env->tlb.helper_tlbp (); }void helper_tlbr (void ) { - env->tlb->helper_tlbr (); + env->tlb.helper_tlbr (); }/* Specials */
target-mips/translate.c +10 -6
@@ -5992,26 +5992,30 @@ static void gen_cp0 (CPUMIPSState *env, DisasContext *ctx, uint32_t opc, int rt,break ;case OPC_TLBWI : opn ="tlbwi" ; -if (!env->tlb->helper_tlbwi) +if (!env->tlb.helper_tlbwi) { goto die; + }gen_helper_tlbwi ();break ;case OPC_TLBWR : opn ="tlbwr" ; -if (!env->tlb->helper_tlbwr) +if (!env->tlb.helper_tlbwr) { goto die; + }gen_helper_tlbwr ();break ;case OPC_TLBP : opn ="tlbp" ; -if (!env->tlb->helper_tlbp) +if (!env->tlb.helper_tlbp) { goto die; + }gen_helper_tlbp ();break ;case OPC_TLBR : opn ="tlbr" ; -if (!env->tlb->helper_tlbr) +if (!env->tlb.helper_tlbr) { goto die; + }gen_helper_tlbr ();break ;case OPC_ERET :
@@ -12786,8 +12790,8 @@ void cpu_state_reset(CPUMIPSState *env) env->CP0_ErrorEPC = env->active_tc.PC; } env->active_tc.PC = (int32_t )0xBFC00000 ; - env->CP0_Random = env->tlb->nb_tlb -1 ; - env->tlb->tlb_in_use = env->tlb->nb_tlb; + env->CP0_Random = env->tlb.nb_tlb -1 ; + env->tlb.tlb_in_use = env->tlb.nb_tlb; env->CP0_Wired =0 ; env->CP0_EBase =0x80000000 | (env->cpu_index &0x3FF ); env->CP0_Status = (1 << CP0St_BEV) | (1 << CP0St_ERL);
target-mips/translate_init.c +11 -13
@@ -513,30 +513,28 @@ void mips_cpu_list (FILE *f, fprintf_function cpu_fprintf)#ifndef CONFIG_USER_ONLY static void no_mmu_init (CPUMIPSState *env,const mips_def_t *def) { - env->tlb->nb_tlb =1 ; - env->tlb->map_address = &no_mmu_map_address; + env->tlb.nb_tlb =1 ; + env->tlb.map_address = &no_mmu_map_address; }static void fixed_mmu_init (CPUMIPSState *env,const mips_def_t *def) { - env->tlb->nb_tlb =1 ; - env->tlb->map_address = &fixed_mmu_map_address; + env->tlb.nb_tlb =1 ; + env->tlb.map_address = &fixed_mmu_map_address; }static void r4k_mmu_init (CPUMIPSState *env,const mips_def_t *def) { - env->tlb->nb_tlb =1 + ((def->CP0_Config1 >>CP0C1_MMU ) &63 ); - env->tlb->map_address = &r4k_map_address; - env->tlb->helper_tlbwi = r4k_helper_tlbwi; - env->tlb->helper_tlbwr = r4k_helper_tlbwr; - env->tlb->helper_tlbp = r4k_helper_tlbp; - env->tlb->helper_tlbr = r4k_helper_tlbr; + env->tlb.nb_tlb =1 + ((def->CP0_Config1 >>CP0C1_MMU ) &63 ); + env->tlb.map_address = &r4k_map_address; + env->tlb.helper_tlbwi = r4k_helper_tlbwi; + env->tlb.helper_tlbwr = r4k_helper_tlbwr; + env->tlb.helper_tlbp = r4k_helper_tlbp; + env->tlb.helper_tlbr = r4k_helper_tlbr; }static void mmu_init (CPUMIPSState *env,const mips_def_t *def) { - env->tlb =g_malloc0 (sizeof (CPUMIPSTLBContext)); -switch (def->mmu_type) {case MMU_TYPE_NONE :no_mmu_init (env, def);
@@ -581,7 +579,7 @@ static void mvp_init (CPUMIPSState *env, const mips_def_t *def) (0x00 <<CP0MVPC0_PTC );#if !defined(CONFIG_USER_ONLY )/* Usermode has no TLB support */ - env->mvp.CP0_MVPConf0 |= (env->tlb->nb_tlb <<CP0MVPC0_PTLBE ); + env->mvp.CP0_MVPConf0 |= (env->tlb.nb_tlb <<CP0MVPC0_PTLBE );#endif /* Allocatable CP1 have media extensions, allocatable CP1 have FP support,
Signature · 1 line
1.7.7.6
PATCH v5 20/35 mips: bump migration version to 4
In reply to Juan Quintelabcond state was stored as int32, but it is target_ulong. Change migration state to reflect that.
--- target-mips/cpu.h | 2 +- target-mips/machine.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-)
target-mips/cpu.h +1 -1
@@ -502,7 +502,7 @@ void mips_cpu_list (FILE *f, fprintf_function cpu_fprintf);#define cpu_signal_handler cpu_mips_signal_handler#define cpu_list mips_cpu_list -#define CPU_SAVE_VERSION 3 +#define CPU_SAVE_VERSION 4/* MMU modes definitions. We carefully match the indices with our hflags layout. */
target-mips/machine.c +4 -6
@@ -84,8 +84,7 @@ void cpu_save(QEMUFile *f, void *opaque)qemu_put_sbe32s (f, &env->error_code);qemu_put_be32s (f, &env->hflags);qemu_put_betls (f, &env->btarget); - i = env->bcond; -qemu_put_sbe32s (f, &i); +qemu_put_betls (f, &env->bcond);/* Save remaining CP1 registers */ qemu_put_sbe32s (f, &env->CP0_Index);
@@ -193,9 +192,9 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)CPUMIPSState *env = opaque;int i; -if (version_id !=3 ) +if (version_id !=4 ) {return -EINVAL ; - + }/* Load active TC */ load_tc (f, &env->active_tc);
@@ -236,8 +235,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)qemu_get_sbe32s (f, &env->error_code);qemu_get_be32s (f, &env->hflags);qemu_get_betls (f, &env->btarget); -qemu_get_sbe32s (f, &i); - env->bcond = i; +qemu_get_betls (f, &env->bcond);/* Load remaining CP1 registers */ qemu_get_sbe32s (f, &env->CP0_Index);
Signature · 1 line
1.7.7.6
PATCH v5 21/35 vmstate: port mips cpu
In reply to Juan Quintela--- target-mips/cpu.h | 5 +- target-mips/machine.c | 465 +++++++++++++++++++------------------------------ 2 files changed, 182 insertions(+), 288 deletions(-)
target-mips/cpu.h +3 -2
@@ -30,6 +30,9 @@ struct r4k_tlb_t { uint_fast16_t D0:1; uint_fast16_t D1:1;target_ulong PFN [2 ]; +/* Fields needed as intermediate for vmstate */ +uint8_t asid_vmstate; +uint16_t flags_vmstate; };#if !defined(CONFIG_USER_ONLY )
@@ -502,8 +505,6 @@ void mips_cpu_list (FILE *f, fprintf_function cpu_fprintf);#define cpu_signal_handler cpu_mips_signal_handler#define cpu_list mips_cpu_list -#define CPU_SAVE_VERSION 4 -/* MMU modes definitions. We carefully match the indices with our hflags layout. */ #define MMU_MODE0_SUFFIX _kernel
target-mips/machine.c +179 -286
483 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH v5 22/35 arm: save always 32 fpu registers
In reply to Juan QuintelaThis way, we fix a bug (we were overwritten the 16 first registers on load), and we don't need to check for ARM_FEATURE_VPF3, we always send the 32 registers.
--- target-arm/cpu.h | 2 +- target-arm/machine.c | 22 ++-------------------- 2 files changed, 3 insertions(+), 21 deletions(-)
target-arm/cpu.h +1 -1
@@ -464,7 +464,7 @@ void cpu_arm_set_cp_io(CPUARMState *env, int cpnum,#define cpu_signal_handler cpu_arm_signal_handler#define cpu_list arm_cpu_list -#define CPU_SAVE_VERSION 6 +#define CPU_SAVE_VERSION 7/* MMU modes definitions */ #define MMU_MODE0_SUFFIX _kernel
target-arm/machine.c +2 -20
@@ -64,7 +64,7 @@ void cpu_save(QEMUFile *f, void *opaque)qemu_put_be32 (f, env->features);if (arm_feature (env,ARM_FEATURE_VFP )) { -for (i =0 ; i <16 ; i++) { +for (i =0 ; i <32 ; i++) {CPU_DoubleU u; u.d = env->vfp.regs[i];qemu_put_be32 (f, u.l.upper);
@@ -77,15 +77,6 @@ void cpu_save(QEMUFile *f, void *opaque)/* TODO: Should use proper FPSCR access functions. */ qemu_put_be32 (f, env->vfp.vec_len);qemu_put_be32 (f, env->vfp.vec_stride); - -if (arm_feature (env,ARM_FEATURE_VFP3 )) { -for (i =16 ; i <32 ; i++) { -CPU_DoubleU u; - u.d = env->vfp.regs[i]; -qemu_put_be32 (f, u.l.upper); -qemu_put_be32 (f, u.l.lower); - } - } }if (arm_feature (env,ARM_FEATURE_IWMMXT )) {
@@ -182,7 +173,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) env->features =qemu_get_be32 (f);if (arm_feature (env,ARM_FEATURE_VFP )) { -for (i =0 ; i <16 ; i++) { +for (i =0 ; i <32 ; i++) {CPU_DoubleU u; u.l.upper =qemu_get_be32 (f); u.l.lower =qemu_get_be32 (f);
@@ -195,15 +186,6 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)/* TODO: Should use proper FPSCR access functions. */ env->vfp.vec_len =qemu_get_be32 (f); env->vfp.vec_stride =qemu_get_be32 (f); - -if (arm_feature (env,ARM_FEATURE_VFP3 )) { -for (i =16 ; i <32 ; i++) { -CPU_DoubleU u; - u.l.upper =qemu_get_be32 (f); - u.l.lower =qemu_get_be32 (f); - env->vfp.regs[i] = u.d; - } - } }if (arm_feature (env,ARM_FEATURE_IWMMXT )) {
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 22/35] arm: save always 32 fpu registers
Quoted 3 lines · Juan Quintela
This way, we fix a bug (we were overwritten the 16 first registers on load), and we don't need to check for
ARM_FEATURE_VPF3, we always send the 32 registers.
As I pointed out last time around, this bug is already fixed in master and you need to correct this commit message.
-- PMM
PATCH v5 23/35 vmstate: port arm cpu
In reply to Juan QuintelaUse one subsection for each feature. This means that we don't need to bump the version field each time that a new feature gets introduced.
Introduce cpsr_vmstate field, as I am not sure if I can "use" uncached_cpsr for saving state.
--- target-arm/cpu.h | 5 +- target-arm/machine.c | 344 ++++++++++++++++++++++---------------------------- 2 files changed, 156 insertions(+), 193 deletions(-)
target-arm/cpu.h +3 -2
@@ -236,6 +236,9 @@ typedef struct CPUARMState { } cp[15 ];void *nvic;const struct arm_boot_info *boot_info; + +/* Fields needed as intermediate for vmstate */ +uint32_t cpsr_vmstate; } CPUARMState;#include "cpu-qom.h"
@@ -464,8 +467,6 @@ void cpu_arm_set_cp_io(CPUARMState *env, int cpnum,#define cpu_signal_handler cpu_arm_signal_handler#define cpu_list arm_cpu_list -#define CPU_SAVE_VERSION 7 -/* MMU modes definitions */ #define MMU_MODE0_SUFFIX _kernel#define MMU_MODE1_SUFFIX _user
target-arm/machine.c +153 -191
368 lines not on this page · raw message
Signature · 1 line
1.7.7.6
Re: [Qemu-devel] [PATCH 23/35] vmstate: port arm cpu
Quoted 17 lines · Juan Quintela
Use one subsection for each feature. This means that we don't need to bump the version field each time that a new feature gets introduced.
Introduce
cpsr_vmstatefield, as I am not sure if I can "use"uncached_cpsrfor saving state.Signed-off-by Juan Quintela <[email protected]>---
target-arm/cpu.h | 5 +-
target-arm/machine.c | 344 ++++++++++++++++++++++----------------------------2 files changed, 156 insertions(+), 193 deletions(-)target-arm/cpu.h +0
-0
target-arm/cpu.h typedef struct CPUARMState { · line 242
Quoted 7 lines
target-arm/cpu.h +3
-0@@ -236,6 +236,9 @@ typedef struct CPUARMState { } cp[15]; void *nvic; const struct arm_boot_info *boot_info; + + /* Fields needed as intermediate for vmstate */ + uint32_t cpsr_vmstate; } CPUARMState;
I still think this is the wrong approach. We need to support "this is how you read/write this field" functions. See also target-alpha handling of the fpcr.
-- PMM
Re: [Qemu-devel] [PATCH 23/35] vmstate: port arm cpu
Quoted 13 lines · Peter Maydell
Quoted 12 lines · Juan Quintela
Use one subsection for each feature. This means that we don't need to bump the version field each time that a new feature gets introduced.
Introduce
cpsr_vmstatefield, as I am not sure if I can "use"uncached_cpsrfor saving state.Signed-off-by Juan Quintela <[email protected]>---
target-arm/cpu.h | 5 +-
target-arm/machine.c | 344 ++++++++++++++++++++++----------------------------2 files changed, 156 insertions(+), 193 deletions(-)
Quoted 16 lines
target-arm/cpu.h typedef struct CPUARMState { · line 242
Quoted 12 lines
target-arm/cpu.h +3
-0@@ -236,6 +236,9 @@ typedef struct CPUARMState { } cp[15]; void *nvic; const struct arm_boot_info *boot_info; + + /* Fields needed as intermediate for vmstate */ + uint32_t cpsr_vmstate; } CPUARMState;I still think this is the wrong approach. We need to support "this is how you read/write this field" functions. See also target-alpha handling of the fpcr.
It is easy to change to support that (see alpha example), but then, each time that we change protocol format (and we have a pending change for 1.2), every user that is "like" uint64_t, but with accesor and setter, needs to get a new change. This other way (with pre_save/post_load) instead makes trivial to change protocols.
So, we can have "cleaniness" or "flexibility", take one.
I still think that alpha should be changed to this other approach, for the same reason.
Notice that we _know_ that what we sent is an uint32_t, it is how we get that uint32_t what changes, that is why I preffer a new field and pre_load/post_load functions.
The only other sane approach that I can think is changing:
#define VMSTATE_INT32_V(_f, _s, _v) \
into something like:
VMSTATE_INT32_GENERAL(_f, _s, _v, _getter, _setter)
and then _getter/_setter functions for normal ints the obvious copy this uint32_t?
Would that work for you?
Later, Juan.
Re: [Qemu-devel] [PATCH 23/35] vmstate: port arm cpu
Quoted 4 lines · Juan Quintela
The only other sane approach that I can think is changing:
#define
VMSTATE_INT32_V(_f, _s, _v)\
Quoted 8 lines
into something like:
VMSTATE_INT32_GENERAL(_f, _s, _v, _getter, _setter)and then _getter/_setter functions for normal ints the obvious copy this
uint32_t?Would that work for you?
Yes, I'd be happy with that approach: it's the general idea of "here's a function to get/set the value" that I like in the alpha code, not the specific implementation (which is a bit of an ugly hack).
-- PMM
PATCH v5 24/35 vmstate: all cpus converted
In reply to Juan QuintelaWe don't have any more CPU_SAVEVM_VERSION users, neither cpu_save/load() ones.
--- exec.c | 5 ----- qemu-common.h | 4 ---- 2 files changed, 0 insertions(+), 9 deletions(-)
exec.c +0 -5
@@ -719,13 +719,8 @@ void cpu_exec_init(CPUArchState *env)#endif #if !defined(CONFIG_USER_ONLY )vmstate_register (NULL , cpu_index, &vmstate_cpu_common, env); -#if defined(CPU_SAVE_VERSION ) -register_savevm (NULL ,"cpu" , cpu_index,CPU_SAVE_VERSION , - cpu_save, cpu_load, env); -#else vmstate_register (NULL , cpu_index, &vmstate_cpu, env);#endif -#endif }/* Allocate a new translation block. Flush the translation buffer if
qemu-common.h +0 -4
@@ -275,10 +275,6 @@ bool tcg_enabled(void);void cpu_exec_init_all (void ); -/* CPU save/load. */ -void cpu_save (QEMUFile *f,void *opaque); -int cpu_load (QEMUFile *f,void *opaque,int version_id); -/* Unblock cpu */ void qemu_cpu_kick (void *env);void qemu_cpu_kick_self (void );
Signature · 1 line
1.7.7.6
PATCH v5 25/35 vmstate: fix vmstate formating for i386
In reply to Juan Quintela--- target-i386/machine.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
target-i386/machine.c +8 -8
@@ -11,7 +11,7 @@ static const VMStateDescription vmstate_segment = { .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old = 1, - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINT32 (selector, SegmentCache),VMSTATE_UINTTL (base, SegmentCache),VMSTATE_UINT32 (limit, SegmentCache),
@@ -37,7 +37,7 @@ static const VMStateDescription vmstate_xmm_reg = { .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old = 1, - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINT64 (XMM_Q (0 ), XMMReg),VMSTATE_UINT64 (XMM_Q (1 ), XMMReg),VMSTATE_END_OF_LIST ()
@@ -53,7 +53,7 @@ static const VMStateDescription vmstate_ymmh_reg = { .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old = 1, - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINT64 (XMM_Q (0 ), XMMReg),VMSTATE_UINT64 (XMM_Q (1 ), XMMReg),VMSTATE_END_OF_LIST ()
@@ -68,7 +68,7 @@ static const VMStateDescription vmstate_mtrr_var = { .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old = 1, - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINT64 (base, MTRRVar),VMSTATE_UINT64 (mask, MTRRVar),VMSTATE_END_OF_LIST ()
@@ -284,7 +284,7 @@ static const VMStateDescription vmstate_async_pf_msr = { .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old =1 , - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINT64 (async_pf_en_msr, CPUX86State),VMSTATE_END_OF_LIST () }
@@ -302,7 +302,7 @@ static const VMStateDescription vmstate_fpop_ip_dp = { .version_id = 1, .minimum_version_id = 1, .minimum_version_id_old = 1, - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINT16 (fpop, CPUX86State),VMSTATE_UINT64 (fpip, CPUX86State),VMSTATE_UINT64 (fpdp, CPUX86State),
@@ -353,7 +353,7 @@ const VMStateDescription vmstate_cpu = { .minimum_version_id_old = 3, .pre_save = cpu_pre_save, .post_load = cpu_post_load, - .fields = (VMStateField []) { + .fields = (VMStateField []) {VMSTATE_UINTTL_ARRAY (regs, CPUX86State,CPU_NB_REGS ),VMSTATE_UINTTL (eip, CPUX86State),VMSTATE_UINTTL (eflags, CPUX86State),
@@ -449,7 +449,7 @@ const VMStateDescription vmstate_cpu = {VMSTATE_END_OF_LIST ()/* The above list is not sorted /wrt version numbers, watch out! */ }, - .subsections = (VMStateSubsection []) { + .subsections = (VMStateSubsection []) { { .vmsd = &vmstate_async_pf_msr, .needed = async_pf_msr_needed,
Signature · 1 line
1.7.7.6
PATCH v5 26/35 vmstate: remove unneeded includes from target-*/machine.c
In reply to Juan Quintela--- target-alpha/machine.c | 1 - target-arm/machine.c | 1 - target-cris/machine.c | 1 - target-i386/machine.c | 6 ------ target-lm32/machine.c | 1 - target-mips/machine.c | 3 --- target-ppc/machine.c | 2 -- target-sparc/machine.c | 4 ---- 8 files changed, 0 insertions(+), 19 deletions(-)
target-alpha/machine.c +0 -1
@@ -1,5 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" static int get_fpcr (QEMUFile *f,void *opaque,size_t size) {
target-arm/machine.c +0 -1
@@ -1,5 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" static bool feature_vfp_needed (void *opaque) {
target-cris/machine.c +0 -1
@@ -1,5 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" static const VMStateDescription vmstate_tlbset = { .name ="cpu/tlbset" ,
target-i386/machine.c +0 -6
@@ -1,10 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" -#include "hw/pc.h" -#include "hw/isa.h" - -#include "cpu.h" -#include "kvm.h" static const VMStateDescription vmstate_segment = { .name ="segment" ,
target-lm32/machine.c +0 -1
@@ -1,5 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" const VMStateDescription vmstate_cpu = { .name ="cpu" ,
target-mips/machine.c +0 -3
@@ -1,7 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" - -#include "cpu.h" static const VMStateDescription vmstate_tc = { .name ="tc" ,
target-ppc/machine.c +0 -2
@@ -1,6 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" -#include "kvm.h" static const VMStateDescription vmstate_tlb = { .name ="tlb" ,
target-sparc/machine.c +0 -4
@@ -1,8 +1,4 @@#include "hw/hw.h" -#include "hw/boards.h" -#include "qemu-timer.h" - -#include "cpu.h" static const VMStateDescription vmstate_cpu_timer = { .name ="cpu_timer" ,
Signature · 1 line
1.7.7.6
PATCH v5 27/35 vmstate: rename machine.c to vmstate-cpu.c
In reply to Juan QuintelaThey only contain vmstate cpu sections nowadays. Change name to reflect the case.
---
Makefile.target | 3 ++-
target-alpha/{machine.c => vmstate-cpu.c} | 0
target-arm/{machine.c => vmstate-cpu.c} | 0
target-cris/{machine.c => vmstate-cpu.c} | 0
target-i386/{machine.c => vmstate-cpu.c} | 0
target-lm32/{machine.c => vmstate-cpu.c} | 0
target-m68k/{machine.c => vmstate-cpu.c} | 0
target-microblaze/{machine.c => vmstate-cpu.c} | 0
target-mips/{machine.c => vmstate-cpu.c} | 0
target-ppc/{machine.c => vmstate-cpu.c} | 0
target-s390x/{machine.c => vmstate-cpu.c} | 0
target-sh4/{machine.c => vmstate-cpu.c} | 0
target-sparc/{machine.c => vmstate-cpu.c} | 0
target-xtensa/{machine.c => vmstate-cpu.c} | 0
14 files changed, 2 insertions(+), 1 deletions(-)
rename target-alpha/{machine.c => vmstate-cpu.c} (100%)
rename target-arm/{machine.c => vmstate-cpu.c} (100%)
rename target-cris/{machine.c => vmstate-cpu.c} (100%)
rename target-i386/{machine.c => vmstate-cpu.c} (100%)
rename target-lm32/{machine.c => vmstate-cpu.c} (100%)
rename target-m68k/{machine.c => vmstate-cpu.c} (100%)
rename target-microblaze/{machine.c => vmstate-cpu.c} (100%)
rename target-mips/{machine.c => vmstate-cpu.c} (100%)
rename target-ppc/{machine.c => vmstate-cpu.c} (100%)
rename target-s390x/{machine.c => vmstate-cpu.c} (100%)
rename target-sh4/{machine.c => vmstate-cpu.c} (100%)
rename target-sparc/{machine.c => vmstate-cpu.c} (100%)
rename target-xtensa/{machine.c => vmstate-cpu.c} (100%)Makefile.target +2 -1
@@ -179,7 +179,8 @@ endif #CONFIG_BSD_USER # System emulator target ifdef CONFIG_SOFTMMU -obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o ioport.o +obj-y = arch_init.o cpus.o monitor.o vmstate-cpu.o gdbstub.o balloon.o +obj-y += ioport.o # virtio has to be here due to weird dependency between PCI and virtio-net. # need to fix this properly obj-$(CONFIG_NO_PCI) += pci-stub.o
target-alpha/vmstate-cpu.c renamed from target-alpha/machine.c +0 -0
target-arm/vmstate-cpu.c renamed from target-arm/machine.c +0 -0
target-cris/vmstate-cpu.c renamed from target-cris/machine.c +0 -0
target-i386/vmstate-cpu.c renamed from target-i386/machine.c +0 -0
target-lm32/vmstate-cpu.c renamed from target-lm32/machine.c +0 -0
target-m68k/vmstate-cpu.c renamed from target-m68k/machine.c +0 -0
target-microblaze/vmstate-cpu.c renamed from target-microblaze/machine.c +0 -0
target-mips/vmstate-cpu.c renamed from target-mips/machine.c +0 -0
target-ppc/vmstate-cpu.c renamed from target-ppc/machine.c +0 -0
target-s390x/vmstate-cpu.c renamed from target-s390x/machine.c +0 -0
target-sh4/vmstate-cpu.c renamed from target-sh4/machine.c +0 -0
target-sparc/vmstate-cpu.c renamed from target-sparc/machine.c +0 -0
target-xtensa/vmstate-cpu.c renamed from target-xtensa/machine.c +0 -0
Signature · 1 line
1.7.7.6
PATCH v5 28/35 vmstate: Add copyright info for alpha processor
In reply to Juan Quintela--- target-alpha/vmstate-cpu.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
target-alpha/vmstate-cpu.c +15 -0
@@ -1,3 +1,18 @@ +/* +* Migration support for alpha cpus +* +* Copyright (C) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Based on savevm serialization code by: +* Richard Henderson <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or +* later. See the COPYING file in the top-level directory. +*/ +#include "hw/hw.h" static int get_fpcr (QEMUFile *f,void *opaque,size_t size)
Signature · 1 line
1.7.7.6
PATCH v5 29/35 vmstate: Add copyright info for lm32 processor
In reply to Juan Quintela--- target-lm32/vmstate-cpu.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
target-lm32/vmstate-cpu.c +15 -0
@@ -1,3 +1,18 @@ +/* +* Migration support for lm32 cpus +* +* Copyright (C) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Based on savevm serialization code by: +* Michael Walle <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or +* later. See the COPYING file in the top-level directory. +*/ +#include "hw/hw.h" const VMStateDescription vmstate_cpu = {
Signature · 1 line
1.7.7.6
PATCH v5 30/35 vmstate: Add copyright info for cris processor
In reply to Juan Quintela--- target-cris/vmstate-cpu.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
target-cris/vmstate-cpu.c +15 -0
@@ -1,3 +1,18 @@ +/* +* Migration support for cris cpus +* +* Copyright (C) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Based on savevm serialization code by: +* Edgar E. Iglesias <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or +* later. See the COPYING file in the top-level directory. +*/ +#include "hw/hw.h" static const VMStateDescription vmstate_tlbset = {
Signature · 1 line
1.7.7.6
PATCH v5 31/35 vmstate: Add copyright info for arm processor
In reply to Juan Quintela--- target-arm/vmstate-cpu.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
target-arm/vmstate-cpu.c +15 -0
@@ -1,3 +1,18 @@ +/* +* Migration support for arm cpus +* +* Copyright (C) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Based on savevm serialization code by: +* Andrzej Zaborowski <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or +* later. See the COPYING file in the top-level directory. +*/ +#include "hw/hw.h" static bool feature_vfp_needed (void *opaque)
Signature · 1 line
1.7.7.6
PATCH v5 32/35 vmstate: Add copyright info for i386 processor
In reply to Juan Quintelav2: Move license to BSD-like as in vl.c
Add Fabrice copyright from vl.c
--- target-i386/vmstate-cpu.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-)
target-i386/vmstate-cpu.c +28 -0
@@ -1,3 +1,31 @@ +/* +* Migration support for x86 cpu +* +* Copyright (c) 2003-2008 Fabrice Bellard +* Copyright (c) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ +#include "hw/hw.h" static const VMStateDescription vmstate_segment = {
Signature · 1 line
1.7.7.6
PATCH v5 33/35 vmstate: Add copyright info for mips processor
In reply to Juan Quintelav2: Move license to BSD-like as in vl.c
--- target-mips/vmstate-cpu.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-)
target-mips/vmstate-cpu.c +29 -0
@@ -1,3 +1,32 @@ +/* +* Migration support for mips cpu +* +* Copyright (c) 2003-2008 Fabrice Bellard +* Copyright (c) 2003-2008 Thiemo Seufer +* Copyright (c) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ +#include "hw/hw.h" static const VMStateDescription vmstate_tc = {
Signature · 1 line
1.7.7.6
PATCH v5 34/35 vmstate: Add copyright info for ppc processor
In reply to Juan Quintelav2: Move license to BSD-like as in vl.c
v3: change copyright dates
v4: add Fabrice & QEMU contributors
--- target-ppc/vmstate-cpu.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
target-ppc/vmstate-cpu.c +30 -0
@@ -1,3 +1,33 @@ +/* +* Migration support for ppc cpu +* +* Copyright (c) 2003-2008 Fabrice Bellard +* Copyright (c) 2004-2009 Blue Swirl <[email protected]> +* Copyright (c) 2003-2012 QEMU contributors +* Copyright (c) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ +#include "hw/hw.h" static const VMStateDescription vmstate_tlb = {
Signature · 1 line
1.7.7.6
PATCH v5 35/35 vmstate: Add copyright info for sparc processor
In reply to Juan Quintelav2: Move license to BSD-like as in vl.c
v3: Change copyright dates
v4: add QEMU contributors
--- target-sparc/vmstate-cpu.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
target-sparc/vmstate-cpu.c +30 -0
@@ -1,3 +1,33 @@ +/* +* Migration support for sparc cpu +* +* Copyright (c) 2003-2008 Fabrice Bellard +* Copyright (c) 2004-2011 Blue Swirl <[email protected]> +* Copyright (c) 2003-2012 QEMU contributors +* Copyright (c) 2011 Red Hat, Inc. +* +* Author(s): +* Juan Quintela <[email protected]> +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ +#include "hw/hw.h" static const VMStateDescription vmstate_cpu_timer = {
Signature · 1 line
1.7.7.6
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 11 lines
This repository contains all the changes:
git://repo.or.cz/qemu/quintela.gitvmstate-cpus-v4[v5]
- rebase on top
- sparc psr change behaviour: old behaviour was unintended, thanks Blu
- alexander agreed with ppc changes
- patch missing already included for ppcAnthony, please pull.
You forgot to update the subjects. And if it's labeled [PATCH] it's supposed to be reviewed, not directly pulled.
The branch is off by one; positive that -v4 branch matches v5 series?
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 11 lines · Andreas Färber
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 10 lines
This repository contains all the changes:
git://repo.or.cz/qemu/quintela.gitvmstate-cpus-v4[v5]
- rebase on top
- sparc psr change behaviour: old behaviour was unintended, thanks Blu
- alexander agreed with ppc changes
- patch missing already included for ppc
Quoted 4 lines
Quoted 1 line
Anthony, please pull.
You forgot to update the subjects. And if it's labeled [PATCH] it's supposed to be reviewed, not directly pulled.
Oops. I think that I answered all the review comments on previous threads, Should be ready for pull.
Quoted 1 line
The branch is off by one; positive that -v4 branch matches v5 series?
Shuould be updated by now (I sent the patches and forget to do the push).
Quoted 6 lines · Juan Quintela
Quoted 5 lines · Andreas Färber
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 4 lines
This repository contains all the changes:
git://repo.or.cz/qemu/quintela.gitvmstate-cpus-v4
Oops, you meaned here. s/v4/v5/ :-(
I have to put in one script how to ask for a pull and don't rely on my weak memory.
Quoted 19 lines
Quoted 10 lines
Quoted 7 lines
[v5]
- rebase on top
- sparc psr change behaviour: old behaviour was unintended, thanks Blu
- alexander agreed with ppc changes
- patch missing already included for ppcAnthony, please pull.
You forgot to update the subjects. And if it's labeled [PATCH] it's supposed to be reviewed, not directly pulled.
Oops. I think that I answered all the review comments on previous threads, Should be ready for pull.
Quoted 1 line
The branch is off by one; positive that -v4 branch matches v5 series?
Shuould be updated by now (I sent the patches and forget to do the push).
Quoted 5 lines · Juan Quintela
Quoted 4 lines · Juan Quintela
Quoted 3 lines · Andreas Färber
Am 04.05.2012 12:54, schrieb Juan Quintela:
Quoted 2 lines
This repository contains all the changes:
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
git://repo.or.cz/qemu/quintela.gitvmstate-cpus-v4Oops, you meaned here. s/v4/v5/ :-(
I have to put in one script how to ask for a pull and don't rely on my weak memory.
We're in freeze so this cannot be pulled until after the 1.1 release.
Regards,
Anthony Liguori