History | View | Annotate | Download (76.2 kB)
spice: stop using DisplayState
Rework DisplayStateListener callbacks to not use the DisplayStateany more.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
console: zap displaystate from dcl callbacks
Now that nobody depends on DisplayState in DisplayChangeListenercallbacks any more we can remove the parameter from all callbacks.
console: stop using DisplayState in gfx hardware emulation
Use QemuConsole instead. Updates interfaces in console.[ch] and adaptsgfx hardware emulation code.
console: fix displaychangelisteners interface
Split callbacks into separate Ops struct. Pass DisplayChangeListenerpointer as first argument to all callbacks. Uninline a bunch ofdisplay functions and move them from console.h to console.c
qxl: zap qxl0 global
DisplayChangeListener is passed now to all DisplayChangeListenerOpscallbacks, so we can use that to access the qxl state and kill theqxl0 global variable.
qxl: better vga init in enter_vga_mode
Ask the vga core to update the display. Will trigger dpy_gfx_resizeif needed. More complete than just calling dpy_gfx_resize.
console: rework DisplaySurface handling [dcl/ui side]
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListenercallbacks with a dpy_gfx_switch callback which notifies the ui codewhen the framebuffer backing storage changes.
hw: include hw header files with full paths
Done with this script:
cd hwfor i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'done | sed -i -f - `find . -type f`
This is so that paths remain valid as files are moved....
error: Strip trailing '\n' from error string arguments (again)
Commit 6daf194d and be62a2eb got rid of a bunch, but they keep comingback. Tracked down with this Coccinelle semantic patch:
r expression err, eno, cls, fmt; position p; @@ (...
r
qxl: change rom size to 8192
This is a simpler solution to 869981, where migration breaks since qxl'srom bar size has changed. Instead of ignoring fields in QXLRom, which is what hasactually changed, we remove some of the modes, a mechanism alreadyaccounted for by the guest. The modes left allow for portrait and...
qxl: stop using non revision 4 rom fields for revision < 4
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check
The pointer arithmetic there is safe, but ugly. Coverity grousesabout it. However, the actual comparison is off by one: <= endinstead of < end. Fix by rewriting the check in a cleaner way....
qxl: Don't drop client capability bits
interface_set_client_capabilities() copies only the first few bits,because it falls into a Classic C trap: you can declare a parameteruint8_t caps58, but the resulting parameter type is uint8_t *, notuint8_t58. In particular, sizeof(caps) is sizeof(uint8_t *), not...
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register alltypes natively through QEMU Object Model), TypeInfo as used inthe common, non-iterative pattern is no longer amended with informationand should therefore be const....
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
qxl: reload memslots after migration, when qxl is in UNDEFINED mode
The devram memslot stays active when qxl enters UNDEFINED mode (i.e, noprimary surface). If migration has occurred while the device is inUNDEFINED stae, the memslots have to be reloaded at the destination....
spice: fix initialization order
Register displaychangelistener last, after spice is fully initialized,otherwise we may hit NULL pointer dereferences when qemu starts callingour callbacks.
Commit e250d949feb1334828f27f0d145c35f29c4b7639 triggers this bug....
hw/qxl: qxl_send_events: nop if stopped
Added a trace point for easy logging.
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=870972
qxl: fix cursor reset
When resetting the qxl cursor notify the qemu displaystate too.
qxl: call dpy_gfx_resize when entering vga mode
When entering vga mode the display size likely changes,notify all displaychangelisteners about this.
Probably went unnoticed for a while as one if the firstthings the guest does after leaving qxl native mode and...
hw/qxl: guest bug on primary create with stride %4 != 0
Due to usage of pixman for rendering on all spice surfaces we havepixman's requirement that the stride be word aligned. A guest nothonoring that can crash spice and qemu with it due to failure to create...
console: untangle gfx & txt updates
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....
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
qxl: fix range check for rev3 io commands.
Enables QXL_IO_FLUSH_SURFACES_ASYNC and QXL_IO_FLUSH_RELEASEwhich are part of the qxl rev3 feature set.
hw/qxl: exit on failure to register qxl interface
This prevents a segfault later on when the device reset handlertries to access a NULL ssd.worker since interface_attach_worker hasnot been called.
hw/qxl: fix condition for exiting guest_bug
Reported and suggested by Paolo Bonzini, thanks.
hw/qxl: qxl_dirty_surfaces: use uintptr_t
As suggested by Paolo Bonzini, to avoid possible integer overflow issues.
spice: raise requirement to 0.12
With the next qemu version (1.3) we are going to bump the qxl devicerevision to 4. The new features available require a recent spice-serverversion, so raise up the bar. Otherwise we would end up with differentqxl revisions depending on the spice-server version installed, which...
qxl/update_area_io: cleanup invalid parameters handling
This cleans up two additions of almost the same code in commits511b13e2c9 and ccc2960d654. While at it, make error pathsconsistent (always use 'break' instead of 'return').
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>...
Merge remote-tracking branch 'spice/spice.v60' into staging
hw/qxl: support client monitor configuration via device
Until now we used only the agent to change the monitor count and eachmonitor resolution. This patch introduces the qemu part of using thedevice as the mediator instead of the agent via virtio-serial....
hw/qxl: tracing fixes
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 thoseof qxl_io_write for easier grouping under a single systemtap probe....
qxl: add trace-event for QXL_IO_LOG
qxl: dont update invalid area
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...
qxl: Ignore set_client_capabilities pre/post migrate
The recent introduction of set_client_capabilities has broken(seamless) migration by trying to call qxl_send_events pre (seamlessincoming) and post (*) migration, triggering the following assert:qxl_send_events: Assertion `qemu_spice_display_is_running(&d->ssd)' failed....
qxl: better cleanup for surface destroy
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....
spice: switch to queue for vga mode updates
VGA: Flush coalesced MMIO on related MMIO/PIO accesses
In preparation of stopping to flush coalesced MMIO unconditionally onvmexits, mark VGA MMIO and PIO regions as synchronous /wrt coalescedMMIO and flush the buffer explicitly on PIO accesses that do not use...
Merge branch 'spice.v59' of git://anongit.freedesktop.org/spice/qemu
console: vga_hw_screen_dump_ptr: take Error argument
All devices that register a screen dump callback viagraphic_console_init() are updated.
The new argument is not used in this commit. Error handling willbe added to each device individually later.
This change is a preparation to convert the screendump command...
vga: ppm_save(): add error handling
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
spice: make number of surfaces runtime-configurable.
qxl: Add set_client_capabilities() interface to QXLInterface
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...
Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPP
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>
spice: notify on vm state change only via spice_server_vm_start/stop
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>
qxl/update_area_io: guest_bug on invalid parameters
qxl: disallow unknown revisions
qxl: add QXL_IO_MONITORS_CONFIG_ASYNC
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...
vga: raise default vgamem size
Old size: 8 MB (traditional upstream qemu value).New size: 16 MB (traditional qemu-kvm value).
Also adds compat properties so old machine typeskeep the old default values.
qxl: add vgamem_size_mb and vgamem_size
In preperation for supporting a larger framebuffer for multiple monitorson a single card, add a property to qxl vgamem_size_mb, and correspondingbyte sized vgamem_size, and use instead of VGA_RAM_SIZE.
[ kraxel: simplify property handling, add sanity checks ]...
hw/qxl: s/qxl_guest_bug/qxl_set_guest_bug/
qxl: stop dirty loging when not in vga mode
Tested with linux guest. Not sure how to check actual performance affectof this. Checked with the previously send traceevent that the kvm ioctlto start/stop dirty logging is being called.(KVM_SET_USER_MEMORY_REGION)....
hw/qxl: ignore guest from guestbug until reset
soft_reset is called from any of: * QXL_IO_RESET * vga io * pci reset handler
qxl: reset current_async on qxl_soft_reset
vga: make vram size configurable
Zap the global VGA_RAM_SIZE #define, make the vga ram size configurablefor standard vga and vmware vga. cirrus and qxl are left with a fixedsize (and private VGA_RAM_SIZE #define) for now.
qxl needs some non-trivial adjustments in the mode list handling deal...
qxl: set size of PCI IO BAR correctly (16) for revision 2
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>
hw/qxl.c: qxl_phys2virt: replace panics with guest_bug
qxl: check for NULL return from qxl_phys2virt
qxl: replace panic with guest bug in qxl_track_command
qxl: fix > 80 chars line
qxl: don't abort on guest trigerrable ring indices mismatch
qxl: cleanup s/__FUNCTION__/__func__/
qxl: interface_notify_update: remove guest trigerrable abort
qxl: qxl_add_memslot: remove guest trigerrable panics
qxl: ioport_write: remove guest trigerrable abort
qxl: don't assert on guest create_guest_primary
qxl: Add missing GCC_FMT_ATTR and fix format specifier
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 -1
The addition of those values caused a regression where not specifyingany value for the vram bar size would result in a 4096 byte surfacearea. This is ok for the windows driver but causes the X driver to be...
qxl: init_pipe_signaling: exit on failure
If pipe creation fails, exit, don't log and continue. Fix indentation atthe same time.
qxl: switch qxl.c to trace-events
dprint is still used for qxl_init_common one time prints.
also switched parts of spice-display.c over, mainly all the callbacks tospice server.
All qxl device trace events start with the qxl device id.
Signed-off-by: Alon Levy <alevy@redhat.com>...
hw/qxl.c: Fix compilation failures on 32 bit hosts
Fix compilation failures on 32 bit hosts (cast from pointer tointeger 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>...
qxl: add optinal 64bit vram bar
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 thanthe 32bit bar. Both 32bit and 64bit bar refer to the same memory. Onlythe first part of the memory is available via 32bit bar....
qxl: introduce QXLCookie
Will be used in the next patch.
qxl: make qxl_render_update async
RHBZ# 747011
Removes the last user of QXL_SYNC when using update drivers that use the_ASYNC io ports.
The last user is qxl_render_update, it is called both by qxl_hw_updatewhich is the vga_hw_update_ptr passed to graphic_console_init, and by...
qxl: fix spice+sdl no cursor regression
regression introduced by 075360945860ad9bdd491921954b383bf762b0e5,
v2: lock around qemu_spice_cursor_refresh_unlocked
Reported-by: Fabiano Fidêncio <fabiano@fidencio.org>Signed-off-by: Alon Levy <alevy@redhat.com>...
qxl: require spice >= 0.8.2
drop all ifdefs on SPICE_INTERFACE_QXL_MINOR >= 1 as a result,any check for SPICE_SERVER_VERSION that is now always satisfied,and SPICE_INTERFACE_CORE_MINOR >= 3 tests, because0.8.2 has SPICE_INTERFACE_QXL_MINOR 1 andSPICE_INTERFACE_CORE_MINOR 3....
optimize screendump for the common non-switch case
switch console only if needed, also pass down whenever the console wasswitched or not because a displaysurface redraw is only needed in casethe console was switched.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
qxl: drop vram bar minimum size
There is no reason to require a minimum size of 16 MB for the vram.Lower the limit to 4096 (one page). Make it disapper completely wouldbreak guests.
qxl: move ram size init to new function
Factor memory bar sizing bits out to a separate function.
qxl: add user-friendly bar size properties
Add two properties to specify bar sizes in megabytes instead of bytes,which is alot more user-friendly.
qxl: fix warnings on 32bit
qxl: set only off-screen surfaces dirty instead of the whole vram
We used to assure the guest surfaces were saved before migration bysetting the whole vram dirty. This patch sets dirty only the areasthat are actually used in the vram.
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>...
qxl: make sure primary surface is saved on migration also in compat mode
RHBZ #790083
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: prepare source tree for code conversion
These are various small stylistic changes which help make things moreconsistent such that the automated conversion script can be simpler.
It's not necessary to agree or disagree with these style changes because all...
memory: change dirty setting APIs to take a size
Instead of each target knowing or guessing the guest page size,just pass the desired size of dirtied memory area.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qxl: Slot sanity check in qxl_phys2virt() is off by one, fix
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
vmstate, memory: decouple vmstate from memory API
Currently creating a memory region automatically registers it forlive migration. This differs from other state (which is enumeratedin a VMStateDescription structure) and ties the live migration codeinto the memory core....
qxl: fix vga port initialization.
Commit 0a039dc70096b768d3810afa50ba1d214768aaf4 broke vga modes forqxl-vga by loosing vga_ioport_read windup. qxl needs to hook intovga port writes only and used to realize that by letting vga_init() dothe work for both reads and writes, then overwrite the write function....
qxl: create slots on post_load in vga state
RHBZ 740547
If we migrate when the device is in vga state the gueststill believes the slots are created, and will cause operationsthat reference the slots, causing a "panic: virtual address out of range" on the first of them. Easy to see by migrating in vga mode with...
qxl: factor out properties
qxl: fix guest cursor tracking
(1) If the guest cursor command is empty, don't reload it after migration.(2) Cleaning the guest cursor when it is released by the spice server. In addition, explicitly reset the cursor in spice upon destroying the primary surface...
qxl: reset update_surface
update init_qxl_ram to reset update_surface to 0. This fixes one caseof breakage when installing an old driver in a vm that had a new driverinstalled. The newer driver would know about surface creation and wouldchange update_surface to !=0, then a reset would happen, all surfaces...
qxl: Convert to QEMU thread API
Use QEMU thread API instead of pthread directly. We still need to getrid of pthread_yield, though, to drop pthread.h inclusion.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qxl: Drop phread_yield on OOM
This was only a best-effort attempt, by far not guaranteed to have aneffect. Drop it so that also no direct pthread usage remain in thedevice model.
vga: Convert to isa_register_portio_list
[jan: fix cut'n'paste errors][avi: adjust pci variants not to use isa functions]
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Avi Kivity <avi@redhat.com>