build: rename TARGET_ARCH2 to TARGET_NAME
Do not introduce any new use yet.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1370349928-20419-3-git-send-email-pbonzini@redhat.comSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
build: do not use TARGET_ARCH
TARGET_ARCH is generally wrong to use, there are better variablesprovided in config-target.mak. The right one is usually TARGET_NAME(previously TARGET_ARCH2), but for bsd-user we can also use TARGET_ABI_DIRfor consistency with linux-user....
Add a stp file for usage from build directory
For systemtap the location of the process being tapped is crucial, as aresult the existing stp file requires installation for use.
There are now two files:$(TARGET_DIR)/$(QEMU_PROG).stp-installed: copied to $(tapdir)/$(QEMU_PROG).stp...
Merge remote-tracking branch 'mjt/trivial-patches-next' into staging
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
Merge remote-tracking branch 'pmaydell/tcg-aarch64.next' into staging
Merge remote-tracking branch 'pmaydell/target-arm.next' into staging
Message-id: 1370268884-25945-1-git-send-email-peter.maydell@linaro.orgSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'rth/tcg-for-anthony' into staging
Message-id: 1370437167-11278-1-git-send-email-rth@twiddle.net...
piix: fix some printf errors when debug is enabled
And use PRIxxx macros if possible.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
cputlb: fix debug logs
'pd' variable has been removed in 06ef3525e1f271b6a842781a05eace5cf63b95c2.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
create qemu_openpty_raw() helper function and move it to a separate file
In two places qemu uses openpty() which is very system-dependent,and in both places the pty is switched to raw mode as well.Make a wrapper function which does both steps, and move all the...
spapr_rtas: Abstract rtas_start_cpu() with qemu_get_cpu()
Instead of looping over all CPUArchState, use a helper to obtain thedesired CPUState.Free the "cpu" variable for PowerPCCPU, to access its CPUPPCState.
Signed-off-by: Andreas Färber <afaerber@suse.de>
spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu()
Instead of looping over all CPUArchState, use a helper to obtain thedesired CPUState directly. Saves a CPUPPCState variable and QOM cast.
MAINTAINERS: add tcg/aarch64 maintainer
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Message-id: 51ACA0B2.80800@huawei.comSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
tcg/aarch64: implement byte swap operations
implement the optional byte swap operations with the dedicatedaarch64 instructions.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Message-id: 51AC9A33.9050003@huawei.com...
tcg/aarch64: implement sign/zero extend operations
implement the optional sign/zero extend operations with the dedicatedaarch64 instructions.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Message-id: 51AC9A58.40502@huawei.com...
user-exec.c: aarch64 initial implementation of cpu_signal_handler
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 51AF4028.5030504@huawei.com...
tcg/aarch64: implement user mode qemu ld/st
also put aarch64 in the list of archs that do not need an ldscript.
Signed-off-by: Jani Kokkoken <jani.kokkonen@huawei.com>Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>...
configure: permit compilation on arm aarch64
support compiling on aarch64.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Message-id: 51A5C5ED.90103@huawei.com...
configure: Drop CONFIG_ATFILE test
Nobody uses the CONFIG_ATFILE test now, so just drop it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Richard Henderson <rth@twiddle.net>Tested-by: Claudio Fontana <claudio.fontana@huawei.com>Message-id: 1370126121-22975-3-git-send-email-peter.maydell@linaro.org
include/elf.h: add aarch64 ELF machine and relocs
we will use the 26bit relative relocs in the aarch64 tcg target.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>...
tcg/aarch64: implement new TCG target for aarch64
add preliminary support for TCG target aarch64.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
tcg/aarch64: improve arith shifted regs operations
for arith operations, add SUBS, ANDS, ADDS and add a shift parameterso that all arith instructions can make use of shifted registers.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>...
tcg/aarch64: implement AND/TEST immediate pattern
add functions to AND/TEST registers with immediate patterns.
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Message-id: 51AC9A0C.3090303@huawei.com...
linux-user: Allow getdents to be provided by getdents64
Newer architectures may only implement the getdents64 syscall, notgetdents. Provide an implementation of getdents in terms of getdents64so that we can run getdents-using targets on a getdents64-only host....
linux-user: Drop direct use of openat etc syscalls
The linux-user syscall emulation layer currently supports theopenat family of syscalls via two mechanisms: simply callingthe corresponding libc functions, and making direct syscalls.Since glibc has supported these functions since at least glibc...
main-loop: do not include slirp/slirp.h, use libslirp.h instead
The header slirp/slirp.h is an internal header for slirp, andmain-loop.c does not use internals from there. Instead, it usespublic functions (slirp_update_timeout(), slirp_pollfds_fill()etc) which are declared in slirp/libslirp.h....
libcacard/vscclient: fix leakage of socket on error paths
Spotted by Coverity.
Signed-off-by: Alon Levy <alevy@redhat.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
KVM: ARM: Add dummy kvm_arch_init_irq_routing()
The common KVM code insists on calling kvm_arch_init_irq_routing()as soon as it sees kernel header support for it (regardless of whetherQEMU supports it). Provide a dummy function to satisfy this.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>...
KVM: S390: Add dummy kvm_arch_init_irq_routing()
KVM: PPC: Add dummy kvm_arch_init_irq_routing()
Unlike x86, PPC does not have one default irqchip, so there's no common...
linux-headers: Update to v3.10-rc5
This adds symbols required for PPC64 pseries platform features:1. sPAPR live migration;2. in-kernel XICS interrupt controller.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
ivshmem: add missing error exit(2)
If the user fails to specify 'chardev' or 'shm' then we cannot continue.Exit right away so that we don't invoke shm_open(3) with a NULL pointer.
It would be nice to replace exit(1) with error returns in the PCI device...
char/serial: cosmetic fixes.
Some cosmetic fixes to char/serial fixing some checkpatch errors.
Cc: qemu-trivial@nongnu.org
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
char/serial: Use generic Fifo8
Use the generic Fifo8 helper provided by QEMU, rather than re-implementprivately.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
char/serial: serial_ioport_write: Factor out common code
These three lines are common to both FIFO and regular mode. Just factorthem out to outside the if rather than replicate the same lines insideboth if and else.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
gtk: implement -full-screen
Aiming for GTK as replacement for SDL, a feature like -full-screen should alsobe implemented.
Bringing the window into full-screen mode is done by activating the "Fullscreen" menu item. This is done after showing the windows to make the cursor and menu...
Unbreak -no-quit for GTK, validate SDL options
Certain options (-no-frame, -alt-grab, -ctrl-grab) only make sense with SDL.When compiling without SDL, these options (and -no-quit) print an error messageand exit qemu.
In case QEMU is compiled with SDL support, the three aforementioned options...
Makefile: Install qemu-img and qemu-nbd man pages only if built
When splitting openSUSE's qemu and qemu-linux-user packages we noticedthat for linux-user-only builds unrelated man pages got installed.It's surely possible to delete them before packaging, but not installing...
device tree: Fix cppcheck warning
Fix this cppcheck warning:
Checking device_tree.c...device_tree.c:216: style: Checking if unsigned variable 'r' is less than zero.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/scsi: Don't increment a boolean value
This fixes a warning from cppcheck.
target-sparc: Replace free by g_free
The wrong function was reported by cppcheck.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/xen: Use g_free instead of free and fix potential memory leaks
The wrong functions and the missing calls of g_free were reportedby cppcheck.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qemu-char: remove a few needless #includes
This removes <syslog.h> since we don't usesyslogging, and removes second, solaris-specific,include of <net/if.h> (which is included ina common part of the file)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
gitignore: unignore *.patch
This partially reverts:
commit 082369e62c5bbaba89f173c2b803bc24115bb111 Author: liguang <lig.fnst@cn.fujitsu.com> Date: Fri Mar 22 16:44:13 2013 +0800
gitignore: ignore more files
I'm not sure how this went in. The thing is that...
configure: remove ${config_host_ld} variable
It was only used in one place (and already expanded in one other).
Signed-off-by: Ed Maste <emaste@freebsd.org>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
configure: Disable host-bsd USB on FreeBSD
It hasn't built since FreeBSD 8.x, and is disabled by a patch in theFreeBSD ports tree. FreeBSD is migrating to QEMU's libusb support.
intc/xilinx_intc: Use qemu_set_irq
Use qemu_set_irq rather than if-elsing qemu_irq_(lower|raise). Nofunctional change, just reduces verbosity.
curl: Whitespace only changes.
Trivial patch to remove odd whitespace.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
memory_mapping: Improve qemu_get_guest_memory_mapping() error reporting
Pass any Error out into dump_init() and have it actually stop on errors.Whether it is unsupported on a certain CPU can be checked by looking fora NULL CPUClass::get_memory_mapping field....
dump: Abstract dump_init() with cpu_synchronize_all_states()
Instead of calling cpu_synchronize_state() for each CPU, call theexisting cpu_synchronize_all_states() helper.
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Change default for CPUClass::get_paging_enabled()
qemu_get_guest_memory_mapping() uses cpu_paging_enabled() to determinewhether to use cpu_get_memory_mapping() to return mappings or whether tofall back to a simple identity map.
Since by default CPUClass::get_memory_mapping() is not implemented,...
dump: Drop qmp_dump_guest_memory() stub and build for all targets
qmp_dump_guest_memory() calls dump_init() and returns an Error whencpu_get_dump_info() returns an error, as done by the stub.So there is no need to have a stub for qmp_dump_guest_memory()....
memory_mapping: Drop qemu_get_memory_mapping() stub
dump.c:dump_init() never checked for the return code anyway.If paging is not enabled, it will fall back to an identity map.If paging is enabled and getting memory mapping list is notimplemented, qemu_get_guest_memory_mapping() will return an error....
cpu: Turn cpu_get_memory_mapping() into a CPUState hook
Change error reporting from return value to Error argument.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>[AF: Fixed cpu_get_memory_mapping() documentation]...
memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.h
This will avoid issues with hwaddr and ram_addr_t when includingsysemu/memory_mapping.h for CONFIG_USER_ONLY, e.g., from qom/cpu.h.
cpu: Turn cpu_paging_enabled() into a CPUState hook
Relocate assignment of x86 get_arch_id to have all hooks in one place.
Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
monitor: Simplify do_inject_mce() with qemu_get_cpu()
Avoids an open-coded CPU loop.
Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: cpu: Fix potential buffer overrun in get_register_name_32()
Spotted by Coverity,x86_reg_info_32[] is CPU_NB_REGS32 elements long, so accessingx86_reg_info_32[CPU_NB_REGS32] will be one element off array.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>...
dump: Move stubs into libqemustub.a
This allows us to drop CONFIG_NO_CORE_DUMP with its indirect dependencyon CONFIG_HAVE_CORE_DUMP.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
pc: Fix crash when attempting to hotplug CPU with negative ID
QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': 1 }}" may causeQEMU SIGSEGV at: piix4_cpu_hotplug_req () ... g>sts[cpu_id / 8] |= (1 << (cpu_id % 8)); ...
Since for PC in current implementation id should be in range [0...maxcpus)...
pc: Create pc-*-1.6 machine-types
Some CPU model fixes are going to be included and they will requirecompatibility properties in the pc-*-1.5 machine-types.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Igor Mammedov <imammedo@redhat.com>...
target-i386: Update model values on Conroe/Penryn/Nehalem CPU models
The CPUID model values on Conroe, Penryn, and Nehalem are tooconservative and don't reflect the values found on real Conroe, Penryn,and Nehalem CPUs.
This causes at least one known problems: Windows XP disables sysenter...
target-i386: Set level=4 on Conroe/Penryn/Nehalem
The CPUID level value on Conroe, Penryn, and Nehalem are too low. Thiscauses at least one known problem: the -smp "threads" option doesn'twork as expect if level is < 4, because thread count information is...
qemu-char: don't issue CHR_EVENT_OPEN in a BH
When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET,and it was issued as a bottom-half:
86e94dea5b740dad65446c857f6959eae43e0ba6
Which we basically used to print out a greeting/prompt for the...
Merge remote-tracking branch 'luiz/queue/qmp' into staging
Merge remote-tracking branch 'stefanha/net' into staging
Message-id: 1370613288-14933-1-git-send-email-stefanha@redhat.com...
softfloat: Fix shift128Right for shift counts 64..127
shift128Right would give the wrong result for a shift countbetween 64 and 127. This was never noticed because all ofour uses of this function are guaranteed not to use shiftcounts in this range.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
gtk: use better icon
The current icon looks pretty terrible rendered in Gnome. Thisswitches to a transparent SVG which looks much nicer.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dc
This commit used the wrong check to prevent an assertion failure.After this commit, you need to start a guest in the monitor, youcannot use anymore the "c" command in the debugger. This is...
gdbstub: let the debugger resume from guest panicked state
While in general we forbid a "continue" from the guest panickedstate, it makes sense to have an exception for that when continuingin the debugger. Perhaps the guest entered that state due to a bug,...
xilinx_axidma: Do not set DMA .notify to NULL after notify
If a stream notify function is not ready, it may re-populate the notify call-back to indicate it should be re-polled later. This break in this usage, asimmediately following the notify() call, .notify is set to NULL. reverse the...
xilinx_axienet: Fix bit mask code
Obviously the code wanted to mask the lower bits but failed to do sobecause of a missing "<".
cppcheck detected a conditional expression which was always true (1 < 7).
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
correct RTC_CHANGE_EVENT description (v2)
Fix RTC_CHANGE event description to match implementation.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
MAINTAINERS: new maintainers for qapi-schema.json
I'm facing two problems lately wrt QMP patch review: increasinglylack of bandwidth and lack of background in so many different areasthat are getting new QMP commands almost every week.
In order to help me mitigate this problem, I'm adding Eric and Markus...
MAINTAINERS: split Monitor (QMP/HMP) entry
This entry doesn't reflect reality for a few years now. This commitsplits it into Human Monitor (HMP), QAPI and QMP. Markus is droppedas a maintainer.
This is what we have been for the last few years. Also, it's going...
tap: fix NULL dereference when passing invalid parameters to tap
This patch forbid the following invalid parameters to tap:
1) fd and vhostfds were specified but vhostfd were not specified2) vhostfds were specified but fds were not specified3) fds and vhostfd were specified...
Merge remote-tracking branch 'stefanha/block' into staging
Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging
Message-id: 1370592676-22532-1-git-send-email-cornelia.huck@de.ibm.com...
hmp: show ImageInfo in 'info block'
Now human monitor can show image details, include internalsnapshot and backing chain info for every block device.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hmp: add parameters device and -v for info block
With these parameters, user can choose the information to be showed,to avoid message flood in the monitor.
block: add snapshot info query function bdrv_query_snapshot_info_list()
This patch adds function bdrv_query_snapshot_info_list(), which willretrieve snapshot info of an image in qmp object format. The implementationis based on the code moved from qemu-img.c with modification to fit more...
block: add image info query function bdrv_query_image_info()
This patch adds function bdrv_query_image_info(), which willretrieve image info in qmp object format. The implementation isbased on the code moved from qemu-img.c, but uses block layerfunction to get snapshot info....
qmp: add ImageInfo in BlockDeviceInfo used by query-block
Now image info will be retrieved as an embbed json object insideBlockDeviceInfo, backing chain info and all related internal snapshotinfo can be got in the enhanced recursive structure of ImageInfo. New...
ide-test: Add FLUSH CACHE test case
This checks in particular that BSY is set while the flush request is inflight.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
ide: Set BSY bit during FLUSH
The implementation of the ATA FLUSH command invokes a flush at the blocklayer, which may on raw files on POSIX entail a synchronous fdatasync().This may in some cases take so long that the SLES 11 SP1 guest driverreports I/O errors and filesystems get corrupted or remounted read-only....
ide-test: Add enum value for DEV
Get rid of the magic number.
blkdebug: Add BLKDBG_FLUSH_TO_OS/DISK events
qemu-io: Move functions for registering and running commands
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-io: Move command_loop() and friends
qemu-io: Move remaining helpers from cmd.c
qemu-io: Interface cleanup
qemu-io: Use the qemu version for -V
Always printing 0.0.1 and never updating the version number wasn't veryuseful. qemu-io is released with qemu, so using the same version numbermakes most sense.
Make qemu-io commands available in HMP
It was decided to not make this command available in QMP in order tomake clear that this is not supposed to be a stable API and should beused only for testing and debugging purposes.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
qemu-io: Don't use global bs in command implementations
Pass in the BlockDriverState to the command handlers instead of usingthe global variable. This is an important step to make the commandsusable outside of qemu-io.
qemu-io: Split off commands to qemu-io-cmds.c
This is the implementation of all qemu-io commands that make sense to becalled from the qemu monitor, i.e. everything except open, close andquit.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
qemu-io: Factor out qemuio_command
It's duplicated code. Move it to qemu-io-cmds.c because it's notdependent on any static data of the qemu-io tool.
qemu-io: Move 'help' function
No reason to treat it different from other commands. Move it toqemu-io-cmds.c, adapt the coding style and register it like any othercommand.
qemu-io: Move 'quit' function
This one only makes sense in the context of the qemu-io tool, so move itto qemu-io.c. Adapt coding style and register it like other commands.
qemu-io: Move qemu_strsep() to cutils.c