libvfio-user: update submodule

This update will stop using `struct vfio_device_info` from
<linux/vfio.h>.

Fix issue #1922.

Change-Id: Ia7ad745db8d7ed8f5248ca13e3188ebd540b0e40
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7831
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Changpeng Liu 2021-05-07 17:48:20 +08:00 committed by Tomasz Zawadzki
parent 78a794b9a3
commit 55189bee6b
5 changed files with 14 additions and 5 deletions

View File

@ -81,6 +81,14 @@ struct vfio_user_version {
uint8_t data[];
} __attribute__((packed));
struct vfio_user_device_info {
uint32_t argsz;
/* VFIO_DEVICE_FLAGS_* */
uint32_t flags;
uint32_t num_regions;
uint32_t num_irqs;
} __attribute__((packed));
struct vfio_user_dma_region {
uint64_t addr;
uint64_t size;

View File

@ -285,10 +285,10 @@ vfio_user_get_dev_region_info(struct vfio_device *dev, struct vfio_region_info *
}
int
vfio_user_get_dev_info(struct vfio_device *dev, struct vfio_device_info *dev_info,
vfio_user_get_dev_info(struct vfio_device *dev, struct vfio_user_device_info *dev_info,
size_t buf_len)
{
dev_info->argsz = sizeof(struct vfio_device_info);
dev_info->argsz = sizeof(struct vfio_user_device_info);
return vfio_user_dev_send_request(dev, VFIO_USER_DEVICE_GET_INFO,
dev_info, dev_info->argsz, buf_len, NULL, 0);
}

View File

@ -34,6 +34,7 @@
#define _VFIO_INTERNAL_H
#include <linux/vfio.h>
#include "spdk/vfio_user_spec.h"
#define VFIO_USER_MAJOR_VER 0
#define VFIO_USER_MINOR_VER 1
@ -85,7 +86,7 @@ struct vfio_device {
};
int vfio_user_dev_setup(struct vfio_device *dev);
int vfio_user_get_dev_info(struct vfio_device *dev, struct vfio_device_info *dev_info,
int vfio_user_get_dev_info(struct vfio_device *dev, struct vfio_user_device_info *dev_info,
size_t buf_len);
int vfio_user_get_dev_region_info(struct vfio_device *dev, struct vfio_region_info *region_info,
size_t buf_len, int *fds, int num_fds);

View File

@ -369,7 +369,7 @@ spdk_vfio_user_setup(const char *path)
{
int ret;
struct vfio_device *device = NULL;
struct vfio_device_info dev_info = {};
struct vfio_user_device_info dev_info = {};
device = calloc(1, sizeof(*device));
if (!device) {

@ -1 +1 @@
Subproject commit 3acb97477f261bf11c866b5764deabe693607bc3
Subproject commit 702a4cad49c40406ff498e0da4a80c6d07b4fc83