s390/mm: use non-quiescing sske for KVM switch to keyed guest
authorChristian Borntraeger <borntraeger@linux.ibm.com>
Mon, 30 May 2022 09:27:06 +0000 (11:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Jun 2022 13:18:40 +0000 (15:18 +0200)
commit 3ae11dbcfac906a8c3a480e98660a823130dc16a upstream.

The switch to a keyed guest does not require a classic sske as the other
guest CPUs are not accessing the key before the switch is complete.
By using the NQ SSKE things are faster especially with multiple guests.

Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Suggested-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20220530092706.11637-3-borntraeger@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/mm/pgtable.c

index 6ad634a27d5b950dde2908725ae4e7f2bdca22ca..df0adb7e2fe8ec01b42b0e033669c2bd82c8c39e 100644 (file)
@@ -748,7 +748,7 @@ void ptep_zap_key(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
        pgste_val(pgste) |= PGSTE_GR_BIT | PGSTE_GC_BIT;
        ptev = pte_val(*ptep);
        if (!(ptev & _PAGE_INVALID) && (ptev & _PAGE_WRITE))
-               page_set_storage_key(ptev & PAGE_MASK, PAGE_DEFAULT_KEY, 1);
+               page_set_storage_key(ptev & PAGE_MASK, PAGE_DEFAULT_KEY, 0);
        pgste_set_unlock(ptep, pgste);
        preempt_enable();
 }