sheepdog: add full data preallocation support
This introduces qemu-img create option for sheepdog which allows thedata to be fully preallocated (note that sheepdog always preallocatesmetadata).
The option is disabled by default and you need to enable it like the...
qemu-io: Fix formatting
Replaced tabs with spaces, 8 space indentations with 4 spaceindentation, and other fixes to better adhere to CODING_STYLE
Signed-off-by: Devin Nakamura <devin122@gmail.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fix signal handling of SIG_IPI when io-thread is enabled
Both the signal thread (via sigwait()) and the cpu thread (viaa normal signal handler) were attempting to catch SIG_IPI.
This resulted in random freezes under Darwin.
This patch separates SIG_IPI from the rest of the signals handled...
Fix signal handling when io-thread is disabled
Changes since v1:- take pthread_sigmask() out of the ifdef as it is now commonto both parts.
This fix effectively blocks, in the main thread, the signals handledby signalfd or the compatibility signal thread....
tcg/README: Expand advice on number of TCG ops per target insn
Expand the note on the number of TCG ops generated per target insn,to be clearer about the range of applicability of the 20 op ruleof thumb. Also add a note about the hard MAX_OP_PER_INSTR limit....
set ELF_HWCAP for SPARC and SPARC64
setting ELF_HWCAP fixes dynamic library loading for Linux/sparc64This patch allows loading busybox from Debian 6 initrd
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc: fix FPU and AM enable checks for translation
Translation used incorrectly CPUState fields directly to checkfor FPU enable state and 32 bit address masking on Sparc64.
Fix by using TB flags instead.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
SPARC64: C99 comment fix for block-transfer ASIs
Fixed C99 comments on block-tranfer ASIs.
Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
SPARC64: Add JPS1 ASI_BLK_AIU[PS]L ASIs for ldfa and stfa
Support JPS1 little endian block transfer ASIs.
SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for stfa
Support UA2007 block store ASIs for stfa instructions.
SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for ldfa
Support UA2007 block load ASIs for ldfa instructions.
SPARC64: fp_disabled checks on stfa/stdfa/stqfa
stfa/stdfa/stqfa instructions should raise fp_disabled exceptionsif %pstate.PEF==0 or %fprs.FEF==0.
SPARC64: Implement stfa/stdfa/stqfa instrcutions properly
This patch implements sparcv9 stfa/stdfa/stqfa instructionswith non block-store ASIs.
SPARC64: fp_disabled checks on ldfa/lddfa/ldqfa
ldfa/lddfa/ldqfa instructions should raise fp_disabled exceptionsif %pstate.PEF==0 or %fprs.FEF==0.
SPARC64: Implement ldfa/lddfa/ldqfa instructions properly
This patch implements sparcv9 ldfa/lddfa/ldqfa instructionswith non block-load ASIs.
os-posix: set groups properly for -runas
Andrew Griffiths reports that -runas does not set supplementary groupIDs. This means that gid 0 (root) is not dropped when switching to anunprivileged user.
Add an initgroups(3) call to use the -runas user's /etc/groups...
esp: cancel current request only if some request is in flight
This bug was introduced in 94d3f98a3f3caddd7875f9a11776daeb84962a7b:scsi_cancel_io was checking if some request was pending before tryingto cancel it, while scsi_req_cancel always cancels the request....
target-alpha, target-ppc: Remove unnecessary setjmp.h include
Remove the include of setjmp.h from the cpu.h of target-alphaand target-ppc. This is unnecessary because cpu-defs.h alreadyincludes this header; this change brings these two targetsinto line with all the rest....
Remove unneeded setjmp.h (fix compilation on Debian "lenny")
Some versions of png.h cannot be included after setjmp.h,even when PNG_SKIP_SETJMP_CHECK was defined.
setjmp.h was included from qemu-common.h and is not needed there.Removing the include statement fixes compilation of ui/vnc-enc-tight.c...
tcg: Reload local variables after return from longjmp
Recent compilers look deep into cpu_exec, find longjmp as a noreturnfunction and decide to smash some stack variables as they won't be usedagain. This may lead to env becoming invalid after return from setjmp,...
exec-all.h: Make MAX_OP_PER_INSTR large enough for target-arm's uses
The target-arm frontend's worst-case TCG ops per instr is 194 (and ingeneral many of the "load multiple registers" ARM instructions generatemore than 100 TCG ops). Raise MAX_OP_PER_INSTR accordingly to avoid...
exec.c: Fix calculation of code_gen_buffer_max_size
When calculating the point at which we should not try to put anotherTB into the code gen buffer, we have to allow not just for OPC_MAX_SIZEbut OPC_BUF_SIZE. This is because the target translate.c will only...
spapr: use specific endian ld/st_phys
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
s390-virtio: use specific endian ld/st_phys
ppc405_uc: use specific endian ld/st_phys
pl080: use specific endian ld/st_phys
msix: use specific endian ld/st_phys
msi: use specific endian ld/st_phys
intel-hda: use specific endian ld/st_phys
hpet: use specific endian ld/st_phys
exec: add endian specific phys ld/st functions
Device code some times needs to access physical memory and does thatthrough the ld./st._phys functions. However, these are the exact samefunctions that the CPU uses to access memory, which means they willbe endianness swapped depending on the target CPU....
ide: Initialise buffers with zeros
Just in case there's still a way how a guest can read out buffers when it's notsupposed to, let's zero the buffers during initialisation so that we don't leakinformation to the guest.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
ide: Ignore reads during PIO in and writes during PIO out
This fixes https://bugs.launchpad.net/qemu/+bug/786209:
When the DRQ_STAT bit is set, the IDE core permits both data reads and data writes, regardless of whether the current transfer was initiated as a read or write....
block: drive_init(): Simplify interface type setting
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: drive_init(): Improve CHS setting error message
The current message doesn't clearly communicate the error cause.
Documentation: Remove outdated host_device note
People shouldn't explicitly specify host_device any more. raw is doing theRight Thing.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img: Add cache command line option
qemu-img currently writes disk images using writeback and fillingup the cache buffers which are then flushed by the kernel preventingother processes from accessing the storage.This is particularly bad in cluster environments where time-based...
block/raw-posix: Linux compat-ioctl warning workaround
On Linux x86_64 host with 32bit userspace, runningqemu or even just "qemu-img create -f qcow2 some.img 1G" causes a kernel warning:
ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(00005326){t:'S';sz:0} arg(7fffffff) on some.img...
virtio-blk: Turn drive serial into a qdev property
It needs to be a qdev property, because it belongs to the drive'sguest part. Precedence: commit a0fef654 and 6ced55a5.
Bonus: info qtree now shows the serial number.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
pxa2xx_lcd: add proper rotation support
Until now, pxa2xx_lcd only supported 90deg rotation, butsome machines (for example Zipit Z2) needs 270deg rotation.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
arm: Add const attribute to some arm_boot_info pointers
Parameter 'info' is const, so add the missing attribute.
v2:Add 'const' to the local variable info in do_cpu_reset() and tothe boot_info field in CPUARMState (suggested by Peter Maydell).
Cc: Andrzej Zaborowski <balrogg@gmail.com>...
esp: correctly fill bus id with requested lun
This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, andmay be seen only on operating systems not using DMA to give commandsto SCSI adapter.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>...
TCG/PPC: use stack for TCG temps
Use stack instead of temp_buf array in CPUState for TCG temps.
fix cpu_cc_src and cpu_cc_src2 corruption in udivx and sdivx
udivx and sdvix don't modify condition flags, so they shall notoverwrite cpu_cc_*
Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
tcg-hppa: Support deposit opcode.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hppa: Fix printf warnings in hppa-dis.c.
TCG/HPPA: use stack for TCG temps
TCG/HPPA: use TCG_REG_CALL_STACK instead of TCG_REG_SP
Use TCG_REG_CALL_STACK instead of TCG_REG_SP for consistency.
Acked-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
etraxfs-ser: Correct default value for RW_REC_CTRL
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
user: Fix -d debug logging for usermode emulation
cris: Handle opcode zero
It's a valid branch pc + 2.
tcg/ppc64: Remove tcg_out_addi
The only user (within tcg.c) was removed
Signed-off-by: malc <av1474@comtv.ru>
tcg/ppc: Remove tcg_out_addi
Merge remote-tracking branch 'kraxel/usb.17' into staging
Merge remote-tracking branch 'amit/for-anthony' into staging
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
vnc: Fix compilation with --enable-vnc-png
Commit f26e428da505709ec03b2ed2c9eb3db82b30bd7b fixed compilationwith --enable-vnc-png, but broke it with --enable-vnc-png.
The breakage is caused by pngconfig.h which checks whethersetjmp.h was already included and fails because qemu-common.h...
virtio-serial: Fix segfault on guest boot
If I start qemu with:
Fix MinGW compilation when --enable-vnc-jpeg is specified
Fix conflicting types for 'INT32' in basetsd.h and jmorecfg.h byincluding qemu-common.h first.
Signed-off-by: Roy Tam <roytam@gmail.com>Acked-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
TCG/Sparc64: use stack for TCG temps
On Sparc64, stack pointer is not aligned but there is a fixed bias of 2047,so don't try to enforce alignment.
TCG/x86: use stack for TCG temps
Use stack instead of temp_buf array in CPUState for TCGtemps.
TCG/x86: use TCG_REG_CALL_STACK instead of TCG_REG_ESP
Except for specific cases where the use of %esp changes the encoding ofthe instruction, it's cleaner to use TCG_REG_CALL_STACK instead ofTCG_REG_ESP.
TCG: remove broken stack allocation for call arguments
The code for stack allocation for call arguments is way too simplisticto actually work on targets with non-trivial stack allocation policies,e.g. ppc64. We've also already allocated TCG_STATIC_CALL_ARGS_SIZE worth...
TCG: fix negative frame offset calculations
size_t is unsigned, so the frame offset calculations can be incorrect fornegative offsets.
Delegate setup of TCG temporaries to targets
Delegate TCG temp_buf setup to targets, so that they can use a stackframe later instead.
cpu-exec.c: avoid AREG0 use
Make functions take a parameter for CPUState instead of relyingon global env. Pass CPUState pointer to TCG prologue, which movesit to AREG0.
Thanks to Peter Maydell and Laurent Desnogues for the ARM prologuechange.
Revert the hacks to avoid AREG0 use on Sparc hosts....
Remove exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
Move cpu_has_work and cpu_pc_from_tb to cpu.h
Move functions cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. This isneeded by later patches.
exec.h: fix coding style and change cpu_has_work to return bool
Before the next patch, fix coding style of the areas affected.
Change the type of the return value from cpu_has_work() andqemu_cpu_has_work() to bool.
cpu-exec: unify do_interrupt call
Now that all targets use common function signature for do_interrupt(), there is noneed for the #ifdeffery anymore.
m68k: use caller supplied CPUState for interrupt related stuff
Pass CPUState to do_interrupt(). This is needed by later patches.
It would be cleaner to move the function to helper.c, but there area few dependencies between do_interrupt() and other functions....
x86: use caller supplied CPUState for interrupt related stuff
Several x86 specific functions are called from cpu-exec.c with theassumption that global env register is valid. This will be changedlater, so make the functions use caller supplied CPUState parameter....
sparc: move do_interrupt to helper.c
do_interrupt() was mixing CPUState pointer passed from callerand global env (AREG0).
Fix by moving the function to helper.c. Introduce a helper for callingchange_pstate() safely from outside of execution context.
sparc: fix coding style of the area to be moved
cpu_loop_exit: avoid using AREG0
Make cpu_loop_exit() take a parameter for CPUState instead of relyingon global env.
Sparc32: dummy implementation of MXCC MMU breakpoint registers
Add dummy registers for SuperSPARC MXCC MMU counter breakpoints, saveand load all MXCC registers.
Fix fallouts from Linux header inclusion
This is an all-in-one fix for the smaller and bigger mistakes of thebuild system changes for accompanied Linux headers: - only enable KVM and vhost on Linux hosts - fix powerpc asm header symlink - do not use Linux headers on non-Linux hosts...
qemu-kvm: fix pulseaudio detection in configure
pulse/simple.h does not include stdlib.hWe cannot use NULL since it may not be definedUse 0 instead
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
exec: last_first_tb was only used in !ONLY_USER case
Once there, use a better variable name.
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
w32: Remove redundant definitions of PRI*64
The PRI*64 macros are defined in MinGW's inttypes.h since 2002,so they are not needed in qemu-common.h (which includes inttypes.h).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qemu-img: Don't prepend qemu-img to error messages twice.
error_report() prepends the location already. Example:
$ qemu-img convert -6qemu-img: qemu-img: option -6 is deprecated, please use '-o compat6' instead!
Spell "unkown" correctly in error_report() arguments
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
blockdev: Put space after comma in error message
MAINTAINERS: Fix typo in email address
Fix a typo in one of the copies of Aurelien Jarno's email address.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix comment typos in hw/armv7m.c
Fix a couple of typos in comments.
Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>Acked-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Do not include compatfd for WIN32
sigset_t, used by that header, is not available in mingw32 environments.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
configure: Don't create symlinks to nonexistent targets
When we create the symlinks to source tree files, don't create themif the file is not actually present in the source tree; this willhappen if the file is in a git submodule that wasn't checked out....
Align dummy display to fixed-size active console
This fixes e.g. '-vga none -monitor vc:120Cx50C'.
sheepdog: qemu_bh_new() can't return null pointer, drop check
Strip trailing '\n' from error_report()'s first argument
error_report() prepends location, and appends a newline. The messageconstructed from the arguments should not contain a newline. Fix theobvious offenders.
usb: ignore USB_DT_DEBUG
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-storage: Turn drive serial into a qdev property usb-storage.serial
coreaudio: Fix OSStatus format specifier
OSStatus type is defined as SInt32. That's signed int on LP64 andsigned long otherwise.Since it is an explicit 32-bit-width type, cast to corresponsing POSIX typeand use PRId32 format specifier. This avoids a warning on ppc64....
coreaudio: Avoid formatting UInt32 type
coreaudioVoiceOut's audioDevicePropertyBufferFrameSize is defined as UInt32and is being used by reference for AudioDevice{Get,Set}Property().UInt32 is unsigned int on LP64 but unsigned long otherwise.
Cast to POSIX type and use PRIu32 format specifier to hide the details....
usb-bus: Don't allow speed mismatch while attaching devices
hw/usb-ohci.c: Fix handling of remote wakeup corner cases
Correct a number of minor errors in the OHCI wakeup implementation: * when the port is suspended but the controller is not, raise RHSC * when the controller is suspended but the port is not, raise RD...
usb: Add a speedmask to devices
This is used to indicate at which speed[s] the device can operate,so that this can be checked to match the ports capabilities when it getsattached to a bus.
Note that currently all usb1 emulated device claim to be fullspeed, this...
usb-linux: allow "compatible" high speed devices to connect at fullspeed
Some usb2 highspeed devices, like usb-msd devices, work fine when redirectedto a usb1 virtual controller. Allow this to avoid the new speedhecks causingregressions for users who do not enable the new experimental ehci code....