diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-03-13 19:13:33 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-03-13 19:13:33 +0000 |
commit | bbbd67f0ccdba93702e58879997c1d2ca67311b1 (patch) | |
tree | d02c18e59ace36d7f8dcf01040b8f1218ad021b1 /target-i386/cpu.h | |
parent | d7f0a59ff02affb8270ad9b6ee7e60974ac92df0 (diff) | |
parent | 2ef1f68d4f6630e6c77071d2dd979123d1b4d0ed (diff) | |
download | qemu-bbbd67f0ccdba93702e58879997c1d2ca67311b1.tar.gz |
Merge remote-tracking branch 'remotes/afaerber/tags/qom-cpu-for-2.0' into staging
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
# gpg: Signature made Thu 13 Mar 2014 19:06:56 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg: aka "Andreas Färber <afaerber@suse.com>"
* remotes/afaerber/tags/qom-cpu-for-2.0: (58 commits)
user-exec: Change exception_action() argument to CPUState
cputlb: Change tlb_set_page() argument to CPUState
cputlb: Change tlb_flush() argument to CPUState
cputlb: Change tlb_flush_page() argument to CPUState
target-microblaze: Replace DisasContext::env field with MicroBlazeCPU
target-cris: Replace DisasContext::env field with CRISCPU
exec: Change cpu_abort() argument to CPUState
exec: Change memory_region_section_get_iotlb() argument to CPUState
cputlb: Change tlb_unprotect_code_phys() argument to CPUState
cpu-exec: Change cpu_resume_from_signal() argument to CPUState
exec: Change cpu_breakpoint_{insert,remove{,_by_ref,_all}} argument
exec: Change cpu_watchpoint_{insert,remove{,_by_ref,_all}} argument
target-ppc: Use PowerPCCPU in PowerPCCPUClass::handle_mmu_fault hook
translate-all: Change tb_flush_jmp_cache() argument to CPUState
translate-all: Change tb_gen_code() argument to CPUState
translate-all: Change cpu_io_recompile() argument to CPUState
translate-all: Change tb_check_watchpoint() argument to CPUState
translate-all: Change cpu_restore_state_from_tb() argument to CPUState
translate-all: Change cpu_restore_state() argument to CPUState
cpu-exec: Change cpu_loop_exit() argument to CPUState
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r-- | target-i386/cpu.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 0014acca7b..4d1374c6cc 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -875,8 +875,8 @@ typedef struct CPUX86State { target_ulong exception_next_eip; target_ulong dr[8]; /* debug registers */ union { - CPUBreakpoint *cpu_breakpoint[4]; - CPUWatchpoint *cpu_watchpoint[4]; + struct CPUBreakpoint *cpu_breakpoint[4]; + struct CPUWatchpoint *cpu_watchpoint[4]; }; /* break/watchpoints for dr[0..3] */ uint32_t smbase; int old_exception; /* exception in flight */ @@ -887,6 +887,7 @@ typedef struct CPUX86State { CPU_COMMON + /* Fields from here on are preserved across CPU reset. */ uint64_t pat; /* processor features (e.g. for CPUID insn) */ @@ -1067,9 +1068,8 @@ void host_cpuid(uint32_t function, uint32_t count, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx); /* helper.c */ -int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, +int x86_cpu_handle_mmu_fault(CPUState *cpu, vaddr addr, int is_write, int mmu_idx); -#define cpu_handle_mmu_fault cpu_x86_handle_mmu_fault void x86_cpu_set_a20(X86CPU *cpu, int a20_state); static inline bool hw_local_breakpoint_enabled(unsigned long dr7, int index) @@ -1186,20 +1186,6 @@ void optimize_flags_init(void); #include "hw/i386/apic.h" #endif -static inline bool cpu_has_work(CPUState *cs) -{ - X86CPU *cpu = X86_CPU(cs); - CPUX86State *env = &cpu->env; - - return ((cs->interrupt_request & (CPU_INTERRUPT_HARD | - CPU_INTERRUPT_POLL)) && - (env->eflags & IF_MASK)) || - (cs->interrupt_request & (CPU_INTERRUPT_NMI | - CPU_INTERRUPT_INIT | - CPU_INTERRUPT_SIPI | - CPU_INTERRUPT_MCE)); -} - #include "exec/exec-all.h" static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc, @@ -1276,11 +1262,11 @@ void do_smm_enter(X86CPU *cpu); void cpu_report_tpr_access(CPUX86State *env, TPRAccess access); -void disable_kvm_pv_eoi(void); - void x86_cpu_compat_set_features(const char *cpu_model, FeatureWord w, uint32_t feat_add, uint32_t feat_remove); +void x86_cpu_compat_disable_kvm_features(FeatureWord w, uint32_t features); + /* Return name of 32-bit register, from a R_* constant */ const char *get_register_name_32(unsigned int reg); |