aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c12
-rw-r--r--arch/s390/kvm/kvm-s390.c12
-rw-r--r--arch/x86/kvm/x86.c19
3 files changed, 43 insertions, 0 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index f7589dba75ab..6df073240135 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1792,3 +1792,15 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
1792{ 1792{
1793 return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE; 1793 return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE;
1794} 1794}
1795
1796int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu,
1797 struct kvm_mp_state *mp_state)
1798{
1799 return -EINVAL;
1800}
1801
1802int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
1803 struct kvm_mp_state *mp_state)
1804{
1805 return -EINVAL;
1806}
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index d96613765973..98d1e73e01f1 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -414,6 +414,18 @@ int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu *vcpu,
414 return -EINVAL; /* not implemented yet */ 414 return -EINVAL; /* not implemented yet */
415} 415}
416 416
417int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu,
418 struct kvm_mp_state *mp_state)
419{
420 return -EINVAL; /* not implemented yet */
421}
422
423int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
424 struct kvm_mp_state *mp_state)
425{
426 return -EINVAL; /* not implemented yet */
427}
428
417static void __vcpu_run(struct kvm_vcpu *vcpu) 429static void __vcpu_run(struct kvm_vcpu *vcpu)
418{ 430{
419 memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16); 431 memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16);
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b364d192896c..5c3c9d38c780 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -817,6 +817,7 @@ int kvm_dev_ioctl_check_extension(long ext)
817 case KVM_CAP_CLOCKSOURCE: 817 case KVM_CAP_CLOCKSOURCE:
818 case KVM_CAP_PIT: 818 case KVM_CAP_PIT:
819 case KVM_CAP_NOP_IO_DELAY: 819 case KVM_CAP_NOP_IO_DELAY:
820 case KVM_CAP_MP_STATE:
820 r = 1; 821 r = 1;
821 break; 822 break;
822 case KVM_CAP_VAPIC: 823 case KVM_CAP_VAPIC:
@@ -3083,6 +3084,24 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
3083 return 0; 3084 return 0;
3084} 3085}
3085 3086
3087int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu,
3088 struct kvm_mp_state *mp_state)
3089{
3090 vcpu_load(vcpu);
3091 mp_state->mp_state = vcpu->arch.mp_state;
3092 vcpu_put(vcpu);
3093 return 0;
3094}
3095
3096int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
3097 struct kvm_mp_state *mp_state)
3098{
3099 vcpu_load(vcpu);
3100 vcpu->arch.mp_state = mp_state->mp_state;
3101 vcpu_put(vcpu);
3102 return 0;
3103}
3104
3086static void set_segment(struct kvm_vcpu *vcpu, 3105static void set_segment(struct kvm_vcpu *vcpu,
3087 struct kvm_segment *var, int seg) 3106 struct kvm_segment *var, int seg)
3088{ 3107{