aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kvm/kvm-s390.c13
-rw-r--r--arch/s390/mm/pgtable.c10
2 files changed, 10 insertions, 13 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index ce81eb2ab76a..81b0e11521e4 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1317,19 +1317,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
1317 return -EINVAL; 1317 return -EINVAL;
1318 } 1318 }
1319 1319
1320 switch (kvm_run->exit_reason) {
1321 case KVM_EXIT_S390_SIEIC:
1322 case KVM_EXIT_UNKNOWN:
1323 case KVM_EXIT_INTR:
1324 case KVM_EXIT_S390_RESET:
1325 case KVM_EXIT_S390_UCONTROL:
1326 case KVM_EXIT_S390_TSCH:
1327 case KVM_EXIT_DEBUG:
1328 break;
1329 default:
1330 BUG();
1331 }
1332
1333 vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask; 1320 vcpu->arch.sie_block->gpsw.mask = kvm_run->psw_mask;
1334 vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr; 1321 vcpu->arch.sie_block->gpsw.addr = kvm_run->psw_addr;
1335 if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) { 1322 if (kvm_run->kvm_dirty_regs & KVM_SYNC_PREFIX) {
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 19daa53a3da4..5404a6261db9 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -986,11 +986,21 @@ int set_guest_storage_key(struct mm_struct *mm, unsigned long addr,
986 pte_t *ptep; 986 pte_t *ptep;
987 987
988 down_read(&mm->mmap_sem); 988 down_read(&mm->mmap_sem);
989retry:
989 ptep = get_locked_pte(current->mm, addr, &ptl); 990 ptep = get_locked_pte(current->mm, addr, &ptl);
990 if (unlikely(!ptep)) { 991 if (unlikely(!ptep)) {
991 up_read(&mm->mmap_sem); 992 up_read(&mm->mmap_sem);
992 return -EFAULT; 993 return -EFAULT;
993 } 994 }
995 if (!(pte_val(*ptep) & _PAGE_INVALID) &&
996 (pte_val(*ptep) & _PAGE_PROTECT)) {
997 pte_unmap_unlock(*ptep, ptl);
998 if (fixup_user_fault(current, mm, addr, FAULT_FLAG_WRITE)) {
999 up_read(&mm->mmap_sem);
1000 return -EFAULT;
1001 }
1002 goto retry;
1003 }
994 1004
995 new = old = pgste_get_lock(ptep); 1005 new = old = pgste_get_lock(ptep);
996 pgste_val(new) &= ~(PGSTE_GR_BIT | PGSTE_GC_BIT | 1006 pgste_val(new) &= ~(PGSTE_GR_BIT | PGSTE_GC_BIT |