summaryrefslogtreecommitdiffstats
path: root/hw/qxl.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-2/+2
| | | | | | | | | | | | | | | target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* spice: raise requirement to 0.12Gerd Hoffmann2012-10-081-30/+0
| | | | | | | | | | | | 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>
* hw/qxl: qxl_dirty_surfaces: use uintptr_tAlon Levy2012-10-081-2/+2
| | | | | | | As suggested by Paolo Bonzini, to avoid possible integer overflow issues. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl: fix condition for exiting guest_bugAlon Levy2012-10-081-1/+1
| | | | | | | Reported and suggested by Paolo Bonzini, thanks. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl: exit on failure to register qxl interfaceAlon Levy2012-10-081-1/+5
| | | | | | | | | This prevents a segfault later on when the device reset handler tries to access a NULL ssd.worker since interface_attach_worker has not been called. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: fix range check for rev3 io commands.Gerd Hoffmann2012-10-081-1/+1
| | | | | | | Enables QXL_IO_FLUSH_SURFACES_ASYNC and QXL_IO_FLUSH_RELEASE which are part of the qxl rev3 feature set. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl/update_area_io: cleanup invalid parameters handlingMichael Tokarev2012-10-081-10/+3
| | | | | | | | | | | This cleans up two additions of almost the same code in commits 511b13e2c9 and ccc2960d654. While at it, make error paths consistent (always use 'break' instead of 'return'). Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Dunrong Huang <riegamaths@gmail.com> Cc: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'spice/spice.v60' into stagingAnthony Liguori2012-09-171-6/+101
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * spice/spice.v60: hw/qxl: support client monitor configuration via device qxl: add trace-event for QXL_IO_LOG hw/qxl: tracing fixes qxl: better cleanup for surface destroy qxl: Ignore set_client_capabilities pre/post migrate qxl: dont update invalid area spice: send updates only for changed screen content spice: add screen mirror spice: split qemu_spice_create_update spice: switch to queue for vga mode updates
| * hw/qxl: support client monitor configuration via deviceAlon Levy2012-09-131-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now we used only the agent to change the monitor count and each monitor resolution. This patch introduces the qemu part of using the device as the mediator instead of the agent via virtio-serial. Spice (>=0.11.5) calls the new QXLInterface::client_monitors_config, which returns wether the interrupt is enabled, and if so and given a non NULL monitors config will generate an interrupt QXL_INTERRUPT_CLIENT_MONITORS_CONFIG with crc checksum for the guest to verify a second call hasn't interfered. The maximal number of monitors is limited on the QXLRom to 64. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qxl: add trace-event for QXL_IO_LOGAlon Levy2012-09-131-0/+1
| | | | | | | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * hw/qxl: tracing fixesAlon Levy2012-09-131-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new trace events: qxl_send_events(int qid, uint32_t events) "%d %d" qxl_set_guest_bug(int qid) "%d" Change qxl_io_unexpected_vga_mode parameters to be equivalent to those of qxl_io_write for easier grouping under a single systemtap probe. Change d to qxl in one place. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qxl: better cleanup for surface destroyUri Lublin2012-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add back a call to qxl_spice_destroy_surface_wait_complete() in qxl_spice_destroy_surface_wait(), that was removed by commit c480bb7da465186b84d8427e068ef7502e47ffbf It is needed to complete surface-removal cleanup, for non async. For async, qxl_spice_destroy_surface_wait_complete is called upon operation completion. Signed-off-by: Uri Lublin <uril@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qxl: Ignore set_client_capabilities pre/post migrateHans de Goede2012-09-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent introduction of set_client_capabilities has broken (seamless) migration by trying to call qxl_send_events pre (seamless incoming) and post (*) migration, triggering the following assert: qxl_send_events: Assertion `qemu_spice_display_is_running(&d->ssd)' failed. The solution is easy, pre migration the guest will have already received the client caps on the migration source side, and post migration there no longer is a guest, so we can simply ignore the set_client_capabilities call in both those scenarios. *) Post migration, so not fatal for to the migration itself, but still a crash Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qxl: dont update invalid areaDunrong Huang2012-09-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following error: $ ~/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -spice port=5900,disable-ticketing -vga qxl -cdrom ~/Images/linuxmint-13-mate-dvd-32bit.iso (/home/mathslinux/usr/bin/qemu-system-x86_64:10068): SpiceWorker-CRITICAL **: red_worker.c:4599:red_update_area: condition `area->left >= 0 && area->top >= 0 && area->left < area->right && area->top < area->bottom' failed Aborted spice server terminates QEMU process if we pass invalid area to it, so dont update those invalid areas. Signed-off-by: Dunrong Huang <riegamaths@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * spice: switch to queue for vga mode updatesGerd Hoffmann2012-09-121-3/+3
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | VGA: Flush coalesced MMIO on related MMIO/PIO accessesJan Kiszka2012-09-111-0/+1
|/ | | | | | | | | | In preparation of stopping to flush coalesced MMIO unconditionally on vmexits, mark VGA MMIO and PIO regions as synchronous /wrt coalesced MMIO and flush the buffer explicitly on PIO accesses that do not use generic memory regions yet. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* Merge branch 'spice.v59' of git://anongit.freedesktop.org/spice/qemuAurelien Jarno2012-09-101-23/+152
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'spice.v59' of git://anongit.freedesktop.org/spice/qemu: Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPP qxl: Add set_client_capabilities() interface to QXLInterface spice: make number of surfaces runtime-configurable. configure: print spice-protocol and spice-server versions qxl: add QXL_IO_MONITORS_CONFIG_ASYNC qxl: disallow unknown revisions qxl/update_area_io: guest_bug on invalid parameters spice: increase the verbosity of spice section in "qemu --help" spice: adding seamless-migration option to the command line spice: add 'migrated' flag to spice info spice migration: add QEVENT_SPICE_MIGRATE_COMPLETED spice: notify on vm state change only via spice_server_vm_start/stop spice: notify spice server on vm start/stop spice: abort on invalid streaming cmdline params
| * Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPPSøren Sandmann Pedersen2012-09-051-2/+0
| | | | | | | | | | | | | | We require spice >= 0.8 now, so this flag is always present. Signed-off-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qxl: Add set_client_capabilities() interface to QXLInterfaceSøren Sandmann Pedersen2012-09-051-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This new interface lets spice server inform the guest whether (a) a client is connected (b) what capabilities the client has There is a fixed number (464) of bits reserved for capabilities, and when the capabilities bits change, the QXL_INTERRUPT_CLIENT interrupt is generated. Signed-off-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * spice: make number of surfaces runtime-configurable.Gerd Hoffmann2012-09-051-14/+17
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qxl: add QXL_IO_MONITORS_CONFIG_ASYNCAlon Levy2012-09-051-4/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * qxl: disallow unknown revisionsAlon Levy2012-09-051-1/+4
| | | | | | | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * qxl/update_area_io: guest_bug on invalid parametersAlon Levy2012-09-051-0/+12
| | | | | | | | | | Signed-off-by: Alon Levy <alevy@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-051-3/+4
| | | | | | | | | | | | | | 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>
* | vga: ppm_save(): add error handlingLuiz Capitulino2012-09-051-1/+1
| | | | | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | console: vga_hw_screen_dump_ptr: take Error argumentLuiz Capitulino2012-09-051-2/+3
|/ | | | | | | | | | | | | All devices that register a screen dump callback via graphic_console_init() are updated. The new argument is not used in this commit. Error handling will be added to each device individually later. This change is a preparation to convert the screendump command to the QAPI. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* vga: raise default vgamem sizeGerd Hoffmann2012-06-221-1/+1
| | | | | | | | | | Old size: 8 MB (traditional upstream qemu value). New size: 16 MB (traditional qemu-kvm value). Also adds compat properties so old machine types keep the old default values. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: add vgamem_size_mb and vgamem_sizeAlon Levy2012-06-221-30/+42
| | | | | | | | | | | | In preperation for supporting a larger framebuffer for multiple monitors on a single card, add a property to qxl vgamem_size_mb, and corresponding byte sized vgamem_size, and use instead of VGA_RAM_SIZE. [ kraxel: simplify property handling, add sanity checks ] [ kraxel: fix mode copying ] Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: make vram size configurableGerd Hoffmann2012-06-221-1/+4
| | | | | | | | | | | | | | | | | Zap the global VGA_RAM_SIZE #define, make the vga ram size configurable for standard vga and vmware vga. cirrus and qxl are left with a fixed size (and private VGA_RAM_SIZE #define) for now. qxl needs some non-trivial adjustments in the mode list handling deal with a runtime-configurable size, which calls for a separate qxl patch. cirrus emulates cards which have 2 MB (isa) and 4 MB (pci), so I guess it would make sense to use these sizes. That change would break migration though, so I left it fixed at 8 MB size. Making it configurabls is pretty pointless for cirrus as we have to match real hardware. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: reset current_async on qxl_soft_resetAlon Levy2012-06-221-0/+1
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl: ignore guest from guestbug until resetAlon Levy2012-06-221-1/+12
| | | | | | | | | | soft_reset is called from any of: * QXL_IO_RESET * vga io * pci reset handler Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: stop dirty loging when not in vga modeAlon Levy2012-06-221-0/+2
| | | | | | | | | | Tested with linux guest. Not sure how to check actual performance affect of this. Checked with the previously send traceevent that the kvm ioctl to start/stop dirty logging is being called. (KVM_SET_USER_MEMORY_REGION). Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl: s/qxl_guest_bug/qxl_set_guest_bug/Alon Levy2012-06-221-22/+27
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: set size of PCI IO BAR correctly (16) for revision 2Uri Lublin2012-05-141-5/+3
| | | | | | | Also move it up into switch(qxl->revision) block Signed-off-by: Uri Lublin <uril@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: don't assert on guest create_guest_primaryAlon Levy2012-05-031-1/+4
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: ioport_write: remove guest trigerrable abortAlon Levy2012-05-031-2/+1
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: qxl_add_memslot: remove guest trigerrable panicsAlon Levy2012-05-031-7/+20
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: interface_notify_update: remove guest trigerrable abortAlon Levy2012-05-031-2/+7
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: cleanup s/__FUNCTION__/__func__/Alon Levy2012-05-031-1/+1
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: don't abort on guest trigerrable ring indices mismatchAlon Levy2012-05-031-12/+39
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: fix > 80 chars lineAlon Levy2012-05-031-2/+2
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: replace panic with guest bug in qxl_track_commandAlon Levy2012-05-031-1/+5
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: check for NULL return from qxl_phys2virtAlon Levy2012-05-031-1/+12
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl.c: qxl_phys2virt: replace panics with guest_bugAlon Levy2012-05-031-6/+19
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: Add missing GCC_FMT_ATTR and fix format specifierStefan Weil2012-04-201-1/+1
| | | | | | | | val is an uint64_t, therefore %d was not correct. Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* qxl: set default values of vram*_size_mb to -1Alon Levy2012-04-181-2/+2
| | | | | | | | | | | The addition of those values caused a regression where not specifying any value for the vram bar size would result in a 4096 _byte_ surface area. This is ok for the windows driver but causes the X driver to be unusable. Also, it's a regression. This patch returns the default behavior of having a 64 megabyte vram BAR. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* hw/qxl.c: Fix compilation failures on 32 bit hostsPeter Maydell2012-03-191-8/+8
| | | | | | | | | Fix compilation failures on 32 bit hosts (cast from pointer to integer of different size; %ld expects 'long int' not uint64_t). Reported-by: Steve Langasek <steve.langasek@canonical.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: switch qxl.c to trace-eventsAlon Levy2012-03-191-72/+69
| | | | | | | | | | | | | dprint is still used for qxl_init_common one time prints. also switched parts of spice-display.c over, mainly all the callbacks to spice server. All qxl device trace events start with the qxl device id. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: init_pipe_signaling: exit on failureAlon Levy2012-03-191-10/+11
| | | | | | | | If pipe creation fails, exit, don't log and continue. Fix indentation at the same time. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qxl: add optinal 64bit vram barGerd Hoffmann2012-02-281-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an 64bit pci bar for vram. It is turned off by default. It can be enabled by setting the size of the 64bit bar to be larger than the 32bit bar. Both 32bit and 64bit bar refer to the same memory. Only the first part of the memory is available via 32bit bar. The intention is to allow large vram sizes for 64bit guests, by allowing the vram bar being mapped above 4G, so we don't have to squeeze it into the pci I/O window below 4G. With vram_size_mb=16 and vram64_size_mb=256 it looks like this: 00:02.0 VGA compatible controller: Red Hat, Inc. Device 0100 (rev 02) (prog-if 00 [VGA controller]) Subsystem: Red Hat, Inc Device 1100 Physical Slot: 2 Flags: fast devsel, IRQ 10 Memory at f8000000 (32-bit, non-prefetchable) [size=64M] Memory at fc000000 (32-bit, non-prefetchable) [size=16M] Memory at fd020000 (32-bit, non-prefetchable) [size=8K] I/O ports at c5a0 [size=32] Memory at ffe0000000 (64-bit, prefetchable) [size=256M] Expansion ROM at fd000000 [disabled] [size=64K] [ mapping above 4G needs patched seabios: http://www.kraxel.org/cgit/seabios/commit/?h=pci64 ]
OpenPOWER on IntegriCloud