Fix 32-bit overflow in parallels image support
[qemu-kvm/fedora.git] / qemu-kvm-ia64.c
blobb8a2587c29c96e7c15ebce206667ac97b5e588e1
1 #include "config.h"
2 #include "config-host.h"
4 #include <string.h>
6 #include "hw/hw.h"
7 #include "qemu-kvm.h"
8 #include <pthread.h>
9 #include <sys/utsname.h>
10 #include <sys/io.h>
14 int kvm_arch_qemu_create_context(void)
16 return 0;
19 void kvm_arch_load_regs(CPUState *env)
24 void kvm_arch_save_regs(CPUState *env)
28 int kvm_arch_qemu_init_env(CPUState *cenv)
30 return 0;
33 int kvm_arch_halt(void *opaque, kvm_vcpu_context_t vcpu)
35 CPUState *env = cpu_single_env;
36 env->hflags |= HF_HALTED_MASK;
37 return 1;
40 void kvm_arch_pre_kvm_run(void *opaque, CPUState *env)
44 void kvm_arch_post_kvm_run(void *opaque, CPUState *env)
48 int kvm_arch_has_work(CPUState *env)
50 return 1;
53 int kvm_arch_try_push_interrupts(void *opaque)
55 return 1;
58 void kvm_arch_update_regs_for_sipi(CPUState *env)
62 int kvm_arch_insert_sw_breakpoint(CPUState *current_env,
63 struct kvm_sw_breakpoint *bp)
65 return -EINVAL;
68 int kvm_arch_remove_sw_breakpoint(CPUState *current_env,
69 struct kvm_sw_breakpoint *bp)
71 return -EINVAL;
74 int kvm_arch_insert_hw_breakpoint(target_ulong addr,
75 target_ulong len, int type)
77 return -ENOSYS;
80 int kvm_arch_remove_hw_breakpoint(target_ulong addr,
81 target_ulong len, int type)
83 return -ENOSYS;
86 void kvm_arch_remove_all_hw_breakpoints(void)
90 int kvm_arch_debug(struct kvm_debug_exit_arch *arch_info)
92 return 0;
95 void kvm_arch_update_guest_debug(CPUState *env, struct kvm_guest_debug *dbg)
99 void kvm_arch_save_mpstate(CPUState *env)
101 #ifdef KVM_CAP_MP_STATE
102 int r;
103 struct kvm_mp_state mp_state;
105 r = kvm_get_mpstate(env->kvm_cpu_state.vcpu_ctx, &mp_state);
106 if (r < 0)
107 env->mp_state = -1;
108 else
109 env->mp_state = mp_state.mp_state;
110 #endif
113 void kvm_arch_load_mpstate(CPUState *env)
115 #ifdef KVM_CAP_MP_STATE
116 struct kvm_mp_state mp_state = { .mp_state = env->mp_state };
119 * -1 indicates that the host did not support GET_MP_STATE ioctl,
120 * so don't touch it.
122 if (env->mp_state != -1)
123 kvm_set_mpstate(env->kvm_cpu_state.vcpu_ctx, &mp_state);
124 #endif
127 void kvm_arch_cpu_reset(CPUState *env)
129 if (kvm_irqchip_in_kernel(kvm_context)) {
130 #ifdef KVM_CAP_MP_STATE
131 kvm_reset_mpstate(env->kvm_cpu_state.vcpu_ctx);
132 #endif
133 } else {
134 env->interrupt_request &= ~CPU_INTERRUPT_HARD;
135 env->halted = 1;
139 void kvm_arch_do_ioperm(void *_data)
141 struct ioperm_data *data = _data;
142 ioperm(data->start_port, data->num, data->turn_on);
145 void kvm_arch_process_irqchip_events(CPUState *env)