Fix spelling in comments and debug messages (recieve -> receive)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Reviewed-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/pci-stub: fix comment typo
[Stefan fixed "doesn't" -> "don't"]
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix disabling interrupts in sun4u
clear interrupt request if the interrupt priority < CPU pilclear hardware interrupt request if interrupts are disabled
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>[blauwirbel@gmail.com: added a comment about magic 2]...
xilinx: Convert most xilinx devices to MemoryRegion
This converts ethlite, intc, timer and uartlite to useMemoryRegions.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
TCG: improve optimizer debugging
Use enum TCGOpcode instead of plain old int so that the name ofcurrent op can be seen in GDB. Add a default case to switchso that GCC does not complain about unhandled enum cases.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
dyngen-exec.h: cleanup
Remove unused or otherwise available stuff.
g364fb: convert to qdev
Extract G364 ROM contents from device emulation to machine emulation,so device emulation can be reused in other machines (Commodore Amiga)
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
g364fb: use trace framework
checkpatch: fix braces {} handling
checkpatch.pl doesn't report warning for if/else statements with missing'else' braces:
if (something) { foo;} else bar;
The patch has been tested using the last 100 commits.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>...
Fix linker scripts
Remove PROVIDE_HIDDEN and ONLY_IF_{RO,RW} from linker scripts to makethem work with older binutils versions. Fixes *-bsd-user build onOpenBSD 4.9 which ships binutils 2.15.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix build on OpenBSD with BSD userland emu and smartcard NSS enabled
The first issue is the hard coded POSIX Real Time extensions library in thelibcacard/Makefile. From looking at the code it doesn't seem this is necessaryanyway. Robert Relyea seems to think it most likely isn't necessary....
linux-user: Correct a few missuses of host addresses
Fix a few cases where we were passing host pointers to theguest.
microblaze: Make the MSR PVR bit non writable
Instead of hardcoding it to 1.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
microblaze: Add an MSR_PVR constant and use it.
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: 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.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging
Merge remote-tracking branch 'aneesh/for-upstream-2' into staging
disasm: update comment
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix up some style nits of last uq/master merge
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
mainstone: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
mcf5208: convert to memory API
milkymist-minimac2: convert to memory API
milkymist-softusb: convert to memory API
milkymist: convert to memory API
sysbus: add sysbus_add_memory_overlap()
Signed-off-by: Avi Kivity <avi@redhat.com>
integratorcp: convert to memory API (RAM/flash only)
leon3: convert to memory API
cirrus: wrap memory update in a transaction
This prevents spurious unmapping and remapping of the vga windows,which reduces performance.
piix_pci: wrap memory update in a transaction
The code will remap all PAMs, even if just one is updated, resultingin reduced performance. Wrap in a transaction to detect that thoseother PAMs have not changed.
Reviewed-by: Richard Henderson <rth@twiddle.net>...
Makefile.hw: allow hw/ files to include glib headers
pflash_cfi01/pflash_cfi02: convert to memory API
cfi02 is annoying in that is ignores some address bits; we probablywant explicit support in the memory API for that.
dummy_m68k: convert to memory API
g364fb: convert to memory API
lm32_boards: convert to memory API
axis_dev88: convert to memory API (RAM only)
Reviewed-by: Richard Henderson <rth@twiddle.net>Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Signed-off-by: Avi Kivity <avi@redhat.com>
ppc_oldworld, ppc_newworld: fix escc BAR related crash
ppc maps the escc mmio region both at a fixed offset (as a sysbus area) and as part of a PCI BAR.This crashes, since a MemoryRegion may have only one parent. Use an alias so we have a separateMemoryRegion for the BAR....
gt64xxx: fix crash in gt64120_pci_mapping()
The map/unmap code was assymetric - unmap used the local MemoryRegion whilemap used isa_mmio_init(), which cannot handle dynamic mappings.
Fix by using isa_mmio_setup() and the local MemoryRegion.
Signed-off-by: Avi Kivity <avi@redhat.com>...
armv7m: convert to memory API
an5206: convert to memory API
ReadWriteHandler: remove
No longer used.
pci_host: convert conf index and data ports to memory API
sysbus: add helpers to add and delete memory regions to the system bus
stellaris_enet: convert to memory API
PPC: E500: Add ESR bit definitions
The BookE spec specifies a number of ESR bits. Add defines for themso we can use them later on.
Reported-by: Jason Wessel <jason.wessel@windriver.com>Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
PPC: E500: Inject SPE exception on invalid SPE access
When accessing an SPE instruction despite it being not available,throw an SPE exception instead of an APU exception. That way theguest knows what's going on and actually uses SPE.
Reported-by: Jason Wessel <jason.wessel@windriver.com>...
PPC: E500: Set ESR values
When an exception occurs on BookE, we need to set ESR bits to exposeto the guest information on what exactly happened. Add the obvious ones.
Reported-by: Jason Wessel <jason.wessel@windriver.com>Signed-off-by: Alexander Graf <agraf@suse.de>...
hw/omap_gpmc: Don't try to map CS0 twice on reset
Remove a spurious second map of the OMAP GPMC CS0 region on reset.This fixes an assertion failure when we try to add the region toits container when it was already added. (The old code did notcomplain about mismatched map/unmap calls, but the new MemoryRegion...
tcg: Update --enable-debug for TCG_OPF_NOT_PRESENT.
Signed-off-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
xilinx.h: Added missing includes
Added some missing #includes for this file. Previously this filerelied on its clients to pre-include its dependencies.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
xilinx: removed microbalze_pic_init from xilinx.h
This is a microblaze target specific function that belongs outsideof xilinx.h (which is a collection of target independent device modelinstantiator functions)
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>...
sdl: Don't release input on mouse mode change in full-screen mode
While in full-screen mode, the input focus naturally belongs to the SDLwindow. Avoid dropping it when switching from absolute to relativemouse mode.
target-i386: Remove unused polarity arguments from APIC API
Polarity of external interrupts needs to be handled in the IOAPIC.Passing it to the APIC is pointless. So remove all these arguments.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ioapic: Implement polarity
If the polarity bit is set in the redirection table, the input levelsimply has to inverted as it is low active in this case.
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: 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 some unused fields
Memory region refactorings obsoleted them.
CC: Avi Kivity <avi@redhat.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Replace qemu_system_cond with VCPU stop mechanism
We can express the VCPU thread wakeup with the stop mechanism, savingboth qemu_system_ready and the qemu_system_cond. For KVM threads, we canjust enter the main loop as long as the thread is stopped. The central...
Do not drop global mutex for polled main loop runs
If we call select without a timeout, it's more efficient to keep theglobal mutex locked as we may otherwise just play ping pong with avcpu thread contending for it. This is particularly important for TCG...
Poll main loop after I/O events were received
Polling until select returns empty fdsets helps to reduce the switchesbetween iothread and vcpus. The benefit of this patch is best visiblewhen running an SMP guest on an SMP host in emulation mode.
Do not kick vcpus in TCG mode
In TCG mode, iothread and vcpus run in lock-step. So it's pointless tosend a signal from qemu_cpu_kick to the vcpu thread - if we got here,the receiver already left the vcpu loop.
Merge remote-tracking branch 'qemu-kvm/memory/core' into staging
microblaze-user: Deliver SIGFPE on div by zero
memory: Fix old_portio vs non-zero offset
The legacy functions that we're wrapping expect that offsetto be included in the register. Indeed, they generallyexpect the absolute address and then mask off the "high" bits.
The FDC is the first converted device with a non-zero offset....
memory: temporarily suppress the subregion collision warning
After 312b4234, the APIC and PCI devices are colliding with each other. Thisis harmless in practice because the APIC accesses are special cased and nevermake there way onto the bus.
Avi is working on a proper fix, but until that's ready, avoid printing the...
isa: add isa_address_space()
A helper that returns the address space used by ISA devices. Usefulfor getting rid of isa_mem_base, multiple ISA buses, or ISA buses behindbridges.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: add pci_address_space()
Returns the PCI address space. Useful for bridges that can obscurepart of the PCI address space.
vga: drop get_system_memory() from vga devices and derivatives
Instead, use the bus accessors, or get the address space directlyfrom the board constructor.
440fx: fix PAM, PCI holes
The current implementation of PAM and the PCI holes is broken in severalways:
- PCI BARs are not restricted to the PCI hole (a BAR may hide memory) - PCI devices do not respect PAM (if a PCI device maps a region while PAM maps the region to RAM, the request will be honored)...
sh_pci: convert to memory API
arm11mpcore: use sysbus_init_mmio_cb2
This tells the sysbus code it need not use IO_MEM_UNASSIGNED.
versatile_pci: convert to memory API
ppce500_pci: convert to sysbus_init_mmio_cb2()
Not a huge step forward, but at least we now have a 1:1 relationshipbetween registration and unregistration.
sysbus: remove sysbus_init_mmio_cb()
This problem with this function is that it is not reversible - it isimpossible to know where things are registered and unregister themexactly. As there are no more users, we can remove it.
sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback
sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove aregion. Provide an alternative that calls an unmap callback, so the removalmay be done non-destructively.
ppc4xx_sdram: convert to memory API
Clumsy due to the lack of clipping support, needed forchanging exposed ram size.
ppc405_uc: convert to memory API
onenand: convert to memory API
pcie_host: convert to memory API
Assuming that mmcfg size cannot change at runtime.
omap_gpmc/nseries/tusb6010: convert to memory API
Somewhat clumsy since it needs a variable sized region.
arm_timer: convert to memory API
gt64xxx.c: convert to memory API
tusb6010: move declarations to new file tusb6010.h
Avoid #include hell.
arm_sysctl: convert to memory API
Improvements to libtool support.
Improvements to the libtool support in QEMU. Replace hard codedlibtool in the infrastructure with $(LIBTOOL) and allowoverriding the libtool binary used via the configurescript.
Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de>...
pcnet: fix wrong opaque (broken by bd8d6f7cadb6ace98c779135217a4ed7b5fccc23)
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
apb_pci: convert to memory API
apic: convert to memory API
arm_gic: convert to memory API
build: list libraries after objects, for proper linkage
Without this change, when using -Wl,--as-needed with GNU linker, thelibraries would be discarded.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
w32: Fix qemu_ftruncate64
SetFilePointer returns INVALID_SET_FILE_POINTER when it fails.In addition, GetLastError must be checked.
The first call of SetFilePointer did not use INVALID_SET_FILE_POINTER,the second call used wrong error handling.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
fix code format
Fix code format to make checkpatch.pl happy.
Signed-off-by: Robert Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
e1000: use MII status register for link up/down
Some guests will use the standard MII status registerto verify link state. They will not notice link changesunless this register is updated.
Verified with Linux 3.0 and Windows XP guests.
Without this patch, ethtool will report speed and duplex as...
char: remove qemu_chr_send_event()
It's dead code.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: document the functions that will be the public interface