History | View | Annotate | Download (68.5 kB)
Move graphic-related coalesced MMIO flushes to affected device models
This is conceptually cleaner and will allow us to drop the nographictimer. Moreover, it will be mandatory to fully exploit future per-devicecoalesced MMIO rings.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
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>
vga: Respect isa_mem_base when registering chain4 alias
This does not yet unbreak PPC (which has its own problems) butpotentially other non-x86 systems where isa_mem_base is != 0.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga: Fix text mode screendumps
In text mode, even a full refresh of the screen takes multiple updates.As we reset the dump file pointer after the first call, we only wrotethe first line.
vga: Silence bogus gcc warning about uninitialized variables
Some gcc versions do not properly detect that all possible cases arecovered and base and size are always initialized. Please gcc by defininga pseudo default case.
vmware-vga: Eliminate vga_dirty_log_restart
After the conversion to the new Memory API, vga_dirty_log_restart becameseriously pointless. Remove it from vmware-vga and and then finally dropthe service.
CC: Andrzej Zaborowski <balrogg@gmail.com>CC: Avi Kivity <avi@redhat.com>...
vga: Use linear mapping + dirty logging in chain 4 memory access mode
Most VGA memory access modes require MMIO handling as they demand weirdlogic to get a byte from or into the video RAM. However, there is oneexception: chain 4 mode with all memory planes enabled for writing. This...
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.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga: simplify vga window mmio access functions
Make use of the memory API's ability to satisfy multi-byte accesses viamultiple single-byte accesses.
We have to keep vga_mem_{read,write}b() since they're used by cirrus.
Reviewed-by: Richard Henderson <rth@twiddle.net>...
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...
Optimize screendump
When running kvm-autotest, fputc() is often the second highest (sometimes #1)function showing up in a profile. This is due to fputc() locking the filefor every byte written.
Optimize by buffering a line's worth of pixels and writing that out in a...
change all other clock references to use nanosecond resolution accessors
This was done with:
sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' )...
vga-isa: convert to qdev
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Introduce log_start/log_stop in CPUPhysMemoryClient
In order to use log_start/log_stop with Xen as well in the vga code,this two operations have been put in CPUPhysMemoryClient.
The two new functions cpu_physical_log_start,cpu_physical_log_stop areused in hw/vga.c and replace the kvm_log_start/stop. With this, vga does...
Fix curses on big endian hosts
On big endian hosts, the curses interface is unusable: the emulatedgraphic card only displays garbage, while the monitor interface displaysnothing (or rather only spaces).
The curses interface is waiting for data in native endianness, so...
vga: Declare as little endian
This patch replaces explicit bswaps with endianness hints to themmio layer.
CC: Alexander Graf <agraf@suse.de>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
more stdvga cleanups.
video.x is gone now. It was the only user of thevga bios_offset + bios_size logic. Zap it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
VGA: Don't register deprecated VBE range
Old versions of the BOCHs VGA BIOS (cira 2003) made use of VBEregisters at 0xff80/81. In VBE API version 0xb0c2 these weremoved to 0x1ce/cf. Unfortunately, QEMU still registers handlersfor the old range. If a guest attempts to assign an I/O device...
qemu_ram_alloc: Add DeviceState and name parameters
These will be used to generate unique id strings for ramblocks. The namefield is required, the device pointer is optional as most callers don'thave a device. When there's no device or the device isn't a child of...
Fix %lld or %llx printf format use
vga: make some tables 'const'
vga: fix typo in length passed to kvm_log_stop
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
x86: remove dead assignments, spotted by clang analyzer
Value stored is never read.
update bochs vbe interface
The bochs vbe interface got a new register a while back, which specifiesthe linear framebuffer size in 64k units. This patch adds support forthe new register to qemu. With this patch applied vgabios 0.6c workswith qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
hw/vga.c: remove dead assignment
clang-analyzer points out a redundant assignment.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
VMware VGA: Only enable dirty log tracking when fifo is disabled
This patch enables dirty log tracking whenever it's needed and disables itwhen it is not.
We unconditionally enable dirty log tracking on reset, restart dirty logtracking when PCI IO regions are remapped, and disable/enable it based on...
Make sure to enable dirty tracking of VBE vram mapping
Apparently, VBE maps the VGA vram to a fixed physical location. KVM requiresthat all mappings of the VGA vram have dirty tracking enabled on them. Anyaccess to the VGA vram through the VBE mapping currently fails to result in...
Revert "vga: do not resize the screen on hw_invalidate"
This causes ctrl+alt+u or ctrl+alt+f to not work when windows hasn't beenresized first. Other graphic emulators do resize the screen onhw_invalidate.
This reverts commit 0bd8246bfec1dfb2eb959f52db535572c0260f4c.
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializingdevices. Since we are already registering them, calling qemu_system_reset()should suffice. Actually, it is what happens when we reboot the machine,...
vga: fix line comparison
Line counter doesn't wrap.
Signed-off-by: malc <av1474@comtv.ru>
vga: Respect Line Compare Register in text modes
Unbreaks setup screen of Act1/PL
vga: remove unused vga_common_save/load
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga: create is_vbe_vmstate field
vga: port vga_common_save/load to vmstate
vga: move back dirty_log functions to vga.c
They are needed there on qemu-kvm.
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.
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
vga: change tabs to spaces
vga and cirrus_vga: substitute switch for equivalent assigntment
vga: Rename last VGAState occurrences to VGACommonState
vga and cirrus_vga: create vga_ioport_invalid() and use it everywhere
vga: split vga_{load, save} into pci and common parts
Once there adjust VGAState <-> VGACommonStateExport vga_common_save/vga_common_load (nreeded by wmvare_vgaRemove vga.pci_dev field, it is not needed anymore
Signed-off-by: Juan Quintela <quintela@redhat.com>...
vga: split pci bits into vga-pci.c
Adjust all the VGAState in VGACommonStateCompile vga-pci.o only for targets that use it.
vga: split isa bits inco vga-isa.c
Adjust all the VGAState in VGACommonStateCompile vga-isa.o in the targets that use it
vga: export vga_mem_{read,write}
vga: split vga-isa-mm.o
It is only used in mips softmmu, compile only there.it_shift field was only used for vga_isa_mm, move it from VGACommonStateto ISAVGAMMstate.
vga: remove useless cast from void *
vga: export vga_ioport_{read,write}
Introduce vga_common_reset() to be able to typcheck vga_reset()
vga: Rename vga_state -> vga
Everything outside of vga.c should use VGACommonState
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
Make CPURead/WriteFunc structure 'const'
make vga screen_dump use DisplayState properly
Hi all,currently the vga screen_dump code doesn't use the DisplayStateinterface properly and tries to replace it temporarily while taking thescreenshot.A better approach is to register a DisplayChangeListener, call...
qdev/prop: convert vga.c to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
vga: do not resize the screen on hw_invalidate
Hi all,currently vga always resizes the screen when vga_hw_invalidate is calledwhile this is not required and all the other graphic emulators don't.This patch fixes it, making vga invalidate behaviour consistent with the...
qdev: convert all vga devices.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Fix most warnings (errors with -Werror) when debugging is enabled
I used the following command to enable debugging:perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * /* *//*
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Fix vga_screen_dump_blank() PPM generation
vga_screen_dump_blank() was not generating a valid PPM file: the width of theimage made no sense (why it was multiplied by sizeof(uint32_t)?), and there wasonly one sample per pixel, instead of three.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
Rename pci_register_io_region() to pci_register_bar()
This function is used to manage a PCI BAR, so make the more genericpci_register_io_region() available to other uses.
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
Remove vga_ram_size
The vga_ram_size argument to machine init functions always has the samevalue, and is ignored by many machines (including SPARC32 which has anobsolete ifdef for VGA_RAM_SIZE).
Remove it and push VGA_RAM_SIZE into vga_int.h.
Signed-off-by: Paul Brook <paul@codesourcery.com>
use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
[RESEND] Fix vga segfaults or screen corruption with large memory guests
page0 and friends are ram addresses; a smaller size will overflow andcause a segfault or random corruption.
Change them to ram_addr_t.
Signed-off-by: Avi Kivity <avi@redhat.com>
vga: Cleanup dirty logging (Jan Kiszka)
In theory, there are no more quirks in the KVM slot management thatrequires dirty log start/stop all over the place. We just have to startthe logging each time the mapping may have changed. This patch dropsvga_dirty_log_stop for both standard and cirrus VGA. It also reverts...
vga: Fix inconsistent tracking of map_addr (Jan Kiszka)
Only track video RAM mapping in map_addr and use the correct RAM size.Furthermore, make sure the reset the address in case unmapping tookplace via PCI reconfiguration.
Clean up VGA ram allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7063 c046a42c-6fe2-441c-8c8c-71466251a162
Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity)
The vga screen dump function updates last_width and last_height,but does not change the DisplaySurface that these variables describe.A consequent vga_draw_graphic() will therefore fail to resize the...
Revert r6989
There is a much more elegant fix that will follow up after this commit.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7025 c046a42c-6fe2-441c-8c8c-71466251a162
Fix display breakage when resizing the screen (v2) (Avi Kivity)
When the vga resolution changes, a new display surface is not allocatedimmediately; instead that is deferred until the next update. However,if we're running without a display client attached, that won't happen...
Fix monitor command (screendump) (Stefan Weil)
starting with r6839, the monitor command 'screendump'raises a nullpointer memory access which crashs Qemu.
Fix crash when calling screendump from monitor.
This was a regression introduced with r6839:DisplayAllocator interface (Stefano Stabellini)...
Fix VGA issue introduced by r6349
Thanks to Robert Riebisch for bisection
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6858 c046a42c-6fe2-441c-8c8c-71466251a162
temporarily disable logging around pci config writes (Avi Kivity)
A pci config write may remap the vga linear frame buffer, confusing thememory slot dirty logging logic.
Fixed Windows with -vga std.
Signed-off-by: Avi Kivity <avi@redhat.com>Sigend-off-by: Anthony Liguori <aliguori@us.ibm.com>...
remove is_graphic_console from vga.c (Stefano Stabellini)
Hi all,since vga_draw_graphic is only called by vga_hw_update when the consoleassociated with the graphic card is active, we don't need to check ifthe current console is active using is_graphic_console....
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: truncation by cast
Fix Sparse warnings about constant truncation caused by cast
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6737 c046a42c-6fe2-441c-8c8c-71466251a162
hw: remove error handling from qemu_malloc() callers (Avi Kivity)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Update #defines for PCI vendor and device IDs from OpenBIOS and Linux
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6490 c046a42c-6fe2-441c-8c8c-71466251a162
Move definition of rgb_to_pixel_dup_table (Nathan Froyd)
This fixes the warning:
/scratch/froydnj/qemu.git/hw/vga.c:1515: warning: redundant redeclaration of 'rgb_to_pixel_dup_table'/scratch/froydnj/qemu.git/hw/vga.c:1248: warning: previous declaration of 'rgb_to_pixel_dup_table' was here...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...
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...
Fix vga on PPC
Fix crash introduced in revision 6336.
(Stefano Stabellini)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6349 c046a42c-6fe2-441c-8c8c-71466251a162
fix screendump (Stefano Stabellini)
this patch fixes the screendump functionality that was recently broken;it must be applied after PATCH 5, 6 and 7 of the original displaystatechange patch series.In fact the other patches make much easier to solve the screendump...
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....
remove bgr (Stefano Stabellini)
Do not handle bgr host displays in the backends.
Right now a bgr flag exists so that sdl can set it, if the SDL_Surfaceis bgr.Afterwards the graphic device (e.g. vga.c) does the needed conversion.
With this patch series is sdl that is responsible for rendering the format...
Add cirrus reset handler
The vga reset handler overwrites some cirrus registers, causing rebootsto corrupt cirrus state to the point that guests can only bring up 640x480resolutions.
Fix by adding a dedicated cirrus reset handler (which calls the common vga...
Fix VGA screen dump
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6159 c046a42c-6fe2-441c-8c8c-71466251a162
Register reset handlers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6136 c046a42c-6fe2-441c-8c8c-71466251a162
KVM: Coalesced MMIO support
MMIO exits are more expensive in KVM or Xen than in QEMU because theyinvolve, at least, privilege transitions. However, MMIO writeoperations can be effectively batched if those writes do not have sideeffects.
Good examples of this include VGA pixel operations when in a planar...
Change MMIO callbacks to use offsets, not absolute addresses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
vga optimization (Glauber Costa)
Hypervisors like KVM perform badly while doing mmio ona loop, because it'll generate an exit on each access.This is the case with VGA, which results in very badperformance.
In this patch, we map the linear frame buffer as RAM,...
better type checking for vga (Glauber Costa)
unsigned long is too bad of a type. Use ram_addr_t instead.
aligurori: fixed a compile warning in this patch
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...