aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 47cbc6e3fafd..099845574901 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -979,6 +979,30 @@ out_free2:
979 r = 0; 979 r = 0;
980 break; 980 break;
981 } 981 }
982 case KVM_GET_MP_STATE: {
983 struct kvm_mp_state mp_state;
984
985 r = kvm_arch_vcpu_ioctl_get_mpstate(vcpu, &mp_state);
986 if (r)
987 goto out;
988 r = -EFAULT;
989 if (copy_to_user(argp, &mp_state, sizeof mp_state))
990 goto out;
991 r = 0;
992 break;
993 }
994 case KVM_SET_MP_STATE: {
995 struct kvm_mp_state mp_state;
996
997 r = -EFAULT;
998 if (copy_from_user(&mp_state, argp, sizeof mp_state))
999 goto out;
1000 r = kvm_arch_vcpu_ioctl_set_mpstate(vcpu, &mp_state);
1001 if (r)
1002 goto out;
1003 r = 0;
1004 break;
1005 }
982 case KVM_TRANSLATE: { 1006 case KVM_TRANSLATE: {
983 struct kvm_translation tr; 1007 struct kvm_translation tr;
984 1008