linux/drivers/s390/crypto
Harald Freudenberger ea1b2081d5 s390/ap: Fix wrong APQN fill calculation
commit 3317785a88 upstream.

The upper limit of the firmware queue fill state for each APQN
is reported by the hwinfo.qd field. This field shows the
numbers 0-7 for 1-8 queue spaces available. But the exploiting
code assumed the real boundary is stored there and thus stoppes
queuing in messages one tick too early.

Correct the limit calculation and thus offer a boost
of 12.5% performance for high traffic on one APQN.

Fixes: d4c53ae8e4 ("s390/ap: store TAPQ hwinfo in struct ap_card")
Cc: stable@vger.kernel.org
Reported-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-30 10:32:25 +01:00
..
ap_bus.c s390/ap: Don't leak debug feature files if AP instructions are not available 2025-12-18 14:02:36 +01:00
ap_bus.h s390/ap: Unmask SLCF bit in card and queue ap functions sysfs 2025-07-31 18:59:26 +02:00
ap_card.c s390/ap: Fix wrong APQN fill calculation 2026-01-30 10:32:25 +01:00
ap_debug.h s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
ap_queue.c s390/ap: Fix wrong APQN fill calculation 2026-01-30 10:32:25 +01:00
Makefile s390/pkey: Add new pkey handler module pkey-uv 2024-10-29 11:17:18 +01:00
pkey_api.c s390 updates for 6.17 merge window 2025-07-29 20:17:08 -07:00
pkey_base.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
pkey_base.h s390/pkey: Provide and pass xflags within pkey and zcrypt layers 2025-04-30 11:34:03 +02:00
pkey_cca.c s390/pkey: Provide and pass xflags within pkey and zcrypt layers 2025-04-30 11:34:03 +02:00
pkey_ep11.c s390/pkey: Provide and pass xflags within pkey and zcrypt layers 2025-04-30 11:34:03 +02:00
pkey_pckmo.c s390/pkey: Provide and pass xflags within pkey and zcrypt layers 2025-04-30 11:34:03 +02:00
pkey_sysfs.c sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
pkey_uv.c s390/pkey: Provide and pass xflags within pkey and zcrypt layers 2025-04-30 11:34:03 +02:00
vfio_ap_debug.h s390-vfio-ap: introduces s390 kernel debug feature for vfio_ap device driver 2022-02-06 23:31:29 +01:00
vfio_ap_drv.c s390/vfio-ap: Driver feature advertisement 2024-09-23 17:57:04 +02:00
vfio_ap_ops.c KVM: s390/vfio-ap: Use kvm_is_gpa_in_memslot() instead of open coded equivalent 2025-09-30 13:38:06 -04:00
vfio_ap_private.h s390/vfio-ap: Signal eventfd when guest AP configuration is changed 2025-02-18 18:53:48 +01:00
zcrypt_api.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
zcrypt_api.h s390/zcrypt: Rework zcrypt function zcrypt_device_status_mask_ext 2025-04-30 11:34:01 +02:00
zcrypt_card.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
zcrypt_cca_key.h s390/zcrypt: rework arrays with length zero occurrences 2023-04-19 16:47:31 +02:00
zcrypt_ccamisc.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
zcrypt_ccamisc.h s390/pkey: Provide and pass xflags within pkey and zcrypt layers 2025-04-30 11:34:03 +02:00
zcrypt_cex2a.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2a.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex4.c s390/zcrypt: Rework ep11 misc functions to use cprb mempool 2025-04-30 11:34:02 +02:00
zcrypt_cex4.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zcrypt_debug.h s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
zcrypt_ep11misc.c s390/pkey: Forward keygenflags to ep11_unwrapkey 2025-08-28 16:52:54 +02:00
zcrypt_ep11misc.h s390/pkey: Provide and pass xflags within pkey and zcrypt layers 2025-04-30 11:34:03 +02:00
zcrypt_error.h s390/zcrypt: improve zcrypt retry behavior 2024-03-07 14:41:15 +01:00
zcrypt_msgtype6.c s390/ap/zcrypt: Rework AP message buffer allocation 2025-04-30 11:34:00 +02:00
zcrypt_msgtype6.h s390/zcrypt: code cleanup 2022-04-25 13:54:14 +02:00
zcrypt_msgtype50.c s390/ap/zcrypt: Rework AP message buffer allocation 2025-04-30 11:34:00 +02:00
zcrypt_msgtype50.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_queue.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00