summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'trivial-patches' of git://github.com/stefanha/qemuBlue Swirl2012-11-034-18/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'trivial-patches' of git://github.com/stefanha/qemu: pc: Drop redundant test for ROM memory region exec: make some functions static target-ppc: make some functions static ppc: add missing static vnc: add missing static vl.c: add missing static target-sparc: make do_unaligned_access static m68k: Return semihosting errno values correctly cadence_uart: More debug information Conflicts: target-m68k/m68k-semi.c
| * vnc: add missing staticBlue Swirl2012-11-014-18/+12
| | | | | | | | | | | | | | Add missing 'static' qualifiers. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | ui/cocoa.m: Update to new DisplayChangeListener member namesPeter Maydell2012-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | Commit a93a4a2 changed the names of some fields in DisplayChangeListener and broke compilation of the cocoa UI. Update to the new names. Acked-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | pixman/vnc: remove dead code.Gerd Hoffmann2012-11-013-87/+27
| | | | | | | | | | | | | | | | Switching the vnc server framebuffer to use 32bpp unconditionally turns the code bits which handle 8 and 16 bpp into dead code. Remove them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | pixman/vnc: remove rgb_prepare_row* functionsGerd Hoffmann2012-11-011-74/+10
| | | | | | | | | | | | Let pixman do it instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | pixman/vnc: use pixman images in vnc.Gerd Hoffmann2012-11-017-228/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content. The vnc code uses this to figure which parts of the guest screen did _really_ change to reduce the amount of updates sent to the vnc clients. It is also used as data source when sending out the updates to the clients. This surface gets replaced by a pixman image. The format changes too, instead of using the guest screen format we'll use fixed 32bit rgb framebuffer and convert the pixels on the fly when comparing and updating the server framebuffer. Third surface carries the format expected by the vnc client. That isn't used to store image data. This surface is switched to PixelFormat and a boolean for bigendian byte order. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | console: remove DisplayAllocatorGerd Hoffmann2012-11-011-111/+6
| | | | | | | | | | | | Causes [temporary] preformance regression with 24bpp vga modes @ sdl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | console: remove dpy_gfx_fillGerd Hoffmann2012-11-011-7/+0
| | | | | | | | | | | | Unused code. 'nuff said. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | console: untangle gfx & txt updatesGerd Hoffmann2012-11-014-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop abusing displaysurface fields for text mode displays. (bpp = 0, width = cols, height = lines). Add flags to displaystate indicating whenever text mode display (curses) or gfx mode displays (sdl, vnc, ...) are present. Add separate displaychangelistener callbacks for text / gfx mode resize & updates. This allows to enable gfx and txt diplays at the same time and also paves the way for more cleanups in the future. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | console: move set_mouse + cursor_define callbacksGerd Hoffmann2012-11-013-10/+10
|/ | | | | | | When adding DisplayChangeListeners the set_mouse and cursor_define callbacks have been left in DisplayState for some reason. Fix it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vnc: drop QERR_VNC_SERVER_FAILEDPaolo Bonzini2012-10-231-3/+0
| | | | | | | We now always return "nice" error messages in errp when we goto fail. Drop the default error message. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* vnc: add error propagation to vnc_display_openPaolo Bonzini2012-10-231-19/+23
| | | | | | | | | | | | | | | | | | | | | | Before: $ qemu-system-x86_64 -vnc foo.bar:12345 getaddrinfo(foo.bar,18245): Name or service not known Failed to start VNC server on `foo.bar:12345' $ qemu-system-x86_64 -vnc localhost:12345,reverse=on inet_connect_opts: connect(ipv4,yakj.usersys.redhat.com,127.0.0.1,12345): Connection refused Failed to start VNC server on `localhost:12345,reverse=on' After: $ x86_64-softmmu/qemu-system-x86_64 -vnc foo.bar:12345 Failed to start VNC server on `foo.bar:12345': address resolution failed for foo.bar:18245: Name or service not known $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:12345,reverse=on Failed to start VNC server on `localhost:12345,reverse=on': Failed to connect to socket: Connection refused Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* vnc: reorganize code for reverse modePaolo Bonzini2012-10-231-11/+9
| | | | | | Avoid the dance between csock and vs->lsock. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* vnc: introduce a single label for error returnsPaolo Bonzini2012-10-231-25/+17
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* vnc: avoid Yoda conditionalsPaolo Bonzini2012-10-231-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qemu-sockets: add Error ** to all functionsPaolo Bonzini2012-10-231-2/+2
| | | | | | | | This lets me adjust the clients to do proper error propagation first, thus avoiding temporary regressions in the quality of the error messages. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ui/vnc-jobs.c: Fix minor typos in commentsPeter Maydell2012-10-191-8/+8
| | | | | | | | Fix some minor typos/grammar errors in comments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ui/vnc: Only report/use TIGHT_PNG encoding if enabled.Joel Martin2012-10-191-0/+2
| | | | | | | | | | | | | If TIGHT_PNG is not enabled by the --enable-vnc-png configure flag then do not report to the client that it is supported. Also, since TIGHT_PNG is the same as the TIGHT encoding but with the filter/copy replaced with PNG data, adding it to the supported encodings list when it is disabled will cause the TIGHT encoding to be used even though the client requested TIGHT_PNG. Signed-off-by: Joel Martin <github@martintribe.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-10-121-0/+4
|\ | | | | | | | | | | | | * stefanha/trivial-patches: vnc: fix "info vnc" with "-vnc ..., reverse=on" sheepdog: use bool for boolean variables configure: Tidy up remnants of non-64-bit physaddrs
| * vnc: fix "info vnc" with "-vnc ..., reverse=on"Paolo Bonzini2012-10-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reverse connection is in use, there is no active VNC server socket. Because of this, getsockopt(-1, ...) is attempted and the following error is emitted: $ socat TCP-LISTEN:5900,reuseaddr TCP-LISTEN:5901,reuseaddr & $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor stdio QEMU 1.2.50 monitor - type 'help' for more information (qemu) info vnc An undefined error has occurred Because however the host, family, service and auth fields are optional, we can just exit if there is no active server socket. $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor stdio QEMU 1.2.50 monitor - type 'help' for more information (qemu) info vnc Server: Client: address: 127.0.0.1:5900 x509_dname: none username: none Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | spice: raise requirement to 0.12Gerd Hoffmann2012-10-083-92/+2
|/ | | | | | | | | | | | With the next qemu version (1.3) we are going to bump the qxl device revision to 4. The new features available require a recent spice-server version, so raise up the bar. Otherwise we would end up with different qxl revisions depending on the spice-server version installed, which would be a major PITA when it comes to compat properties. Clear out a big bunch of #ifdefs which are not needed any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge branch 'trivial-patches' of git://github.com/stefanha/qemuAurelien Jarno2012-10-062-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'trivial-patches' of git://github.com/stefanha/qemu: versatilepb: Use symbolic indices for ARM PIC qdev: kill bogus comment qemu-barrier: Fix compiler version check for future gcc versions hw: Add missing 'static' attribute for QEMUMachine cleanup useless return sentence qemu-sockets: Fix compiler warning (regression for MinGW) vnc: Fix spelling (hellmen -> hellman) in comment slirp: Fix spelling in comment (enought -> enough, insure -> ensure) tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code cpu: Add missing 'static' attribute to qemu_global_mutex configure: Support empty target list (--target-list=) hw: Fix return value check for bdrv_read, bdrv_write
| * cleanup useless return sentenceAmos Kong2012-10-051-1/+0
| | | | | | | | | | | | | | | | This patch cleans up return sentences in the end of void functions. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
| * vnc: Fix spelling (hellmen -> hellman) in commentStefan Weil2012-10-051-1/+1
| | | | | | | | | | | | | | The algorithm was named after Martin E. Hellman. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* | ui/vnc: simplify and avoid strncpyJim Meyering2012-10-051-3/+1
|/ | | | | | | | | Don't bother with strncpy. There's no need for its zero-fill. Use g_strndup in place of g_malloc+strncpy+NUL-terminate. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connectOrit Wasserman2012-09-251-1/+1
| | | | | | | | No need to add non blocking parameters to the blocking inet_connect add block parameter for inet_connect_opts instead of using QemuOpt "block". Signed-off-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-09-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: configure: fix seccomp check arch_init.c: add missing '%' symbols before PRIu64 in debug printfs kvm: Fix warning from static code analysis qapi: Fix enumeration typo error console: Clean up bytes per pixel calculation Fix copy&paste typos in documentation comments linux-user: Remove #if 0'd cpu_get_real_ticks() definition ui: Fix spelling in comment (ressource -> resource) Spelling fixes in comments and macro names (ressource -> resource) Fix spelling (licenced -> licensed) in GPL Spelling fixes in comments and documentation srp: Don't use QEMU_PACKED for single elements of a structured type
| * ui: Fix spelling in comment (ressource -> resource)Stefan Weil2012-09-141-1/+1
| | | | | | | | | | | | | | The function is called interface_release_resource. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | spice: send updates only for changed screen contentGerd Hoffmann2012-09-121-1/+55
| | | | | | | | | | | | | | | | | | | | when creating screen updates go compare the current guest screen against the mirror (which holds the most recent update sent), then only create updates for the screen areas which did actually change. [ v2: drop redundant qemu_spice_create_one_update call ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | spice: add screen mirrorGerd Hoffmann2012-09-122-10/+23
| | | | | | | | | | | | | | Create a screen mirror, keep there a copy of the most recent update passed on to spice-server. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | spice: split qemu_spice_create_updateGerd Hoffmann2012-09-121-13/+18
| | | | | | | | | | | | | | | | | | | | Creating one function which creates a single update for a given rectangle. And one (for now) pretty simple wrapper around it to queue up screen updates for the dirty region. [ v2: also update bounding box ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | spice: switch to queue for vga mode updatesGerd Hoffmann2012-09-122-12/+16
|/ | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: make number of surfaces runtime-configurable.Gerd Hoffmann2012-09-052-3/+5
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: add QXL_IO_MONITORS_CONFIG_ASYNCAlon Levy2012-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Revision bumped to 4 for new IO support, enabled for spice-server >= 0.11.1. New io enabled if revision is 4. Revision can be set to 4. [ kraxel: 3 continues to be the default revision. Once we have a new stable spice-server release and the qemu patches to enable the new bits merged we'll go flip the switch and make rev4 the default ] This io calls the corresponding new spice api spice_qxl_monitors_config_async to let spice-server read a new guest set monitors config and notify the client. On migration reissue spice_qxl_monitors_config_async. RHBZ: 770842 Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> fixup Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: adding seamless-migration option to the command lineYonit Halperin2012-09-051-0/+7
| | | | | | | | | | | | The seamless-migration flag is required in order to identify whether libvirt supports the new QEVENT_SPICE_MIGRATE_COMPLETED or not (by default the flag is off). New libvirt versions that wait for QEVENT_SPICE_MIGRATE_COMPLETED should turn on this flag. When this flag is off, spice fallbacks to its old migration method, which can result in data loss. Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: add 'migrated' flag to spice infoYonit Halperin2012-09-051-0/+4
| | | | | | | | | | | The flag is 'true' when spice migration has completed on the src side. It is needed for a case where libvirt dies before migration completes and it misses the event QEVENT_SPICE_MIGRATE_COMPLETED. When libvirt is restored and queries the migration status, it also needs to query spice and check if its migration has completed. Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice migration: add QEVENT_SPICE_MIGRATE_COMPLETEDYonit Halperin2012-09-051-1/+8
| | | | | | | | | | | | | | When migrating, libvirt queries the migration status, and upon migration completions, it closes the migration src. On the other hand, when migration is completed, spice transfers data from the src to destination via the client. This data is required for keeping the spice session after migration, without suffering from data loss and inconsistencies. In order to allow this data transfer, we add QEVENT for signaling libvirt that spice migration has completed, and libvirt needs to wait for this event before quitting the src process. Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: notify on vm state change only via spice_server_vm_start/stopYonit Halperin2012-09-053-4/+41
| | | | | | | QXLWorker->start/stop are deprecated since spice-server 0.11.2 Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: notify spice server on vm start/stopYonit Halperin2012-09-051-0/+14
| | | | | | | | | | | Spice server needs to know about the vm state in order to prevent attempts to write to devices when they are stopped, mainly during the non-live stage of migration. Instead, spice will take care of restoring this writes, on the migration target side, after migration completes. Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* spice: abort on invalid streaming cmdline paramsChristophe Fergeau2012-09-051-1/+2
| | | | | | | | | | | | | | | When parsing its command line parameters, spice aborts when it finds unexpected values, except for the 'streaming-video' option. This happens because the parsing of the parameters for this option is done using the 'name2enum' helper, which does not error out on unknown values. Using the 'parse_name' helper makes sure we error out in this case. Looking at git history, the use of 'name2enum' instead of 'parse_name' seems to have been an oversight, so let's change to that now. Fixes rhbz#831708 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* net: inet_connect(), inet_connect_opts(): add in_progress argumentLuiz Capitulino2012-08-131-1/+1
| | | | | | | | | | | | It's used to indicate the special case where a valid file-descriptor is returned (ie. success) but the connection can't be completed w/o blocking. This is needed because QERR_SOCKET_CONNECT_IN_PROGRESS is not treated like an error and a future commit will drop it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
* vnc: disable VNC password authentication (security type 2) when in FIPS modePaul Moore2012-08-031-0/+10
| | | | | | | | | | | | | | | | FIPS 140-2 requires disabling certain ciphers, including DES, which is used by VNC to obscure passwords when they are sent over the network. The solution for FIPS users is to disable the use of VNC password auth when the host system is operating in FIPS compliance mode and the user has specified '-enable-fips' on the QEMU command line. This patch causes QEMU to emit a message to stderr when the host system is running in FIPS mode and a VNC password was specified on the commend line. If the system is not running in FIPS mode, or is running in FIPS mode but VNC password authentication was not requested, QEMU operates normally. Signed-off-by: Paul Moore <pmoore@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Avoid returning voidBlue Swirl2012-07-282-2/+3
| | | | | | | It's silly and non-conforming to standards to return void, don't do it. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Remove support for non-threaded VNC serverDaniel P. Berrange2012-06-276-132/+1
| | | | | | | | | | QEMU now has a fundamental requirement for pthreads, so there is no compelling reason to retain support for the non-threaded VNC server. Remove the --{enable,disable}-vnc-thread configure arguments, and all CONFIG_VNC_THREAD conditionals Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/spice-display.c: add missing initialization for valgrindAlon Levy2012-06-221-0/+2
| | | | | | | | | We can't initialize QXLDevSurfaceCreate field by field because it has a pa hole, and so 4 bytes remain uninitialized when building on x86-64, so just memset. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* build: move ui/ objects to nested Makefile.objsPaolo Bonzini2012-06-071-0/+18
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* vnc: fix segfault in vnc_display_pw_expire()Gerd Hoffmann2012-05-301-0/+4
| | | | | | | | NULL pointer dereference in case no vnc server is configured. Catch this and return -EINVAL like vnc_display_password() does. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cocoa: Suppress Cocoa frontend for -qtestAndreas Färber2012-05-291-1/+2
| | | | Signed-off-by: Andreas Färber <andreas.faerber@web.de>
* sockets: use error class to pass listen errorAmos Kong2012-05-101-1/+2
| | | | | | | | | | | | Add a new argument in inet_listen()/inet_listen_opts() to pass back listen error. Change nbd, qemu-char, vnc to use new interface. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sockets: change inet_connect() to support nonblock socketAmos Kong2012-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | Add a bool argument to inet_connect() to assign if set socket to block/nonblock, and delete original argument 'socktype' that is unused. Add a new argument to inet_connect()/inet_connect_opts(), to pass back connect error by error class. Retry to connect when -EINTR is got. Connect's successful for nonblock socket when following errors are got, user should wait for connecting by select(): -EINPROGRESS -EWOULDBLOCK (win32) -WSAEALREADY (win32) Change nbd, vnc to use new interface. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud