OSDN Git Service

s390: vfio-ap: implement mediated device open callback
authorTony Krowiak <akrowiak@linux.ibm.com>
Tue, 25 Sep 2018 23:16:26 +0000 (19:16 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 28 Sep 2018 13:50:09 +0000 (15:50 +0200)
commit258287c994de8f2f52430b8d79b4fdf2c95f8c91
tree131bac85ead99ce6ba8bd174ed0179314ac7861b
parent42104598ef2e8c3ce532ebec891c9edec161e508
s390: vfio-ap: implement mediated device open callback

Implements the open callback on the mediated matrix device.
The function registers a group notifier to receive notification
of the VFIO_GROUP_NOTIFY_SET_KVM event. When notified,
the vfio_ap device driver will get access to the guest's
kvm structure. The open callback must ensure that only one
mediated device shall be opened per guest.

Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Tested-by: Michael Mueller <mimu@linux.ibm.com>
Tested-by: Farhan Ali <alifm@linux.ibm.com>
Tested-by: Pierre Morel <pmorel@linux.ibm.com>
Acked-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20180925231641.4954-12-akrowiak@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
drivers/s390/crypto/vfio_ap_ops.c
drivers/s390/crypto/vfio_ap_private.h