From: Marcelo Tosatti <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
diff --git a/kvm-tpr-opt.c b/kvm-tpr-opt.c
index bf9c9a0..ddac2da 100644
--- a/kvm-tpr-opt.c
+++ b/kvm-tpr-opt.c
@@ -401,10 +401,11 @@ static void vtpr_ioport_write(void *opaque, uint32_t
addr, uint32_t val)
kvm_tpr_enable_vapic(env);
}
-void kvm_tpr_opt_setup(void)
+static void kvm_tpr_opt_setup(void)
{
register_savevm("kvm-tpr-opt", 0, 1, tpr_save, tpr_load, NULL);
register_ioport_write(0x7e, 1, 1, vtpr_ioport_write, NULL);
register_ioport_write(0x7e, 2, 2, vtpr_ioport_write16, NULL);
}
+device_init(kvm_tpr_opt_setup);
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 24f7495..b2052a1 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -157,10 +157,6 @@ int kvm_arch_create(kvm_context_t kvm, unsigned long
phys_mem_bytes,
if (r < 0)
return r;
-#ifdef KVM_EXIT_TPR_ACCESS
- kvm_tpr_opt_setup();
-#endif
-
return 0;
}
diff --git a/qemu-kvm.h b/qemu-kvm.h
index ae2f864..1616180 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -894,7 +894,6 @@ void qemu_kvm_aio_wait_end(void);
void qemu_kvm_notify_work(void);
-void kvm_tpr_opt_setup(void);
void kvm_tpr_access_report(CPUState *env, uint64_t rip, int is_write);
void kvm_tpr_vcpu_start(CPUState *env);
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html