Merge remote-tracking branches 'spi/topic/imx', 'spi/topic/loopback', 'spi/topic...
[sfrench/cifs-2.6.git] / arch / s390 / kvm / sthyi.c
index 926b5244263efd3dd1fadf637ce4790251367e60..a2e5c24f47a7471a1e7730f654b8ce4599434ef0 100644 (file)
@@ -394,7 +394,7 @@ static int sthyi(u64 vaddr)
                "srl     %[cc],28\n"
                : [cc] "=d" (cc)
                : [code] "d" (code), [addr] "a" (addr)
-               : "memory", "cc");
+               : "3", "memory", "cc");
        return cc;
 }
 
@@ -425,7 +425,7 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
        VCPU_EVENT(vcpu, 3, "STHYI: fc: %llu addr: 0x%016llx", code, addr);
        trace_kvm_s390_handle_sthyi(vcpu, code, addr);
 
-       if (reg1 == reg2 || reg1 & 1 || reg2 & 1 || addr & ~PAGE_MASK)
+       if (reg1 == reg2 || reg1 & 1 || reg2 & 1)
                return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
 
        if (code & 0xffff) {
@@ -433,6 +433,9 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
                goto out;
        }
 
+       if (addr & ~PAGE_MASK)
+               return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
+
        /*
         * If the page has not yet been faulted in, we want to do that
         * now and not after all the expensive calculations.