]> Gentwo Git Trees - linux/.git/commit
s390/ap: Use all-bits-one apmask/aqmask for vfio in_use() checks
authorHarald Freudenberger <freude@linux.ibm.com>
Wed, 19 Nov 2025 15:27:35 +0000 (16:27 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 24 Nov 2025 10:43:05 +0000 (11:43 +0100)
commit6917f434fda346323d1269780286e9ae915bdb5e
tree9b494aa5dbe61e51a9f69fea1a3a445b10ed36ac
parent2a2153a2bac7d9388b661a18d49707a8d885b231
s390/ap: Use all-bits-one apmask/aqmask for vfio in_use() checks

For the in_use() check of an updated apmask the host's aqmask
was provided to the vfio function. Similar on an update of the
aqmask the host's apmask was provided to the vfio in_use()
function. This led to false results on the check for apmask or
aqmask updates. For example with only one APQN when exactly
this card is tried to be re-assigned back to the host, the
in_use() check did not complain.

The correct behavior is achieved with providing a full mask
for aqmask when an adapter is to be checked and similar a full
mask for aqmask when a domain is to be checked for usage.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/ap_bus.c