summaryrefslogtreecommitdiff
path: root/ui
AgeCommit message (Collapse)AuthorFilesLines
2012-12-10Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori1-0/+2
* afaerber/qom-cpu: target-i386: Postpone cpuid_level update to realize time target-i386: Use define for cpuid vendor string size target-i386: Separate feature string parsing from CPU model lookup target-i386/cpu.c: Coding style fixes qdev: qdev_create(): use error_report() instead of hw_error() sysemu.h: Include qemu-types.h instead of qemu-common.h Create qemu-types.h for struct typedefs qlist.h: Do not include qemu-common.h qga/channel-posix.c: Include headers it needs qapi/qmp-registry.c: Include headers it needs ui/vnc-palette.c: Include headers it needs user: Rename qemu-types.h to qemu-user-types.h user: Move *-user/qemu-types.h to main directory Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-08curses: Remove OpenBSD workaroundBrad Smith1-4/+0
I removed the same sort of workaround for OpenBSD within the configure script with commit 4dcc3f5876fa638d5c35bd47be3b717ea74cc2e7 but didn't bother to grep further to come across this same chunk of code in the curses code itself. So the following diff removes the same workaround chunk within the curses code. Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-12-06ui/vnc-palette.c: Include headers it needsEduardo Habkost1-0/+2
Include: - <glib.h> for g_malloc0() - <string.h> for memset() Some of those headers were probably being included by accident because some other headers were including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-26Merge remote-tracking branch 'spice/spice.v64' into stagingAnthony Liguori2-1/+36
* spice/spice.v64: spice: add new spice-server callbacks to ui/spice-display.c Fix the inconsistency in x509-dh-key-file parameter Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-26vnc: fix option misspelling ("non-adapative" -> "non-adaptive")Catalin Patulea1-1/+1
Signed-off-by: Catalin Patulea <catalinp@google.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-21spice: add new spice-server callbacks to ui/spice-display.cGerd Hoffmann1-0/+35
Otherwise qemu crashes with non-qxl graphics cards. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-21Fix the inconsistency in x509-dh-key-file parameterLei Li1-1/+1
Commit c448e8552b0f6135dabddf944a7110f929c08320 (spice: tls support) added options to the -spice command line. But there is an inconsistency between the declaration of the option 'x509-dh-key-file' to -spice command line and its parameter parsing 'x509-dh-file' in function qemu_spice_init. https://bugs.launchpad.net/qemu/+bug/1035042 Reported-by: Alon Bar-Lev <alon.barlev@gmail.com> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-15vnc-palette.h: Include <stdbool.h>Eduardo Habkost1-0/+1
<stdbool.h> is needed for the 'bool' type, used in the header. The header is probably being included by accident because some other headers are including qemu-common.h, but those headers should eventually stop including qemu-common.h. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-11-05spice: fix initialization orderGerd Hoffmann1-1/+1
Register displaychangelistener last, after spice is fully initialized, otherwise we may hit NULL pointer dereferences when qemu starts calling our callbacks. Commit e250d949feb1334828f27f0d145c35f29c4b7639 triggers this bug. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-05spice: switch to pixmanGerd Hoffmann2-33/+25
Switch over spice-display.c to use the pixman library instead of the home-grown pflib bits. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-03Merge branch 'trivial-patches' of git://github.com/stefanha/qemuBlue Swirl4-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
2012-11-02ui/cocoa.m: Update to new DisplayChangeListener member namesPeter Maydell1-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>
2012-11-01vnc: add missing staticBlue Swirl4-18/+12
Add missing 'static' qualifiers. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-11-01pixman/vnc: remove dead code.Gerd Hoffmann3-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>
2012-11-01pixman/vnc: remove rgb_prepare_row* functionsGerd Hoffmann1-74/+10
Let pixman do it instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01pixman/vnc: use pixman images in vnc.Gerd Hoffmann7-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>
2012-11-01console: remove DisplayAllocatorGerd Hoffmann1-111/+6
Causes [temporary] preformance regression with 24bpp vga modes @ sdl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: remove dpy_gfx_fillGerd Hoffmann1-7/+0
Unused code. 'nuff said. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: untangle gfx & txt updatesGerd Hoffmann4-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>
2012-11-01console: move set_mouse + cursor_define callbacksGerd Hoffmann3-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>
2012-10-23vnc: drop QERR_VNC_SERVER_FAILEDPaolo Bonzini1-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>
2012-10-23vnc: add error propagation to vnc_display_openPaolo Bonzini1-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>
2012-10-23vnc: reorganize code for reverse modePaolo Bonzini1-11/+9
Avoid the dance between csock and vs->lsock. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-23vnc: introduce a single label for error returnsPaolo Bonzini1-25/+17
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-23vnc: avoid Yoda conditionalsPaolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-23qemu-sockets: add Error ** to all functionsPaolo Bonzini1-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>
2012-10-19ui/vnc-jobs.c: Fix minor typos in commentsPeter Maydell1-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>
2012-10-19ui/vnc: Only report/use TIGHT_PNG encoding if enabled.Joel Martin1-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>
2012-10-12Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori1-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
2012-10-12vnc: fix "info vnc" with "-vnc ..., reverse=on"Paolo Bonzini1-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>
2012-10-08spice: raise requirement to 0.12Gerd Hoffmann3-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>
2012-10-06Merge branch 'trivial-patches' of git://github.com/stefanha/qemuAurelien Jarno2-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
2012-10-05cleanup useless return sentenceAmos Kong1-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>
2012-10-05ui/vnc: simplify and avoid strncpyJim Meyering1-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>
2012-10-05vnc: Fix spelling (hellmen -> hellman) in commentStefan Weil1-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>
2012-09-25Separate inet_connect into inet_connect (blocking) and inet_nonblocking_connectOrit Wasserman1-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>
2012-09-17Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori1-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
2012-09-14ui: Fix spelling in comment (ressource -> resource)Stefan Weil1-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>
2012-09-12spice: send updates only for changed screen contentGerd Hoffmann1-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>
2012-09-12spice: add screen mirrorGerd Hoffmann2-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>
2012-09-12spice: split qemu_spice_create_updateGerd Hoffmann1-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>
2012-09-12spice: switch to queue for vga mode updatesGerd Hoffmann2-12/+16
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-09-05spice: make number of surfaces runtime-configurable.Gerd Hoffmann2-3/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-09-05qxl: add QXL_IO_MONITORS_CONFIG_ASYNCAlon Levy1-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>
2012-09-05spice: adding seamless-migration option to the command lineYonit Halperin1-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>
2012-09-05spice: add 'migrated' flag to spice infoYonit Halperin1-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>
2012-09-05spice migration: add QEVENT_SPICE_MIGRATE_COMPLETEDYonit Halperin1-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>
2012-09-05spice: notify on vm state change only via spice_server_vm_start/stopYonit Halperin3-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>
2012-09-05spice: notify spice server on vm start/stopYonit Halperin1-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>
2012-09-05spice: abort on invalid streaming cmdline paramsChristophe Fergeau1-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>