pseries: Update SLOF firmware image
This patch is a general update to the SLOF firmware image used on thepseries machine. This doesn't contain updates for specific features butcontains a number of bugfixes and enhancements in the main SLOF tree fromThomas Huth....
ppc: Remove broken partial PVR matching
The ppc target contains a ppc_find_by_pvr() function, which looks up aCPU spec based on a PVR (that is, based on the value in the target cpu'sProcessor Version Register). PVR values contain information on both the...
ppc/e500_pci: Fix code style
Put trailing statements on next line.
Signed-off-by: Liu Yu <yu.liu@freescale.com>Reviewed-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Alexander Graf <agraf@suse.de>
ppc/e500_pci: Fix an array overflow issue
When access PPCE500_PCI_IW1 the previous index get overflow.The patch fix the issue and update all to keep consistent style.
Signed-off-by: Liu Yu <yu.liu@freescale.com>Signed-off-by: Alexander Graf <agraf@suse.de>
pseries: Support SMT systems for KVM Book3S-HV
Alex Graf has already made qemu support KVM for the pseries machinewhen using the Book3S-PR KVM variant (which runs the guest inusermode, emulating supervisor operations). This code allows gets usvery close to also working with KVM Book3S-HV (using the hypervisor...
pseries: Allow KVM Book3S-HV on PPC970 CPUS
At present, using the hypervisor aware Book3S-HV KVM will only workwith qemu on POWER7 CPUs. PPC970 CPUs also have hypervisorcapability, but they lack the VRMA feature which makes assigning guestmemory easier....
pseries: Use Book3S-HV TCE acceleration capabilities
The pseries machine of qemu implements the TCE mechanism used as avirtual IOMMU for the PAPR defined virtual IO devices. Because thePAPR spec only defines a small DMA address space, the guest VIOdrivers need to update TCE mappings very frequently - the virtual...
This patch updates the SLOF submodule and precompiled image. The newSLOF versions contains two changes of note:
Set an invalid-bits mask for each SPE instructions
SPE instructions are defined by pairs. Currently, the invalid-bits mask is setfor the first instruction, but the second one can have a different mask.
example:GEN_SPE(efdcmpeq, efdcfs, 0x17, 0x0B, 0x00600000, 0x00180000, PPC_SPE_DOUBLE),...
ppc: Generalize the kvmppc_get_clockfreq() function
Currently the kvmppc_get_clockfreq() function reads the host's clockfrequency from /proc/device-tree, which is useful to past to the guestin KVM setups. However, there are some other host propertiesadvertised in the device tree which can also be relevant to the...
pseries: Add device tree properties for VMX/VSX and DFP under kvm
Sufficiently recent PAPR specifications define properties "ibm,vmx" and "ibm,dfp" on the CPU node which advertise whether the VMX vectorextensions (or the later VSX version) and/or the Decimal Floating...
MAINTAINERS: update wiki URL and machine names for target-xtensa
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg: Optimize some forms of deposit.
If the deposit replaces the entire word, optimize to a move.
If we're inserting to the top of the word, avoid the mask of arg2as we'll be shifting out all of the garbage and shifting in zeros.
If the host is 32-bit, reduce a 64-bit deposit to a 32-bit deposit...
hw/9pfs: Make VirtFS tracing work correctly
this patch fix multiple issues with VirtFS tracing.a) Add tracepoint to the correct code path. We handle error in complete_pdub) Fix indentation in python scriptc) Fix variable naming issue in python script...
exec-all: Fix void pointer arithmetic
Adding an offset to a void pointer works with gcc but is not allowedby the current C standards. With -pedantic, gcc complains:
exec-all.h:344: error: pointer of type ‘void *’ used in arithmetic
Fix this, and also replace (unsigned long) by (uintptr_t) in the same...
Add linux-headers/asm to .gitignore
linux-headers/asm is a symlink generated during configure. It should not,therefore be committed to git, nor show up in git diffs and the like.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>Reviewed-by: Juan Quintela <quintela@redhat.com>...
Merge branch 'rth/vis2' of git://repo.or.cz/qemu/rth
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
target-sparc: Implement EDGE* instructions.
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-sparc: Implement ALIGNADDR* inline.
While ALIGNADDR was implemented out-of-line, ALIGNADDRL was notimplemeneted at all. However, this is a very simple operationso we're better off doing this inline.
target-sparc: Implement BMASK/BSHUFFLE.
target-sparc: Implement FALIGNDATA inline.
This is a relatively simple sequence of shifts.
target-sparc: Implement fpack{16,32,fix}.
target-sparc: Implement PDIST.
target-sparc: Do exceptions management fully inside the helpers.
This reduces the size of the individual translation blocks, sincewe only emit a single call for each FOP rather than three. Inaddition, clear_float_exceptions expands inline to a single byte store....
target-sparc: Extract float128 move to a function.
target-sparc: Undo cpu_fpr rename.
target-sparc: Change fpr representation to doubles.
This allows a more efficient representation for 64-bit hosts.It should be about the same for 32-bit hosts, as we can stillaccess the individual pieces of the double.
target-sparc: Extract common code for floating-point operations.
target-sparc: Mark fprs dirty in store accessor.
target-sparc: Add accessors for double-precision fpr access.
Begin using i64 quantities to manipulate double-precision values.On a 64-bit host this will, for the moment, generate less efficientcode; on a 32-bit host code quality should be largely unchanged....
target-sparc: Pass float64 parameters instead of dt0/1 temporaries.
target-sparc: Make FPU/VIS helpers const when possible.
This also removes the unused ENV parameter from these helpers.
target-sparc: Add accessors for single-precision fpr access.
Load, store, and "create destination". This version attempts tochange the behaviour of the translator as little as possible. Wepreviously used cpu_tmp32 as the temporary destination, and we...
Sparc: split load and store op helpers
Move load and store op helpers top ldst_helper.c.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc: convert win_helper to trace framework
Sparc: convert interrupt helpers to trace framework
Sparc: convert mmu_helper to trace framework
Sparc: split MMU helpers
Move MMU helpers to mmu_helper.c.
Sparc: fix coding style in helper.c
Before the next patch, fix coding style of the areas affected.
Sparc: avoid AREG0 for division op helpers
Make [su]div{,cc} helpers take a parameter for CPUState insteadof relying on global env. Move the functions to helper.c.
Sparc: avoid AREG0 for softint op helpers and Leon cache control
Make softint op helpers and Leon cache irq manager take a parameterfor CPUState instead of relying on global env. Move the functionsto int{32,64}_helper.c.
Reviewed-by: Richard Henderson <rth@twiddle.net>...
Sparc: avoid AREG0 for CWP and PSTATE helpers
Make CWP and PSTATE helpers take a parameter for CPUState insteadof relying on global env. Remove wrapper functions.
Merge remote-tracking branch 'kwolf/for-anthony' into staging
main-loop: Add missing include file
stdint.h defines the POSIX data types and is neededfor MinGW-w64 (and maybe other hosts).
v2: Instead of adding stdint.h directly, qemu-common.h is nowincluded and duplicate include statements were removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
target-sparc: Fix use of g_new0 / g_free
g_malloc0 needs g_free instead of free.While fixing this, I also replaced g_malloc0 by g_new0as was suggested by Stuart Brady.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-sparc: Fix order of function parameters
The MinGW-w64 gcc complains about wrong parameters forgen_helper_fpadd16_s and three other functions.
gen_helper_fpadd16_s is declared like this (hidden in lots of macros):
static inline void gen_helper_fpadd16s(TCGv_i32 retval, TCGv_ptr arg1,...
hda: do not mix output and input stream states, RHBZ #740493
Windows 7 may use the same stream number for input and output.Current code will confuse streams.
Changes since v1:- keep running_compat[] for migration version 1- add running_real[] for migration version 2...
hda: do not mix output and input streams, RHBZ #740493
Windows 7 may use the same stream number for input and output.That will result in lot of garbage on playback.
The hardcoded value of 4 needs to be in sync with GCAP streamsdescription and IN/OUT registers....
Merge remote-tracking branch 'bonzini/split-main-loop-for-anthony' into staging
Add stdio char device on windows
Simple implementation of an stdio char device on Windows.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc: split CWP and PSTATE op helpers
Move CWP and PSTATE op helpers to win_helper.c.
Sparc: avoid AREG0 for lazy condition code helpers
Make lazy condition code helpers take a parameter for CPUState insteadof relying on global env.
Sparc: split lazy condition code handling op helpers
Move lazy condition code handling op helpers to cc_helper.c.
Sparc: avoid AREG0 for float and VIS ops
Make floating point and VIS ops take a parameter for CPUState insteadof relying on global env.
Sparc: split FPU and VIS op helpers
Move FPU op helpers to fop_helper.c. Move VIS op helpers to vis_helper.c,compile it only for Sparc64.
Sparc: fix coding style
Before the next patches, fix coding style of the areas affected.
Sparc: avoid AREG0 for raise_exception and helper_debug
Make raise_exception() and helper_debug() take a parameter forCPUState instead of relying on global env. Move the functionsto helper.c.
Sparc: move trivial functions from op_helper.c
These functions don't need access to CPUState or already pass it,so relocating them from op_helper.c to helper.c and int64_helper.cis trivial.
Sparc: split helper.c
Move CPU init to cpu_init.c and interrupt handling to int32_helper.cfor Sparc32 and int64_helper.c for Sparc64.
m48t59: fix write access
Fix incorrect order of arguments, letting writes to NVRAM succeed.
It looks like guests never write to the device, only read from it, since the bugoriginates back to 819385c58b319d9f80d676cefaed0610118f03ac.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
m48t59: drop obsolete address base arithmetic
Remove now incorrect address base arithmetic, missed by9936d6e42392f1440505dfa9df065eabd251cadf. Fixes Sparc64 boot.
pci_bridge: fix typo
Reviewed-by: Avi Kivity <avi@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
simplify main loop functions
Provide a clean example of how to use the main loop in the tools.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-timer: move common code to qemu_rearm_alarm_timer
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-timer: more clock functions
These will be used when moving icount accounting to cpus.c.
qemu-timer: move icount to cpus.c
None of this is needed by tools, and most of it can even be made staticinside cpus.c.
qemu-timer: do not refer to runstate_is_running()
qemu-timer: use atexit for quit_timers
qemu-timer: move more stuff out of qemu-timer.c
qemu-timer: do not use RunState change handlers
main-loop: create main-loop.h
main-loop: create main-loop.c
Revert to a hand-made select loop
This reverts commit c82dc29a9112f34e0a51cad9a412cf6d9d05dfb2and 4d88a2ac8643265108ef1fb47ceee5d7b28e19f2.
remove unused function
qemu-timer: remove active_timers array
Embed the list in the QEMUClock instead.
compatfd.c: Don't pass NULL pointer to SYS_signalfd
Don't pass a NULL pointer in to SYS_signalfd in qemu_signalfd_available():this isn't valid and Valgrind complains about it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
linux-user: Fix broken "-version" option
Fix the "-version" option, which was accidentally broken in commitfc9c541: * exit after printing version information rather than proceeding blithely onward (and likely printing the full usage message) * correct the cut-n-paste error in the usage message for it...
block: take lock around bdrv_read implementations
This does the first part of the conversion to coroutines, bywrapping bdrv_read implementations to take the mutex.
Drivers that implement bdrv_read rather than bdrv_co_readv canthen benefit from asynchronous operation (at least if the underlying...
block: take lock around bdrv_write implementations
This does the first part of the conversion to coroutines, bywrapping bdrv_write implementations to take the mutex.
Drivers that implement bdrv_write rather than bdrv_co_writev canthen benefit from asynchronous operation (at least if the underlying...
block: change flush to co_flush
Since coroutine operation is now mandatory, convert all bdrv_flushimplementations to coroutines. For qcow2, this means taking the lock.Other implementations are simpler and just forward bdrv_flush to theunderlying protocol, so they can avoid the lock....
block: change discard to co_discard
Since coroutine operation is now mandatory, convert both bdrv_discardimplementations to coroutines. For qcow2, this means taking the lockaround the operation. raw-posix remains synchronous.
The bdrv_discard callback is then unused and can be eliminated....
block: unify flush implementations
Add coroutine support for flush and apply the same emulation thatwe already do for read/write. bdrv_aio_flush is simplified to alwaysgo through a coroutine.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: drop redundant bdrv_flush implementation
Block drivers now only need to provide either of .bdrv_co_flush,.bdrv_aio_flush() or for legacy drivers .bdrv_flush(). Removethe redundant .bdrv_flush() implementations.
[Paolo Bonzini: change raw driver to bdrv_co_flush]...
block: add bdrv_co_discard and bdrv_aio_discard support
This similarly adds support for coroutine and asynchronous discard.
fdc: Fix floppy port I/O
The floppy device was broken by commit 212ec7ba (fdc: Convert toisa_register_portio_list). While the old interface provided the port numberrelative to the floppy drive's io_base, the new one provides the real portnumber, so we need to apply a bitmask now to get the register number....
qemu-img: Don't allow preallocation and compression at the same time
Only qcow and qcow2 can do compression at all, and they require unallocatedclusters when writing the compressed data.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qcow2: Fix bdrv_write_compressed error handling
If during allocation of compressed clusters the cluster was already allocateduncompressed, fail and properly release the l2_table (the latter avoids afailed assertion).
While at it, make it return some real error numbers instead of -1....
pc: Fix floppy drives with if=none
Commit 63ffb564 broke floppy devices specified on the command line like-drive file=...,if=none,id=floppy -global isa-fdc.driveA=floppy because itrelies on drive_get() which works only with -fda/-drive if=floppy.
This patch resembles what we're already doing for IDE, i.e. remember the floppy...
vmdk: fix return values of vmdk_parent_open
While vmdk_open_desc_file (touched by the patch) correctly changed -1to -EINVAL, vmdk_open did not. Fix it directly in vmdk_parent_open.
vmdk: clean up open
Move vmdk_parent_open to vmdk_open. There's another path howvmdk_parent_open can be reached:
vmdk_parse_extents() -> vmdk_open_sparse() -> vmdk_open_vmdk4() -> vmdk_open_desc_file().
If that can happen, however, the code is bogus. vmdk_parent_open...
block: add a CoMutex to synchronous read drivers
The big conversion of bdrv_read/write to coroutines caused the twohomonymous callbacks in BlockDriver to become reentrant. It goeslike this:
1) bdrv_read is now called in a coroutine, and calls bdrv_read or...
sheepdog: add coroutine_fn markers
This makes the following patch easier to review.
Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
add socket_set_block
block: rename bdrv_co_rw_bh
fix memory leak in aio_write_f
Haven't released memory of 'ctx' before return.
Signed-off-by: Alex Jia <ajia@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
xen_disk: Always set feature-barrier = 1
The synchronous .bdrv_flush callback doesn't exist any more and a device reallyshouldn't poke into the block layer internals anyway. All drivers are supposedto have a correctly working bdrv_flush, so let's just hard-code this....
hw/arm_gic.c: Fix save/load of irq_target array
irq_target array saving/loading is in the wrong loop.Version bump.
Signed-off-by: Dmitry Koshelev <karaghiozis@gmail.com>Acked-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/omap2: Wire up the IRQ for the 2430's fifth GPIO module
The OMAP2430 version of the omap-gpio device has five GPIO modules,not four like the other OMAP2 versions; wire up the fifth module'sIRQ line correctly.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...