diff options
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 6b8108624851..88d69cf1f953 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -317,6 +317,7 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
317 | case KVM_CAP_ENABLE_CAP: | 317 | case KVM_CAP_ENABLE_CAP: |
318 | case KVM_CAP_ONE_REG: | 318 | case KVM_CAP_ONE_REG: |
319 | case KVM_CAP_IOEVENTFD: | 319 | case KVM_CAP_IOEVENTFD: |
320 | case KVM_CAP_DEVICE_CTRL: | ||
320 | r = 1; | 321 | r = 1; |
321 | break; | 322 | break; |
322 | #ifndef CONFIG_KVM_BOOK3S_64_HV | 323 | #ifndef CONFIG_KVM_BOOK3S_64_HV |
@@ -762,7 +763,10 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, | |||
762 | break; | 763 | break; |
763 | case KVM_CAP_PPC_EPR: | 764 | case KVM_CAP_PPC_EPR: |
764 | r = 0; | 765 | r = 0; |
765 | vcpu->arch.epr_enabled = cap->args[0]; | 766 | if (cap->args[0]) |
767 | vcpu->arch.epr_flags |= KVMPPC_EPR_USER; | ||
768 | else | ||
769 | vcpu->arch.epr_flags &= ~KVMPPC_EPR_USER; | ||
766 | break; | 770 | break; |
767 | #ifdef CONFIG_BOOKE | 771 | #ifdef CONFIG_BOOKE |
768 | case KVM_CAP_PPC_BOOKE_WATCHDOG: | 772 | case KVM_CAP_PPC_BOOKE_WATCHDOG: |
@@ -908,6 +912,7 @@ static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo) | |||
908 | long kvm_arch_vm_ioctl(struct file *filp, | 912 | long kvm_arch_vm_ioctl(struct file *filp, |
909 | unsigned int ioctl, unsigned long arg) | 913 | unsigned int ioctl, unsigned long arg) |
910 | { | 914 | { |
915 | struct kvm *kvm __maybe_unused = filp->private_data; | ||
911 | void __user *argp = (void __user *)arg; | 916 | void __user *argp = (void __user *)arg; |
912 | long r; | 917 | long r; |
913 | 918 | ||
@@ -926,7 +931,6 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
926 | #ifdef CONFIG_PPC_BOOK3S_64 | 931 | #ifdef CONFIG_PPC_BOOK3S_64 |
927 | case KVM_CREATE_SPAPR_TCE: { | 932 | case KVM_CREATE_SPAPR_TCE: { |
928 | struct kvm_create_spapr_tce create_tce; | 933 | struct kvm_create_spapr_tce create_tce; |
929 | struct kvm *kvm = filp->private_data; | ||
930 | 934 | ||
931 | r = -EFAULT; | 935 | r = -EFAULT; |
932 | if (copy_from_user(&create_tce, argp, sizeof(create_tce))) | 936 | if (copy_from_user(&create_tce, argp, sizeof(create_tce))) |
@@ -938,7 +942,6 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
938 | 942 | ||
939 | #ifdef CONFIG_KVM_BOOK3S_64_HV | 943 | #ifdef CONFIG_KVM_BOOK3S_64_HV |
940 | case KVM_ALLOCATE_RMA: { | 944 | case KVM_ALLOCATE_RMA: { |
941 | struct kvm *kvm = filp->private_data; | ||
942 | struct kvm_allocate_rma rma; | 945 | struct kvm_allocate_rma rma; |
943 | 946 | ||
944 | r = kvm_vm_ioctl_allocate_rma(kvm, &rma); | 947 | r = kvm_vm_ioctl_allocate_rma(kvm, &rma); |
@@ -948,7 +951,6 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
948 | } | 951 | } |
949 | 952 | ||
950 | case KVM_PPC_ALLOCATE_HTAB: { | 953 | case KVM_PPC_ALLOCATE_HTAB: { |
951 | struct kvm *kvm = filp->private_data; | ||
952 | u32 htab_order; | 954 | u32 htab_order; |
953 | 955 | ||
954 | r = -EFAULT; | 956 | r = -EFAULT; |
@@ -965,7 +967,6 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
965 | } | 967 | } |
966 | 968 | ||
967 | case KVM_PPC_GET_HTAB_FD: { | 969 | case KVM_PPC_GET_HTAB_FD: { |
968 | struct kvm *kvm = filp->private_data; | ||
969 | struct kvm_get_htab_fd ghf; | 970 | struct kvm_get_htab_fd ghf; |
970 | 971 | ||
971 | r = -EFAULT; | 972 | r = -EFAULT; |
@@ -978,7 +979,6 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
978 | 979 | ||
979 | #ifdef CONFIG_PPC_BOOK3S_64 | 980 | #ifdef CONFIG_PPC_BOOK3S_64 |
980 | case KVM_PPC_GET_SMMU_INFO: { | 981 | case KVM_PPC_GET_SMMU_INFO: { |
981 | struct kvm *kvm = filp->private_data; | ||
982 | struct kvm_ppc_smmu_info info; | 982 | struct kvm_ppc_smmu_info info; |
983 | 983 | ||
984 | memset(&info, 0, sizeof(info)); | 984 | memset(&info, 0, sizeof(info)); |