Statistics
| Branch: | Revision:

root / hw / qxl.c @ a0f42610

History | View | Annotate | Download (57.4 kB)

# Date Author Comment
c5705a77 01/04/2012 01:34 pm Avi Kivity

vmstate, memory: decouple vmstate from memory API

Currently creating a memory region automatically registers it for
live migration. This differs from other state (which is enumerated
in a VMStateDescription structure) and ties the live migration code
into the memory core....

f67ab77a 11/07/2011 06:57 pm Gerd Hoffmann

qxl: fix vga port initialization.

Commit 0a039dc70096b768d3810afa50ba1d214768aaf4 broke vga modes for
qxl-vga by loosing vga_ioport_read windup. qxl needs to hook into
vga port writes only and used to realize that by letting vga_init() do
the work for both reads and writes, then overwrite the write function....

54825d2e 11/01/2011 02:24 pm Alon Levy

qxl: create slots on post_load in vga state

RHBZ 740547

If we migrate when the device is in vga state the guest
still believes the slots are created, and will cause operations
that 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...

78e60ba5 10/25/2011 03:00 pm Gerd Hoffmann

qxl: factor out properties

Signed-off-by: Gerd Hoffmann <>

30f6da66 10/25/2011 03:00 pm Yonit Halperin

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...

9f0f352d 10/25/2011 03:00 pm Alon Levy

qxl: reset update_surface

update init_qxl_ram to reset update_surface to 0. This fixes one case
of breakage when installing an old driver in a vm that had a new driver
installed. The newer driver would know about surface creation and would
change update_surface to !=0, then a reset would happen, all surfaces...

691f5c7b 10/25/2011 03:00 pm Jan Kiszka

qxl: Convert to QEMU thread API

Use QEMU thread API instead of pthread directly. We still need to get
rid of pthread_yield, though, to drop pthread.h inclusion.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Gerd Hoffmann <>

4ec8d307 10/25/2011 03:00 pm Jan Kiszka

qxl: Drop phread_yield on OOM

This was only a best-effort attempt, by far not guaranteed to have an
effect. Drop it so that also no direct pthread usage remain in the
device model.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Gerd Hoffmann <>

0a039dc7 10/11/2011 04:57 pm Richard Henderson

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 <>
Signed-off-by: Jan Kiszka <>
Signed-off-by: Avi Kivity <>

1dfb4dd9 09/15/2011 10:39 pm Luiz Capitulino

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 ideal
because the VMSTOP macros tell why qemu stopped and not exactly
what the current VM state is....

a680f7e7 09/07/2011 10:20 am Peter Maydell

hw/qxl: Fix format string errors

Fix format string errors causing compile failure on 32 bit hosts
when spice is enabled.

Signed-off-by: Peter Maydell <>
Signed-off-by: Gerd Hoffmann <>

efbf2950 09/07/2011 10:20 am Yonit Halperin

qxl: send interrupt after migration in case ram->int_pending != 0, RHBZ #732949

if qxl_send_events was called from spice server context, and then
migration had completed before a call to pipe_read, the target
guest qxl driver didn't get the interrupt. In addition,...

40010aea 09/07/2011 10:20 am Yonit Halperin

qxl: s/qxl_set_irq/qxl_update_irq/

Signed-off-by: Yonit Halperin <>
Signed-off-by: Gerd Hoffmann <>

12d4536f 09/02/2011 06:34 pm Anthony Liguori

main: force enabling of I/O thread

Enabling the I/O thread by default seems like an important part of declaring
1.0. Besides allowing true SMP support with KVM, the I/O thread means that the
TCG VCPU doesn't have to multiplex itself with the I/O dispatch routines which...

be20f9e9 08/22/2011 06:47 pm Avi Kivity

vga: drop get_system_memory() from vga devices and derivatives

Instead, use the bus accessors, or get the address space directly
from the board constructor.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

c5f3dabb 08/10/2011 06:27 pm Alon Levy

qxl: unbreak after memory API conversion

Break is only noticable with newer spice-server library (0.8.2 release
or 0.9.0 and newer on master branch).

ioport_write's val was changed from uint32_t to uint64_t, this
broke two printfs. Use PRId64 instead of %d....

be48e995 08/10/2011 06:27 pm Yonit Halperin

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 was
triggered by qxl_pre_load (which calls qxl_hard_reset, which calls qxl_soft_reset),...

e824b2cc 08/08/2011 06:22 pm Avi Kivity

pci: rename pci_register_bar_region() to pci_register_bar()

Reviewed-by: Richard Henderson <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

b1950430 08/08/2011 06:15 pm Avi Kivity

vga: convert vga and its derivatives to the memory API

Convert all vga memory to the memory API. Note we need to fall back to
get_system_memory(), since the various buses don't pass the vga window
as a memory region.

We no longer need to sync the dirty bitmap of the cirrus mapped memory...

3e16b9c5 08/03/2011 01:03 pm Alon Levy

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)....

9197a7c8 08/03/2011 01:03 pm Gerd Hoffmann

qxl: bump pci rev

Inform guest drivers about the new features I/O commands we have
now (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 <>...

5ff4e36c 08/03/2011 01:03 pm Alon Levy

qxl: async io support using new spice api

Some of the QXL port i/o commands are waiting for the spice server to
complete certain actions. Add async versions for these commands, so we
don't block the vcpu while the spice server processses the command.
Instead the qxl device will raise an IRQ when done....

5c59d118 08/01/2011 01:43 pm Gerd Hoffmann

spice: add worker wrapper functions.

Add wrapper functions for all spice worker calls.

Signed-off-by: Gerd Hoffmann <>

a963f876 08/01/2011 01:43 pm Gerd Hoffmann

spice: add qemu_spice_display_init_common

Factor out SimpleSpiceDisplay initialization into
qemu_spice_display_init_common() and call it from
both qxl.c (for vga mode) and spice-display.c

Signed-off-by: Gerd Hoffmann <>

aee32bf3 08/01/2011 01:43 pm Gerd Hoffmann

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 a
qxl state pointer instead of a SimpleSpiceDisplay pointer.

Signed-off-by: Gerd Hoffmann <>

14898cf6 08/01/2011 01:43 pm Gerd Hoffmann

qxl: fix surface tracking & locking

Surface tracking needs proper locking since it is used from vcpu and spice
worker threads, add it. Also reset the surface counter when zapping all
surfaces.

Signed-off-by: Gerd Hoffmann <>

8b92e298 08/01/2011 01:43 pm Alon Levy

qxl: add io_port_to_string

Signed-off-by: Alon Levy <>
Signed-off-by: Gerd Hoffmann <>

2bce0400 08/01/2011 01:43 pm Gerd Hoffmann

qxl: error handling fixes and cleanups.

Add qxl_guest_bug() function which is supposed to be called in case
sanity checks of guest requests fail. It raises an error IRQ and
logs a message in case guest debugging is enabled.

Make PANIC_ON() abort instead of exit. That macro should be used...

7635392c 08/01/2011 01:43 pm Alon Levy

qxl: make qxl_guest_bug take variable arguments

Signed-off-by: Alon Levy <>
Signed-off-by: Gerd Hoffmann <>

e21a298a 08/01/2011 01:43 pm Alon Levy

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.

Signed-off-by: Alon Levy <>
Signed-off-by: Gerd Hoffmann <>

8927cfbb 07/20/2011 11:08 am Yonit Halperin

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 process
commands while the guest is not completely loaded....

638f4e47 07/04/2011 04:35 pm Gerd Hoffmann

qxl: device id fixup

Move device ID to PCIDeviceInfo.
Remove support for the unused unstable device ID.

Signed-off-by: Gerd Hoffmann <>

5b77870c 07/04/2011 04:35 pm Alon Levy

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.

Signed-off-by: Gerd Hoffmann <>

6ebebb55 07/04/2011 04:35 pm Alon Levy

qxl: add dev id to guest prints

Signed-off-by: Gerd Hoffmann <>

868379ce 07/04/2011 04:35 pm Yonit Halperin

qxl: make sure primary surface is saved on migration

Signed-off-by: Gerd Hoffmann <>

81144d1a 07/04/2011 04:35 pm Gerd Hoffmann

qxl: put QXL_IO_UPDATE_IRQ into vgamode whitelist

Signed-off-by: Gerd Hoffmann <>

a3d14054 07/04/2011 04:35 pm Alon Levy

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.

Signed-off-by: Gerd Hoffmann <>

befeac45 06/15/2011 06:27 pm Michael S. Tsirkin

Merge remote-tracking branch 'origin/master' into pci

Conflicts:
hw/virtio-pci.c

96c05abc 06/12/2011 10:33 am Isaku Yamahata

hw/qxl.c: convert to PCIDeviceInfo to initialize ids

use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Michael S. Tsirkin <>

212496c9 06/06/2011 10:14 am Alon Levy

qxl: fix cmdlog for vga

Signed-off-by: Alon Levy <>
Signed-off-by: Gerd Hoffmann <>

e0c64d08 05/03/2011 04:35 pm Gerd Hoffmann

spice: don't create updates in spice server context.

This patch moves the creation of spice screen updates from the spice
server context to qemu iothread context (display refresh timer to be
exact). This way we avoid accessing qemu internals (display surface)...

07536094 05/03/2011 04:35 pm Gerd Hoffmann

spice: don't call displaystate callbacks from spice server context.

This patch moves the displaystate callback calls for setting the cursor
and the mouse pointer from spice server to qemu (iothread) context.
This allows us to simplify locking.

Signed-off-by: Gerd Hoffmann <>

196a7784 05/03/2011 04:35 pm Gerd Hoffmann

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 spice
server context. And we don't have to temporarely release the
lock to avoid deadlocks. Drop all the calls....

17268d54 01/24/2011 04:15 pm Gerd Hoffmann

qxl: locking fix

One spice worker call lacks the unlock/relock calls,
which may lead to deadlocks, add them.

Signed-off-by: Gerd Hoffmann <>

b67737a6 01/24/2011 04:13 pm Gerd Hoffmann

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 subsection
logic which is obsolete now. Bumb the version to make a clean cut....

2f6bfe3b 01/10/2011 01:43 pm Gerd Hoffmann

qxl: tag as not hotpluggable

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Michael S. Tsirkin <>

a19cbfb3 12/09/2010 03:23 pm Gerd Hoffmann

spice: add qxl device

qxl is a paravirtual graphics card. The qxl device is the bridge
between the guest and the spice server (aka libspice-server). The
spice server will send the rendering commands to the spice client, which
will actually render them....