]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/powerpc/kvm/powerpc.c
sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched...
[mirror_ubuntu-artful-kernel.git] / arch / powerpc / kvm / powerpc.c
index 40a5b2d75ed19979aa0b52246d1c7951ecf0a367..95c91a9de351c4b8b67f23c299279faa283efef7 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/kvm_host.h>
 #include <linux/vmalloc.h>
 #include <linux/hrtimer.h>
+#include <linux/sched/signal.h>
 #include <linux/fs.h>
 #include <linux/slab.h>
 #include <linux/file.h>
@@ -511,6 +512,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
        case KVM_CAP_ONE_REG:
        case KVM_CAP_IOEVENTFD:
        case KVM_CAP_DEVICE_CTRL:
+       case KVM_CAP_IMMEDIATE_EXIT:
                r = 1;
                break;
        case KVM_CAP_PPC_PAIRED_SINGLES:
@@ -612,6 +614,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
        case KVM_CAP_SPAPR_MULTITCE:
                r = 1;
                break;
+       case KVM_CAP_SPAPR_RESIZE_HPT:
+               /* Disable this on POWER9 until code handles new HPTE format */
+               r = !!hv_enabled && !cpu_has_feature(CPU_FTR_ARCH_300);
+               break;
 #endif
        case KVM_CAP_PPC_HTM:
                r = cpu_has_feature(CPU_FTR_TM_COMP) &&
@@ -1114,7 +1120,10 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
 #endif
        }
 
-       r = kvmppc_vcpu_run(run, vcpu);
+       if (run->immediate_exit)
+               r = -EINTR;
+       else
+               r = kvmppc_vcpu_run(run, vcpu);
 
        if (vcpu->sigset_active)
                sigprocmask(SIG_SETMASK, &sigsaved, NULL);