summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorClaudio Imbrenda <imbrenda@linux.ibm.com>2023-11-09 15:36:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-13 20:27:05 +0300
commite0e897ddf392804fc2f27ebc9cce8917a1178d3e (patch)
treea2da213a3c6aeac28fc739d31502cdb069725e1f /arch/s390
parentab8816a7c2c6b28c775252c81cbc30035f1d4c33 (diff)
downloadlinux-e0e897ddf392804fc2f27ebc9cce8917a1178d3e.tar.xz
KVM: s390/mm: Properly reset no-dat
commit 27072b8e18a73ffeffb1c140939023915a35134b upstream. When the CMMA state needs to be reset, the no-dat bit also needs to be reset. Failure to do so could cause issues in the guest, since the guest expects the bit to be cleared after a reset. Cc: <stable@vger.kernel.org> Reviewed-by: Nico Boehr <nrb@linux.ibm.com> Message-ID: <20231109123624.37314-1-imbrenda@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390')
-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 1c05caf68e7d..5b62e385af38 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -717,7 +717,7 @@ void ptep_zap_unused(struct mm_struct *mm, unsigned long addr,
pte_clear(mm, addr, ptep);
}
if (reset)
- pgste_val(pgste) &= ~_PGSTE_GPS_USAGE_MASK;
+ pgste_val(pgste) &= ~(_PGSTE_GPS_USAGE_MASK | _PGSTE_GPS_NODAT);
pgste_set_unlock(ptep, pgste);
preempt_enable();
}