- Nov 07, 2023
-
-
Marc-André Lureau authored
Those functions require the PIXMAN library. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@linaro.org>
-
- Oct 20, 2023
-
-
Philippe Mathieu-Daudé authored
Access to QemuInputHandlerState::handler are read-only. Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20231017131251.43708-1-philmd@linaro.org>
-
Steve Sistare authored
Pass the callback function to add_migration_state_change_notifier so that migration can initialize the notifier on add and clear it on delete, which simplifies the call sites. Shorten the function names so the extra arg can be added more legibly. Hide the global notifier list in a new function migration_call_notifiers, and make it externally visible so future live update code can call it. No functional change. Signed-off-by:
Steve Sistare <steven.sistare@oracle.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Tested-by:
Michael Galaxy <mgalaxy@akamai.com> Reviewed-by:
Michael Galaxy <mgalaxy@akamai.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <1686148954-250144-1-git-send-email-steven.sistare@oracle.com>
-
Steve Sistare authored
Modify migrate_add_blocker and migrate_del_blocker to take an Error ** reason. This allows migration to own the Error object, so that if an error occurs in migrate_add_blocker, migration code can free the Error and clear the client handle, simplifying client code. It also simplifies the migrate_del_blocker call site. In addition, this is a pre-requisite for a proposed future patch that would add a mode argument to migration requests to support live update, and maintain a list of blockers for each mode. A blocker may apply to a single mode or to multiple modes, and passing Error** will allow one Error object to be registered for multiple modes. No functional change. Signed-off-by:
Steve Sistare <steven.sistare@oracle.com> Tested-by:
Michael Galaxy <mgalaxy@akamai.com> Reviewed-by:
Michael Galaxy <mgalaxy@akamai.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <1697634216-84215-1-git-send-email-steven.sistare@oracle.com>
-
- Oct 19, 2023
-
-
Philippe Mathieu-Daudé authored
Access to QemuInputHandlerState::handler are read-only. Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20231017131251.43708-1-philmd@linaro.org>
-
- Oct 17, 2023
-
-
Paolo Bonzini authored
They are not needed when building user-mode emulators. Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 08, 2023
-
-
Paolo Bonzini authored
Make VNC use the default backend again if one is defined. The recently introduced support for disabling the VNC audio extension is still used, in case no default backend exists. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 06, 2023
-
-
Philippe Mathieu-Daudé authored
Fix: ui/cocoa.m:346:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] QemuCocoaView *cocoaView = userInfo; ^ ui/cocoa.m:342:16: note: previous declaration is here QemuCocoaView *cocoaView; ^ Signed-off-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231004120019.93101-11-philmd@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Oct 03, 2023
-
-
Marc-André Lureau authored
dpy_get_ui_info() shouldn't be called if the underlying GPU doesn't support it. Before the assert() was added and the regression introduced, GTK code used to get "zero" UI info, for ex with a simple VGA device. The assert was added to prevent from calling when there are no console too. The other display backend that calls dpy_get_ui_info() correctly checks that pre-condition. Calling dpy_set_ui_info() is "safe" in this case, it will simply return an error that can be generally ignored. Fixes: commit a92e7bb4 ("ui: add precondition for dpy_get_ui_info()") Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
Ken Xue authored
Android uses XBGR8888 and ABGR8888 as default scanout buffer, But qemu does not support them for qemu_pixman_to_drm_format conversion within virtio_gpu_create_dmabuf for virtio gpu. so, add those 2 formats into drm_format_pixman_map. Signed-off-by:
Ken Xue <Ken.Xue@amd.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20230914013151.805363-1-Ken.Xue@amd.com>
-
Laszlo Ersek authored
qemu_graphic_console_is_multihead() declares the graphical console "c" a "multihead" console if there are two different graphical consoles in the system that (a) both reference "c->device", and (b) have different "c->head" numbers. In effect, if at least two graphical consoles exist that are different heads of the same device that underlies "c". In fact, "c" may be one of these two graphical consoles, or "c" may differ from both of those consoles (in case "c->device" has at least three heads). The loop currently uses this awkward "two different consoles" approach because the function used not to have access to "c", only to "c->device", which didn't allow for fetching (and comparing) "c->head". But, we've changed that in the last patch; we now pass all of "c" to qemu_graphic_console_is_multihead(). Thus, look for the *first* (and possibly *only*) graphical console, if any, that refers to the same "device" as "c", but by a different "head" number. Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kraxel@redhat.com> (odd fixer:Graphics) Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20230913144959.41891-5-lersek@redhat.com>
-
Laszlo Ersek authored
According to Marc-André's and Gerd's descriptions, the "device" and "head" members of QemuGraphicConsole are exposed as QOM properties for two purposes: (1) Introspection (e.g., "qom-get" monitor command). (2) A VNC server can display a specific device + head. This lets us run a multihead configuration by using multiple VNC servers (one for each head). Further, we can link input devices to device + head, so input events are routed to different devices dependent on where they are coming from. Which is most useful for tablet devices in a VNC multihead setup, each head has its own tablet device then. This does requires manual guest-side configuration, for establishing the same tablet <-> head relationship. However, neither goal seems to justify the complicated QOM property lookup that's internal to qemu_console_is_multihead(). Rework qemu_console_is_multihead() with plain old C language field accesses. Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kraxel@redhat.com> (odd fixer:Graphics) Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20230913144959.41891-4-lersek@redhat.com>
-
Laszlo Ersek authored
qemu_console_is_multihead() declares the console "c" a "multihead" console if there are two different consoles in the system that (a) both reference "c->device", and (b) have different "c->head" numbers. In effect, if at least two consoles exist that are different heads of the same device that underlies "c". Commit 58d58708 ("ui/console: move graphic fields to QemuGraphicConsole", 2023-09-04) pushed the "device" and "head" members from the QemuConsole base class down to the QemuGraphicConsole subclass, adjusting the referring QOM properties accordingly as well. As a result, the "device" property lookup in qemu_console_is_multihead() now crashes, in case the candidate console being investigated for criterion (a) is not a QemuGraphicConsole instance: > Unexpected error in object_property_find_err() at qom/object.c:1314: > qemu: Property 'qemu-fixed-text-console.device' not found > Aborted (core dumped) This is effectively an unchecked downcast. Make it checked: only consider such console candidates that are themselves QemuGraphicConsole instances. Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kraxel@redhat.com> (odd fixer:Graphics) Fixes: 58d58708 Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20230913144959.41891-3-lersek@redhat.com>
-
Laszlo Ersek authored
qemu_console_is_multihead() is only called from within "ui/console.c"; make it static. Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kraxel@redhat.com> (odd fixer:Graphics) Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20230913144959.41891-2-lersek@redhat.com>
-
Akihiko Odaki authored
Although an input is routed depending on the console, qemu_input_is_absolute() had no mechanism to specify the console. Accept QemuConsole as an argument for qemu_input_is_absolute, and let the display know the absolute/relative state for a particular console. Signed-off-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230921082936.28100-1-akihiko.odaki@daynix.com>
-
Paolo Bonzini authored
Remove duplicate error formatting code. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
If there is no audiodev do not send the audio ack in response to VNC_ENCODING_AUDIO, so that clients aren't told audio exists, and immediately drop the client if they try to send any audio control messages when audio is not advertised. Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 29, 2023
-
-
Markus Armbruster authored
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-ID: <20230921121312.1301864-4-armbru@redhat.com>
-
- Sep 25, 2023
-
-
Paolo Bonzini authored
VNC_FEATURE_XVP was not shifted left before adding it to vs->features, so it was never enabled; but it was also checked the wrong way with a logical AND instead of vnc_has_feature. Fix both places. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The debug message was cut and pasted from the invalid audio format case, but the audio message is at bytes 2-3. Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 12, 2023
-
-
Marc-André Lureau authored
Ensure that it only get called when dpy_ui_info_supported(). The function should always return a result. There should be a non-null console or active_console. Modify the argument to be const as well. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Albert Esteve <aesteve@redhat.com>
-
Marc-André Lureau authored
Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x0000555555888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812 812 return con->hw_ops->ui_info != NULL; (gdb) bt #0 0x0000555555888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812 #1 0x00005555558a44b1 in protocol_client_msg (vs=0x5555578c76c0, data=0x5555581e93f0 <incomplete sequence \373>, len=24) at ../ui/vnc.c:2585 #2 0x00005555558a19ac in vnc_client_read (vs=0x5555578c76c0) at ../ui/vnc.c:1607 #3 0x00005555558a1ac2 in vnc_client_io (ioc=0x5555581eb0e0, condition=G_IO_IN, opaque=0x5555578c76c0) at ../ui/vnc.c:1635 Fixes: https://issues.redhat.com/browse/RHEL-2600 Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Albert Esteve <aesteve@redhat.com>
-
Marc-André Lureau authored
Move common declarations to console-priv.h, and add a new unit console-vc.c which will handle VC/chardev rendering, when pixman is available. (if necessary, the move could be done chunk by chunks) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Marc-André Lureau authored
Those changes will help to split console.c unit in the following commit. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Marc-André Lureau authored
It's already part of PIXMAN image. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Marc-André Lureau authored
They are QemuTextConsole functions, let's make it clear. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
Marc-André Lureau authored
The function calls to `kbd_put_keysym` have been updated to now call `kbd_put_keysym_console` with a NULL console parameter. Like most console functions, NULL argument is now for the active console. This will allow to rename the text console functions in a consistent manner. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
- Sep 04, 2023
-
-
Dmitry Frolov authored
It is true, that there is no problem during runtime from the first sight, because the memory is lost just before qemu exits. Nevertheless, this change is necessary, because AddressSanitizer is not able to recognize this situation and produces crash-report (which is false-positive in fact). Lots of False-Positive warnings are davaluing problems, found with fuzzing, and thus the whole methodology of dynamic analysis. This patch eliminates such False-Positive reports, and makes every problem, found with fuzzing, more valuable. Fixes: 060ab763 ("gtk: don't exit early in case gtk init fails") Signed-off-by:
Dmitry Frolov <frolov@swemel.ru> Reviewed-by:
Michael Tokarev <mjt@tls.msk.ru> Message-Id: <20230825115818.1091936-1-frolov@swemel.ru>
-
Guoyi Tu authored
Input handler resource should be released when VDAgentChardev object finalize Signed-off-by:
Guoyi Tu <tugy@chinatelecom.cn> Signed-off-by:
dengpengcheng <dengpc12@chinatelecom.cn> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <e7f5e172abf797d454e00a4bbe53af83e4aa4497.1692281173.git.tugy@chinatelecom.cn>
-
Guoyi Tu authored
when the agent connection is lost, the input handler of the mouse doesn't deactivate, which results in unresponsive mouse events in VNC windows. To fix this issue, call vdagent_disconnect() to reset the state each time the frontend disconncect Signed-off-by:
Guoyi Tu <tugy@chinatelecom.cn> Signed-off-by:
dengpengcheng <dengpc12@chinatelecom.cn> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <71fd5a58fd09f10cdb35f167b2edb5669300116e.1692281173.git.tugy@chinatelecom.cn>
-
Bilal Elmoussaoui authored
Currently, when using `-display dbus,gl=on` all updates to the client become "full scanout" updates, meaning there is no way for the client to limit damage regions to the display server. Instead of using an "update count", this patch tracks the damage region and propagates it to the client. This was less of an issue when clients were using GtkGLArea for rendering, as you'd be doing full-surface redraw. To be efficient, the client needs both a DMA-BUF and the damage region to be updated. Co-authored-by:
Christian Hergert <chergert@redhat.com> Signed-off-by:
Bilal Elmoussaoui <belmouss@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230814125802.102160-1-belmouss@redhat.com>
-
Bilal Elmoussaoui authored
Fixes: 142ca628 ("ui: add a D-Bus display backend") Fixes: de9f844c ("ui/dbus: Expose a touch device interface") Signed-off-by:
Bilal Elmoussaoui <belmouss@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230901124507.94087-1-belmouss@redhat.com>
-
Philippe Mathieu-Daudé authored
Use autofree heap allocation instead of variable-length array on the stack. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> [PMM: expanded commit message] Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Francisco Iglesias <frasse.iglesias@gmail.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230818151057.1541189-4-peter.maydell@linaro.org>
-
Peter Maydell authored
In the send_hextile_tile_* function we create a variable length array data[]. In fact we know that the client_pf.bytes_per_pixel is at most 4 (enforced by set_pixel_format()), so we can make the array a compile-time fixed length of 1536 bytes. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> [ Marc-André - rename BPP to MAX_BYTES_PER_PIXEL ] Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230818151057.1541189-3-peter.maydell@linaro.org>
-
Peter Maydell authored
Use an autofree heap allocation instead of a variable-length array on the stack in qemu_spice_create_update(). The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. This is a defensive measure against security bugs where an on-stack dynamic allocation isn't correctly size-checked (e.g. CVE-2021-3527). Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230818151057.1541189-2-peter.maydell@linaro.org>
-
Marc-André Lureau authored
Those functions are specifc to text/vc console, make that explicit from the argument type. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-45-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
In commit 6f974c84 ("gtk: overwrite the console.c char driver"), I shared the VC console parse handler with GTK. And later on in commit d8aec9d9 ("display: add -display spice-app launching a Spice client"), I also used it to handle spice-app VC. This is not necessary, the VC console options (width/height/cols/rows) are specific, and unused by tty-level GTK/Spice VC. This is not a breaking change, as those options are still being parsed by QAPI ChardevVC. Adjust the documentation about it. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-44-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
This will allow to split the VC code in a separate unit more easily. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-43-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-42-marcandre.lureau@redhat.com>
-
Marc-André Lureau authored
This function is called on invalidate, on each cursor blink. Avoid the extra copy when the console size didn't change. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-41-marcandre.lureau@redhat.com>
-