On 25/10/2018 14:37, Michael Mueller wrote:
The function atomically returns the address of the first
GISA of this list and stores a zero address in the origin
list field of the GIB instead.
The GIB alert list contains all GISAs that have pending
adapter interruptions.
Signed-off-by: Michael Mueller <mimu@xxxxxxxxxxxxx>
---
arch/s390/kvm/interrupt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index ce258d6b7c06..487cad95e2c9 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -2886,6 +2886,14 @@ int kvm_s390_get_irq_state(struct kvm_vcpu *vcpu, __u8 __user *buf, int len)
return n;
}
+static struct kvm_s390_gisa __maybe_unused *unlink_gib_alert_list(void)
+{
+ if (!gib)
+ return NULL;
+
+ return (void *)(u64) atomic_xchg(&gib->alert_list_origin, 0);
+}
+
static void nullify_gisa(struct kvm_s390_gisa *gisa)
{
memset(gisa, 0, sizeof(struct kvm_s390_gisa));
Reviewed-by: Pierre Morel<pmorel@xxxxxxxxxxxxx>
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany