misc: Replace 'struct QEMUTimer' by 'QEMUTimer'
Most code already used QEMUTimer without the redundant 'struct' keyword.
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>
.gitignore: Ignore config.status
Signed-off-by: Fam Zheng <famz@redhat.com>Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
acpi-build: Fix compiler warning (missing gnu_printf format attribute)
gcc 4.8.2 reports this warning when extra warnings are enabled (-Wextra):
CC m68k-softmmu/hw/m68k/mcf5206.ohw/i386/acpi-build.c: In function ‘build_append_nameseg’:hw/i386/acpi-build.c:294:5: error:...
qobject: Fix compiler warning (missing gnu_printf format attribute)
CC qobject/qerror.oqobject/qerror.c: In function ‘qerror_from_info’:qobject/qerror.c:53:5: error: function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]...
trace: Remove trace.h from console.h (less dependencies)
This reduces the dependencies on trace.h.Only two source files which need console.h also need trace.h.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
trace: Remove trace.h from hw/usb/hcd-ehci.h (less dependencies)
This reduces the dependencies on trace.h.Only one source file which needs hcd-ehci.h also needs trace.h.
console: Replace conditional debug messages by trace methods
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
gtk: Replace conditional debug messages by trace methods
Open 2.0 development tree
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Update version for 1.7.0 release
block/drive-mirror: Reuse backing HD for sync=none
For "none" sync mode in "absolute-paths" mode, the current image shouldbe used as the backing file for the newly created image.
The current behavior is:a) If the image to be mirrored has a backing file, use that (which is...
qemu-iotests: Fix test 041
Performing multiple drive-mirror blockjobs on the same qemu instanceresults in the image file used for the block device being replaced bythe newly mirrored file, which is not what we want.
Fix this by performing one dedicated test per sync mode....
Update version for v1.7.0-rc2 release
curses: fixup SIGWINCH handler mess
Don't run code in the signal handler, only set a flag.Use sigaction(2) to avoid non-portable signal(2) semantics.Make #ifdefs less messy.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
qga: Fix two format strings for MinGW
Both code locations cause a compiler warning. Using "%s" instead of "%lu" would result in a program crash if the wrong code were executed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Message-id: 1385409257-2522-1-git-send-email-sw@weilnetz.de...
PPC: BookE: Make FIT/WDT timers at best millisecond grained
The default granularity for the FIT timer on 440 is on every 0x1000thtransition of TB from 0 to 1. Translated that means 48828 times a second.
Since interrupts are quite expensive for 440 and we don't really care...
PPC: Make BookE FIT/WDT timers more lazy
Today we fire FIT and WDT timer events every time the respective bitposition in TB flips from 0 -> 1.
However, there is no need to do this if the end result would be thatwe're changing a TSR bit that is set to 1 to 1 again. No guest visible...
acpi-build: fix support for glib < 2.22
glib < 2.22 does not have g_array_get_element_size,limit it's use (to check all elements are 1 bytein size) to newer glib.
This fixes build on RHEL 5.3.
Reported-by: Richard Henderson <rth@redhat.com>Reported-by: Erik Rull <erik.rull@rdsoftware.de>...
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pc very last minute fixes for 1.7
This has a fix for a crasher bug with pci bridges,boot failure fix for s390 on 32 bit hosts,and fixes build for hosts with old glib.
There's also a fix for --iasl configure flag - it can be used...
Merge remote-tracking branch 'bonzini/tags/for-anthony' into staging
Here are a bunch of 1.7-tagged patches that I was afraidwere getting forgotten or that did not have a clear maintainer responsiblefor making a pull request.
Merge remote-tracking branch 'mdroth/qga-pull-2013-11-22' into staging
Message-id: 1385154505-15145-1-git-send-email-mdroth@linux.vnet.ibm.com...
Merge remote-tracking branch 'stefanha/net' into staging
Message-id: 1385118544-28482-1-git-send-email-stefanha@redhat.comSigned-off-by: Anthony Liguori <aliguori@amazon.com>
configure: make --iasl option actually work
--iasl option was added to CC option parsing section by mistake,it's not effective there and attempts to use causean 'unknown option' error.
Fix this up.
Tested-by: Marcel Apfelbaum <marcel.a@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
qemu-ga: vss-win32: Install VSS provider COM+ application service
Currently, qemu-ga for Windows fails to execute guset-fsfreeze-freeze whenno user is logging in to Windows, with an error message: {"error":{"class":"GenericError", "desc":"failed to add C:\\ to snapshotset: (error: 8004230f)"}}...
qdev-properties-system.c: Allow vlan or netdev for -device, not both
It is currently possible to specify things like: -device e1000,netdev=foo,vlan=1With this usage, whichever argument was specified last (vlan or netdev)overwrites what was previousely set and results in a non-working...
qga: Fix compiler warnings (missing format attribute, wrong format strings)
CC qga/commands.oqga/commands.c: In function ‘slog’:qga/commands.c:28:5: error: function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]...
mips jazz: do not raise data bus exception when accessing invalid addresses
MIPS Jazz chipset doesn't seem to raise data bus exceptions on invalid accesses.However, there is no easy way to prevent them. Creating a big memory regionfor the whole address space doesn't prevent memory core to directly call...
target-i386: yield to another VCPU on PAUSE
After commit b1bbfe7 (aio / timers: On timer modification, qemu_notifyor aio_notify, 2013-08-21) FreeBSD guests report a huge slowdown.
The problem shows up as soon as FreeBSD turns out its periodic (~1 ms)tick, but the timers are only the trigger for a pre-existing problem....
rng-egd: offset the point when repeatedly read from the buffer
The buffer content might be read out more than once, currentlywe just repeatedly read the first data block, buffer offset ismissing.
Cc: qemu-stable@nongnu.orgSigned-off-by: Amos Kong <akong@redhat.com>...
rng-egd: remove redundant free
We didn't set default chr_name, the free is redundant.
Signed-off-by: Amos Kong <akong@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()
Fix build failures with clang when KVM is not enabled byproviding a stub version of kvm_arch_get_supported_cpuid().We retain the compile time check that this function isn'tcalled when CONFIG_KVM is not set by guarding the stub with...
vfio-pci: Fix multifunction=on
When an assigned device is initialized it copies the device configspace into the emulated config space. Unfortunately multifunction issetup prior to the device initfn and gets clobbered. We need torestore it just like pci-assign does....
atomic.h: Fix build with clang
clang defines ATOMIC_SEQ_CST but its implementation of the_atomic_exchange() builtin differs from that of gcc. Move the_clang branch of the ifdef ladder to the top and fix itsimplementation (there is no such builtin as __sync_exchange),...
pc: get rid of builtin pvpanic for "-M pc-1.5"
This causes two slight backwards-incompatibilities between "-M pc-1.5" and 1.5's "-M pc":
(1) a fw_cfg file is removed with this patch. This is only a problemif migration stops the virtual machine exactly during fw_cfg enumeration....
sun4m: Add FCode ROM for TCX framebuffer
Upstream OpenBIOS now implements SBus probing in order to determine thecontents of a physical bus slot, which is required to allow OpenBIOS toidentify the framebuffer without help from the fw_cfg interface.
SBus probing works by detecting the presence of an FCode program...
configure: Explicitly set ARFLAGS so we can build with GNU Make 4.0
Our rules.mak adds '-rR' to MAKEFLAGS to indicate that we will beexplicitly specifying everything and not relying on any defaultvariables or rules. However we were accidentally relying on the...
Update version for 1.7.0-rc1 release
target-i386: Fix addr32 prefix in gen_lea_modrm
Fix the following run-test-x86_64 testsuite failures:
-lea (%eax) = 0000000000000001-lea (%ebx) = 0000000000000002-lea (%ecx) = 0000000000000004-lea (%edx) = 0000000000000008-lea (%%esi) = 0000000000000010...
target-i386: do not override nr_cores for -cpu host
Commit 787aaf5 (target-i386: forward CPUID cache leaves when -cpu host isused, 2013-09-02) brings bits 31..26 of CPUID leaf 04h out of sync withthe APIC IDs that QEMU reserves for each package. This number must come...
Signed-off-by: Amos Kong <akong@redhat.com>Message-id: 1385023371-8198-2-git-send-email-akong@redhat.comSigned-off-by: Anthony Liguori <aliguori@amazon.com>
virtio-rng: add check of period
If period is assigned to 0, limit timer will expire immediately.It causes a qemu warning:
"main-loop: WARNING: I/O thread spun for 1000 iterations"
This limit is meaningless. This patch forbids to assign 0 to period.
Reviewed-by: Amit Shah <amit.shah@redhat.com>...
s390x: fix flat file load on 32 bit systems
pc-bios/s390-zipl.rom is a flat image so it's expected thatloading it as elf will fail.It should fall back on loading a flat file, but doesn'ton 32 bit systems, instead it fails printing: qemu: hardware error: could not load bootloader 's390-zipl.rom'...
acpi-build: fix build on glib < 2.22
g_string_vprintf was only introduced in 2.24 so switch to vsnprintfinstead. A bit uglier but name size is fixed at 4 bytes here so it'seasy.
Reported-by: Richard Henderson <rth@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
acpi-build: fix build on glib < 2.14
g_array_get_element_size was only added in glib 2.14.Fortunately we don't use it for any arrays whereelement size is > 1, so just add an assert.
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'jliu/or32' into staging
Merge remote-tracking branch 'quintela/migration.next' into staging
Message-id: 1384946787-8190-1-git-send-email-quintela@redhat.com...
g_array_get_element_size was only added in glib 2.14,there's no way to find element size in with an older glib.
Fortunately we only use a single table (linker) where element size > 1.Switch element size to 1 everywhere, then we can just look at len field...
Revert "e1000/rtl8139: update HMP NIC when every bit is written"
This reverts commit cd5be5829c1ce87aa6b3a7806524fac07ac9a757.Digging into hardware specs shows this does notactually make QEMU behave more like hardware:
There are valid arguments backed by the spec to indicate why the version...
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Reported-by: Richard Henderson <rth@redhat.com>...
pci: unregister vmstate_pcibus on unplug
PCIBus registers a vmstate during init. Unregister it uponremoval/unplug.
Signed-off-by: Bandan Das <bsd@redhat.com>Cc: qemu-stable@nongnu.orgReviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
target-openrisc: Correct carry flag check of l.addc and l.addic test cases
The test cases did not correctly test for the carry flag.
Signed-off-by: Sebastian Macke <sebastian@macke.de>Reviewed-by: Jia Liu <proljc@gmail.com>Signed-off-by: Jia Liu <proljc@gmail.com>
target-openrisc: Correct memory bounds checking for the tlb buffers
The mtspr and mfspr routines didn't check for the correct memory boundaries.This fixes a segmentation fault while booting Linux.
Signed-off-by: Sebastian Macke <sebastian@macke.de>Reviewed-by: Jia Liu <proljc@gmail.com>...
openrisc-timer: Reduce overhead, Separate clock update functions
The clock value is only evaluated when really necessary reducingthe overhead of the timer handling.
This also solves a problem in the way the Linux kernelhandles the timer and the expected accuracy....
target-openrisc: Correct wrong epcr register in interrupt handler
This patch corrects several misbehaviors during an interrupt process.Most of the time the pc is already correct and therefore no special treatmentof the exceptions is necessary.
Tested by checking crashing programs which otherwise work in or1ksim....
target-openrisc: Remove executable flag for every page
Pages should be flagged executable only if the tlb executable flag isset or the mmu is off.
target-openrisc: Remove unnecessary code generated by jump instructions
The sr_f variable is only used for the l.bf and l.bnf instructions.For clarity the code is also rewritten using a switch statement insteadof if chaining.
Signed-off-by: Sebastian Macke <sebastian@macke.de>...
target-openrisc: Speed up move instruction
The OpenRISC architecture does not have its own move registerinstruction. Instead it uses either "l.addi rd, r0, x" or"l.ori rd, rs, 0" or "l.or rd, rx, r0"
The l.ori instruction is automatically optimized but not the l.addi instruction....
The calculation of bytes_xfer in qemu_put_buffer() is wrong
In qemu_put_buffer(), bytes_xfer += size is wrong, it will be morethan expected, and should be bytes_xfer += l.
Signed-off-by: zhangmin <zhangmin6@huawei.com>Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 1384878412-23521-1-git-send-email-quintela@redhat.com...
Merge remote-tracking branch 'stefanha/block' into staging
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM infrastructure fixes for 1.7
Merge remote-tracking branch 'rth/tcg-ia64-17' into staging
pc last minute fixes for 1.8
This has a patch that drops an unused FW CFG entry.I think it's best to include it before 1.7 to avoidthe need to maintain it in compat machine types.
There's also a doc bugfix by Amos: I'm guessing...
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Merge remote-tracking branch 'kwolf/tags/for-anthony' into staging
Block fixes for 1.7.0
Message-id: 1384532032-19057-1-git-send-email-stefanha@redhat.com...
Merge remote-tracking branch 'agraf/tags/signed-ppc-for-upstream-1.7' into staging
Patch queue for ppc - 2013-11-08
These are two patches that will hopefully make it into 1.7. The SLOF updatefixes -append kernel command line argument passing into the guest kernel. The...
migration: drop MADVISE_DONT_NEED for incoming zero pages
The madvise for zeroed out pages was introduced when every transferredzero page was memset to zero and thus allocated. Since commit211ea740 we check for zeroness of a target page before we memset...
qom: Fix memory leak in object_property_set_link()
Save the result of the call to object_get_canonical_path()so we can free it.
Cc: qemu-stable@nongnu.orgSigned-off-by: Vlad Yasevich <vyasevic@redhat.com>Reviewed-by: Amos Kong <akong@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>...
qtest: Use -display none by default
This avoids each test needing to add it to suppress windows popping up.
[Commit 7ceeedd016facf8d58e14a0d1417fa7225d71072 ("blockdev-test: addtest case for drive_add duplicate IDs") and commit43cd209803d6cffb1e1a028c9ff2fd0ff4fce954 ("qdev-monitor-test: add...
virtio-net: fix the memory leak in rxfilter_notify()
object_get_canonical_path() returns a gchar*, it should be freed by thecaller.
Signed-off-by: Amos Kong <akong@redhat.com>Reviewed-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>...
doc: fix hardcoded helper path
The install directory of qemu-bridge-helper is configurable,but we use a fixed path in the documentation.
DEFAULT_BRIDGE_HELPER macro isn't available in texi mode,we should always use "/path/to/" prefix for dynamic paths...
tcg-ia64: Introduce tcg_opc_bswap64_i
Acked-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ia64: Introduce tcg_opc_ext_i
Being able to "extend" from 64-bits (with a mov) simplifiesa few places where the conditional breaks the train of thought.
tcg-ia64: Introduce tcg_opc_movi_a
tcg-ia64: Introduce tcg_opc_mov_a
tcg-ia64: Use A3 form of logical operations
We can and/or/xor/andcm small constants, saving one cycle.
tcg-ia64: Use SUB_A3 and ADDS_A4 for subtraction
We can subtract from more small constants that just 0 with one insn,and we can add the negative for most small constants.
tcg-ia64: Use ADDS for small addition
Avoids a wasted cycle loading up small constants.
Simplify the code assuming the tcg optimizer is going to workand don't expect the first operand of the add to be constant.
Acked-by: Aurelien Jarno <aurelien@aurel32.net>...
tcg-ia64: Avoid unnecessary stop bit in tcg_out_alu
When performing an operation with two input registers, we'd leavethe stop bit (and thus an extra cycle) that's only needed when oneor the other input is a constant.
tcg-ia64: Move AREG0 to R32
Since the move away from the global areg0, we're no longer globallyreserving areg0. Which means our use of R7 clobbers a call-savedregister. Shift areg0 into the windowed registers. Indeed, choosethe incoming parameter register that it comes to us by....
tcg-ia64: Simplify brcond
There was a misconception that a stop bit is required between a compareand the branch that uses the predicate set by the compare. This lead tothe usage of an extra bundle in which to perform the compare. The extrabundle left room for constants to be loaded for use with the compare insn....
tcg-ia64: Handle constant calls
Using only indirect calls results in 3 bundles (one to load thedescriptor address), and 4 stop bits. By looking through thedescriptor to the constants, we can perform the call with 2bundles and only 1 stop bit.
tcg-ia64: Use shortcuts for nop insns
There's no need to go through the full opcode-to-insn function callto generate nops. This makes the source a bit more readable.
tcg-ia64: Use TCGMemOp within qemu_ldst routines
hw/i386/Makefile.obj: use $(PYTHON) to run .py scripts consistently
$(PYTHON) is a Make variable which is set by configure.In all other places over the tree, .py files are run fromMakefiles using this variable, except of a single leftoverin hw/i386/Makefile.obj (and a nearby place in there uses...
configure: Use -B switch only for Python versions which support it
Commit 1d984a67a95d88f3e708b077dab8adeb47c38c93 added the -B switchunconditionally. This breaks Python versions before 2.6 which don'tsupport that switch.
Now configure adds -B only if it is accepted by the Python interpreter....
qga: Fix shutdown command of guest agent to work with SysV
For now guest agent uses following command to shutdown system:shutdown -P +0 "blabla" but this syntax works only with shutdown command from systemd or upstart,because SysV shutdown requires -h switch....
qemu-img: Fix overwriting 'ret' before using
This patch moves ret assignment after reporting original error.
We were lucky to pass qemu-iotests 048 (qemu-img compare case) but whenI tried to run with TEST_DIR=/tmp (tmpfs), it fails with a "wrong" mismatch offset. This fixes two bugs....
MAINTAINERS: add block driver sub-maintainers
There are a number of contributors who maintain block drivers (imageformats and protocols). They should be listed in the MAINTAINERS fileso that get_maintainer.pl lists them.
Note that commits are still merged through Kevin or Stefan's block tree...
block: Fail if requested driver is not available
If an explicit driver option is present, but doesn't specify a validdriver, then bdrv_open() should fail instead of probing the format.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Jeff Cody <jcody@redhat.com>...
qemu-iotests: Test qcow2 count_contiguous_clusters()
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
smc91c111: Fix receive starvation
In case the smc91c111 interface signals that it cannot receive morepackets the packets are queued and further reception will be disabled.In case the interface is again ready to receive packets notify the upperlayer.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>...