- Sep 04, 2020
-
-
Philippe Mathieu-Daudé authored
Nikola reported on Windows when gd_vc_gfx_init() is called, the window is not yet realized, so we run gd_refresh_rate_millihz(NULL) which returns 0 milli-Hertz. When a Widget is realized, it fires a 'realized' event. We already have the gd_draw_event() handler registered for this even, so simply move the gd_refresh_rate_millihz() there. When the event fires, the window is known to exist. This completes commit c4c00922 original intention. Reported-by:
Nikola Pavlica <pavlica.nikola@gmail.com> Tested-by:
Nikola Pavlica <pavlica.nikola@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200817172331.598255-1-philmd@redhat.com Suggested-by:
Nikola Pavlica <pavlica.nikola@gmail.com> Tested-by:
Nikola Pavlica <pavlica.nikola@gmail.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Frediano Ziglio authored
Add support for SIDE and EXTRA buttons. The constants for buttons in both SPICE and QEMU are defined as LEFT MIDDLE RIGHT UP DOWN SIDE EXTRA (same order). "button_mask" contains for each bit the state of a button. Qemu currently uses bits 0, 1, 2 respectively as LEFT, RIGHT, MIDDLE; also add bits 4 and 5 as UP and DOWN (using wheel movements). SPICE protocol uses a bitmask based on the order above where LEFT is bit 0, MIDDLE is bit 1 and so on till EXTRA being bit 6. To avoid clash with Qemu usage SPICE bitmask from SIDE are move a bit more resulting respectively in 0x40 and 0x80 values. Signed-off-by:
Frediano Ziglio <freddy77@gmail.com> Message-id: 20200820145851.50846-1-fziglio@redhat.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Pan Nengyuan authored
'addr' is forgot to free in vnc_socket_ip_addr_string error path. Fix that. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Pan Nengyuan <pannengyuan@huawei.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Message-Id: <20200831134315.1221-11-pannengyuan@huawei.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Pan Nengyuan authored
Receiving error in local variable err, and forgot to free it. This patch check the return value of 'gdk_window_create_gl_context' and 'gdk_gl_context_realize', then free err to fix it. Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Pan Nengyuan <pannengyuan@huawei.com> Message-Id: <20200831134315.1221-6-pannengyuan@huawei.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- Sep 01, 2020
-
-
Paolo Bonzini authored
Pixman used to be included directly in QEMU_CFLAGS and therefore the include path was added to every compiler invocation. Now that (just like basically everything else) it is a separate dependency, we need to add it to all build target, especially UI modules that need it due to their including ui/console.h. Reported-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Liao Pingfang authored
Remove the superfluous break, as there is a "return" before. Signed-off-by:
Liao Pingfang <liao.pingfang@zte.com.cn>a> Signed-off-by:
Yi Wang <wang.yi59@zte.com.cn> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Message-Id: <1594631086-36509-1-git-send-email-wang.yi59@zte.com.cn> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826130622.553318-5-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20200826130622.553318-4-marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 27, 2020
-
-
Mark Cave-Ayland authored
Prevously CONFIG_VTE was not required to build QEMU with GTK UI support as not all platforms have VTE available (in particular Windows). Remove this requirement from the meson build system to enable QEMU to be built with GTK UI support for Windows once again. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
When pixman is not installed (or too old), but virglrenderer is available and "configure" has been run with "--disable-system", the build currently aborts when trying to compile vhost-user-gpu (since it requires pixman). Let's skip the build of vhost-user-gpu when pixman is not installed or too old. Instead of adding CONFIG_PIXMAN, it is simpler to move the detection to pixman. Based on a patch by Thomas Huth. <thuth@redhat.com> Fixes: 9b52b17b ("configure: Allow to build tools without pixman") Reported-by:
Rafael Kitover <rkitover@gmail.com> Reported-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Aug 25, 2020
-
-
Laurent Vivier authored
Signed-off-by:
Laurent Vivier <laurent@vivier.eu> Message-id: 20200824152430.1844159-2-laurent@vivier.eu Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- Aug 21, 2020
-
-
Marc-André Lureau authored
Note that sl and sv keymaps were not created by qemu-keymap. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
With Makefiles that have automatically generated dependencies, you generated includes are set as dependencies of the Makefile, so that they are built before everything else and they are available when first building the .c files. Alternatively you can use a fine-grained dependency, e.g. target/arm/translate.o: target/arm/decode-neon-shared.inc.c With Meson you have only one choice and it is a third option, namely "build at the beginning of the corresponding target"; the way you express it is to list the includes in the sources of that target. The problem is that Meson decides if something is a source vs. a generated include by looking at the extension: '.c', '.cc', '.m', '.C' are sources, while everything else is considered an include---including '.inc.c'. Use '.c.inc' to avoid this, as it is consistent with our other convention of using '.rst.inc' for included reStructuredText files. The editorconfig file is adjusted. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Meson doesn't enjoy the same flexibility we have with Make in choosing the include path. In particular the tracing headers are using $(build_root)/$(<D). In order to keep the include directives unchanged, the simplest solution is to generate headers with patterns like "trace/trace-audio.h" and place forwarding headers in the source tree such that for example "audio/trace.h" includes "trace/trace-audio.h". This patch is too ugly to be applied to the Makefiles now. It's only a way to separate the changes to the tracing header files from the Meson rewrite of the tracing logic. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 13, 2020
-
-
Gerd Hoffmann authored
In case the string doesn't fit into the buffer snprintf returns the size it would need, so len can be larger than the buffer. Fix this by simply using g_strdup_printf() instead of a static buffer. Reported-by:
Wenxiang Qian <leonwxqian@gmail.com> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Message-id: 20200701181801.27935-1-kraxel@redhat.com
-
Thomas Huth authored
GCC supports "#pragma GCC diagnostic" since version 4.6, and Clang seems to support it, too, since its early versions 3.x. That means that our minimum required compiler versions all support this pragma already and we can remove the test from configure and all the related #ifdefs in the code. Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200710045515.25986-1-thuth@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Jul 10, 2020
-
-
Claudio Fontana authored
move the vcpu throttling functionality into its own module. This functionality is not specific to any accelerator, and it is used currently by migration to slow down guests to try to have migrations converge, and by the cocoa MacOS UI to throttle speed. cpu-throttle contains the controls to adjust and inspect throttle settings, start (set) and stop vcpu throttling, and the throttling function itself that is run periodically on vcpus to make them take a nap. Execution of the throttling function on all vcpus is triggered by a timer, registered at module initialization. No functionality change. Signed-off-by:
Claudio Fontana <cfontana@suse.de> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Message-Id: <20200629093504.3228-3-cfontana@suse.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Markus Armbruster authored
The object_property_set_FOO() setters take property name and value in an unusual order: void object_property_set_FOO(Object *obj, FOO_TYPE value, const char *name, Error **errp) Having to pass value before name feels grating. Swap them. Same for object_property_set(), object_property_get(), and object_property_parse(). Convert callers with this Coccinelle script: @@ identifier fun = { object_property_get, object_property_parse, object_property_set_str, object_property_set_link, object_property_set_bool, object_property_set_int, object_property_set_uint, object_property_set, object_property_set_qobject }; expression obj, v, name, errp; @@ - fun(obj, v, name, errp) + fun(obj, name, v, errp) Chokes on hw/arm/musicpal.c's lcd_refresh() with the unhelpful error message "no position information". Convert that one manually. Fails to convert hw/arm/armsse.c, because Coccinelle gets confused by ARMSSE being used both as typedef and function-like macro there. Convert manually. Fails to convert hw/rx/rx-gdbsim.c, because Coccinelle gets confused by RXCPU being used both as typedef and function-like macro there. Convert manually. The other files using RXCPU that way don't need conversion. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200707160613.848843-27-armbru@redhat.com> [Straightforwad conflict with commit 2336172d "audio: set default value for pcspk.iobase property" resolved]
-
Markus Armbruster authored
Pass &error_abort instead of NULL where the returned value is dereferenced or asserted to be non-null. Drop a now redundant assertion. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200707160613.848843-24-armbru@redhat.com>
-
- Jul 02, 2020
-
-
Markus Armbruster authored
vnc_display_print_local_addr() leaks the Error object when qio_channel_socket_get_local_address() fails. Seems unlikely. Called when we create a VNC display with vnc_display_open(). Plug the leak by passing NULL to ignore the error. Cc: Daniel P. Berrange <berrange@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20200630090351.1247703-12-armbru@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Markus Armbruster authored
Receiving the error in a local variable only to free it is less clear (and also less efficient) than passing NULL. Clean up. Cc: Daniel P. Berrange <berrange@redhat.com> Cc: Jerome Forissier <jerome@forissier.org> CC: Greg Kurz <groug@kaod.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Greg Kurz <groug@kaod.org> Message-Id: <20200630090351.1247703-4-armbru@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- May 26, 2020
-
-
Philippe Mathieu-Daudé authored
The buffer is the captured input to pass to backends. As we should not modify it, mark the argument const. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200505132603.8575-3-f4bug@amsat.org> Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- May 19, 2020
-
-
Volker Rümelin authored
Based on a mail on the qemu-devel mailing list at https://lists.nongnu.org/archive/html/qemu-devel/2020-05/msg02909.html and some internet research the GTK3 versions on supported platforms are: RHEL-7.4: 3.22.10 RHEL-7.5: 3.22.26 Debian (Stretch): 3.22.11 Debian (Buster): 3.24.5 OpenBSD (Ports): 3.22.30 FreeBSD (Ports): 3.22.29 OpenSUSE Leap 15: 3.22.30 SLE12-SP2: Unknown SLE15: 3.22.30 Ubuntu (Bionic): 3.22.30 Ubuntu (Focal): 3.24.18 macOS (Homebrew): 3.22.30 This justifies increasing the minimum required GTK version in QEMU to 3.22.0. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-11-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
Since GTK 3.22 the function gdk_event_get_scancode() is available. On Windows this function returns keyboard scancodes and some extended flags. These raw keyboard scancodes are much better suited for this use case than the half-cooked win32 virtual-key codes because scancodes report the key position on the keyboard and the positions are independent of national language settings. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-10-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
Without keyboard grab Windows currently handles the two win keys and the key events are also sent to the guest. This is undesir- able. Only one program should handle key events. This patch ap- plies commit c68f74b02e "win32: do not handle win keys when the keyboard is not grabbed" from project spice-gtk to ui/gtk.c to fix this problem. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-9-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-8-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
QEMU with SDL 1.2 display used to enable keyboard and mouse grab- bing when started in full screen. The SDL 2.0 code tries to do the same but fails to enable grabbing because sdl_grab_start(0) returns early. To do it's work the sdl_grab_start() function needs a pointer to a sdl2_console structure. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-7-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-6-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
Since the removal of GTK2 code in commit 89d85cde the code around ignore_keys is unused. See commit 1a01716a "gtk: Avoid accel key leakage into guest on console switch" why it was only needed for GTK2. Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-5-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
This code was last used before commit 2ec78706 "ui: convert GTK and SDL1 frontends to keycodemapdb". Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-4-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
There is no way to grab the Ctrl-Alt-Del key combination on Windows. This key combination will leave all three keys in a stuck condition. This patch uses the grab-broken-event to release the keys. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-3-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-2-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
Volker Rümelin authored
Import win32 keyboard hooking code from project spice-gtk. This patch removes the extra left control key up/down input events inserted by Windows for the right alt key up/down input events with international keyboard layouts. Additionally there's some code to grab the keyboard. The next patches will use this code. Only Windows needs this. Signed-off-by:
Volker Rümelin <vr_qemu@t-online.de> Message-id: 20200516072014.7766-1-vr_qemu@t-online.de Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- May 15, 2020
-
-
Markus Armbruster authored
The only way object_property_add() can fail is when a property with the same name already exists. Since our property names are all hardcoded, failure is a programming error, and the appropriate way to handle it is passing &error_abort. Same for its variants, except for object_property_add_child(), which additionally fails when the child already has a parent. Parentage is also under program control, so this is a programming error, too. We have a bit over 500 callers. Almost half of them pass &error_abort, slightly fewer ignore errors, one test case handles errors, and the remaining few callers pass them to their own callers. The previous few commits demonstrated once again that ignoring programming errors is a bad idea. Of the few ones that pass on errors, several violate the Error API. The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. ich9_pm_add_properties(), sparc32_ledma_realize(), sparc32_dma_realize(), xilinx_axidma_realize(), xilinx_enet_realize() are wrong that way. When the one appropriate choice of argument is &error_abort, letting users pick the argument is a bad idea. Drop parameter @errp and assert the preconditions instead. There's one exception to "duplicate property name is a programming error": the way object_property_add() implements the magic (and undocumented) "automatic arrayification". Don't drop @errp there. Instead, rename object_property_add() to object_property_try_add(), and add the obvious wrapper object_property_add(). Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200505152926.18877-15-armbru@redhat.com> [Two semantic rebase conflicts resolved]
-
- May 14, 2020
-
-
Changbin Du authored
I found SDL_GetWindowFromID() sometimes return NULL when I start qemu via ssh forwarding even the window has been crated already. I am not sure whether this is a bug of SDL, but we'd better check it carefully. Signed-off-by:
Changbin Du <changbin.du@gmail.com> Message-id: 20200427132412.17909-1-changbin.du@gmail.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-