Do not build extboot on non-x86
[qemu-kvm/fedora.git] / qemu-kvm-ia64.c
blob66e4232c92e567b836afea6fe23e40af1c40a3ae
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 <libkvm.h>
9 #include <pthread.h>
10 #include <sys/utsname.h>
11 #include <sys/io.h>
15 int kvm_arch_qemu_create_context(void)
17 return 0;
20 void kvm_arch_load_regs(CPUState *env)
25 void kvm_arch_save_regs(CPUState *env)
29 int kvm_arch_qemu_init_env(CPUState *cenv)
31 return 0;
34 int kvm_arch_halt(void *opaque, int vcpu)
36 CPUState *env = cpu_single_env;
37 env->hflags |= HF_HALTED_MASK;
38 env->exception_index = EXCP_HLT;
39 return 1;
42 void kvm_arch_pre_kvm_run(void *opaque, CPUState *env)
46 void kvm_arch_post_kvm_run(void *opaque, CPUState *env)
50 int kvm_arch_has_work(CPUState *env)
52 return 1;
55 int kvm_arch_try_push_interrupts(void *opaque)
57 return 1;
60 void kvm_arch_update_regs_for_sipi(CPUState *env)
64 int kvm_arch_insert_sw_breakpoint(CPUState *current_env,
65 struct kvm_sw_breakpoint *bp)
67 return -EINVAL;
70 int kvm_arch_remove_sw_breakpoint(CPUState *current_env,
71 struct kvm_sw_breakpoint *bp)
73 return -EINVAL;
76 int kvm_arch_insert_hw_breakpoint(target_ulong addr,
77 target_ulong len, int type)
79 return -ENOSYS;
82 int kvm_arch_remove_hw_breakpoint(target_ulong addr,
83 target_ulong len, int type)
85 return -ENOSYS;
88 void kvm_arch_remove_all_hw_breakpoints(void)
92 int kvm_arch_debug(struct kvm_debug_exit_arch *arch_info)
94 return 0;
97 void kvm_arch_update_guest_debug(CPUState *env, struct kvm_guest_debug *dbg)
101 void kvm_save_mpstate(CPUState *env)
103 #ifdef KVM_CAP_MP_STATE
104 int r;
105 struct kvm_mp_state mp_state;
107 r = kvm_get_mpstate(kvm_context, env->cpu_index, &mp_state);
108 if (r < 0)
109 env->mp_state = -1;
110 else
111 env->mp_state = mp_state.mp_state;
112 #endif
115 void kvm_load_mpstate(CPUState *env)
117 #ifdef KVM_CAP_MP_STATE
118 struct kvm_mp_state mp_state = { .mp_state = env->mp_state };
121 * -1 indicates that the host did not support GET_MP_STATE ioctl,
122 * so don't touch it.
124 if (env->mp_state != -1)
125 kvm_set_mpstate(kvm_context, env->cpu_index, &mp_state);
126 #endif
129 void kvm_arch_cpu_reset(CPUState *env)
131 if (kvm_irqchip_in_kernel(kvm_context)) {
132 #ifdef KVM_CAP_MP_STATE
133 kvm_reset_mpstate(kvm_context, env->cpu_index);
134 #endif
135 } else {
136 env->interrupt_request &= ~CPU_INTERRUPT_HARD;
137 env->halted = 1;
138 env->exception_index = EXCP_HLT;
142 void kvm_arch_do_ioperm(void *_data)
144 struct ioperm_data *data = _data;
145 ioperm(data->start_port, data->num, data->turn_on);