OSDN Git Service

s390/mm: fix virtual-physical address confusion for swiotlb
authorNico Boehr <nrb@linux.ibm.com>
Mon, 7 Nov 2022 12:12:21 +0000 (13:12 +0100)
committerJanosch Frank <frankja@linux.ibm.com>
Mon, 7 Nov 2022 13:33:40 +0000 (14:33 +0100)
commit58635d6615f1e5a870548ae8999870fdfcdecec0
treec736bb3d0645f0cb5b4e1a52ad568f88819fdd3e
parent77b533411595668659ce5aaade4ca36c7aa2c488
s390/mm: fix virtual-physical address confusion for swiotlb

swiotlb passes virtual addresses to set_memory_encrypted() and
set_memory_decrypted(), but uv_remove_shared() and uv_set_shared()
expect physical addresses. This currently works, because virtual
and physical addresses are the same.

Add virt_to_phys() to resolve the virtual-physical confusion.

Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Link: https://lore.kernel.org/r/20221107121221.156274-2-nrb@linux.ibm.com
Message-Id: <20221107121221.156274-2-nrb@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/include/asm/mem_encrypt.h
arch/s390/mm/init.c