aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-10-31 20:32:56 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-10-31 20:32:56 +0000
commit2ab6c494339652e69ec405dc779d83c46c8faf98 (patch)
tree90f273aa9c284113945b76552164a3631674feb7
parent5e6464f9c6756c95d036c4acf7ce557a7eb3a7be (diff)
parent546323bdac18984c771ebefae1046ee61742f9ca (diff)
downloadqemu-2ab6c494339652e69ec405dc779d83c46c8faf98.zip
qemu-2ab6c494339652e69ec405dc779d83c46c8faf98.tar.gz
qemu-2ab6c494339652e69ec405dc779d83c46c8faf98.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/modules-20201029-pull-request' into staging
modules: build virtio-gpu-pci & virtio-vga modular. modules: various bugfixes, mostly for macos. # gpg: Signature made Thu 29 Oct 2020 11:09:41 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/modules-20201029-pull-request: modules: turn off lazy binding modules: unbreak them on macos virtio-gpu: only compile virtio-gpu-3d.c for CONFIG_VIRGL=y virtio-gpu: add virtio-vga module virtio-gpu: add virtio-gpu-pci module Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-xconfigure1
-rw-r--r--hw/display/meson.build25
-rw-r--r--hw/display/virtio-gpu-3d.c4
-rw-r--r--util/module.c8
4 files changed, 28 insertions, 10 deletions
diff --git a/configure b/configure
index 83610b0..6df4306 100755
--- a/configure
+++ b/configure
@@ -618,6 +618,7 @@ Darwin)
if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then
cpu="x86_64"
fi
+ HOST_DSOSUF=".dylib"
;;
SunOS)
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
diff --git a/hw/display/meson.build b/hw/display/meson.build
index 0d5ddec..dad3bd2 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -57,15 +57,30 @@ softmmu_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: files('ati.c', 'ati_2d
if config_all_devices.has_key('CONFIG_VIRTIO_GPU')
virtio_gpu_ss = ss.source_set()
virtio_gpu_ss.add(when: 'CONFIG_VIRTIO_GPU',
- if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c', 'virtio-gpu-3d.c'), pixman, virgl])
+ if_true: [files('virtio-gpu-base.c', 'virtio-gpu.c'), pixman, virgl])
+ virtio_gpu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRGL'],
+ if_true: [files('virtio-gpu-3d.c'), pixman, virgl])
virtio_gpu_ss.add(when: 'CONFIG_VHOST_USER_GPU', if_true: files('vhost-user-gpu.c'))
hw_display_modules += {'virtio-gpu': virtio_gpu_ss}
endif
-softmmu_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('virtio-gpu-pci.c'))
-softmmu_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'], if_true: files('vhost-user-gpu-pci.c'))
-softmmu_ss.add(when: 'CONFIG_VIRTIO_VGA', if_true: files('virtio-vga.c'))
-softmmu_ss.add(when: 'CONFIG_VHOST_USER_VGA', if_true: files('vhost-user-vga.c'))
+if config_all_devices.has_key('CONFIG_VIRTIO_PCI')
+ virtio_gpu_pci_ss = ss.source_set()
+ virtio_gpu_pci_ss.add(when: ['CONFIG_VIRTIO_GPU', 'CONFIG_VIRTIO_PCI'],
+ if_true: [files('virtio-gpu-pci.c'), pixman])
+ virtio_gpu_pci_ss.add(when: ['CONFIG_VHOST_USER_GPU', 'CONFIG_VIRTIO_PCI'],
+ if_true: files('vhost-user-gpu-pci.c'))
+ hw_display_modules += {'virtio-gpu-pci': virtio_gpu_pci_ss}
+endif
+
+if config_all_devices.has_key('CONFIG_VIRTIO_VGA')
+ virtio_vga_ss = ss.source_set()
+ virtio_vga_ss.add(when: 'CONFIG_VIRTIO_VGA',
+ if_true: [files('virtio-vga.c'), pixman])
+ virtio_vga_ss.add(when: 'CONFIG_VHOST_USER_VGA',
+ if_true: files('vhost-user-vga.c'))
+ hw_display_modules += {'virtio-vga': virtio_vga_ss}
+endif
specific_ss.add(when: [x11, opengl, 'CONFIG_MILKYMIST_TMU2'], if_true: files('milkymist-tmu2.c'))
specific_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_lcdc.c'))
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index 1bd33d7..0b0c114 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -17,8 +17,6 @@
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-gpu.h"
-#ifdef CONFIG_VIRGL
-
#include <virglrenderer.h>
static struct virgl_renderer_callbacks virtio_gpu_3d_cbs;
@@ -633,5 +631,3 @@ int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g)
return capset2_max_ver ? 2 : 1;
}
-
-#endif /* CONFIG_VIRGL */
diff --git a/util/module.c b/util/module.c
index fe3b82d..c65060c 100644
--- a/util/module.c
+++ b/util/module.c
@@ -132,7 +132,7 @@ static int module_load_file(const char *fname, bool mayfail, bool export_symbols
assert(QTAILQ_EMPTY(&dso_init_list));
- flags = G_MODULE_BIND_LAZY;
+ flags = 0;
if (!export_symbols) {
flags |= G_MODULE_BIND_LOCAL;
}
@@ -301,6 +301,12 @@ static struct {
{ "qxl", "hw-", "display-qxl" },
{ "virtio-gpu-device", "hw-", "display-virtio-gpu" },
{ "vhost-user-gpu", "hw-", "display-virtio-gpu" },
+ { "virtio-gpu-pci-base", "hw-", "display-virtio-gpu-pci" },
+ { "virtio-gpu-pci", "hw-", "display-virtio-gpu-pci" },
+ { "vhost-user-gpu-pci", "hw-", "display-virtio-gpu-pci" },
+ { "virtio-vga-base", "hw-", "display-virtio-vga" },
+ { "virtio-vga", "hw-", "display-virtio-vga" },
+ { "vhost-user-vga", "hw-", "display-virtio-vga" },
{ "chardev-braille", "chardev-", "baum" },
{ "chardev-spicevmc", "chardev-", "spice" },
{ "chardev-spiceport", "chardev-", "spice" },