History | View | Annotate | Download (76 kB)
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
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
Replace the VMSTOP macros with a proper state type
Today, when notifying a VM state change with vm_state_notify(),we pass a VMSTOP macro as the 'reason' argument. This is not idealbecause the VMSTOP macros tell why qemu stopped and not exactlywhat the current VM state is....
hw/qxl: Fix format string errors
Fix format string errors causing compile failure on 32 bit hostswhen spice is enabled.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qxl: send interrupt after migration in case ram->int_pending != 0, RHBZ #732949
if qxl_send_events was called from spice server context, and thenmigration had completed before a call to pipe_read, the targetguest qxl driver didn't get the interrupt. In addition,...
qxl: s/qxl_set_irq/qxl_update_irq/
main: force enabling of I/O thread
Enabling the I/O thread by default seems like an important part of declaring1.0. Besides allowing true SMP support with KVM, the I/O thread means that theTCG VCPU doesn't have to multiplex itself with the I/O dispatch routines which...
vga: drop get_system_memory() from vga devices and derivatives
Instead, use the bus accessors, or get the address space directlyfrom the board constructor.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
qxl: unbreak after memory API conversion
Break is only noticable with newer spice-server library (0.8.2 releaseor 0.9.0 and newer on master branch).
ioport_write's val was changed from uint32_t to uint64_t, thisbroke two printfs. Use PRId64 instead of %d....
qxl: allowing the command rings to be not empty when spice worker is stopped RHBZ #728984
same as 8927cfbba232e28304734f7afd463c1b84134031, but for qxl_check_state, that wastriggered by qxl_pre_load (which calls qxl_hard_reset, which calls qxl_soft_reset),...
pci: rename pci_register_bar_region() to pci_register_bar()
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga: convert vga and its derivatives to the memory API
Convert all vga memory to the memory API. Note we need to fall back toget_system_memory(), since the various buses don't pass the vga windowas a memory region.
We no longer need to sync the dirty bitmap of the cirrus mapped memory...
qxl: add QXL_IO_FLUSH_{SURFACES,RELEASE} for guest S3&S4 support
Add two new IOs. QXL_IO_FLUSH_SURFACES - equivalent to update area for all surfaces, used to reduce vmexits from NumSurfaces to 1 on guest S3, S4 and resolution change (windows driver implementation is such that this is done on each of those occasions)....
qxl: bump pci rev
Inform guest drivers about the new features I/O commands we havenow (async commands, S3 support) if building with newer spice, i.e.if SPICE_INTERFACE_QXL_MINOR >= 1.
sneaked in some 81+ column line spliting.
qxl: async io support using new spice api
Some of the QXL port i/o commands are waiting for the spice server tocomplete certain actions. Add async versions for these commands, so wedon't block the vcpu while the spice server processses the command.Instead the qxl device will raise an IRQ when done....
spice: add worker wrapper functions.
Add wrapper functions for all spice worker calls.
spice: add qemu_spice_display_init_common
Factor out SimpleSpiceDisplay initialization intoqemu_spice_display_init_common() and call it fromboth qxl.c (for vga mode) and spice-display.c
spice/qxl: move worker wrappers
Move the wrapper functions which are used by qxl only to qxl.c.Rename them from qemu_spice_* to qxl_spice_*. Also pass in aqxl state pointer instead of a SimpleSpiceDisplay pointer.
qxl: fix surface tracking & locking
Surface tracking needs proper locking since it is used from vcpu and spiceworker threads, add it. Also reset the surface counter when zapping allsurfaces.
qxl: add io_port_to_string
qxl: error handling fixes and cleanups.
Add qxl_guest_bug() function which is supposed to be called in casesanity checks of guest requests fail. It raises an error IRQ andlogs a message in case guest debugging is enabled.
Make PANIC_ON() abort instead of exit. That macro should be used...
qxl: make qxl_guest_bug take variable arguments
qxl: only disallow specific io's in vga mode
Since the driver is still in operation even after moving to UNDEFINED, i.e.by destroying primary in any way.
qxl: upon reset, if spice worker is stopped, the command rings can be not empty
Spice worker does no longer process commands when it is stopped.Otherwise, it might crash during migration when attempting to processcommands while the guest is not completely loaded....
qxl: device id fixup
Move device ID to PCIDeviceInfo.Remove support for the unused unstable device ID.
qxl: interface_get_command: fix reported mode
report correct mode when in undefined mode.introduces qxl_mode_to_string(), and uses it in other places too.
qxl: add dev id to guest prints
qxl: make sure primary surface is saved on migration
qxl: put QXL_IO_UPDATE_IRQ into vgamode whitelist
qxl: allow QXL_IO_LOG also in vga
The driver may change us to vga mode and still issue a QXL_IO_LOG,which we can easily support.
Merge remote-tracking branch 'origin/master' into pci
Conflicts: hw/virtio-pci.c
hw/qxl.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>