diff options
author | Harald Freudenberger <freude@linux.ibm.com> | 2023-02-17 14:05:36 +0300 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2023-02-27 17:29:36 +0300 |
commit | ebf95e884694b2c796ecb53d80d2b4cff8990d2f (patch) | |
tree | 0f0728a8d438131129e9ae61a2d544211652a14e /drivers/s390/crypto/vfio_ap_ops.c | |
parent | ae4b60f6b7a8d25c7253cab104468d22efcecf1a (diff) | |
download | linux-ebf95e884694b2c796ecb53d80d2b4cff8990d2f.tar.xz |
s390/ap,zcrypt,vfio: introduce and use ap_queue_status_reg union
Introduce a new ap queue status register wrapper union to access register
wide values. So the inline assembler only sees register wide values but the
surrounding code may use a more structured view of the same value and a
reader of the code (and the compiler) gets a clear understanding about the
mapping between fields and register values.
All the changes to access the ap queue status are local to the inline
functions within ap.h. However, the struct ap_qirq_ctrl has been replaces
by a union for same reason and this needed slight adaptions in the calling
code.
Suggested-by: Halil Pasic <pasic@linux.ibm.com>
Suggested-by: Andreas Arnez <arnez@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/vfio_ap_ops.c')
-rw-r--r-- | drivers/s390/crypto/vfio_ap_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c index 28a36e016ea9..72e10abb103a 100644 --- a/drivers/s390/crypto/vfio_ap_ops.c +++ b/drivers/s390/crypto/vfio_ap_ops.c @@ -301,7 +301,7 @@ static void vfio_ap_free_aqic_resources(struct vfio_ap_queue *q) */ static struct ap_queue_status vfio_ap_irq_disable(struct vfio_ap_queue *q) { - struct ap_qirq_ctrl aqic_gisa = {}; + union ap_qirq_ctrl aqic_gisa = { .value = 0 }; struct ap_queue_status status; int retries = 5; @@ -384,7 +384,7 @@ static struct ap_queue_status vfio_ap_irq_enable(struct vfio_ap_queue *q, int isc, struct kvm_vcpu *vcpu) { - struct ap_qirq_ctrl aqic_gisa = {}; + union ap_qirq_ctrl aqic_gisa = { .value = 0 }; struct ap_queue_status status = {}; struct kvm_s390_gisa *gisa; struct page *h_page; |