configure: Support configuring C++ compiler
Add configuration for C++ compiler in configure and Makefiles.The C++ compiler is choosed as following: - ${CXX}, if it is specified. - ${cross_prefix}g++, if ${cross_prefix} is specified. - Otherwise, c++ is used....
Add c++ keywords to QAPI helper script
Add c++ keywords to avoid errors in compiling with c++ compiler.This also renames class member of PciDeviceInfo to q_class.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
checkpatch.pl: Check .cpp files
Enable checkpatch.pl to apply the same checks as C source files forC++ files with .cpp extensions. It also adds some exceptions for C++sources to suppress errors for: - <> used in C++ template arguments (e.g. template <class T>)...
Add a script to extract VSS SDK headers on POSIX system
VSS SDK setup.exe is only runnable on Windows. This adds a scriptto extract VSS SDK headers on POSIX-systems using msitools.
From: Paolo Bonzini <pbonzini@redhat.com>...
qemu-ga: Add configure options to specify path to Windows/VSS SDK
To enable VSS support in qemu-ga for Windows, header files included inVSS SDK are required.The VSS support is enabled by the configure option like below: ./configure --with-vss-sdk="/path/to/VSS SDK"...
mips_malta: support up to 2GiB RAM
A Malta board can support up to 2GiB of RAM. Since the unmapped kseg0/1regions are only 512MiB large & the latter 256MiB of those are taken upby the IO region, access to RAM beyond 256MiB must be done through amapped region. In the case of a Linux guest this means we need to use...
Merge remote-tracking branch 'bonzini/iommu-for-anthony' into staging
exec: do tcg_commit only when tcg_enabled
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Revert "memory: Return -1 again on reads from unsigned regions"
This reverts commit 9b8c69243585a32d14b9bb9fcd52c37b0b5a1b71.
The commit was wrong: We only return -1 on invalid accesses, not onvalid but unbacked ones. This broke various corner cases.
Cc: qemu-stable@nongnu.org...
memory: Provide separate handling of unassigned io ports accesses
Accesses to unassigned io ports shall return -1 on read and be ignoredon write. Ensure these properties via dedicated ops, decoupling us fromthe memory core's handling of unassigned accesses....
exec: check offset_within_address_space for register subpage
If offset_within_address_space falls in a page, then we register asubpage. So check offset_within_address_space rather thanoffset_within_region.
Cc: qemu-stable@nongnu.orgCc: Paolo Bonzini <pbonzini@redhat.com>...
exec: fix writing to MMIO area with non-power-of-two length
The problem is introduced by commit 2332616 (exec: Support 64-bitoperations in address_space_rw, 2013-07-08). Before that commit,memory_access_size would only return 1/2/4.
Since alignment is already handled above, reduce l to the largest...
Update mailmap
This makes get_maintainers.pl behave a little better.
Reported-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Merge remote-tracking branch 'kraxel/usb.88' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pc,pci,virtio fixes and cleanups
This includes pc and pci cleanups and enhancements,and a virtio bugfix for level interrupts.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM device refactorings
target-i386: Use #defines instead of magic numbers for CPUID cache info
This is an attempt to make the CPUID cache topology code clearer, byreplacing the magic numbers in the code with #defines, and moving allthe cache information to the same place in the file....
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthandmacros.
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Replace qemu_for_each_cpu()
It was introduced to loop over CPUs from target-independent code, butsince commit 182735efaf956ccab50b6d74a4fed163e0f35660 target-independentCPUState is used.
A loop can be considered more efficient than function calls in a loop,...
a15mpcore: Use qemu_get_cpu() for generic timers
This simplifies the loop and aids with refactoring of CPU list.
Requested-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andreas Färber <afaerber@suse.de>
Merge branch 'tcg-next' of git://github.com/rth7680/qemu
Merge branch 'ppc-for-upstream' of git://github.com/agraf/qemu
tcg/mips: detect available host instructions at runtime
Now that TCG supports enabling and disabling ops at runtime, it'spossible to detect the available host instructions at runtime, andenable the corresponding ops accordingly.
Unfortunately it's not easy to probe for available instructions on...
tcg/mips: inline bswap16/bswap32 ops
Use an inline version for the bswap16 and bswap32 ops to avoidtesting for MIPS32R2 instructions availability, as these ops areonly available in that case.
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg/mips: only enable ext8s/ext16s ops on MIPS32R2
On MIPS ext8s and ext16s ops are implemented with a dedicatedinstruction only on MIPS32R2, otherwise the same kind of implementationthan at TCG level (shift left followed by shift right) is used.
Change that by only implementing the ext8s and ext16s ops on MIPS32R2 so...
tcg: Introduce zero and sign-extended versions of load helpers
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-i386: Make use of zero-extended memory helper routines
For 8 and 16-bit unsigned loads, rely on the zero-extensionfrom the helper and use a smaller 32-bit move insn.
tcg: Change tcg_gen_exit_tb argument to uintptr_t
And update all users.
tcg: Change tcg_out_ld/st offset to intptr_t
tcg: Use appropriate types in tcg_reg_alloc_call
tcg: Fix jit debug for x32
tcg-i386: Use intptr_t appropriately
tcg-i386: Adjust tcg_out_tlb_load for x32
configure: Allow x32 as a host
exec: Reorganize the GETRA/GETPC macros
Always define GETRA; use __builtin_extract_return_addr, rather thanhaving a special case for s390. Split GETPC_ADJ out of GETPC; use 2universally, rather than having a special case for arm.
Rename GETPC_LDST to GETRA_LDST to indicate that it does not...
tcg-i386: Don't perform GETPC adjustment in TCG code
Since we now perform it inside the helper, no need to do it here.This also lets us perform a tail-call from the store slow path tothe helper.
exec: Rename USUFFIX to LSUFFIX
In a following patch, there will be confusion between multiple "unsigned" suffixes; rename this one so as to imply "load".
target: Include softmmu_exec.h where forgotten
Several targets forgot to include softmmu_exec.h, which wouldbreak them with a header cleanup to follow.
exec: Split softmmu_defs.h
The _cmmu helpers can be moved to exec-all.h. The helpers that areused from TCG will shortly need access to tcg_target_long so movetheir declarations into tcg.h.
This requires minor include adjustments to all TCG backends....
tcg: Add muluh and mulsh opcodes
Use them in places where mulu2 and muls2 are used.Optimize mulx2 with dead low part to mulxh.
tcg-mips: Implement mulsh, muluh
With the optimization in tcg_liveness_analysis,we can avoid the MFLO when it is unused.
tcg-ppc64: Implement muluh, mulsh
Using these instead of mulu2 and muls2 lets us avoid having to argumentoverlap analysis in the backend. Normal register allocation will DTRT.
tcg: Constant fold div, rem
qtest: Fix FMT_timeval vs time_t
Since FMT_timeval unconditionally uses %ld for both tv_sec and tv_usec,and already casts tv_usec to long, also cast tv_sec to long.
Cc: Andreas Färber <afaerber@suse.de>Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>...
tcg: Change flush_icache_range arguments to uintptr_t
tcg: Change tcg_qemu_tb_exec return to uintptr_t
tcg: Fix next_tb type in cpu_exec
tcg: Allow TCG_TARGET_REG_BITS to be specified independantly
There are several hosts for which it would be useful to use theavailable 64-bit registers in a 32-bit pointer environment.
tcg: Define TCG_TYPE_PTR properly
tcg: Define TCG_ptr properly
tcg: Change frame pointer offsets to intptr_t
tcg: Change memory offsets to intptr_t
tcg: Change relocation offsets to intptr_t
tcg: Use uintptr_t in TCGHelperInfo
usb: parallelize usb3 streams
usb3 bulk endpoints with streams are implicitly pipelined now,so the requests will actually be processed in parallel. Alsoallow them to complete out-of-order.
Fixes stalls in the uas driver.
Cc: qemu-stable@nongnu.orgSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-hub: add tracepoint for status reports
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Revert "usb-hub: report status changes only once"
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3.
This isn't in line with the usb specification and adds regressions,win7 fails to drive the usb hub for example.
Was added because it "solved" the issue of hubs interacting badly...
usb/dev-hid: Modified usb-tablet category from Misc to Input
usb-tablet device was wrongly assigned to Misc category
Reported-by: Markus Armbruster <armbru@redhat.com>Cc: qemu-stable@nongnu.orgSigned-off-by: Marcel Apfelbaum <marcel.a@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>...
xhci: remove leftover debug printf
xhci: add tracepoint for endpoint state changes
xhci: add port to slot_address tracepoint
xhci: fix endpoint interval calculation
xhci: emulate intr endpoint intervals correctly
Respect the interval for interrupt endpoints, so we don't finishtransfers as fast as possible but at the rate configured by the guest.
Fixes guest deadlocks triggered by interrupt storms.
Cc:Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci: reset port when disabling slot
uas: add property for request logging
qcow2_check: Mark image consistent
If no corruptions remain after an image repair (and no errors have beenencountered), clear the corrupt flag in qcow2_check.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: Overlapping cluster allocations
A new test on corrupted images with overlapping cluster allocations.
qcow2-refcount: Repair shared refcount blocks
If the refcount of a refcount block is greater than one, we can at leasttry to repair that problem by duplicating the affected block.
PPC: spapr: iommu: rework traces
This converts old style fprintf to traces.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>[agraf: change patch subject]Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc: fix bit extraction for FPBF and FPL
Bit extraction for the FP BF and L field of the MTFSFI and MTFSFinstructions is wrong and doesn't match the reference manual (whichexplain the bit number in big endian format). It has been broken incommit 7d08d85645def18eac2a9d672c1868a35e0bcf79....
spapr-pci: fix config space access to support bridges
spapr-pci config space accessors use find_dev() to find a PCI device.However find_dev() only searched on a primary bus and did not dorecursive search through secondary buses so config space access was not...
target-ppc: Use #define instead of opencoding SLB valid bit
Use SLB_ESID_V instead of (1 << 27) in the code
Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
spapr-pci: rework MSI/MSIX
On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAShypercalls which return global IRQ numbers to a guest so it onlyoperates with those and never touches MSIMessage.
Therefore MSIMessage handling is completely hidden in QEMU....
xics: move registration of global state to realize()
Registration of global state belongs into realize so move it there.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
pseries: Add H_SET_MODE hcall to change guest exception endianness
H_SET_MODE is used for controlling various partition settings. Oneof these settings is the endianness a guest takes its exceptions in.
Signed-off-by: Anton Blanchard <anton@samba.org>[agraf: fix whitespace]...
PPC: KVM: Compile fix for qemu_notify_event
The function qemu_notify_event is defined by a header that we don'tinclude in the PPC KVM code. Include it to get the code buildingagain.
target-ppc/kvm_ppc.c: In function 'kvmppc_timer_hack': target-ppc/kvm_ppc.c:26:5: error: implicit declaration of function 'qemu_notify_event' [-Werror=implicit-function-declaration]...
spapr: add "stop-self" RTAS call required to support hot CPU unplug
PAPR+ requires two RTAS calls to be supported by the hypervisor inorder to allow hotplugging VCPUs from the guest. The "start-cpu" RTAScall was already there but "stop-self" was not.
This adds the "stop-self" RTAS call....
pseries: Fix stalls on hypervisor virtual console
A number of users are reporting stalls when using the pserieshypervisor virtual console.
A simple test case is to paste 15 or 17 characters at a timeinto the console. Pasting 15 characters at a time works fine...
target-ppc: USE LPCR_ILE to control exception endian on POWER7
On POWER7, LPCR_ILE is used to control what endian guests taketheir exceptions in so use it instead of MSR_ILE.
Signed-off-by: Anton Blanchard <anton@samba.org>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
target-ppc: POWER7 supports the MSR_LE bit
Add MSR_LE to the msr_mask for POWER7.
Signed-off-by: Anton Blanchard <anton@samba.org>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
disas/ppc.c: Fix little endian disassembly
Use info->endian to select the endian of the instruction tobe disassembled.
ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.
QEMU has 'dtb' option for specifing the device tree file for the kernel.The patch adds support for this option to the 'virtex_ml507' machineimplementation.
Signed-off-by: Efimov Vasily <real@ispras.ru>...
ppc405_boards: Disable debug output
Also move one stray debug output into an #ifdef.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
ppc405_uc: Disable debug output
ppc405_boards: Don't enforce presence of firmware for qtest
Adopt error_report() while at it.
PPC: E500: Generate device tree on reset
Today we generate the device tree once on machine initialization and thenstore the finalized blob in memory to reload it on reset.
This is bad for 2 reasons. First we potentially waste a bunch of RAM for nogood reason, as we have all information required to regenerate the device...
aio / timers: use g_usleep() not sleep()
sleep() apparently doesn't exist under mingw. Use g_usleep forportability.
Signed-off-by: Alex Bligh <alex@alex.org.uk>Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
adlib: sort offsets in portio registration
This fixes the following assert when -device adlib is used:ioport.c:240: portio_list_add: Assertion `pio->offset >= off_last' failed.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qmp: fix integer usage in examples
Per the qapi schema, block_set_io_throttle takes most argumentsas ints, not strings.
Signed-off-by: Eric Blake <eblake@redhat.com>...
tci: Remove function tcg_out64 (fix broken build)
Commit ac26eb69a311396668809eadbf7ff4e623447d4c added tcg_out64 to tcg/tcg.c.tcg/tci/tcg-target.c already had a nearly identical implementation which isnow removed to fix a compiler error.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
target-arm: Report unimplemented opcodes (LOG_UNIMP)
These unimplemented opcodes are handled like illegal opcodes, butthey are used in existing code. We should at least report when theyare executed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
pflash_cfi02.c: fix debug macro
If PFLASH_DEBUG is enabled then we have some build errors:
hw/block/pflash_cfi02.c: In function ‘pflash_timer’:hw/block/pflash_cfi02.c:128:5: error: expected ‘)’ before string constanthw/block/pflash_cfi02.c:128:5: error: too few arguments to function ‘fprintf’...
configure: Remove unneeded redirections of stderr (pkg-config --exists)
Predicate options (--exists, --atleast-version, ...) of pkg-config dont'tprint error messages to stderr, so redirecting stderr is not necessary.
Combining a predicate option with --modversion is not necessary for tests....
configure: Remove unneeded redirections of stderr (pkg-config --cflags, --libs)
For existing libraries, pkg-config --cflags and pkg-config --libs won'tprint error messages to stderr, so redirecting stderr is not necessary.
configure: Don't write .pyc files by default (python -B)
When a Python script is run, Python normally writes bytecode into a .pyc file.QEMU's build process uses several Python scripts which are called fromconfigure or make.
The generated .pyc files take disk space without being of much use, because...
curl: qemu_bh_new() can never return NULL
Drop error code path which cannot be taken since qemu_bh_new() does notreturn NULL.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
slirp/arp_table.c: Avoid shifting into sign bit of signed integers
"0xf << 28" shifts right into the sign bit, since 0xf is a signedinteger. Use the 'U' suffix to force an unsigned shift to avoidthis undefined behaviour and a clang sanitizer warning.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...