diff options
Diffstat (limited to 'subprojects/libvhost-user/libvhost-user.c')
| -rw-r--r-- | subprojects/libvhost-user/libvhost-user.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c index 0200b78e8e..8fb61e2df2 100644 --- a/subprojects/libvhost-user/libvhost-user.c +++ b/subprojects/libvhost-user/libvhost-user.c @@ -32,6 +32,12 @@ #include <sys/mman.h> #include <endian.h> +/* Necessary to provide VIRTIO_F_VERSION_1 on system + * with older linux headers. Must appear before + * <linux/vhost.h> below. + */ +#include "standard-headers/linux/virtio_config.h" + #if defined(__linux__) #include <sys/syscall.h> #include <fcntl.h> @@ -2455,6 +2461,16 @@ void vu_queue_notify_sync(VuDev *dev, VuVirtq *vq) _vu_queue_notify(dev, vq, true); } +void vu_config_change_msg(VuDev *dev) +{ + VhostUserMsg vmsg = { + .request = VHOST_USER_BACKEND_CONFIG_CHANGE_MSG, + .flags = VHOST_USER_VERSION, + }; + + vu_message_write(dev, dev->slave_fd, &vmsg); +} + static inline void vring_used_flags_set_bit(VuVirtq *vq, int mask) { |