• Home
  • Raw
  • Download

Lines Matching refs:cpu

161 int kvm_init_vcpu(CPUState *cpu)  in kvm_init_vcpu()  argument
169 ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, cpu->cpu_index); in kvm_init_vcpu()
175 cpu->kvm_fd = ret; in kvm_init_vcpu()
176 cpu->kvm_state = s; in kvm_init_vcpu()
184 cpu->kvm_run = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, MAP_SHARED, in kvm_init_vcpu()
185 cpu->kvm_fd, 0); in kvm_init_vcpu()
186 if (cpu->kvm_run == MAP_FAILED) { in kvm_init_vcpu()
192 ret = kvm_arch_init_vcpu(cpu); in kvm_init_vcpu()
198 int kvm_put_mp_state(CPUState *cpu) in kvm_put_mp_state() argument
200 CPUArchState *env = cpu->env_ptr; in kvm_put_mp_state()
203 return kvm_vcpu_ioctl(cpu, KVM_SET_MP_STATE, &mp_state); in kvm_put_mp_state()
206 int kvm_get_mp_state(CPUState *cpu) in kvm_get_mp_state() argument
211 ret = kvm_vcpu_ioctl(cpu, KVM_GET_MP_STATE, &mp_state); in kvm_get_mp_state()
215 CPUArchState *env = cpu->env_ptr; in kvm_get_mp_state()
222 CPUState *cpu; in kvm_sync_vcpus() local
224 CPU_FOREACH(cpu) { in kvm_sync_vcpus()
225 int ret = kvm_arch_put_registers(cpu); in kvm_sync_vcpus()
543 static int kvm_handle_io(CPUState *cpu, uint16_t port, void *data, in kvm_handle_io() argument
582 static void kvm_run_coalesced_mmio(CPUState *cpu, struct kvm_run *run) in kvm_run_coalesced_mmio() argument
603 int kvm_cpu_exec(CPUState *cpu) in kvm_cpu_exec() argument
605 CPUArchState *env = cpu->env_ptr; in kvm_cpu_exec()
606 struct kvm_run *run = cpu->kvm_run; in kvm_cpu_exec()
612 if (cpu->exit_request) { in kvm_cpu_exec()
618 kvm_arch_pre_run(cpu, run); in kvm_cpu_exec()
619 ret = kvm_arch_vcpu_run(cpu); in kvm_cpu_exec()
620 kvm_arch_post_run(cpu, run); in kvm_cpu_exec()
633 kvm_run_coalesced_mmio(cpu, run); in kvm_cpu_exec()
639 ret = kvm_handle_io(cpu, run->io.port, in kvm_cpu_exec()
674 gdb_set_stop_cpu(cpu); in kvm_cpu_exec()
685 ret = kvm_arch_handle_exit(cpu, run); in kvm_cpu_exec()
690 if (cpu->exit_request) { in kvm_cpu_exec()
691 cpu->exit_request = 0; in kvm_cpu_exec()
869 int kvm_vcpu_ioctl(CPUState *cpu, int type, ...) in kvm_vcpu_ioctl() argument
879 ret = ioctl(cpu->kvm_fd, type, arg); in kvm_vcpu_ioctl()
916 struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *cpu, in kvm_find_sw_breakpoint() argument
921 QTAILQ_FOREACH(bp, &cpu->kvm_state->kvm_sw_breakpoints, entry) { in kvm_find_sw_breakpoint()
928 int kvm_sw_breakpoints_active(CPUState *cpu) in kvm_sw_breakpoints_active() argument
930 return !QTAILQ_EMPTY(&cpu->kvm_state->kvm_sw_breakpoints); in kvm_sw_breakpoints_active()
933 int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) in kvm_update_guest_debug() argument
938 if (cpu->singlestep_enabled) in kvm_update_guest_debug()
941 kvm_arch_update_guest_debug(cpu, &dbg); in kvm_update_guest_debug()
944 return kvm_vcpu_ioctl(cpu, KVM_SET_GUEST_DEBUG, &dbg); in kvm_update_guest_debug()
947 int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr, in kvm_insert_breakpoint() argument
954 bp = kvm_find_sw_breakpoint(cpu, addr); in kvm_insert_breakpoint()
966 err = kvm_arch_insert_sw_breakpoint(cpu, bp); in kvm_insert_breakpoint()
972 QTAILQ_INSERT_HEAD(&cpu->kvm_state->kvm_sw_breakpoints, in kvm_insert_breakpoint()
980 CPU_FOREACH(cpu) { in kvm_insert_breakpoint()
981 err = kvm_update_guest_debug(cpu, 0); in kvm_insert_breakpoint()
988 int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr, in kvm_remove_breakpoint() argument
995 bp = kvm_find_sw_breakpoint(cpu, addr); in kvm_remove_breakpoint()
1004 err = kvm_arch_remove_sw_breakpoint(cpu, bp); in kvm_remove_breakpoint()
1008 QTAILQ_REMOVE(&cpu->kvm_state->kvm_sw_breakpoints, bp, entry); in kvm_remove_breakpoint()
1016 CPU_FOREACH(cpu) { in kvm_remove_breakpoint()
1017 err = kvm_update_guest_debug(cpu, 0); in kvm_remove_breakpoint()
1024 void kvm_remove_all_breakpoints(CPUState *cpu) in kvm_remove_all_breakpoints() argument
1027 KVMState *s = cpu->kvm_state; in kvm_remove_all_breakpoints()
1030 if (kvm_arch_remove_sw_breakpoint(cpu, bp) != 0) { in kvm_remove_all_breakpoints()
1032 CPU_FOREACH(cpu) { in kvm_remove_all_breakpoints()
1033 if (kvm_arch_remove_sw_breakpoint(cpu, bp) == 0) in kvm_remove_all_breakpoints()
1040 CPU_FOREACH(cpu) { in kvm_remove_all_breakpoints()
1041 kvm_update_guest_debug(cpu, 0); in kvm_remove_all_breakpoints()
1047 int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) in kvm_update_guest_debug() argument
1052 int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr, in kvm_insert_breakpoint() argument
1058 int kvm_remove_breakpoint(CPUState *cpu, target_ulong addr, in kvm_remove_breakpoint() argument
1064 void kvm_remove_all_breakpoints(CPUState *cpu) in kvm_remove_all_breakpoints() argument