aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2009-11-09 21:05:37 +0000
committerAurelien Jarno <aurelien@aurel32.net>2009-11-17 07:52:16 +0100
commitcc04c2ea68a37947c217037c3a23a037dbaff9c1 (patch)
treeea664582a1d3443e9af39819bd47220fcd6a9471
parent170f7598d467e95ae41880bdde2d676757180094 (diff)
kvm: Move KVM mp_state accessors to i386-specific code
Unbreaks PowerPC and S390 KVM builds. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--kvm-all.c20
-rw-r--r--kvm.h3
-rw-r--r--target-i386/kvm.c20
3 files changed, 20 insertions, 23 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 8567ac9163..f4c51f67e9 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -193,26 +193,6 @@ err:
return ret;
}
-int kvm_put_mp_state(CPUState *env)
-{
- struct kvm_mp_state mp_state = { .mp_state = env->mp_state };
-
- return kvm_vcpu_ioctl(env, KVM_SET_MP_STATE, &mp_state);
-}
-
-int kvm_get_mp_state(CPUState *env)
-{
- struct kvm_mp_state mp_state;
- int ret;
-
- ret = kvm_vcpu_ioctl(env, KVM_GET_MP_STATE, &mp_state);
- if (ret < 0) {
- return ret;
- }
- env->mp_state = mp_state.mp_state;
- return 0;
-}
-
/*
* dirty pages logging control
*/
diff --git a/kvm.h b/kvm.h
index 96b4d72609..5da8502679 100644
--- a/kvm.h
+++ b/kvm.h
@@ -71,9 +71,6 @@ int kvm_vm_ioctl(KVMState *s, int type, ...);
int kvm_vcpu_ioctl(CPUState *env, int type, ...);
-int kvm_get_mp_state(CPUState *env);
-int kvm_put_mp_state(CPUState *env);
-
/* Arch specific hooks */
int kvm_arch_post_run(CPUState *env, struct kvm_run *run);
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index cab9fccaec..2d4ebafb34 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -659,6 +659,26 @@ static int kvm_get_msrs(CPUState *env)
return 0;
}
+static int kvm_put_mp_state(CPUState *env)
+{
+ struct kvm_mp_state mp_state = { .mp_state = env->mp_state };
+
+ return kvm_vcpu_ioctl(env, KVM_SET_MP_STATE, &mp_state);
+}
+
+static int kvm_get_mp_state(CPUState *env)
+{
+ struct kvm_mp_state mp_state;
+ int ret;
+
+ ret = kvm_vcpu_ioctl(env, KVM_GET_MP_STATE, &mp_state);
+ if (ret < 0) {
+ return ret;
+ }
+ env->mp_state = mp_state.mp_state;
+ return 0;
+}
+
int kvm_arch_put_registers(CPUState *env)
{
int ret;