aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ioemu
Commit message (Collapse)AuthorAgeFilesLines
...
* tools: Use PATH_MAX for pathname char arrays.Keir Fraser2008-04-042-4/+4
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* stubdom: warn about disabled featuresKeir Fraser2008-04-022-6/+9
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: advertise write cache as enabled only when it actually is.Keir Fraser2008-04-021-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu rendering fixesKeir Fraser2008-04-015-15/+47
| | | | | | | | | | | | | | | | | | | | - no need to call the colourdepth callback in text mode: the buffer cannot be shared anyway; - line size changes are currently undetected: since we added a linesize parameter to the resize callback, we also need to detect line size changes and call dpy_resize accordingly; - 8 bit colour depth with the shared framebuffer is broken: in order to fix it I disabled the shared buffer in vnc for the 8bit colour depth case (it has to be done in software anyway..) and implemented paletted colours in both opengl and sdl; - opengl rendering is broken when there is padding in the framebuffer lines: removing unnecessary GL_UNPACK_ALIGNMENT settings so that the GL_UNPACK_ROW_LENGTH parameter can work properly. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* ioemu: actually check for errors in bdrv_flush et alKeir Fraser2008-03-319-18/+30
| | | | | | | | | | | | bdrv_flush is declared to return void, but this is wrong because it means that the implementations have nowhere to report their errors. Indeed, the implementations generally ignore errors. This patch corrects this by making it return int (implicitly, either 0 or -errno, as for other similar functions). All of the implementations and callers are adjusted too. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* ioemu: ne2k buffer full bug fix, by Marcel Block.Keir Fraser2008-03-281-1/+1
| | | | | | Backport from qemu upstream. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* ioemu: Fall back to SDL rendering when GLX fails.Keir Fraser2008-03-281-9/+20
| | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* ioemu: Perform emulated IDE flushes asynchronously.Keir Fraser2008-03-287-6/+106
| | | | | | | | | | Fixes 'Windows Bug Check 0x101 issue' in which a VCPU gets tied up for so long doing a synchronous flush to disc that it misses critical timer events. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Modified-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* ioemu: Two qcow2 bug fixes from upstream qemu.Keir Fraser2008-03-271-0/+6
| | | | | | | | | | | [Qemu-devel] PATCH: qcow2 image corruption http://lists.gnu.org/archive/html/qemu-devel/2007-03/msg00773.html [Qemu-devel] [PATCH] qcow2: release refcount table clusters of the old table, after growing the refcount table http://lists.gnu.org/archive/html/qemu-devel/2007-04/msg00043.html Signed-off-by: Kevin Wolf <kwolf@suse.de>
* ioemu: Fix L1 table endianess of qcow images created by tapdiskKeir Fraser2008-03-261-0/+58
| | | | | | | | | | | | | | | The qemu/ioemu implementation of the qcow format uses a big endian L1 table. tapdisk omits the necessary conversion, so qcow images have the wrong endianess and cannot be read by correct implementations of qcow. This patch detects broken tapdisk images and converts their L1 tables to big endian when the image file is opened in ioemu for the first time. The fixed image has a new flag EXTHDR_L1_BIG_ENDIAN set in the extended header. Note that a converted image cannot be opened by tapdisk again. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* pvfb: Add offset in resize eventKeir Fraser2008-03-261-2/+6
| | | | | | Also support depth change. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: save IDE write cache flag.Keir Fraser2008-03-261-3/+6
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* xenfb: Dynamic modes support.Keir Fraser2008-03-261-0/+31
| | | | | | | | | | | | Attached patch adds dynamic frame buffer size support to the xenfb PV backend QEMU xenfb. Backend sets feature-resize and handles the resize frame buffer event. Corresponding frontend LINUX patch is required for functionality but this patch is not dependent on it, preserving backwards compatibility. Signed-off-by: Pat Campbell <plc@novell.com>
* stubdom: remove unnecessary includeKeir Fraser2008-03-251-3/+0
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: prefix phy devices with /dev/Keir Fraser2008-03-251-0/+7
| | | | | | just like blkif.py's _parse_uname does for PV guests. Closes bug #983. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: fix VNC case when switching from 32bpp to 24bppKeir Fraser2008-03-251-1/+1
| | | | | | | Even if we don't need to tell the client to redepth, we need to tell e.g. xenfb that we can't share the buffer any more. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: Fix vnc buffer sharing when linesize != width * depth.Keir Fraser2008-03-201-7/+10
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* minios: get VBD CD/removable/RO infoKeir Fraser2008-03-201-1/+2
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: improve DMA transfersKeir Fraser2008-03-202-9/+19
| | | | | | by increasing the size of DMA buffers. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: IDE should accept SETMULT 0Keir Fraser2008-03-201-1/+0
| | | | | | as upstream qemu now does Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: Allow VNC buffer sharing when linesize != width * depthKeir Fraser2008-03-202-9/+7
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* ioemu: Fix non-openGL resizeKeir Fraser2008-03-201-4/+6
| | | | | | We can not resize when OpenGL is not enabled. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: Initialize ioport_opaque, ioport_read/write_table to zeroKeir Fraser2008-03-201-3/+3
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: fix sdl opengl renderingKeir Fraser2008-03-191-4/+5
| | | | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* ioemu: Improve SDL openGL configure-script detection.Keir Fraser2008-03-191-2/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* stubdom: disable xen_blktapKeir Fraser2008-03-182-0/+4
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: Set subsystem vendor/device for ne2k device model.Keir Fraser2008-03-181-0/+4
| | | | | From: Kamala Narasimhan <kamala.narasimhan@citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* ioemu: SDL rendering using OpenGLKeir Fraser2008-03-184-12/+203
| | | | | | | | | | | | | | | | | | Add opengl support for rendering the guest framebuffer in the SDL window. SDL is needed anyway to open the window and handle the events. Opengl rendering is optional and can be turned off at both compile time and in the vm configuration file. Some of the benefits of using opengl are: - faster rendering, less CPU intensive, especially with good graphic cards; - makes the window resizing possible and hardware accelerated, thus very efficient and smooth; - allows other optimizations like sharing directly a buffer in vram with the guest (not yet implemented). Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* stubdom: fix select calls after CDROM ejectionKeir Fraser2008-03-181-0/+1
| | | | | | by calling qemu_set_fd_handler before closing the fd. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: support save/restore by passing the -loadvm parameter,Keir Fraser2008-03-181-2/+2
| | | | | | | letting the stubdomain access the save area, and having it watch the correct xenstore node. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Use ioemu block drivers through blktap.Keir Fraser2008-03-185-1/+759
| | | | | | | | | | Add support for a tap:ioemu pseudo driver. Devices using this driver won't use tapdisk (containing the code duplication) any more, but will connect to the qemu-dm of the domain. In this way no working configuration should be broken right now as you can still choose to use the tapdisk drivers. Signed-off-by: Kevin Wolf <kwolf@suse.de>
* ioemu: Let the USB tablet reach the far bottom and right pixelsKeir Fraser2008-03-053-8/+8
| | | | | | by fixing divisions / multiplications into using width-1. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: support shared framebuffer and linesize != width * depth.Keir Fraser2008-03-059-19/+22
| | | | | | | When sharing the buffer between e.g. xenfb and SDL, SDL must follow the line size. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: Slown down refresh interval when SDL is minimizedKeir Fraser2008-03-053-1/+15
| | | | | | as that saves us the VGA refresh scanning. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: improve colordepth negotiationKeir Fraser2008-03-042-19/+34
| | | | | | | | By moving the colourdepth callback a bit earlier, we can let the display decide the actual depth to be used before the draw and whether sharing is possible or not. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* ioemu: Fix segfault when creating qcow-backed vbds.Keir Fraser2008-03-033-9/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* ioemu: xenfb shared memory patchKeir Fraser2008-03-032-30/+46
| | | | | | | | Share the internal xenfb backend buffer with sdl or vnc. All the needed functions are already in place because have been implemented for the previous cirrus vga shared memory patch. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* ioemu: sdl blittingKeir Fraser2008-03-034-17/+81
| | | | | | | | | | | | | Right now qemu takes care of converting pixels between the guest pixel format and the sdl pixel format, after that qemu also memcpy the converted pixels to the sdl buffer in video ram. This process can be improved using the SDL blit capabilities: the patch I am attaching creates an SDL Surface from the Cirrus VGA framebuffer and uses SDL blitting functions to convert and write pixels to video ram. SDL blitting functions are optimized and can even be hardware accelerated on some platforms. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* ioemu: fix xenfb slow case update by shifting to the left beforeKeir Fraser2008-03-031-18/+34
| | | | | | | masking low bits instead of shifting to the right and masking high bits. Also adds 24bpp support. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* merge with xen-unstable.hgAlex Williamson2008-02-2913-20/+279
|\
| * stubdom: Fix compilation after abs_z to rel_z changeKeir Fraser2008-02-281-6/+4
| | | | | | | | | | From: Samuel Thibault <samuel.thibault@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * Rename struct xenkbd_position member abs_z to rel_z. Z-axis motion isKeir Fraser2008-02-281-3/+5
| | | | | | | | | | | | relative, not absolute. From: Markus Armbruster <armbru@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
| * ioemu: Send logs to stderr and have xend redirect stderr to theKeir Fraser2008-02-283-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correct log file. At the same time, this patch renames the logfile to be 'qemu-dm-{NAME}.log' instead of qemu-dm-{ID}.log. This makes it easier to track/find the QEMU logfile associated with a VM. It will also save 1 backup qemu-dm-{NAME}.log.1 so if a domain crashes & restart, you don't loose/overwrite the logfile immediately. Finally it changes the QEMU monitor prompt back to '(qemu)' instead of '(HVMXen)' because automated tools /scripts interacting with QEMU's monitor need a consistent prompt to look for & changing it for Xen serves no useful purpose. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
| * stubdom: use PVFB so as to e.g. permit SDL displayKeir Fraser2008-02-284-3/+247
| | | | | | | | | | | | | | | | This adds support in ioemu for PVFB frontend as stubdomain display. This permits for instance to use SDL in dom0 to perform the eventual display. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
| * ioemu: Expandable storage backends should defeat block-device range checks.Keir Fraser2008-02-277-7/+24
| | | | | | | | Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
| * ioemu: Fix e1000 mmio range size.Keir Fraser2008-02-271-1/+1
| | | | | | | | | | | | | | | | | | Per Intel 82540EM Software Developer's Manual pp. 211, the mmio size is 0x20000, or address overlapping occurs and causes the second card to fail, which happened to me earlier. From: Tina Yang <tina.yang@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* | merge with xen-unstable.hgAlex Williamson2008-02-269-27/+2046
|\|
| * ioemu: VNC updates should be sent only when requested.Keir Fraser2008-02-261-22/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading qemu code I realized that the qemu vnc server sometimes sends framebuffer updates even if the client didn't request any. This is not consistent with the RFB protocol spec and can break some clients. This patch strictly enforces compliance with the RFB protocol making sure framebuffer updates are sent only if the client requested one. Doing so is more difficult than it seems because some framebuffer pseudo-encoding updates cannot be discarded but must be sent anyway: for example desktop resize and pixel format change messages. To solve the problem I wrote a queue that stores those messages and sends them as soon as the client asks for an update. Since 90% of the times the queue is used to store only few elements, the queue allocates 10 elements at the beginning and every time it runs out of elements allocates other 10 elements. This is should drastically limit the number of malloc and free needed to maintain the queue. I did some stress tests in the last couple of days and seems to work well. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
| * ioemu: Do not sue xce_handle directly as a file descriptor.Keir Fraser2008-02-262-2/+2
| | | | | | | | | | | | | | xce handles are not supposed to be used as file descriptors, but xc_evtchn_fd() be used. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
| * ioemu: e1000 emulationKeir Fraser2008-02-265-1/+1868
| | | | | | | | | | | | | | | | | | This is a direct port of the e1000 driver currently in Qemu CVS with extremely minimal changes. This is useful for Xen as new OSes may not support the old 100Mbps NICs we currently support (especially on non-x86). Drivers for e1000 should be more readily available. Signed-off-by: Alex Williamson <alex.williamson@hp.com>