From 9dcafa400e57d75f77c67151ff57508065651dd8 Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 5 Jan 2022 13:49:37 +0000 Subject: spice: Update QXLInterface for spice >= 0.15.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit spice updated the spelling (and arguments) of "attache_worker" in 0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations compilations from reporting build errors. See also: https://gitlab.freedesktop.org/spice/spice/-/commit/974692bda1e77af92b71ed43b022439448492cb9 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: John Snow Signed-off-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Message-Id: <20211215141949.3512719-3-berrange@redhat.com> Message-Id: <20220105135009.1584676-3-alex.bennee@linaro.org> --- include/ui/qemu-spice.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h index 71ecd6c..21fe195 100644 --- a/include/ui/qemu-spice.h +++ b/include/ui/qemu-spice.h @@ -40,6 +40,12 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port, #define SPICE_NEEDS_SET_MM_TIME 0 #endif +#if defined(SPICE_SERVER_VERSION) && (SPICE_SERVER_VERSION >= 0x000f00) +#define SPICE_HAS_ATTACHED_WORKER 1 +#else +#define SPICE_HAS_ATTACHED_WORKER 0 +#endif + #else /* CONFIG_SPICE */ #include "qemu/error-report.h" -- cgit v1.1 From 021e3fa33b57612fd0e1a6b7ced23d3480cfbdca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 5 Jan 2022 13:49:39 +0000 Subject: ui: avoid warnings about directdb on Alpine / musl libc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Alpine, SDL is built with directfb support and this triggers warnings during QEMU build In file included from /usr/include/directfb/direct/thread.h:38, from /usr/include/directfb/direct/debug.h:43, from /usr/include/directfb/direct/interface.h:36, from /usr/include/directfb/directfb.h:49, from /usr/include/SDL2/SDL_syswm.h:80, from /builds/berrange/qemu/include/ui/sdl2.h:8, from ../ui/sdl2-gl.c:31: /usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls] 41 | DirectResult DIRECT_API direct_waitqueue_init ( DirectWaitQueue *queue ); | ^~~~~~~~~~~~~~~~~~~~~ Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé Signed-off-by: Alex Bennée Message-Id: <20211215141949.3512719-5-berrange@redhat.com> Message-Id: <20220105135009.1584676-5-alex.bennee@linaro.org> --- include/ui/sdl2.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/ui/sdl2.h b/include/ui/sdl2.h index 71bcf7e..8fb7e08 100644 --- a/include/ui/sdl2.h +++ b/include/ui/sdl2.h @@ -5,7 +5,18 @@ #undef WIN32_LEAN_AND_MEAN #include + +/* with Alpine / muslc SDL headers pull in directfb headers + * which in turn trigger warning about redundant decls for + * direct_waitqueue_deinit. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wredundant-decls" + #include + +#pragma GCC diagnostic pop + #ifdef CONFIG_SDL_IMAGE # include #endif -- cgit v1.1 From 33973e1e1f88b7588fe9629645e279ff2c6ca1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 5 Jan 2022 13:49:56 +0000 Subject: hw/arm: add control knob to disable kaslr_seed via DTB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generally a guest needs an external source of randomness to properly enable things like address space randomisation. However in a trusted boot environment where the firmware will cryptographically verify components having random data in the DTB will cause verification to fail. Add a control knob so we can prevent this being added to the system DTB. Signed-off-by: Alex Bennée Tested-by: Heinrich Schuchardt Acked-by: Ilias Apalodimas Acked-by: Jerome Forissier Reviewed-by: Andrew Jones Message-Id: <20220105135009.1584676-22-alex.bennee@linaro.org> --- include/hw/arm/virt.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index dc6b66f..be05346 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -148,6 +148,7 @@ struct VirtMachineState { bool virt; bool ras; bool mte; + bool dtb_kaslr_seed; OnOffAuto acpi; VirtGICType gic_version; VirtIOMMUType iommu; -- cgit v1.1 From 3918fe16b0f8c6657928a14f41b7ff50061e33e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Wed, 5 Jan 2022 13:49:59 +0000 Subject: docs/devel: more documentation on the use of suffixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using _qemu is a little confusing. Let's use _compat for these sorts of things. We should also mention _impl which is another common suffix in the code base. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220105135009.1584676-25-alex.bennee@linaro.org> --- include/glib-compat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/glib-compat.h b/include/glib-compat.h index 8d01a8c..3113a7d 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -46,9 +46,9 @@ * int g_foo(const char *wibble) * * We must define a static inline function with the same signature that does - * what we need, but with a "_qemu" suffix e.g. + * what we need, but with a "_compat" suffix e.g. * - * static inline void g_foo_qemu(const char *wibble) + * static inline void g_foo_compat(const char *wibble) * { * #if GLIB_CHECK_VERSION(X, Y, 0) * g_foo(wibble) @@ -61,7 +61,7 @@ * ensuring this wrapper function impl doesn't trigger the compiler warning * about using too new glib APIs. Finally we can do * - * #define g_foo(a) g_foo_qemu(a) + * #define g_foo(a) g_foo_compat(a) * * So now the code elsewhere in QEMU, which *does* have the * -Wdeprecated-declarations warning active, can call g_foo(...) as normal, -- cgit v1.1