History | View | Annotate | Download (47.2 kB)
pixman: drop obsolete fields from DisplaySurface
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pixman: add pixman image to DisplaySurface
Surfaces are now allocated using pixman. DisplaySurface gets newstruct fields with pixman image and data. DisplayChangeListenerscan easily start using pixman now.
console: make qemu_alloc_display static
console: don't set PixelFormat alpha fields for 32bpp
Currently it is inconstent, PixelFormat->amask is left unset whereasabits and amax and ashift are filled. As an alpha channel doesn't makesense for the vga framebuffer leave all alpha fields clear....
console: untangle gfx & txt updates
Stop abusing displaysurface fields for text mode displays.(bpp = 0, width = cols, height = lines).
Add flags to displaystate indicating whenever text mode display(curses) or gfx mode displays (sdl, vnc, ...) are present....
console: remove DisplayAllocator
Causes [temporary] preformance regression with 24bpp vga modes @ sdl.
console: move set_mouse + cursor_define callbacks
When adding DisplayChangeListeners the set_mouse and cursor_definecallbacks have been left in DisplayState for some reason. Fix it.
console: s/TextConsole/QemuConsole/
TextConsole: saturate escape parameter in TTY_STATE_CSI
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
console: Clean up bytes per pixel calculation
Division with round up is the correct way to compute this even if theonly case where division with round down gives incorrect result isprobably 15 bpp. This case was explicitely patched up in one of thesefunctions but was unhandled in the other. (I'm not sure about setting...
console: vga_hw_screen_dump_ptr: take Error argument
All devices that register a screen dump callback viagraphic_console_init() are updated.
The new argument is not used in this commit. Error handling willbe added to each device individually later.
This change is a preparation to convert the screendump command...
qapi: convert screendump
Next commits will update devices to propagate errors.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
console: bounds check whenever changing the cursor due to an escape code
This is XSA-17 / CVE-2012-3515
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
console: Fix warning from clang (and potential crash)
ccc-analyzer reports this warning:
console.c:1090:29: warning: Dereference of null pointer if (active_console->cursor_timer) { ^
Function console_select allows active_console to be NULL,...
console: Implementing blinking of cursor
Let the text console cursor blink at 2 HZ.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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>...
Remove screendump dummy functions.
The code in console.c verifies whenever a screen_dump functionpointer is present before calling it, so there is no need to supply andummy function. Remove them. Also report an error to notify the userthat he didn't got a screenshot....
console: Eliminate text_consoles[]
Simply use consoles[] instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "qemu-char: Print strerror message on failure" and deps
The commit's purpose is laudable:
The only way for chardev drivers to communicate an error was to return a NULL pointer, which resulted in an error message that said that something went wrong, but not why....
console: Fix segfault on screendump without VGA adapter
When trying to create a screen dump without having any VGA adapterinside the guest, QEMU segfaults.
This is because it's trying to switch back to the "previous" screenit was on before dumping the VGA screen. Unfortunately, in my case...
console: Clean up confusing indentation in console_putchar()
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
console: Fix console_putchar() for CSI J
It falls through to the code for CSI K. "Erase Down" also does "EraseEnd of Line", "Erase Up" also does "Erase Start of Line", and "EraseScreen" also does "Erase Line". Happens not to be visible. Fix itanyway. Spotted by Coverity....
console: Fix qemu_default_pixelformat() for 24 bpp
Falls through to 32 bpp. Harmless, because the only difference is thealpha component, and we're not using that. Spotted by Coverity.
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Markus Armbruster <armbru@redhat.com>...
console: Fix rendering of VGA underline
vga_putcharxy()'s underline code sets font_data to 0xffff instead of0xff. vga_putcharxy() then reads dmask16[0xffff >> 4] anddmask4[0xffff >> 6]. In practice, these out-of-bounds subscripts"only" put a few crap bits into the display surface....
Fix mismatching allocation and deallocation
This error was reported by cppcheck.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
console: Properly switch consoles for screen dumps
Do not mess with active_console, use console_select instead. This fixescorrupt virtual monitor consoles after issuing the screendump command.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
curses: fix garbling when chtype != long
Qemu currently assumes that chtype is typedef'd to unsigned long, butthis is not necessarily the case (ncurses, for instance, can configurethis at build-time). This patch uses the predefined chtype if qemu isconfigured for curses support and falls back to unsigned long otherwise....
char: remove qemu_chr_send_event()
It's dead code.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: rename qemu_chr_read() -> qemu_chr_be_write()
char: rename qemu_chr_can_read() -> qemu_chr_be_can_read()
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
qemu-char: Print strerror message on failure
The only way for chardev drivers to communicate an error was to return a NULLpointer, which resulted in an error message that said that something wentwrong, but not why.
This patch changes the interface to return 0/-errno and updates...
Align dummy display to fixed-size active console
This fixes e.g. '-vga none -monitor vc:120Cx50C'.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix segfault on screendump with -nographic
When running -nographic and calling "screendump" on the monitor, qemusegfaults. Fix the invalid pointer dereference by checking for NULL.
Signed-off-by: Alexander Graf <agraf@suse.de>
Consolidate DisplaySurface allocation in qemu_alloc_display()
This removes various code duplication from console.e and sdl.c
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
change all rt_clock references to use millisecond resolution accessors
This was done with:
sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \ $(git grep -l 'get_clock\>.*rt_clock' ) sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \...
create TextConsole together with the CharDeviceState
A nicer solution would be to get rid of the opaque pointer anduse containment, but it would also be a much bigger patch.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
add set_echo implementation for text consoles
remove text_console_opts
console: Avoid dereferencing NULL active_console
The console_select() function does not check that active_console isnon-NULL before dereferencing it. When invoked with qemu -nodefaults itis possible to hit this case.
This patch checks that active_console is non-NULL before stashing away...
check for active_console before using it
Other vga_hw_* functions do the same.Fixes a segmentation fault. Trigger: boot with -nodefaults,then connect via vnc.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add support for depth 15 to qemu_default_pixelformat()
Makes qemu_default_pixelformat(15) return pixelformat filled for 15 bitcolor depth (16 bpp, 5 bits for red,green,blue each, 1 bit unused).
Remove dead assignments in various common files, spotted by clang analyzer
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
move default allocator to console.c
Moving stuff in console.c to avoid the need for prototypes makesthis patch a bit bigger, but there's no change in the code.
vc: colorize chardev title line with blue background.
chardev: move greeting into vc backend.
Make the 'vc' chardev backend print a title line with the chardev nameafter initialization, using CharDriverState->label.
This replaces the banner printing code in vl.c.
char: rename qemu_chr_reset to qemu_chr_generic_open
This function sends out the OPENED event to backends thathave drive the chardevs. The 'reset' is now a historicalartifact and we can now just call the function for what itis.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
convert vc chardev to QemuOpts.
new cmd line syntax: -chardev vc,id=name -chardev vc,id=name,width=pixels,height=pixels -chardev vc,id=name,cols=chars,rows=chars
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162
DisplayAllocator interface (Stefano Stabellini)
Hi all,this patch adds a DisplayAllocator interface that allows displayfrontends (sdl in particular) to provide a preallocated display bufferfor the graphical backend to use.
Whenever a graphical backend cannot use...
Sparse fixes: NULL use, header order, ANSI prototypes, static
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
vnc fixes and improvements (Stefano Stabellini)
this patch fixes a bug and improves the generic pixel conversionfunction in vnc.c.The bug is that when a new vnc client connects we need to reset the flaghas_WMVi but currently we don't.The generic pixel conversion function is vnc_convert_pixel and currently...
fix endianness problem sharing the videoram buffer
[ The following text is in the "UTF-8" character set. ]
[ Your display is set for the "koi8-r" character set. ]
[ Some characters may be displayed incorrectly. ]
This patch fixes vga rendering when the guest endianness differs from...
re-fix screendump (Stefano Stabellini)
Removing the assumption about a single graphic console madeget_graphic_console return NULL when called by vga_screen_dump.In this case returning NULL is correct but since NULL is not handled inqemu_console_resize it causes a segmentation fault....
fix curses interface (Stefano Stabellini)
Hi all,this patch fixes the curses interface: when we switch from one consoleto another we need to change the displaystate width and height eventhough in the curses case the backing buffer remains of the same size....
Coalesce virtual console screen updates.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6374 c046a42c-6fe2-441c-8c8c-71466251a162
add an init function parameter to qemu_chr_open()
And use it for the malta emulation. Fix segfault introduced inrevision 6352.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162
console: remove trailing spaces
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6355 c046a42c-6fe2-441c-8c8c-71466251a162
Squash warnings in console.c
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6354 c046a42c-6fe2-441c-8c8c-71466251a162
Remove assumption about a single graphic console.
This fixes a fault with the jazz_led since it has two graphic consoles.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6353 c046a42c-6fe2-441c-8c8c-71466251a162
Fix character devices after DisplayState refactoring
The DisplayState refactoring changed the machine init function to create aDisplayState for each VGA device instead of being passed an existingDisplayState. This change is critical to enable multiple graphics device...
Fix warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6346 c046a42c-6fe2-441c-8c8c-71466251a162
graphical_console_init change (Stefano Stabellini)
Patch 5/7
This patch changes the graphical_console_init function to return anallocated DisplayState instead of a QEMUConsole.
This patch contains just the graphical_console_init change and few othermodifications mainly in console.c and vl.c....
DisplayState interface change (Stefano Stabellini)
This patch changes the DisplayState interface adding support formultiple frontends at the same time (sdl and vnc) and implements mostof the benefit of the shared_buf patch without the added complexity....
Introduce accessors for DisplayState (Stefano Stabellini)
Introducing some accessors:
ds_get_linesizeds_get_bits_per_pixelds_get_widthds_get_heightds_get_data
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Reintroduce TEXT_CONSOLE_FIXED_SIZE and TEXT_CONSOLE for resizable vc's.
This partially reverts r4812 to fix an issue highlighted by Ryan Harperwith all vc's being fixed size which prevented backends with resizablewindow (curses) from displaying okay....
Don't use ds->dpy_copy directly from hw/ (Jan Niehusmann).
I left a TODO in the code because this still doesn't definitelyfix all issues.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5308 c046a42c-6fe2-441c-8c8c-71466251a162
Fix typo in console.c comment
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5129 c046a42c-6fe2-441c-8c8c-71466251a162
Force screen resize if no buffer set (Avi Kivity).
This is a hack to get screen_dump to work, we should start using a globalscreen_dump method.
Signed-off-by: Avi Kivity <avi@qumranet.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4903 c046a42c-6fe2-441c-8c8c-71466251a162
Pretend to be the active console while a screendump takes place (Avi Kivity).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4901 c046a42c-6fe2-441c-8c8c-71466251a162
Implement resolution switching in common console code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4812 c046a42c-6fe2-441c-8c8c-71466251a162
Add an ncurses UI.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3976 c046a42c-6fe2-441c-8c8c-71466251a162
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
Miscellaneous VNC related fixes from Xen forwarded by Matthew Kent.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3489 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
New features for QEMU text console, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3068 c046a42c-6fe2-441c-8c8c-71466251a162
Serial console improvements, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2412 c046a42c-6fe2-441c-8c8c-71466251a162
Rearrange char event handlers to fix CHR_EVENT_RESET.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2361 c046a42c-6fe2-441c-8c8c-71466251a162
Improved console handling, thanks Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2322 c046a42c-6fe2-441c-8c8c-71466251a162
Reinitialize monitor upon reconnect, by Anthony Liguori.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2300 c046a42c-6fe2-441c-8c8c-71466251a162
fixed LF interpretation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2054 c046a42c-6fe2-441c-8c8c-71466251a162
avoid name conflicts
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2015 c046a42c-6fe2-441c-8c8c-71466251a162
send correctly long key sequences on slow terminals - fixes backspace handling
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2012 c046a42c-6fe2-441c-8c8c-71466251a162
Allow multiple graphics devices.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1803 c046a42c-6fe2-441c-8c8c-71466251a162
Improved terminal emulation (Piotr Esden-Tempski).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1773 c046a42c-6fe2-441c-8c8c-71466251a162
monitor fixes (Johannes Schindelin)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1109 c046a42c-6fe2-441c-8c8c-71466251a162
console focus support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1032 c046a42c-6fe2-441c-8c8c-71466251a162
virtual console
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1024 c046a42c-6fe2-441c-8c8c-71466251a162