Hello Peter, This is my current QOM CPU patch queue. Please pull.
Since this touches on bsd-user code, request to apply the build fix first. NB: I was only able to test x86/ppc/arm KVM this time; s390x KVM was re-reviewed only. Regards, Andreas Cc: Peter Maydell <peter.mayd...@linaro.org> Cc: Anthony Liguori <anth...@codemonkey.ws> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: Igor Mammedov <imamm...@redhat.com> Cc: Christian Borntraeger <borntrae...@de.ibm.com> The following changes since commit be86c53c058d75fc3938b1b54f363259f282b3d5: Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0' into staging (2014-03-13 13:19:46 +0000) are available in the git repository at: git://github.com/afaerber/qemu-cpu.git tags/qom-cpu-for-2.0 for you to fetch changes up to 98f11363e7add1e750f76e3d81750348f0470c29: user-exec: Change exception_action() argument to CPUState (2014-03-13 15:35:04 +0100) ---------------------------------------------------------------- QOM CPUState refactorings / X86CPU * Deadlock fix for exit requests around CPU reset * X86CPU x2apic for KVM * X86CPU model subclasses * SPARCCPU preparations for model subclasses * -cpu arguments for arm, cris, lm32, moxie, openrisc, ppc, sh4, uc32 * m68k assertion cleanups * CPUClass hooks for cpu.h inline functions * Field movements from CPU_COMMON to CPUState and follow-up cleanups ---------------------------------------------------------------- Andreas Färber (48): target-alpha: Clean up ENV_GET_CPU() usage target-arm: Clean up ENV_GET_CPU() usage target-i386: Clean up ENV_GET_CPU() usage target-ppc: Clean up ENV_GET_CPU() usage target-s390x: Clean up ENV_GET_CPU() usage target-sparc: Clean up ENV_GET_CPU() usage target-unicore32: Clean up ENV_GET_CPU() usage target-xtensa: Clean up ENV_GET_CPU() usage cpu: Turn cpu_has_work() into a CPUClass hook target-i386: Prepare CPUClass::class_by_name for X86CPU cpu: Introduce CPUClass::parse_features() hook target-sparc: Use error_report() for CPU error reporting target-sparc: Implement CPUClass::parse_features() for SPARCCPU target-sparc: Defer SPARCCPU feature inference to QOM realize cpu: Implement CPUClass::parse_features() for the rest of CPUs cpu: Factor out cpu_generic_init() cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook cpu: Move mem_io_{pc,vaddr} fields from CPU_COMMON to CPUState cpu: Move can_do_io field from CPU_COMMON to CPUState cpu: Move icount_extra field from CPU_COMMON to CPUState cpu: Move icount_decr field from CPU_COMMON to CPUState cpu: Move tb_jmp_cache field from CPU_COMMON to CPUState cpu: Move jmp_env field from CPU_COMMON to CPUState cpu: Move exception_index field from CPU_COMMON to CPUState cpu: Move opaque field from CPU_COMMON to CPUState cpu: Move watchpoint fields from CPU_COMMON to CPUState cpu: Move breakpoints field from CPU_COMMON to CPUState exec: Change tlb_fill() argument to CPUState cpu-exec: Change cpu_loop_exit() argument to CPUState translate-all: Change cpu_restore_state() argument to CPUState translate-all: Change cpu_restore_state_from_tb() argument to CPUState translate-all: Change tb_check_watchpoint() argument to CPUState translate-all: Change cpu_io_recompile() argument to CPUState translate-all: Change tb_gen_code() argument to CPUState translate-all: Change tb_flush_jmp_cache() argument to CPUState target-ppc: Use PowerPCCPU in PowerPCCPUClass::handle_mmu_fault hook exec: Change cpu_watchpoint_{insert,remove{,_by_ref,_all}} argument exec: Change cpu_breakpoint_{insert,remove{,_by_ref,_all}} argument cpu-exec: Change cpu_resume_from_signal() argument to CPUState cputlb: Change tlb_unprotect_code_phys() argument to CPUState exec: Change memory_region_section_get_iotlb() argument to CPUState exec: Change cpu_abort() argument to CPUState target-cris: Replace DisasContext::env field with CRISCPU target-microblaze: Replace DisasContext::env field with MicroBlazeCPU cputlb: Change tlb_flush_page() argument to CPUState cputlb: Change tlb_flush() argument to CPUState cputlb: Change tlb_set_page() argument to CPUState user-exec: Change exception_action() argument to CPUState Edgar E. Iglesias (1): cpu: Don't clear cpu->exit_request on reset Eduardo Habkost (8): target-i386: Rename cpu_x86_register() to x86_cpu_load_def() target-i386: Call x86_cpu_load_def() earlier target-i386: Rename x86_def_t to X86CPUDefinition target-i386: Don't declare variables in the middle of blocks target-i386: Make kvm_default_features an array target-i386: Introduce x86_cpu_compat_disable_kvm_features() target-i386: Enable x2apic by default on KVM target-i386: X86CPU model subclasses Peter Maydell (1): target-m68k: Remove custom qemu_assert() function bsd-user/main.c | 2 +- cpu-exec.c | 106 +++++++------ cpus.c | 25 ++- cputlb.c | 24 +-- exec.c | 118 ++++++++------- gdbstub.c | 48 +++--- hw/i386/kvmvapic.c | 6 +- hw/i386/pc_piix.c | 7 +- hw/i386/pc_q35.c | 1 + hw/ppc/e500.c | 3 +- hw/ppc/ppc405_uc.c | 2 +- hw/ppc/ppce500_spin.c | 2 +- hw/ppc/spapr_hcall.c | 8 +- hw/s390x/s390-virtio.c | 8 +- hw/sh4/sh7750.c | 2 +- include/exec/cpu-all.h | 24 --- include/exec/cpu-defs.h | 61 -------- include/exec/cputlb.h | 6 +- include/exec/exec-all.h | 43 +++--- include/exec/gen-icount.h | 10 +- include/exec/softmmu_template.h | 24 +-- include/qom/cpu.h | 113 +++++++++++++- linux-user/elfload.c | 10 +- linux-user/linuxload.c | 3 +- linux-user/m68k-sim.c | 3 +- linux-user/m68k/target_cpu.h | 4 +- linux-user/main.c | 102 +++++++------ linux-user/signal.c | 24 +-- linux-user/syscall.c | 30 ++-- linux-user/vm86.c | 27 ++-- qom/cpu.c | 85 ++++++++++- target-alpha/cpu.c | 22 ++- target-alpha/cpu.h | 20 +-- target-alpha/helper.c | 40 +++-- target-alpha/mem_helper.c | 32 ++-- target-alpha/sys_helper.c | 4 +- target-alpha/translate.c | 4 +- target-arm/arm-semi.c | 9 +- target-arm/cpu.c | 15 +- target-arm/cpu.h | 11 +- target-arm/helper.c | 150 ++++++++++-------- target-arm/op_helper.c | 39 +++-- target-arm/translate-a64.c | 4 +- target-arm/translate.c | 6 +- target-cris/cpu.c | 27 ++-- target-cris/cpu.h | 12 +- target-cris/helper.c | 48 +++--- target-cris/mmu.c | 3 +- target-cris/op_helper.c | 28 ++-- target-cris/translate.c | 21 +-- target-cris/translate_v10.c | 16 +- target-i386/cpu-qom.h | 15 ++ target-i386/cpu.c | 301 ++++++++++++++++++++++++------------- target-i386/cpu.h | 26 +--- target-i386/excp_helper.c | 6 +- target-i386/helper.c | 77 ++++++---- target-i386/kvm.c | 8 +- target-i386/machine.c | 7 +- target-i386/mem_helper.c | 16 +- target-i386/misc_helper.c | 20 ++- target-i386/seg_helper.c | 20 ++- target-i386/smm_helper.c | 2 +- target-i386/svm_helper.c | 41 ++--- target-i386/translate.c | 4 +- target-lm32/cpu.c | 14 +- target-lm32/cpu.h | 13 +- target-lm32/helper.c | 64 ++++---- target-lm32/op_helper.c | 23 +-- target-lm32/translate.c | 5 +- target-m68k/cpu.c | 14 +- target-m68k/cpu.h | 9 +- target-m68k/helper.c | 23 +-- target-m68k/m68k-semi.c | 5 +- target-m68k/op_helper.c | 34 ++--- target-m68k/qregs.def | 1 - target-m68k/translate.c | 47 +++--- target-microblaze/cpu.c | 14 +- target-microblaze/cpu.h | 8 +- target-microblaze/helper.c | 34 ++--- target-microblaze/mmu.c | 6 +- target-microblaze/op_helper.c | 19 ++- target-microblaze/translate.c | 102 +++++++------ target-mips/cpu.c | 38 ++++- target-mips/cpu.h | 34 +---- target-mips/helper.c | 56 ++++--- target-mips/machine.c | 3 +- target-mips/op_helper.c | 34 +++-- target-mips/translate.c | 8 +- target-mips/translate_init.c | 4 +- target-moxie/cpu.c | 27 ++-- target-moxie/cpu.h | 7 +- target-moxie/helper.c | 51 ++++--- target-moxie/translate.c | 4 +- target-openrisc/cpu.c | 34 +++-- target-openrisc/cpu.h | 10 +- target-openrisc/exception.c | 6 +- target-openrisc/interrupt.c | 14 +- target-openrisc/interrupt_helper.c | 2 +- target-openrisc/mmu.c | 17 ++- target-openrisc/mmu_helper.c | 8 +- target-openrisc/sys_helper.c | 6 +- target-openrisc/translate.c | 5 +- target-ppc/cpu-qom.h | 8 +- target-ppc/cpu.h | 14 +- target-ppc/excp_helper.c | 73 ++++----- target-ppc/fpu_helper.c | 26 +++- target-ppc/helper_regs.h | 2 +- target-ppc/kvm.c | 8 +- target-ppc/misc_helper.c | 4 +- target-ppc/mmu-hash32.c | 35 +++-- target-ppc/mmu-hash32.h | 14 +- target-ppc/mmu-hash64.c | 30 ++-- target-ppc/mmu-hash64.h | 8 +- target-ppc/mmu_helper.c | 208 ++++++++++++++----------- target-ppc/translate.c | 4 +- target-ppc/translate_init.c | 43 +++--- target-ppc/user_only_helper.c | 8 +- target-s390x/cc_helper.c | 5 +- target-s390x/cpu.c | 22 ++- target-s390x/cpu.h | 14 +- target-s390x/fpu_helper.c | 4 +- target-s390x/helper.c | 88 ++++++----- target-s390x/mem_helper.c | 58 ++++--- target-s390x/misc_helper.c | 33 ++-- target-s390x/translate.c | 4 +- target-sh4/cpu.c | 27 ++-- target-sh4/cpu.h | 11 +- target-sh4/helper.c | 108 +++++++------ target-sh4/op_helper.c | 20 ++- target-sh4/translate.c | 4 +- target-sparc/cpu.c | 114 +++++++++----- target-sparc/cpu.h | 13 +- target-sparc/helper.c | 36 +++-- target-sparc/int32_helper.c | 10 +- target-sparc/int64_helper.c | 8 +- target-sparc/ldst_helper.c | 53 ++++--- target-sparc/machine.c | 3 +- target-sparc/mmu_helper.c | 42 +++--- target-sparc/translate.c | 4 +- target-unicore32/cpu.c | 13 +- target-unicore32/cpu.h | 11 +- target-unicore32/helper.c | 30 ++-- target-unicore32/op_helper.c | 14 +- target-unicore32/softmmu.c | 29 ++-- target-unicore32/translate.c | 32 +++- target-unicore32/ucf64_helper.c | 3 +- target-xtensa/cpu.c | 8 + target-xtensa/cpu.h | 13 +- target-xtensa/helper.c | 32 ++-- target-xtensa/op_helper.c | 51 ++++--- target-xtensa/translate.c | 5 +- translate-all.c | 98 ++++++------ translate-all.h | 2 +- user-exec.c | 28 ++-- 154 files changed, 2442 insertions(+), 1881 deletions(-)