diff options
author | Andreas Färber <afaerber@suse.de> | 2012-10-31 06:06:49 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-12-19 14:09:31 +0100 |
commit | 1bc22652d62f862a5def54f939e87fdb7a5593ae (patch) | |
tree | 007c4c834f580f81989b94c5c5489a57ff2b2263 /kvm-all.c | |
parent | 20d695a9254c1b086a456d3b79a3c311236643ba (diff) | |
download | qemu-1bc22652d62f862a5def54f939e87fdb7a5593ae.zip qemu-1bc22652d62f862a5def54f939e87fdb7a5593ae.tar.gz qemu-1bc22652d62f862a5def54f939e87fdb7a5593ae.tar.bz2 |
kvm: Pass CPUState to kvm_vcpu_ioctl()
Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1557,7 +1557,7 @@ int kvm_cpu_exec(CPUArchState *env) } qemu_mutex_unlock_iothread(); - run_ret = kvm_vcpu_ioctl(env, KVM_RUN, 0); + run_ret = kvm_vcpu_ioctl(cpu, KVM_RUN, 0); qemu_mutex_lock_iothread(); kvm_arch_post_run(cpu, run); @@ -1658,9 +1658,8 @@ int kvm_vm_ioctl(KVMState *s, int type, ...) return ret; } -int kvm_vcpu_ioctl(CPUArchState *env, int type, ...) +int kvm_vcpu_ioctl(CPUState *cpu, int type, ...) { - CPUState *cpu = ENV_GET_CPU(env); int ret; void *arg; va_list ap; @@ -1791,9 +1790,9 @@ struct kvm_set_guest_debug_data { static void kvm_invoke_set_guest_debug(void *data) { struct kvm_set_guest_debug_data *dbg_data = data; - CPUArchState *env = dbg_data->env; + CPUState *cpu = ENV_GET_CPU(dbg_data->env); - dbg_data->err = kvm_vcpu_ioctl(env, KVM_SET_GUEST_DEBUG, &dbg_data->dbg); + dbg_data->err = kvm_vcpu_ioctl(cpu, KVM_SET_GUEST_DEBUG, &dbg_data->dbg); } int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap) @@ -1955,18 +1954,19 @@ void kvm_remove_all_breakpoints(CPUArchState *current_env) int kvm_set_signal_mask(CPUArchState *env, const sigset_t *sigset) { + CPUState *cpu = ENV_GET_CPU(env); struct kvm_signal_mask *sigmask; int r; if (!sigset) { - return kvm_vcpu_ioctl(env, KVM_SET_SIGNAL_MASK, NULL); + return kvm_vcpu_ioctl(cpu, KVM_SET_SIGNAL_MASK, NULL); } sigmask = g_malloc(sizeof(*sigmask) + sizeof(*sigset)); sigmask->len = 8; memcpy(sigmask->sigset, sigset, sizeof(*sigset)); - r = kvm_vcpu_ioctl(env, KVM_SET_SIGNAL_MASK, sigmask); + r = kvm_vcpu_ioctl(cpu, KVM_SET_SIGNAL_MASK, sigmask); g_free(sigmask); return r; |