KVM: s390: ucontrol: disable in-kernel handling of SIE intercepts
authorCarsten Otte <cotte@de.ibm.com>
Wed, 4 Jan 2012 09:25:24 +0000 (10:25 +0100)
committerAvi Kivity <avi@redhat.com>
Mon, 5 Mar 2012 12:52:19 +0000 (14:52 +0200)
This patch disables in-kernel handling of SIE intercepts for user
controlled virtual machines. All intercepts are passed to userspace
via KVM_EXIT_SIE exit reason just like SIE intercepts that cannot be
handled in-kernel for regular KVM guests.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/s390/kvm/kvm-s390.c

index d6bc65aeb9506f27cbe5a4dd20d5109ee271cddb..02510946864e2129c039578ca107245fee6aa732 100644 (file)
@@ -566,7 +566,10 @@ rerun_vcpu:
                rc = __vcpu_run(vcpu);
                if (rc)
                        break;
-               rc = kvm_handle_sie_intercept(vcpu);
+               if (kvm_is_ucontrol(vcpu->kvm))
+                       rc = -EOPNOTSUPP;
+               else
+                       rc = kvm_handle_sie_intercept(vcpu);
        } while (!signal_pending(current) && !rc);
 
        if (rc == SIE_INTERCEPT_RERUNVCPU)