Re: [PATCH v19 05/20] s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/16/22 13:13, Tony Krowiak wrote:


On 5/16/22 12:36 PM, Jason J. Herne wrote:
On 4/4/22 18:10, Tony Krowiak wrote:
|@@ -1306,8 +1392,6 @@ static int vfio_ap_mdev_set_kvm(struct ap_matrix_mdev *matrix_mdev, kvm_get_kvm(kvm); matrix_mdev->kvm = kvm; - memcpy(&matrix_mdev->shadow_apcb, &matrix_mdev->matrix, - sizeof(struct ap_matrix)); kvm_arch_crypto_set_masks(kvm, matrix_mdev->shadow_apcb.apm, matrix_mdev->shadow_apcb.aqm, matrix_mdev->shadow_apcb.adm);|

This looks like an unrelated change. Does this snippet really belong to this patch?

It's kind of hard to tell which snippet you are talking about without the patch context, but I assume you are referring to the removal of the memcpy statement in the vfio_ap_mdev_set_kvm() function in which case this snippet belongs with this patch.

This patch introduces a function that filters the contents of the matrix_mdev->matrix to ensure that the matrix_mdev->shadow_apcb contains only queues that are bound to the vfio_ap device driver. The filtering function is called whenever an adapter, domain or control domain is assigned or unassigned, so it is no longer necessary to copy the contents of matrix_mdev->matrix into matrix_mdev->shadow_apcb before setting the masks in the guest; that will have already been done by the filter function.



I was apparently a little overzealous with my trimming. Yes, you are correct. Thanks for
the explanation.

Reviewed-by: Jason J. Herne <jjherne@xxxxxxxxxxxxx>


--
-- Jason J. Herne (jjherne@xxxxxxxxxxxxx)



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux