]> www.infradead.org Git - users/jedix/linux-maple.git/commit
s390/vfio-ap: Remove gmap_convert_to_secure() from vfio_ap_ops
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Fri, 15 Nov 2024 13:56:11 +0000 (14:56 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 21 Nov 2024 11:44:07 +0000 (12:44 +0100)
commit9c7260b527f0f7c75a9c0fee297663d1acc40937
treeea44557cf3dd3f8d2908165d74a6574d2a3f777e
parent588a9836a4ef7ec3bfcffda526dfa399637e6cfc
s390/vfio-ap: Remove gmap_convert_to_secure() from vfio_ap_ops

If the page has been exported, do not re-import it. Imports should
only be triggered by the guest. The guest will import the page
automatically when it will need it again, there is no advantage in
importing it manually.

Moreover, vfio_pin_pages() will take an extra reference on the page and
thus will cause the import to always fail. The extra reference would be
dropped only after pointlessly trying to import the page.

Fixes: f88fb1335733 ("s390/vfio-ap: make sure nib is shared")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Link: https://lore.kernel.org/r/20241115135611.87836-1-imbrenda@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/vfio_ap_ops.c