]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: Add missing libxl__virtio_devtype to device_type_tbl array
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Fri, 28 Jul 2023 07:41:05 +0000 (09:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 28 Jul 2023 07:41:05 +0000 (09:41 +0200)
Without it being present it won't be possible to use some
libxl__device_type's callbacks for virtio devices as the common code
can only invoke these callbacks (by dereferencing a pointer) for valid
libxl__device_type's elements when iterating over device_type_tbl[].

Please note, there is no issue within current the code base as virtio
devices don't use callbacks that depend on libxl__virtio_devtype
presence in device_type_tbl[]. The issue will appear as soon as we start
using these callbacks (for example, dm_needed).

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
tools/libs/light/libxl_create.c

index 393c5355797bf593eb3f4b452d2fccc341442b66..c91059d713091a8282c3f0c439f3bd2c1e69d28b 100644 (file)
@@ -1887,6 +1887,7 @@ const libxl__device_type *device_type_tbl[] = {
     &libxl__dtdev_devtype,
     &libxl__vdispl_devtype,
     &libxl__vsnd_devtype,
+    &libxl__virtio_devtype,
     NULL
 };