History | View | Annotate | Download (57.3 kB)
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
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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/
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
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
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
qxl: fix cmdlog for vga
spice: don't create updates in spice server context.
This patch moves the creation of spice screen updates from the spiceserver context to qemu iothread context (display refresh timer to beexact). This way we avoid accessing qemu internals (display surface)...
spice: don't call displaystate callbacks from spice server context.
This patch moves the displaystate callback calls for setting the cursorand the mouse pointer from spice server to qemu (iothread) context.This allows us to simplify locking.
spice: drop obsolete iothread locking
We don't use qemu internals from spice server context any more.Thus we don't also need to grab the iothread mutex from spiceserver context. And we don't have to temporarely release thelock to avoid deadlocks. Drop all the calls....
qxl: locking fix
One spice worker call lacks the unlock/relock calls,which may lead to deadlocks, add them.
spice/qxl: zap spice 0.4 migration compatibility bits
Live migration from and to spice 0.4 qxl devices isn't going to work.Rip out the bits which attempt to support that. Zap the subsectionlogic which is obsolete now. Bumb the version to make a clean cut....
qxl: tag as not hotpluggable
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
spice: add qxl device
qxl is a paravirtual graphics card. The qxl device is the bridgebetween the guest and the spice server (aka libspice-server). Thespice server will send the rendering commands to the spice client, whichwill actually render them....