QOM CPUState, part 8: CPU_COMMON continued
cover QOM CPUState, part 8: CPU_COMMON continued
Hello,
This series moves more fields from CPU_COMMON / CPU*State to CPUState, allowing access from target-independent code.
The final patch in this series will help solve some issues (in particular avoid a dependency on CPU_COMMON TLB refactoring for now) but opens a can of worms: Since it is initialized in derived instance_init functions, functions cannot randomly be changed to operate on CPUState and be called from CPUState's instance_init or they will crash due to NULL env_ptr.
For those of you that may have been following the CPU refactorings closely, I have now split off part of former qom-cpu-8 branch into qom-cpu-9. This series thereby applies directly to qom-cpu-next,
whereas qom-cpu-9 depends on the pending s390x pull, my m68k cleanups and may be changed for VMState changes cooking elsewhere to keep i386 v5 compat.
Available for testing at:git://github.com/afaerber/qemu-cpu.git qom-cpu-8.v1
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-8.v1
Regards,
Andreas
Changes from previews:
* Drop #ifdefs for user-only CPUState fields.
* Defer interrupt-related changes to part 9.
Andreas Färber (6):
cpu: Move host_tid field to CPUState
cpu: Move running field to CPUState
cpu: Move exit_request field to CPUState
cpu: Move current_tb field to CPUState
cputlb: Pass CPUState to cpu_unlink_tb()
cpu: Add CPUArchState pointer to CPUState
cpu-exec.c | 21 ++++++++++++--------- cputlb.c | 6 ++++-- dump.c | 8 ++++++-- exec.c | 6 ++++-- gdbstub.c | 14 +++++++++----- hw/apic_common.c | 2 +- hw/apic_internal.h | 2 +- hw/kvmvapic.c | 13 ++++++++----- hw/spapr_hcall.c | 5 +++-- include/exec/cpu-defs.h | 5 ----- include/exec/exec-all.h | 4 +++- include/exec/gdbstub.h | 5 ++--- include/qom/cpu.h | 11 +++++++++++ kvm-all.c | 6 +++--- linux-user/main.c | 37 ++++++++++++++++++++++--------------- linux-user/syscall.c | 4 +++- qom/cpu.c | 2 ++ target-alpha/cpu.c | 2 ++ target-arm/cpu.c | 2 ++ target-cris/cpu.c | 2 ++ target-i386/cpu.c | 1 + target-i386/kvm.c | 4 ++-- target-lm32/cpu.c | 2 ++ target-m68k/cpu.c | 2 ++ target-microblaze/cpu.c | 2 ++ target-mips/cpu.c | 2 ++ target-openrisc/cpu.c | 2 ++ target-ppc/translate_init.c | 2 ++ target-s390x/cpu.c | 2 ++ target-sh4/cpu.c | 2 ++ target-sparc/cpu.c | 2 ++ target-unicore32/cpu.c | 2 ++ target-xtensa/cpu.c | 2 ++ translate-all.c | 36 +++++++++++++++++++++++------------- translate-all.h | 2 +-
35 Dateien geändert, 149 Zeilen hinzugefügt(+), 73 Zeilen entfernt(-)
Signature · 1 line
1.7.10.4
PATCH 1/6 cpu: Move host_tid field to CPUState
Change gdbstub's cpu_index() argument to CPUState now that CPUArchState is no longer used.
--- dump.c | 8 ++++++-- gdbstub.c | 14 +++++++++----- include/exec/cpu-defs.h | 1 - include/exec/gdbstub.h | 5 ++--- include/qom/cpu.h | 2 ++ linux-user/syscall.c | 4 +++-
6 Dateien geändert, 22 Zeilen hinzugefügt(+), 12 Zeilen entfernt(-)
dump.c +6 -2
@@ -271,11 +271,13 @@ static int write_elf64_note(DumpState *s)static int write_elf64_notes (DumpState *s) {CPUArchState *env; +CPUState *cpu;int ret;int id;for (env = first_cpu; env !=NULL ; env = env->next_cpu) { - id =cpu_index (env); + cpu =ENV_GET_CPU (env); + id =cpu_index (cpu); ret =cpu_write_elf64_note (fd_write_vmcore, env, id, s);if (ret <0 ) {dump_error (s,"dump: failed to write elf notes.\n" );
@@ -321,11 +323,13 @@ static int write_elf32_note(DumpState *s)static int write_elf32_notes (DumpState *s) {CPUArchState *env; +CPUState *cpu;int ret;int id;for (env = first_cpu; env !=NULL ; env = env->next_cpu) { - id =cpu_index (env); + cpu =ENV_GET_CPU (env); + id =cpu_index (cpu); ret =cpu_write_elf32_note (fd_write_vmcore, env, id, s);if (ret <0 ) {dump_error (s,"dump: failed to write elf notes.\n" );
gdbstub.c +9 -5
@@ -2066,9 +2066,11 @@ static void gdb_set_cpu_pc(GDBState *s, target_ulong pc)static CPUArchState *find_cpu (uint32_t thread_id) {CPUArchState *env; +CPUState *cpu;for (env = first_cpu; env !=NULL ; env = env->next_cpu) { -if (cpu_index (env) == thread_id) { + cpu =ENV_GET_CPU (env); +if (cpu_index (cpu) == thread_id) {return env; } }
@@ -2096,7 +2098,7 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf)case '?' :/* TODO: Make this return the correct value for user-mode. */ snprintf (buf,sizeof (buf),"T%02xthread:%02x;" ,GDB_SIGNAL_TRAP , -cpu_index (s->c_cpu)); +cpu_index (ENV_GET_CPU (s->c_cpu)));put_packet (s, buf);/* Remove all the breakpoints when this query is issued, * because gdb is doing and initial connect and the state
@@ -2391,7 +2393,8 @@ static int gdb_handle_packet(GDBState *s, const char *line_buf) }else if (strcmp (p,"sThreadInfo" ) ==0 ) { report_cpuinfo:if (s->query_cpu) { -snprintf (buf,sizeof (buf),"m%x" ,cpu_index (s->query_cpu)); +snprintf (buf,sizeof (buf),"m%x" , +cpu_index (ENV_GET_CPU (s->query_cpu)));put_packet (s, buf); s->query_cpu = s->query_cpu->next_cpu; }else
@@ -2512,6 +2515,7 @@ static void gdb_vm_state_change(void *opaque, int running, RunState state) {GDBState *s = gdbserver_state;CPUArchState *env = s->c_cpu; +CPUState *cpu =ENV_GET_CPU (env);char buf[256 ];const char *type;int ret;
@@ -2540,7 +2544,7 @@ static void gdb_vm_state_change(void *opaque, int running, RunState state) }snprintf (buf,sizeof (buf),"T%02xthread:%02x;%swatch:" TARGET_FMT_lx";" , -GDB_SIGNAL_TRAP ,cpu_index (env), type, +GDB_SIGNAL_TRAP ,cpu_index (cpu), type, env->watchpoint_hit->vaddr); env->watchpoint_hit =NULL ; goto send_packet;
@@ -2573,7 +2577,7 @@ static void gdb_vm_state_change(void *opaque, int running, RunState state) ret =GDB_SIGNAL_UNKNOWN ;break ; } -snprintf (buf,sizeof (buf),"T%02xthread:%02x;" , ret,cpu_index (env)); +snprintf (buf,sizeof (buf),"T%02xthread:%02x;" , ret,cpu_index (cpu)); send_packet:put_packet (s, buf);
include/exec/cpu-defs.h +0 -1
@@ -191,7 +191,6 @@ typedef struct CPUWatchpoint {int exception_index; \ \CPUArchState *next_cpu;/* next CPU sharing TB cache */ \ -uint32_t host_tid;/* host thread ID */ \int running;/* Nonzero if cpu is currently running(usermode). */ \/* user data */ \void *opaque; \
include/exec/gdbstub.h +2 -3
@@ -30,12 +30,11 @@ void gdb_register_coprocessor(CPUArchState *env, gdb_reg_cb get_reg, gdb_reg_cb set_reg, int num_regs, const char *xml, int g_pos); -static inline int cpu_index (CPUArchState *env) +static inline int cpu_index (CPUState *cpu) {#if defined(CONFIG_USER_ONLY ) && defined(CONFIG_USE_NPTL ) -return env->host_tid; +return cpu->host_tid;#else -CPUState *cpu =ENV_GET_CPU (env);return cpu->cpu_index +1 ;#endif }
include/qom/cpu.h +2 -0
@@ -65,6 +65,7 @@ struct kvm_run;* @nr_cores: Number of cores within this CPU package. * @nr_threads: Number of threads within this CPU. * @numa_node: NUMA node this CPU is belonging to. +* @host_tid: Host thread ID. * @created: Indicates whether the CPU thread has been successfully created. * @stop: Indicates a pending stop request. * @stopped: Indicates the CPU has been artificially stopped.
@@ -86,6 +87,7 @@ struct CPUState {HANDLE hThread;#endif int thread_id; +uint32_t host_tid;struct QemuCond *halt_cond;struct qemu_work_item *queued_work_first, *queued_work_last;bool thread_kicked;
linux-user/syscall.c +3 -1
@@ -4295,13 +4295,15 @@ static void *clone_func(void *arg) {new_thread_info *info = arg;CPUArchState *env; +CPUState *cpu;TaskState *ts; env = info->env; + cpu =ENV_GET_CPU (env); thread_env = env; ts = (TaskState *)thread_env->opaque; info->tid =gettid (); - env->host_tid = info->tid; + cpu->host_tid = info->tid;task_settid (ts);if (info->child_tidptr)put_user_u32 (info->tid, info->child_tidptr);
Signature · 1 line
1.7.10.4
PATCH 2/6 cpu: Move running field to CPUState
In reply to Andreas FärberPass CPUState to cpu_exec_{start,end}() functions.
--- include/exec/cpu-defs.h | 1 - include/qom/cpu.h | 2 ++ linux-user/main.c | 37 ++++++++++++++++++++++---------------
3 Dateien geändert, 24 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-)
include/exec/cpu-defs.h +0 -1
@@ -191,7 +191,6 @@ typedef struct CPUWatchpoint {int exception_index; \ \CPUArchState *next_cpu;/* next CPU sharing TB cache */ \ -int running;/* Nonzero if cpu is currently running(usermode). */ \/* user data */ \void *opaque; \ \
include/qom/cpu.h +2 -0
@@ -66,6 +66,7 @@ struct kvm_run;* @nr_threads: Number of threads within this CPU. * @numa_node: NUMA node this CPU is belonging to. * @host_tid: Host thread ID. +* @running: #true if CPU is currently running (usermode). * @created: Indicates whether the CPU thread has been successfully created. * @stop: Indicates a pending stop request. * @stopped: Indicates the CPU has been artificially stopped.
@@ -88,6 +89,7 @@ struct CPUState {#endif int thread_id;uint32_t host_tid; +bool running;struct QemuCond *halt_cond;struct qemu_work_item *queued_work_first, *queued_work_last;bool thread_kicked;
linux-user/main.c +22 -15
@@ -151,13 +151,16 @@ static inline void exclusive_idle(void)static inline void start_exclusive (void ) {CPUArchState *other; +CPUState *other_cpu; +pthread_mutex_lock (&exclusive_lock);exclusive_idle (); pending_cpus =1 ;/* Make all other cpus stop executing. */ for (other = first_cpu; other; other = other->next_cpu) { -if (other->running) { + other_cpu =ENV_GET_CPU (other); +if (other_cpu->running) { pending_cpus++;cpu_exit (other); }
@@ -176,19 +179,19 @@ static inline void end_exclusive(void) }/* Wait for exclusive ops to finish, and begin cpu execution. */ -static inline void cpu_exec_start (CPUArchState *env) +static inline void cpu_exec_start (CPUState *cpu) {pthread_mutex_lock (&exclusive_lock);exclusive_idle (); - env->running =1 ; + cpu->running = true;pthread_mutex_unlock (&exclusive_lock); }/* Mark cpu as not executing, and release pending exclusive ops. */ -static inline void cpu_exec_end (CPUArchState *env) +static inline void cpu_exec_end (CPUState *cpu) {pthread_mutex_lock (&exclusive_lock); - env->running =0 ; + cpu->running = false;if (pending_cpus >1 ) { pending_cpus--;if (pending_cpus ==1 ) {
@@ -210,11 +213,11 @@ void cpu_list_unlock(void) }#else /* if !CONFIG_USE_NPTL */ /* These are no-ops because we are not threadsafe. */ -static inline void cpu_exec_start (CPUArchState *env) +static inline void cpu_exec_start (CPUState *cpu) { } -static inline void cpu_exec_end (CPUArchState *env) +static inline void cpu_exec_end (CPUState *cpu) { }
@@ -697,15 +700,16 @@ done:void cpu_loop (CPUARMState *env) { +CPUState *cs =CPU (arm_env_get_cpu (env));int trapnr;unsigned int n, insn;target_siginfo_t info;uint32_t addr;for (;;) { -cpu_exec_start (env); +cpu_exec_start (cs); trapnr =cpu_arm_exec (env); -cpu_exec_end (env); +cpu_exec_end (cs);switch (trapnr) {case EXCP_UDEF : {
@@ -912,14 +916,15 @@ void cpu_loop(CPUARMState *env)void cpu_loop (CPUUniCore32State *env) { +CPUState *cs =CPU (uc32_env_get_cpu (env));int trapnr;unsigned int n, insn;target_siginfo_t info;for (;;) { -cpu_exec_start (env); +cpu_exec_start (cs); trapnr =uc32_cpu_exec (env); -cpu_exec_end (env); +cpu_exec_end (cs);switch (trapnr) {case UC32_EXCP_PRIV : {
@@ -1367,14 +1372,15 @@ static int do_store_exclusive(CPUPPCState *env)void cpu_loop (CPUPPCState *env) { +CPUState *cs =CPU (ppc_env_get_cpu (env));target_siginfo_t info;int trapnr;target_ulong ret;for (;;) { -cpu_exec_start (env); +cpu_exec_start (cs); trapnr =cpu_ppc_exec (env); -cpu_exec_end (env); +cpu_exec_end (cs);switch (trapnr) {case POWERPC_EXCP_NONE :/* Just go on */
@@ -2184,14 +2190,15 @@ static int do_store_exclusive(CPUMIPSState *env)void cpu_loop (CPUMIPSState *env) { +CPUState *cs =CPU (mips_env_get_cpu (env));target_siginfo_t info;int trapnr, ret;unsigned int syscall_num;for (;;) { -cpu_exec_start (env); +cpu_exec_start (cs); trapnr =cpu_mips_exec (env); -cpu_exec_end (env); +cpu_exec_end (cs);switch (trapnr) {case EXCP_SYSCALL : syscall_num = env->active_tc.gpr[2 ] -4000 ;
Signature · 1 line
1.7.10.4
PATCH 3/6 cpu: Move exit_request field to CPUState
In reply to Andreas FärberSince it was located before breakpoints field, it needs to be reset.
--- cpu-exec.c | 8 ++++---- exec.c | 4 +++- hw/spapr_hcall.c | 5 +++-- include/exec/cpu-defs.h | 2 -- include/qom/cpu.h | 2 ++ kvm-all.c | 6 +++--- qom/cpu.c | 1 + target-i386/kvm.c | 4 ++--
8 Dateien geändert, 18 Zeilen hinzugefügt(+), 14 Zeilen entfernt(-)
cpu-exec.c +4 -4
@@ -198,7 +198,7 @@ int cpu_exec(CPUArchState *env) cpu_single_env = env;if (unlikely (exit_request)) { - env->exit_request =1 ; + cpu->exit_request =1 ; }#if defined(TARGET_I386 )
@@ -539,8 +539,8 @@ int cpu_exec(CPUArchState *env) next_tb =0 ; } } -if (unlikely (env->exit_request)) { - env->exit_request =0 ; +if (unlikely (cpu->exit_request)) { + cpu->exit_request =0 ; env->exception_index =EXCP_INTERRUPT ;cpu_loop_exit (env); }
@@ -593,7 +593,7 @@ int cpu_exec(CPUArchState *env)starting execution if there is a pending interrupt. */ env->current_tb = tb;barrier (); -if (likely (!env->exit_request)) { +if (likely (!cpu->exit_request)) { tc_ptr = tb->tc_ptr;/* execute the generated code */ next_tb =tcg_qemu_tb_exec (env, tc_ptr);
exec.c +3 -1
@@ -492,7 +492,9 @@ void cpu_reset_interrupt(CPUArchState *env, int mask)void cpu_exit (CPUArchState *env) { - env->exit_request =1 ; +CPUState *cpu =ENV_GET_CPU (env); + + cpu->exit_request =1 ;cpu_unlink_tb (env); }
hw/spapr_hcall.c +3 -2
@@ -513,13 +513,14 @@ static target_ulong h_cede(PowerPCCPU *cpu, sPAPREnvironment *spapr, target_ulong opcode, target_ulong *args) { CPUPPCState *env = &cpu->env; +CPUState *cs =CPU (cpu); env->msr |= (1ULL <<MSR_EE );hreg_compute_hflags (env); -if (!cpu_has_work (CPU (cpu))) { +if (!cpu_has_work (cs)) { env->halted =1 ; env->exception_index =EXCP_HLT ; - env->exit_request =1 ; + cs->exit_request =1 ; }return H_SUCCESS ; }
include/exec/cpu-defs.h +0 -2
@@ -26,7 +26,6 @@#include "config.h" #include <setjmp.h> #include <inttypes.h> -#include <signal.h> #include "qemu/osdep.h" #include "qemu/queue.h" #include "exec/hwaddr.h"
@@ -160,7 +159,6 @@ typedef struct CPUWatchpoint {memory was accessed */ \uint32_t halted;/* Nonzero if the CPU is in suspend state */ \uint32_t interrupt_request; \ -volatile sig_atomic_t exit_request; \CPU_COMMON_TLB \ struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \/* buffer for temporaries in the code generator */ \
include/qom/cpu.h +2 -0
@@ -20,6 +20,7 @@#ifndef QEMU_CPU_H #define QEMU_CPU_H +#include <signal.h> #include "hw/qdev-core.h" #include "qemu/thread.h"
@@ -96,6 +97,7 @@ struct CPUState {bool created;bool stop;bool stopped; +volatile sig_atomic_t exit_request;int kvm_fd;bool kvm_vcpu_dirty;
kvm-all.c +3 -3
@@ -1537,7 +1537,7 @@ int kvm_cpu_exec(CPUArchState *env)DPRINTF ("kvm_cpu_exec()\n" );if (kvm_arch_process_async_events (cpu)) { - env->exit_request =0 ; + cpu->exit_request =0 ;return EXCP_HLT ; }
@@ -1548,7 +1548,7 @@ int kvm_cpu_exec(CPUArchState *env) }kvm_arch_pre_run (cpu, run); -if (env->exit_request) { +if (cpu->exit_request) {DPRINTF ("interrupt exit requested\n" );/* * KVM requires us to reenter the kernel after IO exits to complete
@@ -1622,7 +1622,7 @@ int kvm_cpu_exec(CPUArchState *env)vm_stop (RUN_STATE_INTERNAL_ERROR ); } - env->exit_request =0 ; + cpu->exit_request =0 ;return ret; }
qom/cpu.c +1 -0
@@ -32,6 +32,7 @@ void cpu_reset(CPUState *cpu)static void cpu_common_reset (CPUState *cpu) { + cpu->exit_request =0 ; }ObjectClass *cpu_class_by_name (const char *typename,const char *cpu_model)
target-i386/kvm.c +2 -2
@@ -1777,7 +1777,7 @@ void kvm_arch_pre_run(CPUState *cpu, struct kvm_run *run)* or pending TPR access reports. */ if (env->interrupt_request & (CPU_INTERRUPT_INIT |CPU_INTERRUPT_TPR )) { - env->exit_request =1 ; + cpu->exit_request =1 ; }/* Try to inject an interrupt if the guest can accept it */
@@ -1847,7 +1847,7 @@ int kvm_arch_process_async_events(CPUState *cs)if (env->exception_injected ==EXCP08_DBLE ) {/* this means triple fault */ qemu_system_reset_request (); - env->exit_request =1 ; + cs->exit_request =1 ;return 0 ; } env->exception_injected =EXCP12_MCHK ;
Signature · 1 line
1.7.10.4
PATCH 4/6 cpu: Move current_tb field to CPUState
In reply to Andreas FärberExplictly NULL it on CPU reset since it was located before breakpoints.
Change vapic_report_tpr_access() argument to CPUState. This also resolves the use of void* for cpu.h independence. Change vAPIC patch_instruction() argument to X86CPU.
--- cpu-exec.c | 13 ++++++++----- cputlb.c | 6 ++++-- hw/apic_common.c | 2 +- hw/apic_internal.h | 2 +- hw/kvmvapic.c | 13 ++++++++----- include/exec/cpu-defs.h | 1 - include/exec/exec-all.h | 4 +++- include/qom/cpu.h | 3 +++ qom/cpu.c | 1 + translate-all.c | 29 +++++++++++++++++++----------
10 Dateien geändert, 48 Zeilen hinzugefügt(+), 26 Zeilen entfernt(-)
cpu-exec.c +8 -5
@@ -34,7 +34,9 @@ bool qemu_cpu_has_work(CPUState *cpu)void cpu_loop_exit (CPUArchState *env) { - env->current_tb =NULL ; +CPUState *cpu =ENV_GET_CPU (env); + + cpu->current_tb =NULL ;longjmp (env->jmp_env,1 ); }
@@ -56,6 +58,7 @@ void cpu_resume_from_signal(CPUArchState *env, void *puc)static void cpu_exec_nocache (CPUArchState *env,int max_cycles,TranslationBlock *orig_tb) { +CPUState *cpu =ENV_GET_CPU (env);tcg_target_ulong next_tb;TranslationBlock *tb;
@@ -66,10 +69,10 @@ static void cpu_exec_nocache(CPUArchState *env, int max_cycles, tb =tb_gen_code (env, orig_tb->pc, orig_tb->cs_base, orig_tb->flags, max_cycles); - env->current_tb = tb; + cpu->current_tb = tb;/* execute the generated code */ next_tb =tcg_qemu_tb_exec (env, tb->tc_ptr); - env->current_tb =NULL ; + cpu->current_tb =NULL ;if ((next_tb &3 ) ==2 ) {/* Restore PC. This may happen if async event occurs before
@@ -591,7 +594,7 @@ int cpu_exec(CPUArchState *env)TB, but before it is linked into a potentially infinite loop and becomes env->current_tb. Avoid starting execution if there is a pending interrupt. */ - env->current_tb = tb; + cpu->current_tb = tb;barrier ();if (likely (!cpu->exit_request)) { tc_ptr = tb->tc_ptr;
@@ -625,7 +628,7 @@ int cpu_exec(CPUArchState *env) } } } - env->current_tb =NULL ; + cpu->current_tb =NULL ;/* reset soft MMU for next block (it can currently only be set by a memory fault) */ }/* for(;;) */
cputlb.c +4 -2
@@ -54,6 +54,7 @@ static const CPUTLBEntry s_cputlb_empty_entry = {*/ void tlb_flush (CPUArchState *env,int flush_global) { +CPUState *cpu =ENV_GET_CPU (env);int i;#if defined(DEBUG_TLB )
@@ -61,7 +62,7 @@ void tlb_flush(CPUArchState *env, int flush_global)#endif /* must reset current TB so that interrupts cannot modify the links while we are modifying them */ - env->current_tb =NULL ; + cpu->current_tb =NULL ;for (i =0 ; i <CPU_TLB_SIZE ; i++) {int mmu_idx;
@@ -92,6 +93,7 @@ static inline void tlb_flush_entry(CPUTLBEntry *tlb_entry, target_ulong addr)void tlb_flush_page (CPUArchState *env,target_ulong addr) { +CPUState *cpu =ENV_GET_CPU (env);int i;int mmu_idx;
@@ -110,7 +112,7 @@ void tlb_flush_page(CPUArchState *env, target_ulong addr) }/* must reset current TB so that interrupts cannot modify the links while we are modifying them */ - env->current_tb =NULL ; + cpu->current_tb =NULL ; addr &=TARGET_PAGE_MASK ; i = (addr >>TARGET_PAGE_BITS ) & (CPU_TLB_SIZE -1 );
hw/apic_common.c +1 -1
@@ -103,7 +103,7 @@ void apic_handle_tpr_access_report(DeviceState *d, target_ulong ip, {APICCommonState *s =DO_UPCAST (APICCommonState, busdev.qdev, d); -vapic_report_tpr_access (s->vapic, &s->cpu->env, ip, access); +vapic_report_tpr_access (s->vapic,CPU (s->cpu), ip, access); }void apic_report_irq_delivered (int delivered)
hw/apic_internal.h +1 -1
@@ -143,7 +143,7 @@ bool apic_next_timer(APICCommonState *s, int64_t current_time);void apic_enable_tpr_access_reporting (DeviceState *d,bool enable);void apic_enable_vapic (DeviceState *d,hwaddr paddr); -void vapic_report_tpr_access (DeviceState *dev,void *cpu,target_ulong ip, +void vapic_report_tpr_access (DeviceState *dev,CPUState *cpu,target_ulong ip,TPRAccess access);#endif /* !QEMU_APIC_INTERNAL_H */
hw/kvmvapic.c +8 -5
@@ -382,8 +382,10 @@ static void patch_call(VAPICROMState *s, CPUX86State *env, target_ulong ip,cpu_memory_rw_debug (env, ip +1 , (void *)&offset,sizeof (offset),1 ); } -static void patch_instruction (VAPICROMState *s,CPUX86State *env,target_ulong ip) +static void patch_instruction (VAPICROMState *s,X86CPU *cpu,target_ulong ip) { +CPUState *cs =CPU (cpu); +CPUX86State *env = &cpu->env;VAPICHandlers *handlers;uint8_t opcode[2 ];uint32_t imm32;
@@ -439,17 +441,18 @@ static void patch_instruction(VAPICROMState *s, CPUX86State *env, target_ulong iresume_all_vcpus ();if (!kvm_enabled ()) { - env->current_tb =NULL ; + cs->current_tb =NULL ;tb_gen_code (env, current_pc, current_cs_base, current_flags,1 );cpu_resume_from_signal (env,NULL ); } } -void vapic_report_tpr_access (DeviceState *dev,void *cpu,target_ulong ip, +void vapic_report_tpr_access (DeviceState *dev,CPUState *cs,target_ulong ip,TPRAccess access) {VAPICROMState *s =DO_UPCAST (VAPICROMState, busdev.qdev, dev); -CPUX86State *env = cpu; +X86CPU *cpu =X86_CPU (cs); +CPUX86State *env = &cpu->env;cpu_synchronize_state (env);
@@ -465,7 +468,7 @@ void vapic_report_tpr_access(DeviceState *dev, void *cpu, target_ulong ip,if (vapic_enable (s, env) <0 ) {return ; } -patch_instruction (s, env, ip); +patch_instruction (s, cpu, ip); } typedef struct VAPICEnableTPRReporting {
include/exec/cpu-defs.h +0 -1
@@ -148,7 +148,6 @@ typedef struct CPUWatchpoint {#define CPU_TEMP_BUF_NLONGS 128#define CPU_COMMON \ - struct TranslationBlock *current_tb;/* currently executing TB */ \/* soft mmu support */ \/* in order to avoid passing too many arguments to the MMIO \ helpers, we store some rarely used information in the CPU \
include/exec/exec-all.h +3 -1
@@ -393,11 +393,13 @@ extern volatile sig_atomic_t exit_request;instruction of a TB so that interrupts take effect immediately. */ static inline int can_do_io (CPUArchState *env) { +CPUState *cpu =ENV_GET_CPU (env); +if (!use_icount) {return 1 ; }/* If not executing code then assume we are ok. */ -if (!env->current_tb) { +if (cpu->current_tb ==NULL ) {return 1 ; }return env->can_do_io !=0 ;
include/qom/cpu.h +3 -0
@@ -71,6 +71,7 @@ struct kvm_run;* @created: Indicates whether the CPU thread has been successfully created. * @stop: Indicates a pending stop request. * @stopped: Indicates the CPU has been artificially stopped. +* @current_tb: Currently executing TB. * @kvm_fd: vCPU file descriptor for KVM. * * State of one CPU core or thread.
@@ -99,6 +100,8 @@ struct CPUState {bool stopped;volatile sig_atomic_t exit_request; +struct TranslationBlock *current_tb; +int kvm_fd;bool kvm_vcpu_dirty;struct KVMState *kvm_state;
qom/cpu.c +1 -0
@@ -33,6 +33,7 @@ void cpu_reset(CPUState *cpu)static void cpu_common_reset (CPUState *cpu) { cpu->exit_request =0 ; + cpu->current_tb =NULL ; }ObjectClass *cpu_class_by_name (const char *typename,const char *cpu_model)
translate-all.c +19 -10
@@ -1008,6 +1008,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, {TranslationBlock *tb, *tb_next, *saved_tb;CPUArchState *env = cpu_single_env; +CPUState *cpu =NULL ;tb_page_addr_t tb_start, tb_end;PageDesc *p;int n;
@@ -1030,6 +1031,9 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,/* build code bitmap */ build_page_bitmap (p); } +if (env !=NULL ) { + cpu =ENV_GET_CPU (env); + }/* we remove all the TBs in the range [start, end[ */ /* XXX: see if in some cases it could be faster to invalidate all
@@ -1076,14 +1080,14 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,/* we need to do that to handle the case where a signal occurs while doing tb_phys_invalidate() */ saved_tb =NULL ; -if (env) { - saved_tb = env->current_tb; - env->current_tb =NULL ; +if (cpu !=NULL ) { + saved_tb = cpu->current_tb; + cpu->current_tb =NULL ; }tb_phys_invalidate (tb,-1 ); -if (env) { - env->current_tb = saved_tb; -if (env->interrupt_request && env->current_tb) { +if (cpu !=NULL ) { + cpu->current_tb = saved_tb; +if (env && env->interrupt_request && cpu->current_tb) {cpu_interrupt (env, env->interrupt_request); } }
@@ -1104,7 +1108,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,/* we generate a block containing just the instruction modifying the memory. It will ensure that it cannot modify itself */ - env->current_tb =NULL ; + cpu->current_tb =NULL ;tb_gen_code (env, current_pc, current_cs_base, current_flags,1 );cpu_resume_from_signal (env,NULL ); }
@@ -1152,6 +1156,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,#ifdef TARGET_HAS_PRECISE_SMC TranslationBlock *current_tb =NULL ;CPUArchState *env = cpu_single_env; +CPUState *cpu =NULL ;int current_tb_modified =0 ;target_ulong current_pc =0 ;target_ulong current_cs_base =0 ;
@@ -1168,6 +1173,9 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,if (tb && pc !=0 ) { current_tb =tb_find_pc (pc); } +if (env !=NULL ) { + cpu =ENV_GET_CPU (env); + }#endif while (tb !=NULL ) { n = (uintptr_t )tb &3 ;
@@ -1196,7 +1204,7 @@ static void tb_invalidate_phys_page(tb_page_addr_t addr,/* we generate a block containing just the instruction modifying the memory. It will ensure that it cannot modify itself */ - env->current_tb =NULL ; + cpu->current_tb =NULL ;tb_gen_code (env, current_pc, current_cs_base, current_flags,1 );cpu_resume_from_signal (env, puc); }
@@ -1423,15 +1431,16 @@ void cpu_unlink_tb(CPUArchState *env)problem and hope the cpu will stop of its own accord. For userspace emulation this often isn't actually as bad as it sounds. Often signals are used primarily to interrupt blocking syscalls. */ +CPUState *cpu =ENV_GET_CPU (env);TranslationBlock *tb;static spinlock_t interrupt_lock =SPIN_LOCK_UNLOCKED ;spin_lock (&interrupt_lock); - tb = env->current_tb; + tb = cpu->current_tb;/* if the cpu is currently executing code, we must unlink it and all the potentially executing TB */ if (tb) { - env->current_tb =NULL ; + cpu->current_tb =NULL ;tb_reset_jump_recursive (tb); }spin_unlock (&interrupt_lock);
Signature · 1 line
1.7.10.4
PATCH 5/6 cputlb: Pass CPUState to cpu_unlink_tb()
In reply to Andreas FärberCPUArchState is no longer needed.
--- exec.c | 2 +- translate-all.c | 9 +++++---- translate-all.h | 2 +-
3 Dateien geändert, 7 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-)
exec.c +1 -1
@@ -495,7 +495,7 @@ void cpu_exit(CPUArchState *env)CPUState *cpu =ENV_GET_CPU (env); cpu->exit_request =1 ; -cpu_unlink_tb (env); +cpu_unlink_tb (cpu); }void cpu_abort (CPUArchState *env,const char *fmt, ...)
translate-all.c +5 -4
@@ -1425,13 +1425,12 @@ void tb_invalidate_phys_addr(hwaddr addr) }#endif /* TARGET_HAS_ICE && !defined(CONFIG_USER_ONLY) */ -void cpu_unlink_tb (CPUArchState *env) +void cpu_unlink_tb (CPUState *cpu) {/* FIXME: TB unchaining isn't SMP safe. For now just ignore the problem and hope the cpu will stop of its own accord. For userspace emulation this often isn't actually as bad as it sounds. Often signals are used primarily to interrupt blocking syscalls. */ -CPUState *cpu =ENV_GET_CPU (env);TranslationBlock *tb;static spinlock_t interrupt_lock =SPIN_LOCK_UNLOCKED ;
@@ -1485,7 +1484,7 @@ static void tcg_handle_interrupt(CPUArchState *env, int mask)cpu_abort (env,"Raised interrupt while not in I/O function" ); } }else { -cpu_unlink_tb (env); +cpu_unlink_tb (cpu); } }
@@ -1625,8 +1624,10 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)void cpu_interrupt (CPUArchState *env,int mask) { +CPUState *cpu =ENV_GET_CPU (env); + env->interrupt_request |= mask; -cpu_unlink_tb (env); +cpu_unlink_tb (cpu); }/*
translate-all.h +1 -1
@@ -28,7 +28,7 @@/* translate-all.c */ void tb_invalidate_phys_page_fast (tb_page_addr_t start,int len); -void cpu_unlink_tb (CPUArchState *env); +void cpu_unlink_tb (CPUState *cpu);void tb_check_watchpoint (CPUArchState *env);#endif /* TRANSLATE_ALL_H */
Signature · 1 line
1.7.10.4
PATCH 6/6 cpu: Add CPUArchState pointer to CPUState
In reply to Andreas FärberThe target-specific ENV_GET_CPU() macros have allowed us to navigate from CPUArchState to CPUState. The reverse direction was not supported. Avoid introducing CPU_GET_ENV() macros by initializing an untyped pointer that is initialized in derived instance_init functions.
The field may not be called "env" due to it being poisoned.
--- include/qom/cpu.h | 2 ++ target-alpha/cpu.c | 2 ++ target-arm/cpu.c | 2 ++ target-cris/cpu.c | 2 ++ target-i386/cpu.c | 1 + target-lm32/cpu.c | 2 ++ target-m68k/cpu.c | 2 ++ target-microblaze/cpu.c | 2 ++ target-mips/cpu.c | 2 ++ target-openrisc/cpu.c | 2 ++ target-ppc/translate_init.c | 2 ++ target-s390x/cpu.c | 2 ++ target-sh4/cpu.c | 2 ++ target-sparc/cpu.c | 2 ++ target-unicore32/cpu.c | 2 ++ target-xtensa/cpu.c | 2 ++
16 Dateien geändert, 31 Zeilen hinzugefügt(+)
include/qom/cpu.h +2 -0
@@ -71,6 +71,7 @@ struct kvm_run;* @created: Indicates whether the CPU thread has been successfully created. * @stop: Indicates a pending stop request. * @stopped: Indicates the CPU has been artificially stopped. +* @env_ptr: Pointer to subclass-specific CPUArchState field. * @current_tb: Currently executing TB. * @kvm_fd: vCPU file descriptor for KVM. *
@@ -100,6 +101,7 @@ struct CPUState {bool stopped;volatile sig_atomic_t exit_request; +void *env_ptr;/* CPUArchState */ struct TranslationBlock *current_tb;int kvm_fd;
target-alpha/cpu.c +2 -0
@@ -233,9 +233,11 @@ static const TypeInfo ev68_cpu_type_info = {static void alpha_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);AlphaCPU *cpu =ALPHA_CPU (obj);CPUAlphaState *env = &cpu->env; + cs->env_ptr = env;cpu_exec_init (env);tlb_flush (env,1 );
target-arm/cpu.c +2 -0
@@ -134,9 +134,11 @@ static inline void set_feature(CPUARMState *env, int feature)static void arm_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);ARMCPU *cpu =ARM_CPU (obj);static bool inited; + cs->env_ptr = &cpu->env;cpu_exec_init (&cpu->env); cpu->cp_regs =g_hash_table_new_full (g_int_hash, g_int_equal, g_free, g_free);
target-cris/cpu.c +2 -0
@@ -68,10 +68,12 @@ static void cris_cpu_realizefn(DeviceState *dev, Error **errp)static void cris_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);CRISCPU *cpu =CRIS_CPU (obj);CPUCRISState *env = &cpu->env;static bool tcg_initialized; + cs->env_ptr = env;cpu_exec_init (env);if (tcg_enabled () && !tcg_initialized) {
target-i386/cpu.c +1 -0
@@ -2164,6 +2164,7 @@ static void x86_cpu_initfn(Object *obj)CPUX86State *env = &cpu->env;static int inited; + cs->env_ptr = env;cpu_exec_init (env); object_property_add(obj, "family", "int",
target-lm32/cpu.c +2 -0
@@ -56,10 +56,12 @@ static void lm32_cpu_realizefn(DeviceState *dev, Error **errp)static void lm32_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);LM32CPU *cpu =LM32_CPU (obj);CPULM32State *env = &cpu->env;static bool tcg_initialized; + cs->env_ptr = env;cpu_exec_init (env); env->flags =0 ;
target-m68k/cpu.c +2 -0
@@ -154,10 +154,12 @@ static void m68k_cpu_realizefn(DeviceState *dev, Error **errp)static void m68k_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);M68kCPU *cpu =M68K_CPU (obj);CPUM68KState *env = &cpu->env;static bool inited; + cs->env_ptr = env;cpu_exec_init (env);if (tcg_enabled () && !inited) {
target-microblaze/cpu.c +2 -0
@@ -98,10 +98,12 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **errp)static void mb_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);MicroBlazeCPU *cpu =MICROBLAZE_CPU (obj);CPUMBState *env = &cpu->env;static bool tcg_initialized; + cs->env_ptr = env;cpu_exec_init (env);set_float_rounding_mode (float_round_nearest_even, &env->fp_status);
target-mips/cpu.c +2 -0
@@ -55,9 +55,11 @@ static void mips_cpu_realizefn(DeviceState *dev, Error **errp)static void mips_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);MIPSCPU *cpu =MIPS_CPU (obj);CPUMIPSState *env = &cpu->env; + cs->env_ptr = env;cpu_exec_init (env);if (tcg_enabled ()) {
target-openrisc/cpu.c +2 -0
@@ -75,9 +75,11 @@ static void openrisc_cpu_realizefn(DeviceState *dev, Error **errp)static void openrisc_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);OpenRISCCPU *cpu =OPENRISC_CPU (obj);static int inited; + cs->env_ptr = &cpu->env;cpu_exec_init (&cpu->env);#ifndef CONFIG_USER_ONLY
target-ppc/translate_init.c +2 -0
@@ -10529,11 +10529,13 @@ static void ppc_cpu_reset(CPUState *s)static void ppc_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);PowerPCCPU *cpu =POWERPC_CPU (obj);PowerPCCPUClass *pcc =POWERPC_CPU_GET_CLASS (cpu);CPUPPCState *env = &cpu->env;ppc_def_t *def = pcc->info; + cs->env_ptr = env;cpu_exec_init (env); env->msr_mask = def->msr_mask;
target-s390x/cpu.c +2 -0
@@ -110,6 +110,7 @@ static void s390_cpu_realizefn(DeviceState *dev, Error **errp)static void s390_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);S390CPU *cpu =S390_CPU (obj);CPUS390XState *env = &cpu->env;static bool inited;
@@ -118,6 +119,7 @@ static void s390_cpu_initfn(Object *obj)struct tm tm;#endif + cs->env_ptr = env;cpu_exec_init (env);#if !defined(CONFIG_USER_ONLY )qemu_register_reset (s390_cpu_machine_reset_cb, cpu);
target-sh4/cpu.c +2 -0
@@ -67,9 +67,11 @@ static void superh_cpu_realizefn(DeviceState *dev, Error **errp)static void superh_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);SuperHCPU *cpu =SUPERH_CPU (obj);CPUSH4State *env = &cpu->env; + cs->env_ptr = env;cpu_exec_init (env); env->movcal_backup_tail = &(env->movcal_backup);
target-sparc/cpu.c +2 -0
@@ -860,9 +860,11 @@ static void sparc_cpu_realizefn(DeviceState *dev, Error **errp)static void sparc_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);SPARCCPU *cpu =SPARC_CPU (obj);CPUSPARCState *env = &cpu->env; + cs->env_ptr = env;cpu_exec_init (env);if (tcg_enabled ()) {
target-unicore32/cpu.c +2 -0
@@ -93,10 +93,12 @@ static void uc32_cpu_realizefn(DeviceState *dev, Error **errp)static void uc32_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);UniCore32CPU *cpu =UNICORE32_CPU (obj);CPUUniCore32State *env = &cpu->env;static bool inited; + cs->env_ptr = env;cpu_exec_init (env);#ifdef CONFIG_USER_ONLY
target-xtensa/cpu.c +2 -0
@@ -69,10 +69,12 @@ static void xtensa_cpu_realizefn(DeviceState *dev, Error **errp)static void xtensa_cpu_initfn (Object *obj) { +CPUState *cs =CPU (obj);XtensaCPU *cpu =XTENSA_CPU (obj);CPUXtensaState *env = &cpu->env;static bool tcg_inited; + cs->env_ptr = env;cpu_exec_init (env);if (tcg_enabled () && !tcg_inited) {
Signature · 1 line
1.7.10.4
Re: [Qemu-devel] [PATCH qom-cpu-next 6/6] cpu: Add CPUArchState pointer to CPUState
Quoted 8 lines · Andreas Färber
The target-specific
ENV_GET_CPU()macros have allowed us to navigate from CPUArchState to CPUState. The reverse direction was not supported. Avoid introducingCPU_GET_ENV()macros by initializing an untyped pointer that is initialized in derivedinstance_initfunctions.The field may not be called "env" due to it being poisoned.
Signed-off-by Andreas Färber<[email protected]>
r~
Am 01.02.2013 13:38, schrieb Andreas Färber:
Quoted 10 lines
Hello,
This series moves more fields from
CPU_COMMON/ CPU*State to CPUState, allowing access from target-independent code.The final patch in this series will help solve some issues (in particular avoid a dependency on
CPU_COMMONTLB refactoring for now) but opens a can of worms: Since it is initialized in derivedinstance_initfunctions, functions cannot randomly be changed to operate on CPUState and be called from CPUState'sinstance_initor they will crash due to NULLenv_ptr.
The "questionable" patch in this series has been acked by rth, so if nobody objects, I'll queue it on qom-cpu-next tonight, to base further work on. I'm not aware of any conflicting maintainer's queue so far.
Andreas
Quoted 62 lines
For those of you that may have been following the CPU refactorings closely, I have now split off part of former qom-cpu-8 branch into qom-cpu-9. This series thereby applies directly to qom-cpu-next,
whereas qom-cpu-9 depends on the pending s390x pull, my m68k cleanups and may be changed for VMState changes cooking elsewhere to keep i386 v5 compat.Available for testing at:
git://github.com/afaerber/qemu-cpu.gitqom-cpu-8.v1
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-8.v1Regards,
AndreasChanges from previews:
* Drop #ifdefs for user-only CPUState fields.
* Defer interrupt-related changes to part 9.Andreas Färber (6):
cpu: Movehost_tidfield to CPUState
cpu: Move running field to CPUState
cpu: Moveexit_requestfield to CPUState
cpu: Movecurrent_tbfield to CPUState
cputlb: Pass CPUState tocpu_unlink_tb()
cpu: Add CPUArchState pointer to CPUStatecpu-exec.c | 21 ++++++++++++--------- cputlb.c | 6 ++++-- dump.c | 8 ++++++-- exec.c | 6 ++++-- gdbstub.c | 14 +++++++++----- hw/apic_common.c | 2 +- hw/apic_internal.h | 2 +- hw/kvmvapic.c | 13 ++++++++----- hw/spapr_hcall.c | 5 +++-- include/exec/cpu-defs.h | 5 ----- include/exec/exec-all.h | 4 +++- include/exec/gdbstub.h | 5 ++--- include/qom/cpu.h | 11 +++++++++++ kvm-all.c | 6 +++--- linux-user/main.c | 37 ++++++++++++++++++++++--------------- linux-user/syscall.c | 4 +++- qom/cpu.c | 2 ++ target-alpha/cpu.c | 2 ++ target-arm/cpu.c | 2 ++ target-cris/cpu.c | 2 ++ target-i386/cpu.c | 1 + target-i386/kvm.c | 4 ++-- target-lm32/cpu.c | 2 ++ target-m68k/cpu.c | 2 ++ target-microblaze/cpu.c | 2 ++ target-mips/cpu.c | 2 ++ target-openrisc/cpu.c | 2 ++ target-ppc/translate_init.c | 2 ++ target-s390x/cpu.c | 2 ++ target-sh4/cpu.c | 2 ++ target-sparc/cpu.c | 2 ++ target-unicore32/cpu.c | 2 ++ target-xtensa/cpu.c | 2 ++ translate-all.c | 36 +++++++++++++++++++++++------------- translate-all.h | 2 +-35 Dateien geändert, 149 Zeilen hinzugefügt(+), 73 Zeilen entfernt(-)
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
Andreas Färber
AppliedAm 14.02.2013 18:49, schrieb Andreas Färber:
Quoted 6 lines
Am 01.02.2013 13:38, schrieb Andreas Färber:
Quoted 5 lines
Hello,
This series moves more fields from
CPU_COMMON/ CPU*State to CPUState, allowing access from target-independent code.
Quoted 8 lines
Quoted 5 lines
The final patch in this series will help solve some issues (in particular avoid a dependency on
CPU_COMMONTLB refactoring for now) but opens a can of worms: Since it is initialized in derivedinstance_initfunctions, functions cannot randomly be changed to operate on CPUState and be called from CPUState'sinstance_initor they will crash due to NULLenv_ptr.The "questionable" patch in this series has been acked by rth, so if nobody objects, I'll queue it on qom-cpu-next tonight, [...]
Applied:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-next
Andreas
Quoted 63 lines
Quoted 62 lines
For those of you that may have been following the CPU refactorings closely, I have now split off part of former qom-cpu-8 branch into qom-cpu-9. This series thereby applies directly to qom-cpu-next,
whereas qom-cpu-9 depends on the pending s390x pull, my m68k cleanups and may be changed for VMState changes cooking elsewhere to keep i386 v5 compat.Available for testing at:
git://github.com/afaerber/qemu-cpu.gitqom-cpu-8.v1
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-8.v1Regards,
AndreasChanges from previews:
* Drop #ifdefs for user-only CPUState fields.
* Defer interrupt-related changes to part 9.Andreas Färber (6):
cpu: Movehost_tidfield to CPUState
cpu: Move running field to CPUState
cpu: Moveexit_requestfield to CPUState
cpu: Movecurrent_tbfield to CPUState
cputlb: Pass CPUState tocpu_unlink_tb()
cpu: Add CPUArchState pointer to CPUStatecpu-exec.c | 21 ++++++++++++--------- cputlb.c | 6 ++++-- dump.c | 8 ++++++-- exec.c | 6 ++++-- gdbstub.c | 14 +++++++++----- hw/apic_common.c | 2 +- hw/apic_internal.h | 2 +- hw/kvmvapic.c | 13 ++++++++----- hw/spapr_hcall.c | 5 +++-- include/exec/cpu-defs.h | 5 ----- include/exec/exec-all.h | 4 +++- include/exec/gdbstub.h | 5 ++--- include/qom/cpu.h | 11 +++++++++++ kvm-all.c | 6 +++--- linux-user/main.c | 37 ++++++++++++++++++++++--------------- linux-user/syscall.c | 4 +++- qom/cpu.c | 2 ++ target-alpha/cpu.c | 2 ++ target-arm/cpu.c | 2 ++ target-cris/cpu.c | 2 ++ target-i386/cpu.c | 1 + target-i386/kvm.c | 4 ++-- target-lm32/cpu.c | 2 ++ target-m68k/cpu.c | 2 ++ target-microblaze/cpu.c | 2 ++ target-mips/cpu.c | 2 ++ target-openrisc/cpu.c | 2 ++ target-ppc/translate_init.c | 2 ++ target-s390x/cpu.c | 2 ++ target-sh4/cpu.c | 2 ++ target-sparc/cpu.c | 2 ++ target-unicore32/cpu.c | 2 ++ target-xtensa/cpu.c | 2 ++ translate-all.c | 36 +++++++++++++++++++++++------------- translate-all.h | 2 +-35 Dateien geändert, 149 Zeilen hinzugefügt(+), 73 Zeilen entfernt(-)
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