Re: [PATCH v2 2/4] eventfd: simplify eventfd_signal()

2024-02-07 Thread Anthony Krowiak
For vfio_ap_ops.c Reviewed-by: Anthony Krowiak On 2/6/24 2:44 PM, Stefan Hajnoczi wrote: vhost and VIRTIO-related parts: Reviewed-by: Stefan Hajnoczi On Wed, 22 Nov 2023 at 07:50, Christian Brauner wrote: Ever since the evenfd type was introduced back in 2007 in commit e1ad7468c77d

Re: [PATCH 1/2] eventfd: simplify eventfd_signal()

2023-07-13 Thread Anthony Krowiak
For vfio_ap_ops.c: Reviewed-by: Tony Krowiak On 7/13/23 6:05 AM, Christian Brauner wrote: Ever since the evenfd type was introduced back in 2007 in commit e1ad7468c77d ("signal/timer/event: eventfd core") the eventfd_signal() function only ever passed 1 as a value for @n. There's no point in

Re: [PATCH v2 7/7] vfio: Remove vfio_free_device

2022-11-02 Thread Anthony Krowiak
Reviewed-by: Tony Krowiak : vfio_ap part On 11/2/22 11:01 AM, Eric Farman wrote: With the "mess" sorted out, we should be able to inline the vfio_free_device call introduced by commit cb9ff3f3b84c ("vfio: Add helpers for unifying vfio_device life cycle") and remove them from driver release

Re: [PATCH 01/15] vfio: Add helpers for unifying vfio_device life cycle

2022-08-30 Thread Anthony Krowiak
On 8/30/22 11:10 AM, Jason Gunthorpe wrote: On Tue, Aug 30, 2022 at 09:42:42AM -0400, Anthony Krowiak wrote: +/* + * Alloc and initialize vfio_device so it can be registered to vfio + * core. + * + * Drivers should use the wrapper vfio_alloc_device() for allocation. + * @size is the size

Re: [PATCH 09/15] vfio/ap: Use the new device life cycle helpers

2022-08-30 Thread Anthony Krowiak
Reviewed-by: Tony Krowiak On 8/27/22 1:10 PM, Kevin Tian wrote: From: Yi Liu and manage available_instances inside @init/@release. Signed-off-by: Yi Liu Signed-off-by: Kevin Tian --- drivers/s390/crypto/vfio_ap_ops.c | 50 ++- 1 file changed, 29

Re: [PATCH 01/15] vfio: Add helpers for unifying vfio_device life cycle

2022-08-30 Thread Anthony Krowiak
Reviewed-by: Tony Krowiak I have a couple of review comments, but nothing critical that would prevent my r-b. On 8/27/22 1:10 PM, Kevin Tian wrote: The idea is to let vfio core manage the vfio_device life cycle instead of duplicating the logic cross drivers. This is also a preparatory step

Re: [PATCH v3 06/10] vfio/ap: Change saved_pfn to saved_iova

2022-07-12 Thread Anthony Krowiak
Reviewed-by: Tony Krowiak On 7/8/22 6:44 PM, Nicolin Chen wrote: The vfio_ap_ops code maintains both nib address and its PFN, which is redundant, merely because vfio_pin/unpin_pages API wanted pfn. Since vfio_pin/unpin_pages() now accept "iova", change "saved_pfn" to "saved_iova" and remove

Re: [PATCH v3 05/10] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API

2022-07-12 Thread Anthony Krowiak
Reviewed-by: Tony Krowiak On 7/8/22 6:44 PM, Nicolin Chen wrote: The vfio_pin/unpin_pages() so far accepted arrays of PFNs of user IOVA. Among all three callers, there was only one caller possibly passing in a non-contiguous PFN list, which is now ensured to have contiguous PFN inputs too.

Re: [PATCH v3 01/10] vfio: Make vfio_unpin_pages() return void

2022-07-12 Thread Anthony Krowiak
On 7/8/22 6:44 PM, Nicolin Chen wrote: There's only one caller that checks its return value with a WARN_ON_ONCE, while all other callers don't check the return value at all. Above that, an undo function should not fail. So, simplify the API to return void by embedding similar WARN_ONs. Also