Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-02 Thread Tony Krowiak
On 03/02/2018 05:08 AM, David Hildenbrand wrote: On 01.03.2018 21:42, Tony Krowiak wrote: On 03/01/2018 04:37 AM, David Hildenbrand wrote: On 28.02.2018 21:45, Tony Krowiak wrote: On 02/28/2018 04:49 AM, David Hildenbrand wrote: +static int vfio_ap_mdev_open(struct mdev_device *mdev) +{ +

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-02 Thread Tony Krowiak
On 03/02/2018 05:08 AM, David Hildenbrand wrote: On 01.03.2018 21:42, Tony Krowiak wrote: On 03/01/2018 04:37 AM, David Hildenbrand wrote: On 28.02.2018 21:45, Tony Krowiak wrote: On 02/28/2018 04:49 AM, David Hildenbrand wrote: +static int vfio_ap_mdev_open(struct mdev_device *mdev) +{ +

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-02 Thread David Hildenbrand
On 01.03.2018 21:42, Tony Krowiak wrote: > On 03/01/2018 04:37 AM, David Hildenbrand wrote: >> On 28.02.2018 21:45, Tony Krowiak wrote: >>> On 02/28/2018 04:49 AM, David Hildenbrand wrote: > +static int vfio_ap_mdev_open(struct mdev_device *mdev) > +{ > + struct ap_matrix_mdev

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-02 Thread David Hildenbrand
On 01.03.2018 21:42, Tony Krowiak wrote: > On 03/01/2018 04:37 AM, David Hildenbrand wrote: >> On 28.02.2018 21:45, Tony Krowiak wrote: >>> On 02/28/2018 04:49 AM, David Hildenbrand wrote: > +static int vfio_ap_mdev_open(struct mdev_device *mdev) > +{ > + struct ap_matrix_mdev

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-01 Thread Tony Krowiak
On 03/01/2018 04:37 AM, David Hildenbrand wrote: On 28.02.2018 21:45, Tony Krowiak wrote: On 02/28/2018 04:49 AM, David Hildenbrand wrote: +static int vfio_ap_mdev_open(struct mdev_device *mdev) +{ + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); + unsigned long

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-01 Thread Tony Krowiak
On 03/01/2018 04:37 AM, David Hildenbrand wrote: On 28.02.2018 21:45, Tony Krowiak wrote: On 02/28/2018 04:49 AM, David Hildenbrand wrote: +static int vfio_ap_mdev_open(struct mdev_device *mdev) +{ + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); + unsigned long

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-01 Thread David Hildenbrand
On 28.02.2018 21:45, Tony Krowiak wrote: > On 02/28/2018 04:49 AM, David Hildenbrand wrote: >>> +static int vfio_ap_mdev_open(struct mdev_device *mdev) >>> +{ >>> + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); >>> + unsigned long events; >>> + int ret; >>> + >>> +

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-03-01 Thread David Hildenbrand
On 28.02.2018 21:45, Tony Krowiak wrote: > On 02/28/2018 04:49 AM, David Hildenbrand wrote: >>> +static int vfio_ap_mdev_open(struct mdev_device *mdev) >>> +{ >>> + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); >>> + unsigned long events; >>> + int ret; >>> + >>> +

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-02-28 Thread Tony Krowiak
On 02/28/2018 04:49 AM, David Hildenbrand wrote: +static int vfio_ap_mdev_open(struct mdev_device *mdev) +{ + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); + unsigned long events; + int ret; + + matrix_mdev->group_notifier.notifier_call =

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-02-28 Thread Tony Krowiak
On 02/28/2018 04:49 AM, David Hildenbrand wrote: +static int vfio_ap_mdev_open(struct mdev_device *mdev) +{ + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); + unsigned long events; + int ret; + + matrix_mdev->group_notifier.notifier_call =

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-02-28 Thread David Hildenbrand
> +static int vfio_ap_mdev_open(struct mdev_device *mdev) > +{ > + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); > + unsigned long events; > + int ret; > + > + matrix_mdev->group_notifier.notifier_call = vfio_ap_mdev_group_notifier; > + events =

Re: [PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-02-28 Thread David Hildenbrand
> +static int vfio_ap_mdev_open(struct mdev_device *mdev) > +{ > + struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); > + unsigned long events; > + int ret; > + > + matrix_mdev->group_notifier.notifier_call = vfio_ap_mdev_group_notifier; > + events =

[PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-02-27 Thread Tony Krowiak
Registers a group notifier during the open of the mediated matrix device to get information on KVM presence through the VFIO_GROUP_NOTIFY_SET_KVM event. When notified, the pointer to the kvm structure is saved inside the mediated matrix device. Once the VFIO AP device driver has access to KVM, the

[PATCH v2 13/15] KVM: s390: Configure the guest's CRYCB

2018-02-27 Thread Tony Krowiak
Registers a group notifier during the open of the mediated matrix device to get information on KVM presence through the VFIO_GROUP_NOTIFY_SET_KVM event. When notified, the pointer to the kvm structure is saved inside the mediated matrix device. Once the VFIO AP device driver has access to KVM, the