History | View | Annotate | Download (66.4 kB)
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
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
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>
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....