Skip to content

s390: Reintroduce support for DCACHE_WORD_ACCESS

Heiko Carstens kvm linux-s390 lkml 4 versions – Applied

Status from this message: Applied, thank you!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 15 repliesApplied
  2. v36 patches 0 repliesSuperseded
  3. v24 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches4 repliesSuperseded

Changes in v4 from the cover letter

- Add two more cleanup patches based on Sashiko feedback, however I don't consider them as bug fixes. This is more cosmetics:
- Use handle_fault_error() in do_secure_storage_access()
- Use goto statement in do_secure_storage_access()

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/8KVM: s390: pv: Use VM_SPARSE area for guest variable storage areaarch/s390/include/asm/uv.h arch/s390/kernel/uv.c arch/s390/kvm/pv.c+70 -35 replies
2/8s390/mm: Add missing mm check to do_secure_storage_access()arch/s390/mm/fault.c+2 -31 reply
3/8s390/mm: Use lock_mm_and_find_vma() in do_secure_storage_access()arch/s390/mm/fault.c+2 -31 reply
4/8s390/mm: Fix handling of vmalloc area in do_secure_storage_access()arch/s390/mm/fault.c+2 -01 reply
5/8s390/mm: Remove folio handling for kernel faults in do_secure_storage_access()arch/s390/mm/fault.c+1 -72 replies
6/8s390/mm: Use handle_fault_error() in do_secure_storage_access()arch/s390/mm/fault.c+3 -50 replies
7/8s390/mm: Use goto statement in do_secure_storage_access()arch/s390/mm/fault.c+3 -41 reply
8/8s390: Add support for DCACHE_WORD_ACCESS (again)arch/s390/Kconfig arch/s390/include/asm/asm-extable.h arch/s390/include/asm/word-at-a-time.h +1 more+45 -01 reply

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchChristian BorntraegerSven SchnelleClaudio Imbrenda
1/8T-b R-b
2/8R-b
3/8R-b
4/8T-b R-b
5/8T-b R-b A-b
6/8
7/8R-b
8/8T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/8] s390: Reintroduce support for DCACHE_WORD_ACCESS

v4:
- Add two more cleanup patches based on Sashiko feedback, however I don't consider them as bug fixes. This is more cosmetics:
- Use handle_fault_error() in do_secure_storage_access()
- Use goto statement in do_secure_storage_access()

v3:
- Fix two more pre-existing bugs reported by Sashiko
- Add Christian's Tested-by tag to four of the six patches

v2:
- Explicitely PAGE_ALIGN size in uv_alloc_stor_var() [Sashiko]
- Document that lazy PTE update / TLB flushing is intended [Sashiko]

v1:
Support for DCACHE_WORD_ACCESS was recently removed [1] since it caused problems with the incomplete handling of secure storage access exceptions. It looked like fixing the exception handler would be a larger effort; therefore support for DCACHE_WORD_ACCESS was removed as a work around.

Address the potential problems that exist with secure storage access exceptions and add support for DCACHE_WORD_ACCESS again.

In particular address the following problems:

- Reading the guest variable storage area via the /proc/kcore interface results in short reads. Address this by using a VM_SPARSE area for the guest variable storage area. VM_SPARSE areas will be handled like memory holes (zeros will be read).

- Fix handling of secure storage access exceptions in vmalloc area.

- Remove folio handling for secure storage access exceptions to avoid potential data corruption.

[1] 37540b8c287f ("s390: Revert support for DCACHE_WORD_ACCESS")

Heiko Carstens (8):
KVM: s390: pv: Use VM_SPARSE area for guest variable storage area s390/mm: Add missing mm check to do_secure_storage_access() s390/mm: Use lock_mm_and_find_vma() in do_secure_storage_access() s390/mm: Fix handling of vmalloc area in do_secure_storage_access() s390/mm: Remove folio handling for kernel faults in do_secure_storage_access() s390/mm: Use handle_fault_error() in do_secure_storage_access() s390/mm: Use goto statement in do_secure_storage_access()
s390: Add support for DCACHE_WORD_ACCESS (again)

 arch/s390/Kconfig                      |  1 +
 arch/s390/include/asm/asm-extable.h    |  4 ++
 arch/s390/include/asm/uv.h             |  2 +
 arch/s390/include/asm/word-at-a-time.h | 22 +++++++++
 arch/s390/kernel/uv.c                  | 65 ++++++++++++++++++++++++++
 arch/s390/kvm/pv.c                     |  6 +--
 arch/s390/mm/extable.c                 | 18 +++++++
 arch/s390/mm/fault.c                   | 35 ++++++--------
 8 files changed, 128 insertions(+), 25 deletions(-)
Signature · 1 line
2.53.0