mips: Default to using one VPE and one TC.
Boards can override the setup if needed.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
mips: Initialize MT state at reset
Only TC0 on VPE0 is active after reset. All other VPEs andTCs start in sleep.
mips: Handle TC indexing of other VPEs
Introduce mips_cpu_map_tc() to map a global TC index into a VPE nrand local tc index.
mips: Synchronize CP0 TCSTatus, Status and EntryHi
These registers share some of their fields. Writes to these fieldsshould be visible through the corresponding mirror fields.
mips: Hook in more reg accesses via mttr/mftr
mips: Correct IntCtl write mask for VInt
mips: Correct VInt vector generation
1. The pending need to pass the Status IM gating.2. The priority is from seven (highest prio) down to zero. QEMU was doing the opposite.
mips: Enable VInt interrupt mode for the 34Kf
apb_pci: convert PCI space to memory API
Add a new memory space for PCI instead of using system memory.
This also fixes a bug where VGA region vga.chain4 isaccidentally mapped to 0xa0000 instead of 0x1ff000a0000.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
fw_cfg: fix crash if FW_CFG_WRITE_CHANNEL is used incorrectly
Avoid a crash if the guest combines FW_CFG_WRITE_CHANNEL witha wrong value.
softfloat: Use uint32 consistently
Prepares for uint32 replacement.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
softfloat: Use uint16 consistently
Prepares for uint16 replacement.
Allow overriding the location of Samba's smbd.
Pretty much every OS I look at has some means ofchanging this path (patching) so lets just makeit easier for OS developers creating packagesand/or end users to override the location....
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/'...
Add new macro QEMU_PACKED for packed C structures
A packed struct needs different gcc attributes for compilationswith MinGW compilers because glib-2.0 adds compiler flag-mms-bitfields which modifies the packing algorithm.
Attribute gcc_struct reverses the negative effects of -mms-bitfields....
rename qemu_malloc and related to glib names for coherence
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Frediano Ziglio <freddy77@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
main: force enabling of I/O thread
Enabling the I/O thread by default seems like an important part of declaring1.0. Besides allowing true SMP support with KVM, the I/O thread means that theTCG VCPU doesn't have to multiplex itself with the I/O dispatch routines which...
Rename qemu -> qemu-system-i386
This has been discussed before in the past. The special casing really makes nosense anymore. This seems like a good change to make for 1.0.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix install(1) usage to be compatible with OpenBSD's install(1).
When creating a directory via the -d flag the -p flag cannot beused at the same time. Also in the context of installing QEMU it...
trace: fix out-of-tree builds
Reported-by: Lluis Vilanova <vilanova@ac.upc.edu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'stefanha/tracing' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into staging
build: sort objects to remove duplicates for link
Avoid duplicate object files during the link. There are legitimatecases where a link command-line would include duplicate object filesbecause two independent subsystems both depend on common infrastructure....
Add glib support to main loop
This allows GSources to be used to register callback events in QEMU. This isuseful as it allows us to take greater advantage of glib and also because itallows us to write code that is more easily testable outside of QEMU since we...
main: switch qemu_set_fd_handler to g_io_add_watch
This patch changes qemu_set_fd_handler to be implemented in terms ofg_io_add_watch(). The semantics are a bit different so some glue is required.
qemu_set_fd_handler2 is much harder to convert because of its use of polling....
tcg/ppc/tcg-target.c: Avoid 'set but not used' gcc warnings
Move the declaration and initialisation of some variables intcg_out_qemu_ld and tcg_out_qemu_st inside CONFIG_SOFTMMU, toavoid the "variable set but not used" warning of gcc 4.6.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
trace: generalize the "property" concept in the trace-events file
This adds/modifies the following functions:
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
trace: separate trace event control and query routines from the simple backend
Generalize the 'st_print_trace_events' and 'st_change_trace_event_state' intobackend-specific 'trace_print_events' and 'trace_event_set_state' (respectively)in the "trace/control.h" file....
trace: always compile support for controlling and querying trace event states
The current interface is generic for this small set of operations, and thusother backends can easily modify the "trace/control.c" file to add their ownimplementation.
trace: add "-trace events" argument to control initial state
The "-trace events" argument can be used to provide a file with a list of traceevent names that will be enabled prior to starting execution, thus providingearly tracing.
This saves the user from manually toggling event states through the monitor...
trace: always use the "nop" backend on events with the "disable" keyword
Any event with the keyword/property "disable" generates an empty trace eventusing the "nop" backend, regardless of the current backend.
trace: [simple] disable all trace points by default
Note that this refers to the backend-specific state (whether the output must begenerated), not the event "disabled" property (which always uses the "nop" backend).
trace: [stderr] add support for dynamically enabling/disabling events
Uses the generic interface provided in "trace/control.h" in order to providea programmatic interface as well as command line and monitor controls.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>...
trace: enable all events
Given that all events with programmatically-controlled state are disabled bydefault, we can delete the "disable" property from all events.
simpletrace: fix process() argument count
The simpletrace.process() function invokes analyzer methods with thewrong number of arguments if a timestamp should be included. This patchfixes the issue so that trace analysis scripts can make use oftimestamps....
build: Fix linkage of QEMU_PROG
Using '$^' to establish the files to link with will remove any repeated entriesin the list of dependencies.
build: [simple] Include qemu-timer-common.o in trace-obj-y
Helper programs like qemu-ga use tracing primitives, but qemu-timer-common.o(also used by simpletrace.o) is not necessarily included in the linkage line.
trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*
Provides a more hierarchical view of the variable domain.
Also adds the CONFIG_TRACE_* variables for all backends.
[Stefan added missing 'test' in stap if statement]
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>...
trace: [make] replace 'ifeq' with values in CONFIG_TRACE_*
trace: move backend-specific code into the trace/ directory
trace: avoid conditional code compilation during option parsing
A default implementation for backend-specific routines is provided in"trace/default.c", which backends can override by setting "trace_default=no" in"configure".
tusb6010: Convert to qdev
Convert the tusb6010 to qdev.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>[Riku Voipio: Fixes and restructuring patchset]Signed-off-by: Riku Voipio <riku.voipio@iki.fi>[Peter Maydell: More fixes and cleanups for upstream submission]...
memory: Fix memory_region_get_ram_ptr for ROM devices
Mask out the sub-page bits that are used by ROM device for storing theio-index and the IO_MEM_ROMD flag.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Avi Kivity <avi@redhat.com>
Merge branch 'omap-for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm into pm
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'qemu-kvm/memory/core' into staging
Merge remote-tracking branch 'qemu-kvm/memory/urgent' into staging
Merge remote-tracking branch 'mst/for_anthony' into staging
Merge remote-tracking branch 'qmp/queue/monitor' into staging
qemu-img: Require larger zero areas for sparse handling
By default, require 4k of consecutive zero bytes for qemu-img to make theoutput file sparse by not issuing a write request for the zeroed parts. Add an-S option to allow users to tune this setting....
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>
memory: fix rom_device I/O mode
When adding a rom_device in I/O mode, we incorrectly masked off the lowbits, resulting in a pure RAM map. Fix my masking off the high bits andIO_MEM_ROMD, yielding a pure I/O map.
Signed-off-by: Avi Kivity <avi@redhat.com>
omap_gpmc: Accept a zero mask field on omap3630
OMAP3630 adds an extra bit of address masking, so a mask of0xb1111 is valid. Unfortunately the GPMC_REVISION is the same ason the OMAP3430 which only has three bits of address masking, sowe have to derive this feature directly from the OMAP revision...
omap_gpmc: Pull prefetch engine data into sub-struct
Refactor the gpmc state structure so items relating tothe prefetch engine are in their own sub-struct and havemore useful names.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
omap: Wire up the DMA request line to the GPMC
omap_gpmc: Implement prefetch engine
This commit implements the prefetch engine feature of the GPMCwhich can be used for NAND devices. This includes both interruptdriven and DMA-filling modes.
hw/onenand: Minor spacing fixes
Minor whitespace-only cleanup (separated out from the qdevifyingpatch for clarity).
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>[Riku Voipio: Fixes and restructuring patchset]Signed-off-by: Riku Voipio <riku.voipio@iki.fi>...
omap_gpmc: Clean up omap_gpmc_attach MemoryRegion conversion
Now that all callers of omap_gpmc_attach pass in a MemoryRegion*,we can remove the base_update and unmap function pointer arguments,and the opaque pointer that was passed into these callbacks....
omap_gpmc: Refactor omap_gpmc_cs_map and omap_gpmc_cs_unmap
Refactor the omap_gpmc_cs_map/unmap functions: * take the omap_gpmc_s* and a chipselect id rather than the omap_gpmc_cs_file_s*, so they have access to the general gpmc member fields * extract the base and mask from the config registers in the functions...
omap_gpmc: GPMC_IRQSTATUS is write-one-to-clear
Fix a bug in the handling of writes to GPMC_IRQSTATUS:it behaves as "write one to clear, writing zero is ignored".
omap_gpmc: Wire up the GPMC IRQ correctly
The omap_gpmc wasn't actually wiring up its IRQ, soanything that provoked an interrupt would be usinguninitialised data for its IRQ number.
omap_gpmc: Fix handling of FIFOTHRESHOLDSTATUS bit
The OMAP3 TRM is inconsistent about whether the GPMC FIFOTHRESHOLDSTATUSbit should be set when FIFOPOINTER > FIFOTHRESHOLD or when it is >=FIFOTHRESHOLD. Apparently the underlying functional spec from which...
omap_gpmc: Take omap_mpu_state* in omap_gpmc_init
Take a pointer to the omap mpu state struct in omap_gpmc_init.Some details of GPMC behaviour depend on the OMAP version weare a part of.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>[Riku Voipio: Fixes and restructuring patchset]...
omap_gpmc: Calculate revision from OMAP model
omap_gpmc: Reindent misindented switch statements
Whitespace-only change fixing indentation.
omap_gpmc: Support NAND devices
Support accesses to NAND devices, both by mapping them intothe GPMC address space, and via the NAND_COMMAND, NAND_ADDRESSand NAND_DATA GPMC registers.
hw/omap.h: Add OMAP 3630 to omap_mpu_model enumeration
Add the OMAP 3630 to the omap_mpu_model enumeration, and add thecorresponding cpu_is_omap3630() function.
(OMAP3 isn't supported yet but this is useful in upgrading commoncomponents to be "OMAP3 ready". We already have this for OMAP3430.)...
hw/onenand: Qdevify
Qdevify the ONENAND device.
hw/onenand: Remove unnecessary argument from onenand_command()
Refactor onenand_command() -- since it is essentially a method ofthe device object, it doesn't make sense to pass in something asan argument which is one of the object's own member fields....
hw/sysbus: Add sysbus_mmio_get_region()
Add a sysbus_mmio_get_region() which allows users of sysbusdevices to turn a (SysBusDevice*, mmioidx) tuple into aMemoryRegion*. This enables some useful simplifications ofdevices which pass through another device's mmio region...
sh_pci: Fix sh_pci memory alias confusion
The a7 area was set up as an alias of itself, rather than the p4 area. Thissent the memory core into infinite recursion.
Fix by aliasing the a7 area to the p4 area.
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.
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.
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....
block: latency accounting
Account the total latency for read/write/flush requests. This allowsmanagement tools to average it based on a snapshot of the nr opscounters and allow checking for SLAs or provide statistics.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
vhost-net: cleanup host notifiers at last step
When the vhost notifier is disabled, the userspace handler runsimmediately: virtio_pci_set_host_notifier_internal mightcall virtio_queue_notify_vq.Since the VQ state and the tap backend state aren'trecovered yet, this causes...
linux-user: Correct a few missuses of host addresses
Fix a few cases where we were passing host pointers to theguest.
memory: add opaque parameter to memory_region_init_rom_device()
The MemoryRegionOps callbacks expect it.
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>...
block: explicit I/O accounting
Decouple the I/O accounting from bdrv_aio_readv/writev/flush andmake the hardware models call directly into the accounting helpers.
This means: - we do not count internal requests from image formats in addition to guest originating I/O...
monitor: fix build breakage for !CONFIG_VNC
Commit c62f6d1 (monitor: fix build breakage with --disable-vnc)conditionalised some VNC setup code but left an unused variable. Movethe variable into the conditional code to fix the build breakage.
Cc: Luiz Capitulino <lcapitulino@redhat.com>...
qcow2: remove unused qcow2_create_refcount_update function
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qcow2: use always stderr for debugging
let all DEBUG_ALLOC2 printf goes to stderr
Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging
Merge remote-tracking branch 'aneesh/for-upstream-2' into staging
memory: fix memory_region_init_rom_device() not initializing ->ops
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>