From 405f2ffc3125d44c7fde31fe2bb9b312746eb4e1 Mon Sep 17 00:00:00 2001 From: Swapnil Ingle Date: Tue, 25 May 2021 15:25:35 +0200 Subject: Handle support of PCI FLR capability (#517) * Handle support of PCI FLR capability If device supports FLR cap then call vfu_reset_cb_t when FLR is initiated by client. Signed-off-by: Swapnil Ingle Reviewed-by: John Levon Reviewed-by: Thanos Makatos --- include/libvfio-user.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/libvfio-user.h') diff --git a/include/libvfio-user.h b/include/libvfio-user.h index 6cb817d..009ba83 100644 --- a/include/libvfio-user.h +++ b/include/libvfio-user.h @@ -317,12 +317,18 @@ typedef enum vfu_reset_type { * reset to a known-good initial state (including any PCI register state). */ VFU_RESET_DEVICE, + /* * The vfio-user socket client connection was closed or reset. The attached * context is cleaned up after returning from the reset callback, and * vfu_attach_ctx() must be called to establish a new client. */ - VFU_RESET_LOST_CONN + VFU_RESET_LOST_CONN, + + /* + * Client requested to initiate PCI function level reset. + */ + VFU_RESET_PCI_FLR } vfu_reset_type_t; /* -- cgit v1.1