History | View | Annotate | Download (33.8 kB)
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>...
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate, memory: decouple vmstate from memory API
Currently creating a memory region automatically registers it forlive migration. This differs from other state (which is enumeratedin a VMStateDescription structure) and ties the live migration codeinto the memory core....
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>
Use new macro QEMU_PACKED for packed structures
Most changes were made using these commands:
git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'...
vmware-vga: Register reset service
Fixes cold reset in vmware graphic modes. We need to split up the resetfunction for this purpose, breaking out init-once bits.
Cc: Andrzej Zaborowski <balrogg@gmail.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
vmware-vga: Disable verbose mode
Elimiates 'vmsvga_value_write: guest runs Linux.' messages from theconsole.
CC: Andrzej Zaborowski <balrogg@gmail.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmware-vga: Remove dead DIRECT_VRAM mode
The code was disabled since day 1 of vmware-vga, and now it does noteven build anymore. Time for a cleanup.
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: 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.
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>
vmsvga: don't remember pci BAR address in callback any more
We're going to remove the callback, so we can't use it to save theaddress. Use the pci API instead.
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...
vmware_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>
vmware_vga: refactor device creation
Turn vmsvga_init into an inline function.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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....
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...
vgabios update: handle compatibility with older qemu versions
As pointed out by avi the vgabios update is guest-visible and thus hasmigration implications.
One change is that the vga has a valid pci rom bar now. We already havea pci bus property to enable/disable the rom bar and we'll load the bios...
switch vmware_vga to pci vgabios
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
vmware_vga: Replace the few tab-indents with spaces (clean-up).
Use 4 spaces instead of 2, too.
vmware_vga: Add checks to deal with non-atomic fifo writes.
Janne Huttunen noticed that the FIFO end pointer is updated by theguest after writing each word to the FIFO, at least the X.org driverwhich is open does this. This means that there's no way for the...
vmware_vga: fix reset value for command register
Make init value for this register match the spec.BAR address is 0 at init, so enabling itonly works by chance.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: don't overwrite multi functio bit in pci header type.
Don't overwrite pci header type.Otherwise, multi function bit which pci_init_header_type() setsappropriately is lost.Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zerowhich is already zero cleared....
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>...
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...
use new cursor struct + functions for vmware vga and sdl.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflow
Check that the cursor dimensions passed from the guest for theDEFINE_CURSOR command don't overflow the available space in thecursor.image[] or cursor.mask[] arrays before copying data from the...
vmware_vga: symbolic names for pci registers
No functional changes. I verified that the generated binarydoes not change.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>Acked-by: Glauber Costa <glommer@gmail.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...
vmware: increase cursor buffer size.
The cursor pixmap size we calculate later ends up being 4096 dwordslong by the looks of it. This boots an F12 LiveCD now.
Signed-off-by: Dave Airlie <airlied@linux.ie>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Make sure to enable dirty log tracking for VMware VGA
This is needed for VMware VGA to work properly under KVM.
Fix VMware VGA depth computation
VMware VGA requires that the depth presented to the guest is the same as theDisplaySurface that it renders to. This is because it performs a very simplememcpy() to blit from one surface to another.
We currently hardcode a 24-bit depth. The surface allocator for SDL may, and...
vmware: setup PCI BAR 2 for FIFO as per vmware spec
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...
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...
vmware_vga: add rom file so that it boots.
This just adds the rom file to the vmware SVGA chipset so it boots.
Signed-off-by: Dave Airlie <airlied@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add "static" to please Sparse
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: pci.h cleanup: move out stuff not in pci.c
pci.h declares some functions which aren'tdefined in pci.h. Clean up moving thingsto appropriate headers, and update all users.
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>...
vmware_vga: port to vmstate
vmware_vga: Remove uselss casts from void *
vmware_vga: qemu_malloc() returns void *
vmware_vga: remove !EMBED_STDVGA code
It don't compile. And the trivial fixes (change vga.foo field to foo fielddon't work either. No output
vmware_vga: scratch is really an array of uint32_t
vmware_vga: the support to change dinamically depth is not there
For a start bypp is not changed after vmsvga_reset() and it depends on depth
vga: port vmware std vga to vmstate
vmware_vga: Pass pci_vmsga_state_t arg no VGACommonState
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>
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>...
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'
Revert my commit c00a9de060124a988bd9847c095e5836488c6f01
was incorrect.
Use corect depth from DisplaySurface in vmware_vga.c
Hello,for what I can tell, there is no way for vmware_vga to work correctlyright now. It assumes that the framebuffer bits-per-pixel and the onefrom the DisplaySurface are identical (it uses directly the VRAM from...
qdev: convert all vga devices.
vmware_vga: clean up
use NULL instead of 0 for pci_register_device() argumentfor consistency. Any other caller uses NULL.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.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>...
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>
Clean up VGA ram allocation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7063 c046a42c-6fe2-441c-8c8c-71466251a162
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
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()...
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....
Use the ARRAY_SIZE() macro where appropriate.
Change from v1: Avoid changing the existing coding style in certain files.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162
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
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>...
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
Properly byte-swap values in VMware SVGA (malc).
Makes PPC host happy. Also use the right type for a memory offset.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4874 c046a42c-6fe2-441c-8c8c-71466251a162
Make Bochs VBE work with VMWare SVGA (malc).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4873 c046a42c-6fe2-441c-8c8c-71466251a162
Don't overwrite VMwareSVGA's memory region start addresses (malc).
This was correct also in the Anthony Liguori's patch, but not in mine.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4872 c046a42c-6fe2-441c-8c8c-71466251a162
Initialize the VMware VGA console after vga_init (Alexander Graf).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4871 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
Allocate the -vmwarevga framebuffer in the right place in RAM.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4200 c046a42c-6fe2-441c-8c8c-71466251a162
vmwarevga: fix PCI IO region registration
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4161 c046a42c-6fe2-441c-8c8c-71466251a162
Check for out of range update regions (original patch from Anthony Liguori).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4024 c046a42c-6fe2-441c-8c8c-71466251a162
Register VMware SVGA's memory io region with PCI framework.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4023 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
Register io ports as selected by PCI config in VMware SVGA.Should prevent segfaults with RTL8139.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3905 c046a42c-6fe2-441c-8c8c-71466251a162
qemu_put signedness fixes, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3824 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
Allow VMware-SVGA operation enable before command FIFO is configured. Implement "screendump" for 32 bit colour depth.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2808 c046a42c-6fe2-441c-8c8c-71466251a162
Change the PCI IO region start to that hardcoded in VBE bios (reported by Jeremy Katz)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2768 c046a42c-6fe2-441c-8c8c-71466251a162
VMware SVGA II emulation, by Andrzej Zaborowski.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2579 c046a42c-6fe2-441c-8c8c-71466251a162