diff options
| author | Claudio Imbrenda <imbrenda@linux.ibm.com> | 2026-05-19 17:01:12 +0200 |
|---|---|---|
| committer | Claudio Imbrenda <imbrenda@linux.ibm.com> | 2026-05-22 11:25:10 +0200 |
| commit | 2d505c290667eba67352c5db303ec92b7de860ad (patch) | |
| tree | dac1ad5d429e552dbd9642fedc01740cd51edba7 /include/linux/sync_file.h | |
| parent | 4df4b7cdf54620aa848e7d83d253bb944313f7bd (diff) | |
KVM: s390: vsie: Fix unshadowing logic
In some cases (i.e. under extreme memory pressure on the host),
attempting to shadow memory will result in the same memory being
unshadowed, causing a loop.
Add a PGSTE bit to distinguish between shadowed memory and shadowed DAT
tables, fix the unshadowing logic in _gmap_ptep_xchg() to prevent
unnecessary unshadowing and perform better checks.
Also fix the unshadowing logic in _gmap_crstep_xchg_atomic() which did
not unshadow properly when the large page would become unprotected.
Opportunistically add a check in gmap_protect_rmap() to make sure it
won't be called with level == TABLE_TYPE_PAGE_TABLE.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Fixes: a2c17f9270cc ("KVM: s390: New gmap code")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Diffstat (limited to 'include/linux/sync_file.h')
0 files changed, 0 insertions, 0 deletions
