summaryrefslogtreecommitdiffstats
path: root/contrib/vhost-user-gpu
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/vhost-user-gpu')
-rw-r--r--contrib/vhost-user-gpu/meson.build3
-rw-r--r--contrib/vhost-user-gpu/vhost-user-gpu.c4
-rw-r--r--contrib/vhost-user-gpu/vugpu.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/meson.build
index c487ca72c1..2fc2320b52 100644
--- a/contrib/vhost-user-gpu/meson.build
+++ b/contrib/vhost-user-gpu/meson.build
@@ -2,8 +2,7 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \
and 'CONFIG_GBM' in config_host and 'CONFIG_LINUX' in config_host \
and pixman.found()
executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm.c'),
- link_with: libvhost_user,
- dependencies: [qemuutil, pixman, gbm, virgl],
+ dependencies: [qemuutil, pixman, gbm, virgl, vhost_user],
install: true,
install_dir: get_option('libexecdir'))
diff --git a/contrib/vhost-user-gpu/vhost-user-gpu.c b/contrib/vhost-user-gpu/vhost-user-gpu.c
index a019d0a9ac..f445ef28ec 100644
--- a/contrib/vhost-user-gpu/vhost-user-gpu.c
+++ b/contrib/vhost-user-gpu/vhost-user-gpu.c
@@ -1044,7 +1044,9 @@ vg_get_config(VuDev *dev, uint8_t *config, uint32_t len)
{
VuGpu *g = container_of(dev, VuGpu, dev.parent);
- g_return_val_if_fail(len <= sizeof(struct virtio_gpu_config), -1);
+ if (len > sizeof(struct virtio_gpu_config)) {
+ return -1;
+ }
if (opt_virgl) {
g->virtio_config.num_capsets = vg_virgl_get_num_capsets();
diff --git a/contrib/vhost-user-gpu/vugpu.h b/contrib/vhost-user-gpu/vugpu.h
index 3153c9a6de..bdf9a74b46 100644
--- a/contrib/vhost-user-gpu/vugpu.h
+++ b/contrib/vhost-user-gpu/vugpu.h
@@ -17,7 +17,7 @@
#include "qemu/osdep.h"
-#include "contrib/libvhost-user/libvhost-user-glib.h"
+#include "libvhost-user-glib.h"
#include "standard-headers/linux/virtio_gpu.h"
#include "qemu/queue.h"