Sebastian Macke [Tue, 22 Oct 2013 00:12:38 +0000 (02:12 +0200)]
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 instead
of if chaining.
Signed-off-by: Sebastian Macke <sebastian@macke.de> Reviewed-by: Jia Liu <proljc@gmail.com> Signed-off-by: Jia Liu <proljc@gmail.com>
Sebastian Macke [Tue, 22 Oct 2013 00:12:37 +0000 (02:12 +0200)]
target-openrisc: Speed up move instruction
The OpenRISC architecture does not have its own move register
instruction. 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.
This patch optimizes for this special case.
Signed-off-by: Sebastian Macke <sebastian@macke.de> Reviewed-by: Jia Liu <proljc@gmail.com> Signed-off-by: Jia Liu <proljc@gmail.com>
Anthony Liguori [Tue, 19 Nov 2013 21:00:02 +0000 (13:00 -0800)]
Merge remote-tracking branch 'rth/tcg-ia64-17' into staging
# By Richard Henderson
# Via Richard Henderson
* rth/tcg-ia64-17:
tcg-ia64: Introduce tcg_opc_bswap64_i
tcg-ia64: Introduce tcg_opc_ext_i
tcg-ia64: Introduce tcg_opc_movi_a
tcg-ia64: Introduce tcg_opc_mov_a
tcg-ia64: Use A3 form of logical operations
tcg-ia64: Use SUB_A3 and ADDS_A4 for subtraction
tcg-ia64: Use ADDS for small addition
tcg-ia64: Avoid unnecessary stop bit in tcg_out_alu
tcg-ia64: Move AREG0 to R32
tcg-ia64: Simplify brcond
tcg-ia64: Handle constant calls
tcg-ia64: Use shortcuts for nop insns
tcg-ia64: Use TCGMemOp within qemu_ldst routines
Message-id: 1384811395-7097-1-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Tue, 19 Nov 2013 20:59:48 +0000 (12:59 -0800)]
Merge remote-tracking branch 'mst/tags/for_anthony' 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 avoid
the need to maintain it in compat machine types.
There's also a doc bugfix by Amos: I'm guessing
doc fixes are still fair game even at this late stage.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Mon 18 Nov 2013 03:48:14 AM PST using RSA key ID D28D5469
# gpg: Can't check signature: public key not found
# By Amos Kong (1) and Igor Mammedov (1)
# Via Michael S. Tsirkin
* mst/tags/for_anthony:
doc: fix hardcoded helper path
pc: disable pci-info
Message-id: 1384775449-6693-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Tue, 19 Nov 2013 20:59:26 +0000 (12:59 -0800)]
Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Jan Krupa (4) and others
# Via Michael Tokarev
* mjt/trivial-patches:
hw/i386/Makefile.obj: use $(PYTHON) to run .py scripts consistently
configure: Use -B switch only for Python versions which support it
qga: Fix shutdown command of guest agent to work with SysV
console: Remove unused debug code
qga: Fix compilation for old versions of MinGW
.travis.yml: basic compile and check recipes
pci-assign: Fix error_report of pci-stub message
qapi: Fix comment for create-type to match code.
vl: fix build when configured with no graphic support
usb: drop unused USBNetState.inpkt field
qemu-char: add missing characters used in keymaps
qemu-char: add support for U-prefixed symbols
qemu-char: add Czech keymap file
qemu-char: add Czech characters to VNC keysyms
Message-id: 1384684850-6777-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Tue, 19 Nov 2013 20:59:09 +0000 (12:59 -0800)]
Merge remote-tracking branch 'kwolf/tags/for-anthony' into staging
Block fixes for 1.7.0
# gpg: Signature made Fri 15 Nov 2013 09:51:25 AM PST using RSA key ID C88F2FD6
# gpg: Can't check signature: public key not found
# By Max Reitz (3) and others
# Via Kevin Wolf
* kwolf/tags/for-anthony:
block: Fail if requested driver is not available
MAINTAINERS: add block driver sub-maintainers
qemu-img: Fix overwriting 'ret' before using
qemu-iotests: Test qcow2 count_contiguous_clusters()
qcow2: fix possible corruption when reading multiple clusters
qmp: access the local QemuOptsLists for drive option
MAINTAINERS: add block tree repo URLs
qemu-iotests: Extend 041 for unbacked mirroring
block/drive-mirror: Check for NULL backing_hd
qapi-schema: Update description for NewImageMode
block: Print its file name if backing file opening failed
Message-id: 1384537999-5972-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Tue, 19 Nov 2013 20:58:32 +0000 (12:58 -0800)]
Merge remote-tracking branch 'stefanha/net' into staging
# By Amos Kong (1) and Sebastian Huber (1)
# Via Stefan Hajnoczi
* stefanha/net:
virtio-net: fix the memory leak in rxfilter_notify()
smc91c111: Fix receive starvation
Message-id: 1384532032-19057-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Tue, 19 Nov 2013 20:57:16 +0000 (12:57 -0800)]
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 update
fixes -append kernel command line argument passing into the guest kernel. The
other patch makes VIO devices appear when using -device '?'.
# gpg: Signature made Thu 07 Nov 2013 07:34:54 PM PST using RSA key ID 03FEDC60
# gpg: Can't check signature: public key not found
# By Alexey Kardashevskiy
# Via Alexander Graf
* agraf/tags/signed-ppc-for-upstream-1.7:
pseries: Update SLOF firmware image
spapr: add vio-bus devices to categories
Message-id: 1383881766-13958-1-git-send-email-agraf@suse.de Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Peter Lieven [Thu, 24 Oct 2013 07:21:29 +0000 (09:21 +0200)]
migration: drop MADVISE_DONT_NEED for incoming zero pages
The madvise for zeroed out pages was introduced when every transferred
zero page was memset to zero and thus allocated. Since commit 211ea740 we check for zeroness of a target page before we memset
it to zero. Additionally we memmap target memory so it is essentially
zero initialized (except for e.g. option roms and bios which are loaded
into target memory although they shouldn't).
It was reported recently that this madvise causes a performance degradation
in some situations. As the madvise should only be called rarely and if it's called
it is likely on a busy page (it was non-zero and changed to zero during migration)
drop it completely.
Reported-By: Zhang Haoyu <haoyu.zhang@huawei.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Juan Quintela <quintela@redhat.com>
As a result, "make check" now tries to use graphics (GTK or SDL). Since
graphics are not used by the test and inappropriate for headless "make
check" runs, add the missing -display none.
This fixes "make check" in the QEMU buildbot.
-- Stefan]
Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Amos Kong [Mon, 18 Nov 2013 15:32:17 +0000 (23:32 +0800)]
virtio-net: fix the memory leak in rxfilter_notify()
object_get_canonical_path() returns a gchar*, it should be freed by the
caller.
Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Vlad Yasevich <vyasevic@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Amos Kong [Tue, 22 Oct 2013 20:49:28 +0000 (04:49 +0800)]
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
(e.g.: /path/to/image, /path/to/linux, etc).
Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tcg-ia64: Avoid unnecessary stop bit in tcg_out_alu
When performing an operation with two input registers, we'd leave
the stop bit (and thus an extra cycle) that's only needed when one
or the other input is a constant.
Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Since the move away from the global areg0, we're no longer globally
reserving areg0. Which means our use of R7 clobbers a call-saved
register. Shift areg0 into the windowed registers. Indeed, choose
the incoming parameter register that it comes to us by.
This requires moving the register holding the return address elsewhere.
Choose R33 for tidiness.
Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
There was a misconception that a stop bit is required between a compare
and the branch that uses the predicate set by the compare. This lead to
the usage of an extra bundle in which to perform the compare. The extra
bundle left room for constants to be loaded for use with the compare insn.
If we pack the compare and the branch together in the same bundle, then
there's no longer any room for non-zero constants. At which point we
can eliminate half the function by not handling them.
Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Using only indirect calls results in 3 bundles (one to load the
descriptor address), and 4 stop bits. By looking through the
descriptor to the constants, we can perform the call with 2
bundles and only 1 stop bit.
Acked-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Michael Tokarev [Sat, 16 Nov 2013 10:09:14 +0000 (14:09 +0400)]
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 from
Makefiles using this variable, except of a single leftover
in hw/i386/Makefile.obj (and a nearby place in there uses
$(PYTHON) correctly). Fix this leftover too.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Luigi Rizzo <rizzo@iet.unipi.it>
Reviewed-by:: Stefan Weil <sw@weilnetz.de>
Now configure adds -B only if it is accepted by the Python interpreter.
This modification introduces a small incompatibility because -B might now
also be added when configure was called with --python=PYTHON_INTERPRETER.
Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
whitearchey [Wed, 6 Nov 2013 01:54:04 +0000 (10:54 +0900)]
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.
Following patch changes the command so it works with systemd, upstart and SysV
With upstart/systemd qga use one of thee commands, depending on 'mode' parameter:
shutdown -P +0 "..."
shutdown -H +0 "..."
shutdown -r +0 "..."
SysV equivalents for these are:
shutdown -h -P +0 "..."
shutdown -h -H +0 "..."
shutdown -h -r +0 "..."
and these retain their meaning with upstart/systemd.
According to FreeBSD manpages, shutdown does not accept -P and -H options. Commands should be:
shutdown -p +0 "..."
shutdown -h +0 "..."
shutdown -r +0 "..."
shutdown in Solaris does not accept any of -hHpPr and does not accept time in "+0" format
Signed-off-by: Michael Avdienko <whitearchey@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Stefan Hajnoczi [Wed, 13 Nov 2013 09:33:10 +0000 (10:33 +0100)]
MAINTAINERS: add block driver sub-maintainers
There are a number of contributors who maintain block drivers (image
formats and protocols). They should be listed in the MAINTAINERS file
so that get_maintainer.pl lists them.
Note that commits are still merged through Kevin or Stefan's block tree
but the block driver sub-maintainers are usually the ones to review
patches.
Acked-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Richard W.M. Jones <rjones@redhat.com> Acked-by: Stefan Weil <sw@weilnetz.de> Acked-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Jeff Cody <jcody@redhat.com> Acked-by: Anthony Liguori <aliguori@amazon.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fam Zheng [Wed, 13 Nov 2013 12:26:49 +0000 (20:26 +0800)]
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 when
I tried to run with TEST_DIR=/tmp (tmpfs), it fails with a "wrong"
mismatch offset. This fixes two bugs.
In the first if branch, setting ret to 1 before using it makes dead code
in the next line: pnum is never added to mismatch offset even if ret was
0.
In the other if branch, currently the output error is always -4:
strerror(-4) -> Unknown error -4
Added regression test in case 048.
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com>
Sebastian Huber [Thu, 14 Nov 2013 13:53:46 +0000 (14:53 +0100)]
smc91c111: Fix receive starvation
In case the smc91c111 interface signals that it cannot receive more
packets the packets are queued and further reception will be disabled.
In case the interface is again ready to receive packets notify the upper
layer.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Peter Lieven [Tue, 12 Nov 2013 12:48:07 +0000 (13:48 +0100)]
qcow2: fix possible corruption when reading multiple clusters
if multiple sectors spanning multiple clusters are read the
function count_contiguous_clusters should ensure that the
cluster type should not change between the clusters.
Especially the for-loop should break when we have one
or more normal clusters followed by a compressed cluster.
Unfortunately the wrong macro was used in the mask to
compare the flags.
This was discovered while debugging a data corruption
issue when converting a compressed qcow2 image to raw.
qemu-img reads 2MB chunks which span multiple clusters.
CC: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Amos Kong [Sat, 9 Nov 2013 04:15:47 +0000 (12:15 +0800)]
qmp: access the local QemuOptsLists for drive option
Currently we have three QemuOptsList (qemu_common_drive_opts,
qemu_legacy_drive_opts, and qemu_drive_opts), only qemu_drive_opts
is added to vm_config_groups[].
This patch changes query-command-line-options to access three local
QemuOptsLists for drive option, and merge the description items
together.
Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Max Reitz [Wed, 6 Nov 2013 18:50:45 +0000 (19:50 +0100)]
qemu-iotests: Extend 041 for unbacked mirroring
Add a new test case in file 041 for mirroring unbacked images in
"absolute-paths" mode. This should work, if possible, but most
importantly, qemu should never crash.
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Max Reitz [Wed, 6 Nov 2013 18:50:44 +0000 (19:50 +0100)]
block/drive-mirror: Check for NULL backing_hd
It should be possible to execute the QMP "drive-mirror" command in
"none" sync mode and "absolute-paths" mode even for block devices
lacking a backing file.
"absolute-paths" does in fact not require a backing file to be present,
as can be seen from the "top" sync mode code path. "top" basically
states that the device should indeed have a backing file - however, the
current code catches the case if it doesn't and then simply treats it as
"full" sync mode, creating a target image without a backing file (in
"absolute-paths" mode). Thus, "absolute-paths" does not imply the target
file must indeed have a backing file.
Therefore, the target file may be left unbacked in case of "none" sync
mode as well, if the specified device is not backed either. Currently,
qemu will crash trying to dereference the backing file pointer since it
assumes that it will always be non-NULL in that case ("none" with
"absolute-paths").
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Max Reitz [Thu, 7 Nov 2013 18:47:48 +0000 (19:47 +0100)]
qapi-schema: Update description for NewImageMode
If the NewImageMode is "absolute-paths" but no backing file is available
(e.g., when mirroring a device with an unbacked image), the target image
will not be backed either. This patch updates the documentation in
qapi-schema.json accordingly.
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
$ ls /tmp/b.qcow2
ls: cannot access /tmp/b.qcow2: No such file or directory
This is not intuitive. It's better to have the missing file's name in
the error message. With this patch:
$ qemu-io -c 'read 0 512' /tmp/a.qcow2
qemu-io: can't open device /tmp/a.qcow2: Could not open backing
file: Could not open '/stor/vm/arch.raw': No such file or directory
no file open, try 'help open'
Which is a little bit better.
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Igor Mammedov [Wed, 6 Nov 2013 12:48:40 +0000 (13:48 +0100)]
pc: disable pci-info
The BIOS that we ship in 1.7 does not use pci info
from host and so far isn't going to use it.
Taking in account problems it caused see 9604f70fdf and
to avoid future incompatibility issues, it's safest to
disable that interface by default for all machine types
including 1.7 as it was never exposed/used by guest.
And properly remove/cleanup it during 1.8 development cycle.
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Anthony Liguori [Wed, 13 Nov 2013 19:49:27 +0000 (11:49 -0800)]
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Luiz Capitulino (1) and Richard Henderson (1)
# Via Luiz Capitulino
* luiz/queue/qmp:
MAINTAINERS: add git tree info for HMP, QMP and QAPI
Adjust qapi-visit for python-2.4.3
Message-id: 1384281985-11100-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Wed, 13 Nov 2013 19:48:35 +0000 (11:48 -0800)]
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci, pc, virtio bug fixes
This reverts PCI master abort support - we'll want it
eventually but it exposes too many core bugs to be safe for 1.7.
This also reverts a recent exec.c change that was an
attempt to work-around some of these core bugs.
Also included are small fixes in pc and virtio,
and a core loader fix for PPC bamboo.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Sun 10 Nov 2013 05:13:22 AM PST using RSA key ID D28D5469
# gpg: Can't check signature: public key not found
# By Michael S. Tsirkin (3) and others
# Via Michael S. Tsirkin
* mst/tags/for_anthony:
Revert "exec: limit system memory size"
Revert "hw/pci: partially handle pci master abort"
loader: drop return value for rom_add_blob_fixed
acpi-build: disable with -no-acpi
virtio-net: only delete bh that existed
Fix pc migration from qemu <= 1.5
Message-id: 1384159176-31662-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Wed, 13 Nov 2013 19:48:02 +0000 (11:48 -0800)]
Merge remote-tracking branch 'stefanha/net' into staging
# By Dmitry Fleytman (1) and others
# Via Stefan Hajnoczi
* stefanha/net:
virtio-net: broken RX filtering logic fixed
net: fix qemu_flush_queued_packets() in presence of a hub
net: disallow to specify multicast MAC address
Message-id: 1383928804-28866-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Wed, 13 Nov 2013 19:47:44 +0000 (11:47 -0800)]
Merge remote-tracking branch 'stefanha/block' into staging
# By Jeff Cody (26) and others
# Via Stefan Hajnoczi
* stefanha/block: (37 commits)
block: Round up total_sectors
block: vhdx qemu-iotest - log replay of data sector
block: qemu-iotests for vhdx, add write test support
block: vhdx - update _make_test_img() to filter out vhdx options
block: vhdx - add .bdrv_create() support
block: vhdx - fix comment typos in header, fix incorrect struct fields
block: vhdx - break out code operations to functions
block: vhdx - move more endian translations to vhdx-endian.c
block: vhdx - remove BAT file offset bit shifting
block: vhdx write support
block: vhdx - add log write support
block: vhdx - add region overlap detection for image files
block: vhdx - log parsing, replay, and flush support
block: vhdx code movement - move vhdx_close() above vhdx_open()
block: vhdx - update log guid in header, and first write tracker
block: vhdx - break endian translation functions out
block: vhdx - log support struct and defines
block: vhdx code movement - VHDXMetadataEntries and BDRVVHDXState to header.
block: vhdx - add header update capability.
block: vhdx - minor comments and typo correction.
...
Message-id: 1383905551-16411-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Wed, 13 Nov 2013 19:47:06 +0000 (11:47 -0800)]
Merge remote-tracking branch 'filippov/tags/20131108-xtensa' into staging
Two small fixes for 1.7:
- add missing debug feature to dc233c xtensa core;
- fix qemu abort caused by gdb attempt to invalidate a breakpoint by
virtual address for which there's no mapping.
# gpg: Signature made Thu 07 Nov 2013 09:32:19 PM PST using RSA key ID F83FA044
# gpg: Can't check signature: public key not found
# By Max Filippov
# Via Max Filippov
* filippov/tags/20131108-xtensa:
target-xtensa: add missing DEBUG section to dc233c config
exec: fix breakpoint_invalidate when pc may not be translated
Message-id: 1383889643-21621-1-git-send-email-jcmvbkbc@gmail.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Anthony Liguori [Wed, 13 Nov 2013 19:45:58 +0000 (11:45 -0800)]
Merge remote-tracking branch 'sweil/mingw' into staging
# By Stefan Weil
# Via Stefan Weil
* sweil/mingw:
linux-user: Fix stat64 syscall for SPARC64
configure: Add config.status to recreate the current configuration
nsis: Improved support for parallel installation of 32 and 64 bit code
Message-id: 1383804909-376-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Stefan Weil [Sun, 10 Nov 2013 17:49:11 +0000 (18:49 +0100)]
qga: Fix compilation for old versions of MinGW
While MinGW-w64 can compile the qga code, MinGW from Debian lenny
(gcc-mingw32 4.4.2-3) shows these errors:
In file included from qga/vss-win32.c:17:
qga/vss-win32/requester.h:31:
error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_init«
qga/vss-win32/requester.h:32:
error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_deinit«
The macro STDAPI is unknown, so add the missing include file which
defines it.
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Alex Bennée [Wed, 6 Nov 2013 10:43:37 +0000 (10:43 +0000)]
.travis.yml: basic compile and check recipes
This adds a build matrix definition for travis-ci.org continuous
integration service. It is usable on any public repository hosted on
GitHub. Once you have created an account signed into Travis you can
enable it on selected projects via travis-ci.org/profile. Alternatively
you can configure the service hooks on GitHub via the repository
Settings tab,then Service Hooks and selecting Travis.
Once setup Travis will automatically test every push as well as any pull
requests submitted to that repository.
The build matrix is currently split by target architecture (see TARGETS
environment variable) because a full build of QEMU can take some time.
This way you get quick feedback for any obvious errors. The additional
environment variables exist to allow additional builds to tweak the
environment. These are:
EXTRA_CONFIG - extra terms passed to configure
EXTRA_PKGS - extra dev packages to install
TEST_CMD - default "make check", can be overridden
I've confined the additional stuff to x86/x86_64 for convenience.
As Travis supports clang the main builds are done twice (once for gcc
and once for clang). However clang is disabled for the debug/trace
builds for the purposes of brevity.
Other wrinkles:
* The lttng user-space tracing back-end is disabled
(it is currently horribly broken)
* The ftrace back-end doesn't run "make check"
(it requires a mounted debugfs to work)
* There are two debug enabled build (with and without TCG interpreter)
Signed-off-by: Alex Bennée <alex@bennee.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cole Robinson [Fri, 11 Oct 2013 15:52:30 +0000 (11:52 -0400)]
pci-assign: Fix error_report of pci-stub message
Using multiple calls to error_report here means every line is
prefaced with the (potentially long) pci-assign command line
arguments.
Use a single error_printf to preserve the intended formatting.
Since this code path is always preceded by an error_report call,
we don't lose the command line reporting.
Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Antony Pavlov [Tue, 29 Oct 2013 04:36:31 +0000 (08:36 +0400)]
vl: fix build when configured with no graphic support
The following error occurs when building with no graphic output support:
vl.c: In function ‘main’:
vl.c:2829:19: error: variable ‘ds’ set but not used [-Werror=unused-but-set-variable]
DisplayState *ds;
^
cc1: all warnings being treated as errors
Jan Krupa [Wed, 16 Oct 2013 12:40:06 +0000 (14:40 +0200)]
qemu-char: add missing characters used in keymaps
This patch adds all missing characters used in regional keymap
files which already exist in QEMU. I checked for the missing
characters by going through all of the keymaps and matching that
with records in vnc_keysym.h. If the key wasn't found I looked
it up in libxkbcommon library [1]. If I understood it correctly
this is also the same place where most of the keymaps were
exported from according to the comment on the first line in those
files. I was able to find all symbols except "quotebl" used
in Netherland keymap.
I tested this update with Czech keyboard by myself. I also asked
Matej Serc to test Slovenian keyboard layout - he reported problems
with it few days ago on this mailing list. Both layouts seems
to work fine. I wasn't able to test the remaining layouts but
since this change doesn't modify any existing symbols, just adds
new ones, I don't expect any sideeffects.
Jan Krupa [Wed, 16 Oct 2013 12:40:05 +0000 (14:40 +0200)]
qemu-char: add support for U-prefixed symbols
This patch adds support for Unicode symbols in keymap files. This
feature was already used in some keyboard layouts in QEMU generated
from XKB (e.g. Arabic) but it wasn't implemented in QEMU source code.
There is no need for check of validity of the hex string after U character
because strtol returns 0 in case the conversion was unsuccessful.
Signed-off-by: Jan Krupa <jkrupa@suse.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This was a work-around for bugs elsewhere in the system,
exposed by commit a53ae8e934cd54686875b5bcfc2f434244ee55d6:
"hw/pci: partially handle pci master abort"
since that's reverted now, the work-around is not required for 1.7
anymore.
The proper fix is supporting full 64 bit addresses in the radix tree.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Marcel Apfelbaum <marcel.a@redhat.com>
The patch being reverted introduced a low-priority memory region
covering all 64 bit pci address space. This exposed the following bugs
elsewhere in the code:
1. Some memory regions have INT64_MAX size, where the
intent was all 64 bit address space.
This results in a sub-page region, should be UINT64_MAX.
2. page table rendering in exec.c ignores physical address bits
above TARGET_PHYS_ADDR_SPACE_BITS.
Access outside this range (e.g. from device DMA, or gdb stub)
ends up with a wrong region. Registering a region outside this
range leads to page table corruption.
3. Some regions overlap PCI hole and have same priority.
This only works as long as no device uses the overlapping address.
It doesn't look like we can resolve all issues in time for 1.7.
Let's fix the bugs first and apply afterwards for 1.8.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
rom_add_blob never fails, and neither does rom_add_blob_fixed,
so there's no need to return value from it.
In fact, rom_add_blob_fixed was erroneously returning -1 unconditionally
which made the only system that checked the return value -M bamboo fail
to start.
Drop the return value and drop checks from ppc440_bamboo to
fix this failure.
Reported-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Jason Wang [Wed, 6 Nov 2013 08:58:08 +0000 (16:58 +0800)]
virtio-net: only delete bh that existed
We delete without check whether it existed during exit. This will lead NULL
pointer deference since it was created conditionally depends on guest driver
status and features. So add a check of existence before trying to delete it.
Cc: qemu-stable@nongnu.org Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: Replace pci_find_domain() with more general pci_root_bus_path()
The issue is that i440fx savevm idstr went from 0000:00:00.0/I440FX to
0000:00.0/I440FX. Unfortunately we are stuck with the breakage for
1.6 machine types.
Add a compat property to maintain the busted idstr for the 1.6 machine
types, but revert to the old style format for 1.7+, and <= 1.5.
Tested with migration from qemu 1.5, qemu 1.6, and qemu.git.
Cc: qemu-stable@nongnu.org Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Upon processing of VIRTIO_NET_CTRL_MAC_TABLE_SET command
multicast list overwrites unicast list in mac_table.
This leads to broken logic for both unicast and multicast RX filtering.
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Dmitry Krivenok [Mon, 21 Oct 2013 08:08:44 +0000 (12:08 +0400)]
net: disallow to specify multicast MAC address
[Assigning a multicast MAC address to a NIC leads to confusing behavior.
Reject multicast MAC addresses so users are alerted to their error
straight away.
The "net/eth.h" in6_addr rename prevents a name collision with
<netinet/in.h> on Linux.
-- Stefan]
Signed-off-by: Dmitry V. Krivenok <krivenok.dmitry@gmail.com> Reviewed-by: Amos Kong <kongjianjun@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fam Zheng [Wed, 6 Nov 2013 11:48:06 +0000 (19:48 +0800)]
block: Round up total_sectors
Since b94a2610, bdrv_getlength() is omitted when probing image. VMDK
monolithicFlat is broken by that because a file < 512 bytes can't be
read with its total_sectors truncated to 0. This patch round up the size
to BDRV_SECTOR_SIZE, when a image size is not sector aligned.
The main changes are:
* fixed bug with not passing arguments from -append
* client-architecture-support hypercall
* netboot
* USB stack fixes
The full list of changes:
> client-architecture-support: fix wrong version read
> client-architecture-support: fix redundant stack drop
> Update device tree returned by CAS hypercall
> fdt: introduce fdt-init
> Add ibm,client-architecture-support method
> Kernel parameter passed from qemu commandline ignored
> Allow more than one client to open net devices simultaneously
> ci: add missing close in else condition
> Add GPT support
> pci: fix interrupt-map for bridges
> usb-ohci: preserve the toggleCarry bit in ED
> usb-ohci: done_head processing fixes
> usb-ohci: update init and rationalize timings
> usb-msc: handle stall and other fixes
> scsi: make probe more error resilient
> usb-core: Add CLEAR FEATURE api
> Implement range allocator
> Remove bcm57xx network driver as module
> Remove e1000 network driver as module
> Remove virtio-net network driver as module
> Remove veth network driver as module
> Add missing close-dev in ping
> Remove lodable network driver modules and related functions
> Add bcm57xx network driver in libbcm
> Add e1000 network driver in libe1k
> Add virtio-net driver in libvirtio
> Add veth driver in libveth
> Get MAC address for client interface module
> Add SLOF usleep wrapper
> Add SLOF pci wrapper functions
> Fix 'canon' client interface
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
Jeff Cody [Wed, 30 Oct 2013 14:44:56 +0000 (10:44 -0400)]
block: vhdx qemu-iotest - log replay of data sector
This tests the replay of a data sector in a VHDX image file.
The image file is a 10G dynamic image, with 4MB block size. The
image was created with qemu-img, and the log left unplayed by
modification of the vhdx image format driver.
It was verified under both QEMU and Hyper-V that the image file,
post log replay, matched.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:55 +0000 (10:44 -0400)]
block: qemu-iotests for vhdx, add write test support
This removes the IMGFMT_GENERIC blocker for read-only, so existing
iotests run read/write tests for vhdx images created by qemu-img (e.g.
tests 001, 002, 003).
In addition, this updates the sample image test for the Hyper-V
created image, to verify we can write it as well.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:54 +0000 (10:44 -0400)]
block: vhdx - update _make_test_img() to filter out vhdx options
The non-global option output is suppresed in _make_test_img() for
output verification in the 0?? tests. This adds suppression for
the vhdx-unique options as well. This allows check -vhdx to run
successfully.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:53 +0000 (10:44 -0400)]
block: vhdx - add .bdrv_create() support
This adds support for VHDX image creation, for images of type "Fixed"
and "Dynamic". "Differencing" types (i.e., VHDX images with backing
files) are currently not supported.
Options for image creation include:
* log size:
The size of the journaling log for VHDX. Minimum is 1MB,
and it must be a multiple of 1MB. Invalid log sizes will be
silently fixed by rounding up to the nearest MB.
Default is 1MB.
* block size:
This is the size of a payload block. The range is 1MB to 256MB,
inclusive, and must be a multiple of 1MB as well. Invalid sizes
and multiples will be silently fixed. If '0' is passed, then
a sane size is chosen (depending on virtual image size).
Default is 0 (Auto-select).
* subformat:
- "dynamic"
An image without data pre-allocated.
- "fixed"
An image with data pre-allocated.
Default is "dynamic"
When creating the image file, the lettered sections are created:
VHDXPage83Data and VHDXParentLocatorHeader both incorrectly had their
MSGUID fields set as arrays of 16. This is incorrect (it stems from
an early version where those fields were uint_8 arrays). Those fields
were, up to this patch, unused.
Also, there were a couple of typos and incorrect wording in comments,
and those have been fixed up as well.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:51 +0000 (10:44 -0400)]
block: vhdx - break out code operations to functions
This is preperation for vhdx_create(). The ability to write headers,
and calculate the number of BAT entries will be needed within the
create() functions, so move this relevant code into helper functions.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:49 +0000 (10:44 -0400)]
block: vhdx - remove BAT file offset bit shifting
Bit shifting can be fun, but in this case it was unnecessary. The
upper 44 bits of the 64-bit BAT entry is specifies the File Offset,
so we shifted the bits to get access to the value.
However, per the spec the value is in MB. So we dutifully shifted back
to the left by 20 bits, to convert to a true uint64_t file offset.
This replaces those steps with just a bit mask, to get rid of the lower
20 bits instead.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:48 +0000 (10:44 -0400)]
block: vhdx write support
This adds support for writing to VHDX image files, using coroutines.
Writes into the BAT table goes through the VHDX log. Currently, BAT
table writes occur when expanding a dynamic VHDX file, and allocating a
new BAT entry.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:46 +0000 (10:44 -0400)]
block: vhdx - add region overlap detection for image files
Regions in the image file cannot overlap - the log, region tables,
and metdata must all be unique and non-overlapping.
This adds region checking by means of a QLIST; there can be a variable
number of regions and metadata (there may be metadata or region tables
that we do not recognize / know about, but are not required).
This adds the capability to register a region for later checking, and
to check against registered regions for any overlap.
Also, if neither the BAT or Metadata region tables are found, return
error.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:45 +0000 (10:44 -0400)]
block: vhdx - log parsing, replay, and flush support
This adds support for VHDX v0 logs, as specified in Microsoft's
VHDX Specification Format v1.00:
https://www.microsoft.com/en-us/download/details.aspx?id=34750
The following support is added:
* Log parsing, and validation - validate that an existing log
is correct.
* Log search - search through an existing log, to find any valid
sequence of entries.
* Log replay and flush - replay an existing log, and flush/clear
the log when complete.
The VHDX log is a circular buffer, with elements (sectors) of 4KB.
A log entry is a variably-length number of sectors, that is
comprised of a header and 'descriptors', that describe each sector.
A log may contain multiple entries, know as a log sequence. In a log
sequence, each log entry immediately follows the previous entry, with an
incrementing sequence number. There can only ever be one active and
valid sequence in the log.
Each log entry must match the file log GUID in order to be valid (along
with other criteria). Once we have flushed all valid log entries, we
marked the file log GUID to be zero, which indicates a buffer with no
valid entries.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:42 +0000 (10:44 -0400)]
block: vhdx - break endian translation functions out
This moves the endian translation functions out from the vhdx.c source,
into a separate source file. In addition to the previously defined
endian functions, new endian translation functions for log support are
added as well.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:41 +0000 (10:44 -0400)]
block: vhdx - log support struct and defines
This adds some magic number defines, and internal structure definitions
for VHDX log replay support. The struct VHDXLogEntries does not reflect
an on-disk data structure, and thus does not need to be packed.
Some minor code style fixes are applied as well.
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Jeff Cody [Wed, 30 Oct 2013 14:44:39 +0000 (10:44 -0400)]
block: vhdx - add header update capability.
This adds the ability to update the headers in a VHDX image, including
generating a new MS-compatible GUID.
As VHDX depends on uuid.h, VHDX is now a configurable build option. If
VHDX support is enabled, that will also enable uuid as well. The
default is to have VHDX enabled.
To enable/disable VHDX: --enable-vhdx, --disable-vhdx
Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>