History | View | Annotate | Download (88.2 kB)
cirrus: Unbreak ISA support
Do not try to map against the PCI bar in the ISA version of the device.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cirrus: wrap memory update in a transaction
This prevents spurious unmapping and remapping of the vga windows,which reduces performance.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversingchanges made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.
From Avi:
Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work 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>
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>
cirrus: simplify mmio BAR access functions
Make use of the memory API's ability to satisfy multi-byte accesses viamultiple single-byte accesses.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cirrus: simplify bitblt BAR access functions
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>...
cirrus: simplify vga window mmio access functions
vga: simplify vga window mmio access functions
We have to keep vga_mem_{read,write}b() since they're used by cirrus.
Reviewed-by: Richard Henderson <rth@twiddle.net>...
cirrus: simplify linear framebuffer access functions
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-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...
Merge remote-tracking branch 'mst/for_anthony' into staging
Conflicts: hw/usb-uhci.c
cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped
If the cirrus_vga PCI BAR is unmapped than we should not only resetmap_addr but also lfb_addr, otherwise we'll keep trying to mapthe old lfb_addr in map_linear_vram.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
hw/cirrus_vga.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>
cirrus-vga: convert to pci_register_bar_simple()
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
cirrus_vga: flag on-device ram for dirty logging
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
cirrus_vga: remove unneeded reset
cirrus_reset is already called by the reset framework,so there is no need to call it in cirrus_init_common.
Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
cirrus: Remove obsolete kvm.h include
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Merge remote branch 'origin/master' into pci
vga: tag as not hotplugable.
This patch tags all vga cards as not hotpluggable. The qemustandard vga will never ever be hotpluggable. For cirrus + vmwareit might be possible to get that work some day. Todays we can'thandle that for a number of reasons though....
cirrus: delete GCC 4.6 warnings
Commit 92d675d1c1f23f3617e24b63c825074a1d1da44b triggered uninitializedvariables warning with GCC 4.6. Fix them by adding zero initializers.
Acked-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
cirrus_vga: Declare as little endian
This patch replaces explicit bswaps with endianness hints to themmio layer.
CC: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
cirrus_vga: fix division by 0 for color expansion rop
Commit d85d0d3883f5a567fa2969a0396e42e0a662b3fa introduces a regressionwith Windows ME that leads to a division by 0 and a crash.
It uses the color expansion rop with the source pitch set to 0. This is...
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...
pci: Replace unneeded type casts in calls of pci_register_bar
There is no need for these type casts (as other existingcode shows). So re-write the first argument withouttype cast (and remove a related TODO comment).
Cc: Michael S. Tsirkin <mst@redhat.com>...
cirrus: avoid write only variables
Compiling with GCC 4.6.0 20100925 produced a lot of warnings like:In file included from /src/qemu/hw/cirrus_vga_rop.h:174:0, from /src/qemu/hw/cirrus_vga.c:284:/src/qemu/hw/cirrus_vga_rop2.h: In function 'cirrus_patternfill_0_8':...
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceStatewhen registering a savevm. For buses with a get_dev_path()function, this will allow us to create more unique savevmid strings.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
vmstate: fix breakage by 7e72abc382b700a72549e8147bdea413534eeedc
cirrus_post_load() will be executed twice when loading vm states and then thewrong physical memory will be registered. This issue may lead to crash qemu.
Signed-off-by: TeLeMan <geleman@gmail.com>...
cirrus: Properly re-register cirrus_linear_io_addr on vram unmap
This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more:
When switching away from linearly mapped vram, we also have to restorethe I/O handlers for the LFB.
This regression was once introduced by commit 2bec46dc97....
Support PCI based option rom loading
Currently, we preload option roms into the option rom space in memory. Thisprevents DDIM from functioning correctly which severely limits the numberof roms we can support.
This patch introduces a pci_add_option_rom() which registers the...
pci romfiles: add property, add default to PCIDeviceInfo
This patch adds a romfile property to the pci bus. It allows to specifya romfile to load into the rom bar of the pci device. The default valuecomes from a new field in PCIDeviceInfo. The property allows to change...
qdev: Replace device names containing whitespace
Device names with whitespace require quoting in the shell and in themonitor. Some of the offenders are also overly long. Some have amore convenient alias, some don't.
The place for verbose device names is DeviceInfo member desc. The...
qemu: make cirrus init value pci spec compliant
PCI memory should be disabled at reset, otherwisewe might claim transactions at address 0.I/O should also be disabled, although for cirrusit is harmless to enable it as we do nothave I/O bar.
Note: bios fix needed for this patch to work...
qemu: cleanup unused macros in cirrus
Cirrus vga has a copy of many PCI macros,and it doesn't even use them. Clean up.We also don't need to override header typeas it is NORMAL by default.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>...
savevm: Port to qdev.vmsd all devices that have qdev
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: initialize pci config headers depending it pci header type.
- Only sets default subsystem id for header type 00.(normal header type) because header type 01 doesn't have subsystem id, and uses the register for other purpose. So setting default subsystem id doesn't make sense....
pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t
This patch is preliminary for 64 bit BAR support.Introduce dedicated type, pcibus_t, to represent pci bus address/sizeinstead of uint32_t.Later this type will be changed to uint64_t....
pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h
make constants for pci base address match pci_regs.h byrenaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
pci: define a constant to represent a unmapped bar and use it.
define a constant to represent a unmapped bar instead of -1 and use it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga roms: move loading from pc.c to vga drivers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cirrus_vga: also assign gr0/1 when writting shadow_gr0/1
This is a regression/bug caused by previous vga_cleanup. This fixesUbuntu installer reported by: Pierre Riteau
vmstate: add version_id argument to post_load
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>
vmstate: port cirrus_vga device
cirrus_vga: rename cirrus_hook_read_cr() cirrus_vga_read_cr()
Simplify the logic to do everything inside the function. Return 0xff if index is out of range independetly of DEBUG_CIRRUS
cirrus_vga: rename cirrus_hook_write_cr() cirrus_vga_write_cr()
Simplify the logic to do everything inside the function.
cirrus_vga: CIRRUS_HOOK_* is not used anymore
cirrus_vga: rename cirrus_hook_write_sr() cirrus_vga_write_sr()
cirrus_vga: rename cirrus_hook_read_palette() cirrus_vga_read_palette()
Simplify the logic to do everything inside the function
cirrus_vga: rename cirrus_hook_write_palette() cirrus_vga_write_palette()
cirrus_vga: rename cirrus_hook_read_gr() cirrus_vga_read_gr()
cirrus_vga: rename cirrus_hook_write_gr() cirrus_vga_write_gr()
cirrus_vga: make cirrus_read_hidden_dac() return its result
vga and cirrus_vga: substitute switch for equivalent assigntment
cirrus_vga: rename cirrus_hook_read_sr() cirrus_vga_read_sr()
And make it a real function
vga and cirrus_vga: create vga_ioport_invalid() and use it everywhere
cirrus_vga: Add a VGACommonState local var to cirrus_vga_ioport_{read, write}
cirrus_vga: prefix vga_ioport_{read, write} with cirrus
cirrus_vga: remove pointless cast from void *
cirrus_vga: Change casts to DO_UPCAST() for PCICirrusVGAState
Add pci_cirrus_vga_{save/load} functions, then remove vga.pci_dev use
Introduce vga_common_reset() to be able to typcheck vga_reset()
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'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qdev: convert all vga devices.
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.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.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>
vga: Replace VGA_COMMON with a structure
All VGA devices share a common field subset; currently they do so bya macro which defines the common fields inline their state structures,relying on the the common state being placed at offset 0 in the structure....
use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Remove redundant cirrus vga ram functions.
Remove vga LFB accessor hacks.
These are redundant now that we remap the LFB ram area.
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...
Clean up VGA ram allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7063 c046a42c-6fe2-441c-8c8c-71466251a162
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...
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
stop dirty logging while updating cirrus bank memory (Glauber Costa)
Otherwise, slot tracking gets confused.
This fixes a screen corruption bug with Ubuntu guest installation.
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>...
Sparse fixes: dubious mixing of bitwise and logical operations
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6741 c046a42c-6fe2-441c-8c8c-71466251a162
Missing cirrus_invalidate_region() in cirrus_do_copy() (Brian Kress)
After doing a video to video copy, cirrus_do_copy() in cirrus_vga.c does aconditional call to cirrus_invalidate_region() with an "if (!notify)" test.However at this point the blt has already been done so it seems like this call...
Fix hardware accelerated video to video copy on Cirrus VGA (Brian Kress)
cirrus_do_copy() in hw/cirrus_vga.c seems to make some incorrect assumptionsabout video memory layout. It tries to convert addresses to coordinatesassuming that one row of data is (width * depth) bytes long. The correct way...
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...
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()...
cirrus: unify unmapping of vram (Jan Kiszka)
Switc vram unmapping in map_linear_vram to the simpler pattern used byunmap_linear_vram.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6386 c046a42c-6fe2-441c-8c8c-71466251a162
cirrus: cleanup reset handler (Jan Kiszka)
We should not re-register the cirrus io-memory regions on each reset.Moreover, this patch removes some dead code and pushes other staticfield initializations from reset to init_common.
cirrus: avoid resetting vga dirty logging unnecessarily (Avi Kivity)
cirrus bitblt reset will stop and start dirty logging even when there is noneed; this causes full redraws.
avoid by only updating memory access when exiting cpu-to-video update mode....
cirrus: stop dirty logging during remaps (Jan Kiszka)
Cleaned-up port from kvm-userspace: We have to stop any vram loggingwhile doing remaps. Otherwise the logger gets confused. This reward isenormously accelerated cirrus vga in kvm mode.
cirrus: unmap vram on reset (Jan Kiszka)
Fix the broken text mode after reset by unmapping potentially mappedvram.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6382 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....
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...
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...
do boundary check based on absolute value (Glauber Costa)
For backward operations, dstpitch and srcpitch canbe negative. This leads BLTUNSAFE macro into anoverflow, and as a result, it avoids performingoperations that are perfectly valid.
The visible effect that led to that patch was the gnome-panel...