aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/crypto/ap_bus.c
diff options
context:
space:
mode:
authorGravatar Harald Freudenberger <freude@linux.ibm.com> 2023-11-09 11:24:20 +0100
committerGravatar Alexander Gordeev <agordeev@linux.ibm.com> 2023-11-30 16:24:23 +0100
commit207022d39d3b158ca3581e321212f799fa5e7e24 (patch)
tree099ebc5b6c45b5048e037672343874686cafe950 /drivers/s390/crypto/ap_bus.c
parents390/ap: store TAPQ hwinfo in struct ap_card (diff)
downloadlinux-207022d39d3b158ca3581e321212f799fa5e7e24.tar.gz
linux-207022d39d3b158ca3581e321212f799fa5e7e24.tar.bz2
linux-207022d39d3b158ca3581e321212f799fa5e7e24.zip
s390/ap: handle outband SE bind state change
This patch addresses some weird scenarios where an outband manipulation of the SE bind state of a queue assigned and maybe in use by an SE guest with AP pass-through support took place. So for example when the guest has bound and associated a queue and then this domain has been zeroed on the service element. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.c')
-rw-r--r--drivers/s390/crypto/ap_bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 20396eccb33b..f46dd6abacd7 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -1847,6 +1847,7 @@ static inline void ap_scan_domains(struct ap_card *ac)
aq->card = ac;
aq->config = !decfg;
aq->chkstop = chkstop;
+ aq->se_bstate = hwinfo.bs;
dev = &aq->ap_dev.device;
dev->bus = &ap_bus_type;
dev->parent = &ac->ap_dev.device;
@@ -1876,6 +1877,8 @@ static inline void ap_scan_domains(struct ap_card *ac)
}
/* handle state changes on already existing queue device */
spin_lock_bh(&aq->lock);
+ /* SE bind state */
+ aq->se_bstate = hwinfo.bs;
/* checkstop state */
if (chkstop && !aq->chkstop) {
/* checkstop on */