diff options
author | Swapnil Ingle <swapnil.ingle@nutanix.com> | 2020-10-07 12:04:08 -0400 |
---|---|---|
committer | Swapnil Ingle <swapnil.ingle@nutanix.com> | 2020-10-07 12:05:25 -0400 |
commit | e699304cbb97f5ac8fa47ded20d41c37e76ab512 (patch) | |
tree | 22d0712f73ffbda718188a34d2871e93f6069114 /samples/client.c | |
parent | 31a8d4d52088e8c3e7407c9904bf47a978e5da20 (diff) | |
download | libvfio-user-e699304cbb97f5ac8fa47ded20d41c37e76ab512.zip libvfio-user-e699304cbb97f5ac8fa47ded20d41c37e76ab512.tar.gz libvfio-user-e699304cbb97f5ac8fa47ded20d41c37e76ab512.tar.bz2 |
client, server changes for VFIO_USER_DEVICE_RESET
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'samples/client.c')
-rw-r--r-- | samples/client.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/samples/client.c b/samples/client.c index 55e9006..bc0235e 100644 --- a/samples/client.c +++ b/samples/client.c @@ -105,6 +105,15 @@ out: } static int +send_device_reset(int sock) +{ + int ret, msg_id = 1; + + return send_recv_vfio_user_msg(sock, msg_id, VFIO_USER_DEVICE_RESET, + NULL, 0, NULL, 0, NULL, NULL, 0); +} + +static int get_device_region_info(int sock, struct vfio_device_info *client_dev_info) { struct vfio_region_info region_info; @@ -477,6 +486,12 @@ int main(int argc, char *argv[]) return ret; } + /* XXX VFIO_USER_DEVICE_RESET */ + ret = send_device_reset(sock); + if (ret < 0) { + return ret; + } + /* * XXX VFIO_USER_DMA_MAP * |