@@ -1815,7 +1815,6 @@ static void *ap_main_loop(void *_env)
{
CPUState *env = _env;
sigset_t signals;
- struct ioperm_data *data = NULL;
current_env = env;
env->thread_id = kvm_get_thread_id();
@@ -1824,6 +1823,9 @@ static void *ap_main_loop(void *_env)
env->kvm_cpu_state.vcpu_ctx = kvm_create_vcpu(env, env->cpu_index);
#ifdef USE_KVM_DEVICE_ASSIGNMENT
+
+ struct ioperm_data *data = NULL;
+
/* do ioperm for io ports of assigned devices */
LIST_FOREACH(data, &ioperm_head, entries)
on_vcpu(env, kvm_arch_do_ioperm, data);
@@ -1060,6 +1060,9 @@ int kvm_arch_init_irq_routing(void);
int kvm_mmio_read(void *opaque, uint64_t addr, uint8_t * data, int len);
int kvm_mmio_write(void *opaque, uint64_t addr, uint8_t * data, int
len);
+void kvm_mutex_unlock(void);
+void kvm_mutex_lock(void);
+
#ifdef USE_KVM_DEVICE_ASSIGNMENT
struct ioperm_data;