virtio-serial: Use a struct to pass config information from proxy
Instead of using a single variable to pass to the virtio_serial_initfunction, use a struct so that expanding the number of variables to bepassed on later is easier.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Fix conversions from pointer to int and vice versa
Here the int values fds0, sigfd, s, sock and fd are convertedto void pointers which are later converted back to an int value.
These conversions should always use intptr_t instead of unsigned long.
They are needed for environments where sizeof(long) != sizeof(void *)....
petalogix_ml605_mmu: remove unused variable
Remove a write-only variable, spotted by GCC 4.6.0:/src/qemu/hw/petalogix_ml605_mmu.c: In function 'petalogix_ml605_init':/src/qemu/hw/petalogix_ml605_mmu.c:153:11: error: variable 'serial' set but not used [-Werror=unused-but-set-variable]...
qemu-thread: delete unused functions
qemu_mutex_timedlock() and qemu_cond_timedwait() are no longer used.
Remove them and their helper timespec_add_ms().
Reported-by: François Revol <revol@free.fr>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy
These functions were missing in commit9257d46d55f1fe4e8209be9a6870e339ac3266fe.
Both functions are needed for compilations withconfiguration --enable-vnc-thread.
Cc: Paolo Bonzini <pbonzini@redhat.com>...
i8254: Fix migration from older versions
qdev conversion broke migration as the previous version used vmstateinstance IDs derived from the iobase. Fix it by registering a legacyalias.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
microblaze: Compile uart 16550 serial driver
Upcomming little endian platform will use 16550 serial driver.
Signed-off-by: Michal Simek <monstr@monstr.eu>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
xilinx: Add AXIENET & DMA models
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
microblaze: Add PetaLogix ml605 MMU little-endian ref design
Add the first Microblaze little endian platform.Platform uses uart16550, axi ethernet, timer, intc.
win32: implement missing timersub
Implement and wrap timersub() for Win32.
Acked-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
simpletrace: Move st_init() error reporting
User emulator builds do not have error_report() so it should not be usedby simpletrace.c. In fact, error reporting inside simpletrace.c isinappropriate and should be done by the caller instead.
This patch moves st_init() error reporting out to its caller,...
do not use timedwait on qemu_halt_cond
The following conditions can cause cpu_has_work(env) to become true:
- env->queued_work_first: run_on_cpu is already kicking the VCPU
- env->stop = 1: pause_all_vcpus is already kicking the VCPU
- env->stopped = 0: resume_all_vcpus is already kicking the VCPU...
do not use timedwait on qemu_system_cond
qemu_main_loop_start is the only place where qemu_system_ready is setto 1.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
do not use timedwait on qemu_pause_cond
all_vcpus_paused can start returning true after penv->stopped changesfrom 0 to 1. When this is done, qemu_pause_cond is always signaled.
do not use timedwait on qemu_cpu_cond
Whenever env->created becomes true, qemu_cpu_cond is signaled by {kvm,tcg}_cpu_thread_fn.
iothread stops the vcpu thread via IPI
merge all signal initialization with qemu_signalfd_init, rename
provide dummy signal init functions for win32
protect qemu_cpu_kick_self for Win32
add Win32 IPI service
Refactor thread retrieval and check
We have qemu_cpu_self and qemu_thread_self. The latter is retrieving thecurrent thread, the former is checking for equality (using CPUState). Wealso have qemu_thread_equal which is only used like qemu_cpu_self.
This refactors the interfaces, creating qemu_cpu_is_self and...
add win32 qemu-thread implementation
For now, qemu_cond_timedwait and qemu_mutex_timedlock are left asPOSIX-only functions. They can be removed later, once the patchesthat remove their uses are in.
include qemu-thread.h early
add assertions on the owner of a QemuMutex
These are already present in the Win32 implementation, add them tothe pthread wrappers as well. Use PTHREAD_MUTEX_ERRORCHECK for mutexoperations. Later we'll add tracking of the owner for cond_signal/broadcast....
remove CONFIG_THREAD
inline cpu_halted into sole caller
All implementations are now the same, and there is only one caller,so inline the function there.
always qemu_cpu_kick after unhalting a cpu
This ensures env->halt_cond is broadcast, and the loop inqemu_tcg_wait_io_event and qemu_kvm_wait_io_event is exitednaturally rather than through a timeout.
exit round-robin vcpu loop if cpu->stopped is true
Sometimes vcpus are stopped directly without going through ->stop = 1.Exit the VCPU execution loop in this case as well.
always signal pause_cond after stopping a VCPU
unlock iothread during WaitForMultipleObjects
implement win32 dynticks timer
use win32 timer queues
Multimedia timers are only useful for compatibility with Windows NT 4.0and earlier. Plus, the implementation in Wine is extremely heavyweight.
hw/fmopl: Fix buffer access out-of-bounds errors
Index 75 is one too large for AR_TABLE75, DR_TABLE75.This error was reported by cppcheck.
hw/fmopl.c:600: error: Buffer access out-of-bounds: OPL.AR_TABLEhw/fmopl.c:601: error: Buffer access out-of-bounds: OPL.DR_TABLE...
moving eeprom initialization
The initialization should not be only on reset but also when initializingthe device.It resolves a bug when hot plugging a pci network device: the mac addresswas always null.
Signed-off-by: William Dauchy <wdauchy@gmail.com>...
pc: fix wrong CMOS values for floppy drives
Before commit 63ffb564dca94f8bda01ed6d209784104630a4d2, states forfloppy drives were calculated in fdc.c:fd_revalidate(). There it isalso considered whether a disk is inserted or not. The commit didn't copythe logic completely to pc.c, which caused a regression....
microblaze: Fix PetaLogix company name
trivial fix.
microblaze: Add PVR for writeback cache, endians
Specify PVR for writeback cache, endians and others.
Merge remote branch 'stefanha/tracing' into staging
vmstate: Fix varrays with uint8 indexes
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: add UINT32 VARRAYS
vmstate: add VMSTATE_STRUCT_VARRAY_INT32
vmstate: add VMSTATE_INT64_ARRAY
vmstate: add VMSTATE_STRUCT_VARRAY_UINT32
vmstate: Add a way to send a partial array
vmstate: be able to store/save a pci device from a pointer
vmstate: move timers to use test instead of version
vnc: Fix stack corruption and other bitmap related bugs
Commit bc2429b9174ac2d3c56b7fd35884b0d89ec7fb02 introduceda severe bug (stack corruption).
bitmap_clear was called with a wrong argumentwhich caused out-of-bound writes to the local variable width_mask....
vmstate: add VMSTATE_UINT32_EQUAL
Fix performance regression in qemu_get_ram_ptr
When the commit f471a17e9d869df3c6573f7ec02c4725676d6f3a converted theram_blocks structure to QLIST, it also removed the conditional check beforeswitching the current block at the beginning of the list.
In the common use case where ram_blocks has a few blocks with only one...
hmp-commands.hx: fix badly merged client_migrate_info command
client_migrate_info was merged badly, placing it between the commandand the documentation for another command. In addition it did notrespect the general rule of hmp-commands.hx, of having command...
xilinx-ethlite: Simplify byteswapping to/from brams
mainstone: PCMCIA support
Extend mst_fpga and mainstone with logic to support PCMCIAattachment (IRQs, status regs).
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
mainstone: use gpio 0 for connection of FPGA instead of hooking into PIC directly
pxa2xx_timer: Get rid of .level in PXA2xxTimer0.
pxa2xx_pic: fixup initialisation
This is based on Dmitry Eremin-Solenikov's patch but simplified.
pxa2xx_timer: separate irq for pxa27x handling
First, sysbus_init_irq shan't be called on on-stack variables. Indeed,it only stores a passed pointer in qdev and the stored irq is laterpopulated, so we get a nice write-to-stack bug.Second, irq for pxa27x should probably be handled in a more gentler way,...
trace: Trace posix-aio-compat.c completion and cancellation
This patch adds paio_complete() and paio_cancel() trace events tocomplement the paio_submit() event.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
trace: Trace bdrv_aio_flush()
Add a trace event for bdrv_aio_flush() to complement the existingbdrv_aio_readv() and bdrv_aio_writev() events.
simpletrace: Thread-safe tracing
Trace events outside the global mutex cannot be used with the simpletrace backend since it is not thread-safe. There is no check to preventthem being enabled so people sometimes learn this the hard way.
This patch restructures the simple trace backend with a ring buffer...
Add lm32 target to configure
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
MAINTAINERS: add LatticeMico32 maintainer
Add me as the lm32-target and machines maintainer.
lm32: system control model
This patch add support for a system control block. It is supposed toact as helper for the emulated program. E.g. shutting down the VM orprinting test results. This model is intended for testing purposes only anddoesn't fit to any real hardware. Therefore, it is not added to any board...
lm32: support for creating device tree
This patch adds helper functions to create a ROM, which contains a hardwaredescription of a board. This is used in Theobromas LM32 Linux port.
lm32: EVR32 and uclinux BSP
This patch adds support for the following two BSPs: - LM32 EVR32 BSP (as used by RTEMS) - uclinux BSP by Theobroma Systems
lm32: todo and documentation
This patch adds general target documentation and a todo list.
lm32: opcode testsuite
This patch creates tests/lm32 directory and adds tests for everyLatticeMico32 opcode.
LatticeMico32 target support
This patch adds support for the LatticeMico32 softcore processor by LatticeSemiconductor.
lm32: translation routines
This patch adds the main translation routine. All opcodes of theLatticeMico32 processor are supported and translated to TCG ops.
lm32: translation code helper
This patch adds translation helper functions.
lm32: machine state loading/saving
This patch adds support for saving and loading the processor state.
lm32: gdbstub support
This patch adds lm32 support to the gdbstub.
lm32: interrupt controller model
This patch adds the interrupt controller of the lm32. Because the PIC isaccessed through special control registers and opcodes, there are callbacksfrom the lm32 translation code to this model.
Signed-off-by: Michael Walle <michael@walle.cc>...
lm32: juart model
This patch adds the JTAG UART model. It is accessed through special controlregisters and opcodes. Therefore the translation uses callbacks to thismodel.
lm32: pic and juart helper functions
This patch adds init functions for the PIC and JTAG UART commonly usedin the board initialization.
lm32: timer model
This patch adds support for the LatticeMico32 system timer.
lm32: uart model
This patch add support for the LatticeMico32 UART.
target-arm: Implement a minimal set of cp14 debug registers
Newer ARM kernels try to probe for whether the CPU has hardware breakpointsupport. For this to work QEMU has to implement a minimal set of the cp14debug registers. The architecture requires v7 cores to implement debug...
target-arm: Use TCG temporary leak debugging facilities
Use the new TCG temporary leak debugging facilities tocheck that each ARM instruction does not leak temporaries.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Remove ad-hoc leak checking code
This commit removes the ad-hoc resource leak checking code fromtarget-arm. This includes replacing all uses of new_tmp() withtcg_temp_new_i32() and all uses of dead_tmp() withtcg_temp_free_i32().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
tcg: Add support for debugging leakage of temporaries
Add support (if CONFIG_DEBUG_TCG is defined) for debugging leakageof temporary variables. Generally any temporaries created bya target while it is translating an instruction should be freedby the end of that instruction; otherwise carefully crafted...
target-arm: Integrate secondary CPU reset in arm_boot
Integrate secondary CPU reset into arm_boot, removing it from realview.c.On non-Linux systems secondary CPUs start with the same entry as the bootCPU.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>...
target-arm: Implement cp15 VA->PA translation
Implement VA->PA translations by cp15-c7 that went through unchangedpreviously.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Fix soft interrupt in GIC distributor
Fix selection of target list filter mode.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Set carry flag correctly for Thumb2 ORNS
The code for Thumb2 ORNS (or negated and set flags) was trashinga TCG input register which was needed later for use in calculatingflags, with the effect that the carry flag was always set withthe wrong sense. Fix this by using the TCG orc op instead of...
ioport: Improve error output
When failing due to conflicting I/O port registrations,include the offending I/O port address in the message.
Cc: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tracetool: Add optional argument to specify dtrace probe names
Optional feature allowing a user to generate the probe list to matchthe name of the binary, in case they wish to install qemu under adifferent name than qemu-{system,user},<arch>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
target-arm: Handle VMOV between two core and VFP single regs
Fix two bugs in the translation of the instructions VMOV sa,sb,rx,ry andVMOV rx,ry,sa,sb (which copy between a pair of ARM core registers and apair of VFP single precision registers):
w32: Add support for curses
MinGW optionally includes pdcurses, so add support for it.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-arm: Don't decode old cp15 WFI instructions on v7 cores
In v7 of the ARM architecture, WFI (wait for interrupt) is a first-classinstruction, but in previous versions this functionality was providedvia a cp15 coprocessor register. Add correct feature checks to the...
net: Add the missing option declaration of "vhostforce"
Signed-off-by: Jason Wang <jasowang@redhat.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vmstate: remove grackle_pci savevm code
It was migrating the wrong structures, no way it would work
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
vmstate: remove uninorth savevm code
gt64xxx: remove savevm support
net: remove parse_host_src_port() function
It was deprecated, and it has no users.
hw/sd.c: fix sd_set_cb() crash when bdrv == NULL
sd_set_cb() calls bdrv_is_read_only() and bdrv_is_inserted() even ifno block driver is associated with the card reader.
This patch fixes the issues by not setting the irq in this case, thisfixes ARM versatile crash....
net: Use iov helper functions
Signed-off-by: Benjamin Poirier <benjamin.poirier@gmail.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Jason Wang <jasowang@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
docs: Update stderr and simple backend, add systemtap backend
The following additions to the tracing documentation are included:
1. Move "stderr" backend documentation to top-level and out of "simple" backend. Include hints on when this backend is useful....
simpletrace: Make simpletrace.py a Python module
The simpletrace.py script pretty-prints a binary trace file. Most ofthe code can be reused by trace file analysis scripts, so turn it into amodule.
Here is an example script that uses the new simpletrace module:...
linux-user: Fix large seeks by 32 bit guest on 64 bit host
When emulating a 32 bit Linux user-mode program on a 64 bit targetwe implement the llseek syscall in terms of lseek. Correct a bugwhich meant we were silently casting the result of host lseek()...
hw/realview: Wire up the MMC card status
Instantiate the three PL061 GPIO modules the realview boards have.Connect the MMC card status outputs of the PL181 MMC controllerto both the system registers and the GPIO module which handlesinternal devices.