tcg-ppc64: bswap64 rotates output 32 bits
If our input and output is in the same register, bswap64 tries toundo a rotate of the input. This just ends up rotating the output.
Cc: qemu-stable@nongnu.orgSigned-off-by: Anton Blanchard <anton@samba.org>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Fix add2_i64
add2_i64 was adding the lower double word to the upper double wordof each input. Fix this so we add the lower double words, then theupper double words with carry propagation.
Cc: qemu-stable@nongnu.orgSigned-off-by: Anton Blanchard <anton@samba.org>...
tcg-ppc64: rotr_i32 rotates wrong amount
rotr_i32 calculates the amount to left shift and puts it into atemporary, but then doesn't use it when doing the shift.
tcg-ppc64: Fix RLDCL opcode
The rldcl instruction doesn't have an sh field, so the minor opcodeis shifted 1 bit. We were using the XO30 macro which shifted theminor opcode 2 bits.
Remove XO30 and add MD30 and MDS30 macros which match thePower ISA categories....
Merge remote-tracking branch 'pmaydell/configury.next' into staging
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Message-id: 1371455050-9523-1-git-send-email-mjt@msgid.tls.msk.ru...
char/serial: fix copy&paste error (fifo8_is_full vs empty)
Copy&paste error in serial.c causes a crash when attemptingto read from UART (if there is no data to be read)
Signed-off-by: Vladimir Senkov <hangup@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
vl: always define no_frame
Commit 047d4e151dd46 "Unbreak -no-quit for GTK, validate SDL options" brokebuild of qemu without sdl, by referencing `no_frame' variable which is definedinside #if SDL block. Fix that by defining that variable unconditionally....
gtk: Fix compiler warning (GTK 3 deprecated function)
With GTK 3, the function gdk_cursor_unref is deprecated:
qemu/ui/gtk.c: In function ‘gd_cursor_define’:qemu/ui/gtk.c:380:5: error: ‘gdk_cursor_unref’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkcursor.h:233): Use 'g_object_unref' instead [-Werror=deprecated-declarations]...
target-i386: fix over 80 chars warnings
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-i386/helper: remove redundant env->eip assignment
target-i386/helper: remove DF macro
target-i386/helper: remove EIP macro
target-i386/helper: remove EDI macro
target-i386/helper: remove ESI macro
target-i386/helper: remove ESP macro
target-i386/helper: remove EBP macro
target-i386/helper: remove EDX macro
target-i386/helper: remove ECX macro
target-i386/helper: remove EBX macro
target-i386/helper: remove EAX macro
Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu
ide-test: fix failure for test_flush
bd07684aacfb61668ae2c25b7dd00b64f3d7c7f3 added a test to ensure BSYflag is set when a flush request is in flight. It does this by settinga blkdebug breakpoint on flush_to_os before issuing a CMD_FLUSH_CACHE.It then resumes CMD_FLUSH_CACHE operation and checks that BSY is unset....
configure: Require libfdt for arm, ppc, microblaze softmmu targets
A number of our softmmu targets (PPC, ARM, Microblaze) now more orless require flattened device tree support for various board modelsto work correctly. Make libfdt mandatory if the target list includes...
arm: Remove CONFIG_FDT conditionals
Now that we know we're compiling with libfdt, we can remove theCONFIG_FDT conditionals.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
microblaze: Remove CONFIG_FDT conditionals
Now that we know we're compiling with libfdt we can remove theCONFIG_FDT conditionals.
ppc: Remove CONFIG_FDT conditionals
build: drop TARGET_TYPE
Just use the TARGET_NAME free string.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Message-id: 1370349928-20419-6-git-send-email-pbonzini@redhat.comSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
configure: dtc: Probe for libfdt_env.h
Currently QEMU provides a local clone of the file libfdt_env.h in/include. This file is supposed to come with the libfdt package and isonly needed for broken installs of libfdt. Now that we have submoduledtc, just ignore these broken installs and prompt for the dtc submodule...
main: use TARGET_ARCH only for the target-specific #define
Everything else needs to match the executable name, which isTARGET_NAME.
Before: $ sh4eb-linux-user/qemu-sh4eb --help usage: qemu-sh4 [options] program [arguments...] Linux CPU emulator (compiled for sh4 emulation)...
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...
audio/intel-hda: Fix Inheritance hierachy
The ich6 and ich9 variants either need to inherit one from the other,or both from a common base class, otherwise its not possible to createa QOM cast macro for use by the shared implementation functions.Went for option B, with a common base class....
audio/intel-hda: QOM casting sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST anddirect -> style casting.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>...
smbios: Fix -smbios type=0, release=... for big endian hosts
Classic endianness bug due to careless dirty coding: assuming readinga byte from an int variable gets the least significant byte.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>...
smbios: Check R in -smbios type=0, release=R parses okay
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>Message-id: 1370610036-10577-7-git-send-email-armbru@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
log.h: Supply missing includes
<stdio.h> has always been missing. Rest missed in commit eeacee4.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>Message-id: 1370610036-10577-3-git-send-email-armbru@redhat.com...
smbios: Convert to error_report()
Improves diagnistics from ad hoc messages like
Invalid SMBIOS UUID string
to
qemu-system-x86_64: -smbios type=1,uuid=gaga: Invalid UUID
smbios: Clean up smbios_add_field() parameters
Having size precede the associated pointer is odd. Swap them, and fixup the types.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>Message-id: 1370610036-10577-5-git-send-email-armbru@redhat.com...
error-report.h: Supply missing include
Missed in commit e5924d8.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>Message-id: 1370610036-10577-2-git-send-email-armbru@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>...
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...