| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes several bugs in serial.c
(1) A typo in serial_save() where qemu_get_8s is called (should be
qemu_put_8s)
(2) No support provided in serial_load() for version_id == 1 (should
unmarshal a 1 byte s->divider and should provide a default value
for s->fcr)
(3) Call serial_ioport_write() to initialize s->fcr. It is not
sufficient to load its value; other hidden values (such as
s->recv_fifo.itl) must be re-initialized.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
|
|
|
|
|
|
|
|
|
|
| |
The recent fix to validate the frontend's frame buffer description
neglected to limit the frame buffer size correctly. This lets a
malicious frontend make the backend attempt to map an arbitrary amount
of guest memory, which could be useful for a denial of service attack
against dom0.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch sends a UNIT_ATTENTION(6), MEDIUM_MAY_HAVE_CHANGED(0x28) sense
when cdrom transitions from not ready to ready.
ATA Packet interface for CD-ROMS, SFF8020i.pdf. See state diagram
Figure 12, page 82 and Table 44 -recommended Sense Key, ASC
With patch in place HVM win2008 server guest sees the CD/DVD contents
have changed when the media is switched.
Signed-off-by: Pat Campbell <plc@novell.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A buggy or malicious frontend can describe its shared framebuffer to
the backend in a way that makes the backend map an arbitrary amount of
guest memory, malloc an arbitrarily large internal buffer, copy
arbitrary memory to that buffer, even beyond its end. A domU running
a malicious frontend can abuse the former two for denial of service
attacks against dom0. It can abuse the third to write arbitrary
backend memory. It can abuse all three to terminate or crash the
backend. Arbitrary code execution looks quite feasible.
In more detail (ignoring #ifdef CONFIG_STUBDOM code):
The frame buffer is described by the following parameters:
* fb_len (size of shared framebuffer)
* width, height, depth
* row_stride, offset
fb_len is fixed on startup. The frontend can modify the other
parameters by sending a XENFB_TYPE_RESIZE event.
xenfb_read_frontend_fb_config() limits fb_len according to backend
configuration parameter videoram (from xenstore), if present. I
believe videoram is not present by default.
xenfb_map_fb() uses fb_len to map the frontend's framebuffer.
The frontend can make it map arbitrarily much, unless limited by the
videoram configuration parameter. This flaw always existed.
xenfb_register_console() and xenfb_on_fb_event() pass width, height,
depth and rowstride to QEMU's DisplayState object. The object sets
itself up to work directly on the framebuffer (shared_buf true) if
parameters allow that. Else it allocates an internal buffer of size
height * width * depth / 8 (shared_buf false).
The frontend can make it allocate arbitrarily much. This flaw always
existed.
xenfb_register_console() and xenfb_on_fb_event() pass width, height,
depth and rowstride to QEMU's DisplayState object. The object sets
itself up to work directly on the framebuffer (shared_buf true) if
parameters allow that. Else it allocates an internal buffer of size
height * width * depth / 8 (shared_buf false).
The frontend can make it allocate arbitrarily much. This flaw was
introduced by the move of PVFB into QEMU (xen-unstable cset 16220
ff).
xenfb_on_fb_event() uses width and height to clip the area of an
update event. It then passes that area to xenfb_guest_copy().
xenfb_invalidate() passes the complete screen area to
xenfb_guest_copy(). xenfb_guest_copy() copies the argument area (x,
y, w, h) into the internal buffer, unless shared_buf is true. This
copies h blocks of memory. The i-th copy (counting from zero) copies
w * depth / 8 bytes
from
shared framebuffer + offset + (y + i) * row_stride + x * depth / 8
to
internal buffer + (y + i) * ds->linesize + x * ds->depth / 8
where ds->linesize and ds->depth are parameters of the internal buffer
chosen by the backend.
This copy can be made to read from the shared framebuffer and write to
the internal buffer out of bounds. I believe the frontend can abuse
this to write arbitrary backend memory.
The flaw in its current form was introduced by the move of PVFB into
QEMU (xen-unstable cset 16220 ff). Before, the framebuffer was always
shared.
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
| |
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
|
|
| |
which permits the frontend to avoid useless polls.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
| |
Signed-off-by: Shan Haitao <Haitao.shan@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
This adds a new HVM op that enables tracking dirty bits of a range of
video RAM. The idea is to optimize just for the most common case
(only one guest mapping, with sometimes some temporary other
mappings), which permits to keep the overhead on shadow as low as
possible.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
|
| |
by not calling get_bpp() (which only makes sense in graphical mode)
and always use 0 instead.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
|
| |
Currently it only inercept access to MSI config space, no MSI-x support.
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
|
|
|
|
|
| |
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, ioemu can be out of sync with the hypervisor after
restoring guest state, if INTx lines were asserted when the state was
saved. This prevents ioemu from setting the line to zero in Xen
(because it thinks the line is already zero). This can allow th eguest
to enter an endless IRQ loop and hang.
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
|
|
|
|
|
| |
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.
Signed-off-by: Kevin Wolf <kwolf@suse.de>
|
|
|
|
|
|
| |
Breaks HVM guest creation (bugzilla #1221).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
|
|
|
|
|
| |
When a domain wants to use a tap:ioemu disk but has no device model,
start a tapdisk-ioemu instance as provider. Also, move the creation
and removal of communication pipes to xend so that qemu-dm doesn't
need the unwanted SIGHUP handler anymore.
Signed-off-by: Kevin Wolf <kwolf@suse.de>
|
|
|
|
|
|
|
|
| |
which with the offset support also permits to expose the VGA vram and
non-shared vram throught PVFB at the same time, switching between both
as appropriate.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
|
| |
instead of dom0.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
|
|
|
|
| |
Windows VMs. Return an error if the guest OS tries to transmit a
packet with the transmitter disabled, so that it doesn't spin forever
waiting for it to complete.
Signed-off-by: Steven Smith <Steven.Smith@eu.citrix.com>
|
|
|
|
| |
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
| |
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Backport from qemu upstream.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Also support depth change.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
| |
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
| |
by increasing the size of DMA buffers.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
| |
as upstream qemu now does
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
| |
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
|
|
|
| |
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
| |
From: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
by fixing divisions / multiplications into using width-1.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| |
| | |
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
| |
| |
| |
| |
| |
| | |
relative, not absolute.
From: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
| |
- Correct a parameter to xc_map_foreign_batch(). skipping vga hole.
- sync_icache() might overrun a page boundary. qemu-dm will die.
This re-enables HVM support after cset
99478ffd81ee8685e6376210a1bd654c3790bf8d in linux-2.6.18-xen.hg
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the qemu WMVi patch is applied we can take full advantage of
it sharing the video buffer between the vga driver and the qemu vnc
server. This saves a lot of memcpy. It's worth mentioning again that
when the guest colour depth is 24 bit we cannot share the buffer
because 24 bpp is not supported by the vnc protocol, so we still have
to do the translation 24 bpp -> 32 bpp.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|