summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@linux.ibm.com>2022-05-30 11:27:06 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-25 11:49:17 +0200
commit2de33ee5b6a4493ce788c376de6b4e090d6aeb1f (patch)
treea06a9bcae05dae5eb702ecf367736ca604b93055
parent4baa21a46e32bbd70ef70c48e0583f0744bd5629 (diff)
downloadlinux-stable-2de33ee5b6a4493ce788c376de6b4e090d6aeb1f.tar.gz
linux-stable-2de33ee5b6a4493ce788c376de6b4e090d6aeb1f.tar.bz2
linux-stable-2de33ee5b6a4493ce788c376de6b4e090d6aeb1f.zip
s390/mm: use non-quiescing sske for KVM switch to keyed guest
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>
-rw-r--r--arch/s390/mm/pgtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 4354ac607750..9f3903089869 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -716,7 +716,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();
}