summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
* hmp: fix sendkey out of bounds write (CVE-2015-8619)Wolfgang Bumiller2016-03-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When processing 'sendkey' command, hmp_sendkey routine null terminates the 'keyname_buf' array. This results in an OOB write issue, if 'keyname_len' was to fall outside of 'keyname_buf' array. Since the keyname's length is known the keyname_buf can be removed altogether by adding a length parameter to index_from_key() and using it for the error output as well. Reported-by: Ling Liu <liuling-it@360.cn> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Message-Id: <20160113080958.GA18934@olga> [Comparison with "<" dumbed down, test for junk after strtoul() tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com> (cherry picked from commit 64ffbe04eaafebf4045a3ace52a360c14959d196) Conflicts: hmp.c *removed dependency on 7fb1cf16 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
* ui: vnc: avoid floating point exceptionPrasad J Pandit2015-12-031-3/+3
| | | | | | | | | | | | While sending 'SetPixelFormat' messages to a VNC server, the client could set the 'red-max', 'green-max' and 'blue-max' values to be zero. This leads to a floating point exception in write_png_palette while doing frame buffer updates. Reported-by: Lian Yihan <lianyihan@360.cn> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* ui/cocoa.m: Prevent activation clicks from going to guestPeter Maydell2015-12-011-1/+9
| | | | | | | | | | | | | | | | When QEMU is brought to the foreground, the click event that activates QEMU should not go to the guest. Accidents happen when they do go to the guest without giving the user a chance to handle them. In particular, if the guest input device is not an absolute-position one then the location of the guest cursor (and thus the click) will likely not be the location of the host cursor when it is clicked, and could be completely obscured below another window. Don't send mouse clicks to QEMU unless the window either has focus or has grabbed mouse events. Reported-by: John Arbuckle <programmingkidx@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 1448551168-13196-1-git-send-email-peter.maydell@linaro.org
* vnc: fix segfaultGerd Hoffmann2015-11-261-0/+5
| | | | | | | | | | | Commit "c7628bf vnc: only alloc server surface with clients connected" missed one rarely used codepath (cirrus with guest drivers using 2d accel) where we have to check for the server surface being present, to avoid qemu crashing with a NULL pointer dereference. Add the check. Reported-by: Anthony PERARD <anthony.perard@citrix.com> Tested-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151116-1' into ↵Peter Maydell2015-11-172-38/+88
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging vnc: buffer code improvements, bugfixes. # gpg: Signature made Mon 16 Nov 2015 17:20:02 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-vnc-20151116-1: vnc: fix mismerge buffer: allow a buffer to shrink gracefully buffer: factor out buffer_adj_size buffer: factor out buffer_req_size vnc: recycle empty vs->output buffer vnc: fix local state init vnc: only alloc server surface with clients connected vnc: use vnc_{width,height} in vnc_set_area_dirty vnc: factor out vnc_update_server_surface vnc: add vnc_width+vnc_height helpers vnc: zap dead code vnc-jobs: move buffer reset, use new buffer move vnc: kill jobs queue buffer vnc: attach names to buffers buffer: add tracing buffer: add buffer_shrink buffer: add buffer_move buffer: add buffer_move_empty buffer: add buffer_init buffer: make the Buffer capacity increase in powers of two Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * vnc: fix mismergeGerd Hoffmann2015-11-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | Commit "4d77b1f vnc: fix bug: vnc server can't start when 'to' is specified" was rebased incorrectly, fix it. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn> Message-id: 1446714738-22400-1-git-send-email-kraxel@redhat.com
| * vnc: recycle empty vs->output bufferPeter Lieven2015-11-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the vs->output buffer is empty it will be dropped by the next qio_buffer_move_empty in vnc_jobs_consume_buffer anyway. So reuse the allocated buffer from this buffer in the worker thread where we otherwise would start with an empty (unallocated buffer). Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-17-git-send-email-kraxel@redhat.com [ added a comment describing the non-obvious optimization ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * vnc: fix local state initGerd Hoffmann2015-11-051-4/+4
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-16-git-send-email-kraxel@redhat.com
| * vnc: only alloc server surface with clients connectedGerd Hoffmann2015-11-051-0/+12
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-15-git-send-email-kraxel@redhat.com
| * vnc: use vnc_{width,height} in vnc_set_area_dirtyGerd Hoffmann2015-11-051-11/+10
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-14-git-send-email-kraxel@redhat.com
| * vnc: factor out vnc_update_server_surfaceGerd Hoffmann2015-11-051-6/+15
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-13-git-send-email-kraxel@redhat.com
| * vnc: add vnc_width+vnc_height helpersGerd Hoffmann2015-11-051-3/+13
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-12-git-send-email-kraxel@redhat.com
| * vnc: zap dead codeGerd Hoffmann2015-11-051-4/+0
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-11-git-send-email-kraxel@redhat.com
| * vnc-jobs: move buffer reset, use new buffer moveGerd Hoffmann2015-11-051-7/+8
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-10-git-send-email-kraxel@redhat.com
| * vnc: kill jobs queue bufferGerd Hoffmann2015-11-051-6/+0
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-9-git-send-email-kraxel@redhat.com
| * vnc: attach names to buffersGerd Hoffmann2015-11-052-0/+23
| | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1446203414-4013-8-git-send-email-kraxel@redhat.com
* | blockdev: read-only-mode for blockdev-change-mediumMax Reitz2015-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add an option to qmp_blockdev_change_medium() which allows changing the read-only status of the block device whose medium is changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently of the drive. Some users may find it useful to be able to therefore change the read-only status of a block device when changing the medium. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | qmp: Introduce blockdev-change-mediumMax Reitz2015-11-111-4/+6
| | | | | | | | | | | | | | | | | | | | Introduce a new QMP command 'blockdev-change-medium' which is intended to replace the 'change' command for block devices. The existing function qmp_change_blockdev() is accordingly renamed to qmp_blockdev_change_medium(). Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | ui: Use g_new() & friends where that makes obvious senseMarkus Armbruster2015-11-067-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form sizeof(T). Same Coccinelle semantic patch as in commit b45c03f. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* | replay: recording of the user inputPavel Dovgalyuk2015-11-061-8/+19
|/ | | | | | | | | | This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162524.8676.11696.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
* vnc: fix bug: vnc server can't start when 'to' is specifiedYang Hongyang2015-11-031-0/+2
| | | | | | | | | | | | | | | | commit e0d03b8ceb52 converted VNC startup to use SocketAddress, the interface socket_listen don't have a port_offset param, so we need to add the port offset (5900) to both 'port' and 'to' opts. currently only 'port' is added by offset. This patch add the port offset to 'to' opts. Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1445926252-14830-1-git-send-email-hongyang.yang@easystack.cn Cc: Daniel P. Berrange <berrange@redhat.com> Cc: Eric Blake <eblake@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vnc: allow fall back to RAW encodingPeter Lieven2015-11-031-2/+18
| | | | | | | | | | | I have observed that depending on the contents and the encoding it happens that sending data as RAW sometimes would take less space than the encoded data. This is especially the case for small updates or areas with high color images. If sending RAW encoded data is beneficial allow a fall back to RAW encoding for the framebuffer update. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ui/curses: Fix pageup/pagedown on -cursesOGAWA Hirofumi2015-11-031-2/+6
| | | | | | | | | | | | | Current KEY_NPAGE/KEY_PPAGE handling is broken on -curses. Those uses "GREY", but "KEY_MASK" masked out "GREY". To fix, we have to use correct mask value - SCANCODE_KEYMASK. Then, this adds support of "shift + pageup/pagedown". With this, -curses mode can use scroll-up/down as usual like other display modes. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ui/curses: Support line graphics chars on -curses modeOGAWA Hirofumi2015-11-031-0/+44
| | | | | | | | | | This converts vga code to curses code in console_write_bh(). With this changes, we can see line graphics (for example, dialog uses) correctly. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ui/curses: Fix monitor color with -curses when 256 colorsOGAWA Hirofumi2015-11-031-1/+6
| | | | | | | | | | | | | | If TERM=xterm-256color, COLOR_PAIRS==256 and monitor passes chtype like 0x74xx. Then, the code uses uninitialized color pair. As result, monitor uses black for both of fg and bg color, i.e. terminal is filled by black. To fix, this initialize above than 64 with default color (fg=white,bg=black). FIXME: on 256 color, curses may be possible better vga color emulation. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* input: Convert to new qapi union layoutEric Blake2015-11-024-72/+73
| | | | | | | | | | | | | | | | | We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This leads to spurious collisions if a tag value matches a non-variant member's name. Make the conversion to the new layout for input-related code. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1445898903-12082-20-git-send-email-eblake@redhat.com> [Commit message tweaked slightly] Signed-off-by: Markus Armbruster <armbru@redhat.com>
* sockets: Convert to new qapi union layoutEric Blake2015-11-021-22/+22
| | | | | | | | | | | | | | | | | We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This leads to spurious collisions if a tag value matches a non-variant member's name. Make the conversion to the new layout for socket-related code. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1445898903-12082-17-git-send-email-eblake@redhat.com> [Commit message tweaked slightly] Signed-off-by: Markus Armbruster <armbru@redhat.com>
* qapi: Unbox base membersEric Blake2015-11-022-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than storing a base class as a pointer to a box, just store the fields of that base class in the same order, so that a child struct can be directly cast to its parent. This gives less malloc overhead, less pointer dereferencing, and even less generated code. Compare to the earlier commit 1e6c1616a "qapi: Generate a nicer struct for flat unions" (although that patch had fewer places to change, as less of qemu was directly using qapi structs for flat unions). It also allows us to turn on automatic type-safe wrappers for upcasting to the base class of a struct. Changes to the generated code look like this in qapi-types.h: | struct SpiceChannel { |- SpiceBasicInfo *base; |+ /* Members inherited from SpiceBasicInfo: */ |+ char *host; |+ char *port; |+ NetworkAddressFamily family; |+ /* Own members: */ | int64_t connection_id; as well as additional upcast functions like qapi_SpiceChannel_base(). Meanwhile, changes to qapi-visit.c look like: | static void visit_type_SpiceChannel_fields(Visitor *v, SpiceChannel **obj, Error **errp) | { | Error *err = NULL; | |- visit_type_implicit_SpiceBasicInfo(v, &(*obj)->base, &err); |+ visit_type_SpiceBasicInfo_fields(v, (SpiceBasicInfo **)obj, &err); | if (err) { (the cast is necessary, since our upcast wrappers only deal with a single pointer, not pointer-to-pointer); plus the wholesale elimination of some now-unused visit_type_implicit_FOO() functions. Without boxing, the corner case of one empty struct having another empty struct as its base type now requires inserting a dummy member (previously, the 'Base *base' member sufficed). And now that we no longer consume a 'base' member in the generated C struct, we can delete the former negative struct-base-clash-base test. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1445898903-12082-11-git-send-email-eblake@redhat.com> [Commit message tweaked slightly] Signed-off-by: Markus Armbruster <armbru@redhat.com>
* vnc: Hoist allocation of VncBasicInfo to callersEric Blake2015-11-021-23/+34
| | | | | | | | | | | | | | | | A future qapi patch will rework generated structs with a base class to be unboxed. In preparation for that, change the code that allocates then populates an info struct to instead merely populate the fields of an info field passed in as a parameter (renaming vnc_basic_info_get* to vnc_init_basic_info*). Add rudimentary Error handling at the lowest levels for cases where the old code returned NULL; but rather than plumb Error all the way through the stack, the callers drop the error and return NULL as before. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1445898903-12082-7-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
* util: pull Buffer code out of VNC moduleDaniel P. Berrange2015-10-202-58/+1
| | | | | | | The Buffer code in the VNC server is useful for the IO channel code, so pull it out into a shared module, QIOBuffer. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* ui: convert VNC startup code to use SocketAddressDaniel P. Berrange2015-10-201-70/+90
| | | | | | | | | | The VNC code is currently using QemuOpts to configure the sockets connections / listeners it needs. Convert it to use SocketAddress to bring it in line with modern QAPI based code elsewhere in QEMU. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2015-10-192-5/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * KVM page size fix for PPC * Support for Linux 4.4's new Hyper-V features * Eliminate g_slice from areas I maintain * checkpatch fix * Peter's cpu_reload_memory_map() cleanups * More changes to MAINTAINERS * Require Python 2.6 * chardev creation fixes * PCI requester id for ARM KVM * cleanups and doc fixes * Allow customization of the Hyper-V vendor id # gpg: Signature made Mon 19 Oct 2015 09:13:10 BST using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream: (49 commits) kvm: Allow the Hyper-V vendor ID to be specified kvm: Move x86-specific functions into target-i386/kvm.c kvm: Pass PCI device pointer to MSI routing functions hw/pci: Introduce pci_requester_id() kvm: Make KVM_CAP_SIGNAL_MSI globally available doc/rcu: fix g_free_rcu() usage example qemu-char: cleanup after completed conversion to cd->create qemu-char: convert ringbuf backend to data-driven creation qemu-char: convert vc backend to data-driven creation qemu-char: convert spice backend to data-driven creation qemu-char: convert console backend to data-driven creation qemu-char: convert stdio backend to data-driven creation qemu-char: convert testdev backend to data-driven creation qemu-char: convert braille backend to data-driven creation qemu-char: convert msmouse backend to data-driven creation qemu-char: convert mux backend to data-driven creation qemu-char: convert null backend to data-driven creation qemu-char: convert pty backend to data-driven creation qemu-char: convert UDP backend to data-driven creation qemu-char: convert socket backend to data-driven creation ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * qemu-char: convert vc backend to data-driven creationPaolo Bonzini2015-10-192-5/+7
| | | | | | | | | | Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * qemu-char: add create to register_char_driverPaolo Bonzini2015-10-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Having creation as a member of the CharDriver struct removes the need to export functions for qemu-char.c's usage. After the conversion, chardev backends implemented outside qemu-char.c will not need a stub creation function anymore. Ultimately all drivers will be converted. For now, support the case where cd->create == NULL. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | ui/cocoa.m: blinky mouse cursor fixJohn Arbuckle2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | The mouse cursor can become blinky when being moved a lot. This patch fixes that problem by issuing the redraw sooner. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: AAA87DD7-EC20-4F4B-B71E-C38461D9FCBA@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | ui/cocoa.m: addRemovableDevicesMenuItems() warning fixJohn Arbuckle2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate this warning associated with the addRemovableDevicesMenuItems() function: ui/cocoa.m:1344:13: warning: function declaration isn't a prototype [-Wstrict-prototypes] static void addRemovableDevicesMenuItems() ^ ui/cocoa.m: In function 'addRemovableDevicesMenuItems': ui/cocoa.m:1344:13: warning: old-style function definition [-Wold-style-definition] Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 7B365FC2-072B-4E8D-A1D9-922C2D691A83@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | ui/cocoa.m: eliminate normalWindow warningJohn Arbuckle2015-10-131-1/+1
|/ | | | | | | | | | | | | | Eliminate this warning associated with the setting of the normalWindow's title: ui/cocoa.m: In function '-[QemuCocoaAppController init]': ui/cocoa.m:888:9: warning: format not a string literal and no format arguments [-Wformat-security] [normalWindow setTitle:[NSString stringWithFormat:@"QEMU"]]; Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 57057D6E-C108-4AE1-8370-E7E6855B2F2C@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* gtk/opengl: add opengl context and scanout support (GtkGLArea)Gerd Hoffmann2015-10-083-24/+334
| | | | | | | | This allows virtio-gpu to render in 3d mode. Uses native opengl support which is present in gtk versions 3.16 and newer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* gtk/opengl: add opengl context and scanout support (egl)Gerd Hoffmann2015-10-082-8/+130
| | | | | | | | This allows virtio-gpu to render in 3d mode. Uses egl, for gtk versions 3.14 and older. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* opengl: add egl-context.[ch] helpersGerd Hoffmann2015-10-082-0/+35
| | | | | | | Add helper functions to manage opengl contexts using egl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* ui/console: add opengl context and scanout support interfaces.Gerd Hoffmann2015-10-081-2/+65
| | | | | | | | Add callbacks for opengl context management and scanout texture configuration to DisplayChangeListenerOps. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* sdl2: stop flickeringGerd Hoffmann2015-10-081-0/+13
| | | | | | | | | Optimizing updates by copying the dirty rectangle only do not work because of double-buffering. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* shaders: initialize vertexes onceGerd Hoffmann2015-10-082-6/+32
| | | | | | | | | | Create a buffer for the vertex data and place vertexes there at initialization time. Then just use the buffer for each texture blit. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* ui/cocoa.m: remove open dialog codeJohn Arbuckle2015-09-251-54/+2
| | | | | | | | | | | | Removes the open dialog code that runs when no arguments are supplied with QEMU. Not everyone needs a hard drive or cdrom to boot their target. A user might only need to use their target's bios to do work. With that said, this patch removes the unneeded open dialog code. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 33856864-321C-4367-9170-FB0BF81E789B@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* ui/cocoa.m: prevent stuck key situationJohn Arbuckle2015-09-251-0/+26
| | | | | | | | | | | | | | | When the user puts QEMU in the background while holding down a key, QEMU will not receive the keyup event when the user lets go of the key. When the user goes back to QEMU, QEMU will think the key is still down causing stuck key symptoms. This patch fixes this problem by releasing all down keys when QEMU goes into the background. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 7A3FA6EE-84C8-4422-A786-C899B7229D32@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* ui/cocoa.m: verify with user before quitting QEMUJohn Arbuckle2015-09-251-1/+38
| | | | | | | | | | | | This patch prevents the user from accidentally quitting QEMU by pushing Command-Q or by pushing the close button on the main window. When the user does one of these two things, a dialog box appears verifying with the user if he or she wants to quit QEMU. Signed-off-by: John Arbuckle <programmingkidx@gmail.com> Message-id: 29169A74-0347-47F5-934F-A5AD24C225CA@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* gtk: avoid redefining _WIN32_WINNT macroDaniel P. Berrange2015-09-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | When building for Mingw64 target on Fedora 22 a warning is issued about _WIN32_WINNT being redefined. In file included from ui/gtk.c:40:0: include/ui/gtk.h:5:0: warning: "_WIN32_WINNT" redefined # define _WIN32_WINNT 0x0601 /* needed to get definition of MAPVK_VK_TO_VSC */ ^ In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/crtdefs.h:10:0, from /usr/i686-w64-mingw32/sys-root/mingw/include/stdio.h:9, from /home/berrange/src/virt/qemu/include/qemu/fprintf-fn.h:12, from /home/berrange/src/virt/qemu/include/qemu-common.h:18, from ui/gtk.c:37: /usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:225:0: note: this is the location of the previous definition #define _WIN32_WINNT 0x502 ^ Rather than try to get MAPVK_VK_TO_VSC defined indirectly by defining _WIN32_WINNT, instead just define it explicitly if missing. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
* spice: surface switch fast path requires same format too.Gerd Hoffmann2015-09-211-1/+2
| | | | | | | | | | | | | | | Commit "555e72f spice: rework mirror allocation, add no-resize fast path" adds a fast path for surface switches which does't go through the full primary surface destroy and re-recreation in case the new surface is identical to the old one (page-flip). It checks the size only though, but the format must be identical too. This patch adds the format check. Commit "0002a51 ui/spice: Support shared surface for most pixman formats" increases the chance to actually trigger this. https://bugzilla.redhat.com/show_bug.cgi?id=1247479 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cocoa: Suppress Cocoa window with -displayRainer Müller2015-09-181-0/+1
| | | | | | | | | | | Do not open a Cocoa window when another display is selected that will be initialized later. The Cocoa display cannot be selected with -display, so there is no need to check its argument. Signed-off-by: Rainer Müller <raimue@codingfarm.de> Reviewed-by: Andreas Färber <andreas.faerber@web.de> Message-id: 1441807710-25431-1-git-send-email-raimue@codingfarm.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch ↵Peter Maydell2015-09-159-780/+350
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/berrange/tags/vnc-crypto-v9-for-upstream' into staging Merge vnc-crypto-v9 # gpg: Signature made Tue 15 Sep 2015 15:32:38 BST using RSA key ID 15104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" * remotes/berrange/tags/vnc-crypto-v9-for-upstream: ui: convert VNC server to use QCryptoTLSSession ui: fix return type for VNC I/O functions to be ssize_t crypto: introduce new module for handling TLS sessions crypto: add sanity checking of TLS x509 credentials crypto: introduce new module for TLS x509 credentials crypto: introduce new module for TLS anonymous credentials crypto: introduce new base module for TLS credentials qom: allow QOM to be linked into tools binaries crypto: move crypto objects out of libqemuutil.la tests: remove repetition in unit test object deps qapi: allow override of default enum prefix naming Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
OpenPOWER on IntegriCloud