Commit Graph

29543 Commits (da87dd7bd70f71ceaf9ff40d7cdb8394a7dc4bf5)

Author SHA1 Message Date
Mark Cave-Ayland da87dd7bd7 sun4m: Add FCode ROM for TCX framebuffer
Upstream OpenBIOS now implements SBus probing in order to determine the
contents of a physical bus slot, which is required to allow OpenBIOS to
identify the framebuffer without help from the fw_cfg interface.

SBus probing works by detecting the presence of an FCode program
(effectively tokenised Forth) at the base address of each slot, and if
present executes it so that it creates its own device node in the
OpenBIOS device tree.

The FCode ROM is generated as part of the OpenBIOS build and should
generally be updated at the same time.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Blue Swirl <blauwirbel@gmail.com>
CC: Bob Breuer <breuerr@mc.net>
CC: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-11-21 17:38:52 +01:00
Anthony Liguori 394cfa39ba Merge remote-tracking branch 'quintela/migration.next' into staging
# By Peter Lieven
# Via Juan Quintela
* quintela/migration.next:
  migration: drop MADVISE_DONT_NEED for incoming zero pages

Message-id: 1384878412-23521-1-git-send-email-quintela@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-11-19 13:03:06 -08:00
Anthony Liguori 4ed3479169 Merge remote-tracking branch 'stefanha/block' into staging
# By Andreas Färber
# Via Stefan Hajnoczi
* stefanha/block:
  qtest: Use -display none by default
2013-11-19 13:00:52 -08:00
Anthony Liguori 1c46e594dc QOM infrastructure fixes for 1.7
* QOM memory leak fix
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJSizZiAAoJEPou0S0+fgE/9FsP/1fMsj0yyzjK1YFW0SuLNttD
 AJwjh7ysv/r5dAAwgsjTG6TQCg+tqM5Ym6SEL/6YwtHeKLJ7CMEALcB6u9dG4wFX
 9qBcyvz/akhNrBl7JBwuOMOrQ+gO1Lspws/x5izEl7o0NYr5ETin3P0RhW3PSyHG
 xvtZMSbuJ1OQZ9zV6NGY1BxVdV/4gmWgJaXM6NmYR0h5iVeCVKETLsJZDSm/+09v
 E88QUljipKlnrekAg6Ks5UBrv0aoyjeBHQ/l5YXVt995m3i3fNZnNxxQ4w4Faagj
 9znw0bIBI1qMbxCHl0PPnTaHmpNKyrb+jQRUp4E/AdAU6kpFxClW2XapGrOdGCdf
 66SI4tlkcLt95skEfSjMrHExqizuS/yr7BjH+IIWMD4VXKMCE4UUhg2LFRg0dWnC
 uUQlCpUMIGoeR4Fzh5l+Jr42y6z97bWLLq0/MAE4VazEAQGhUatdw41xC3sks0zz
 9scNFyvIdpPUW9rKEcM3bILAHSutEp8oFPVRmy9QNrqF+O9zPQzYu5fxoCAh2CpP
 iVnPYsWU+lJTFujfzUGh/vkpBg3lWo/bbLmPz47eUFPVBC7B1kbuOL/tdioksQSL
 O4vtl4asYSXTm6KrtJw4uT6qBxwBXGCeTvke49dNY66mgA7hOBl7SAWq1xreORzt
 v0RISaEOSpaEVogaq17N
 =pZXF
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging

QOM infrastructure fixes for 1.7

* QOM memory leak fix

# gpg: Signature made Tue 19 Nov 2013 01:58:58 AM PST using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Vlad Yasevich
# Via Andreas Färber
* afaerber/tags/qom-devices-for-anthony:
  qom: Fix memory leak in object_property_set_link()
2013-11-19 13:00:09 -08:00
Anthony Liguori dc6dc0a987 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>
2013-11-19 13:00:02 -08:00
Anthony Liguori 4be6693a88 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>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSif5+AAoJECgfDbjSjVRpHNAH/RQO8v2FYOQ7opGhOqzMwXwR
 lbsaeaNtHUVV1MHeFtww04Oslp8tdsvcKq4ORGu38sG60dKHSZjdLnrsJCOKeEO/
 3Luqx5kAJabSKDPHhYc+sZqQPx2aZT0s16bXuDyWXe+IEPpwO6e39VI7J+ulJjyI
 VdDWqumusGtyqFoXri4SS5pcPVowfgKQFhJIkzXfcmzNAT0rXP87CYe1gl9W19rc
 aD5VxHXdMvB7wfJAdtGzpc/MuEDG/MgCiUqgiLvC5zM0JUTmdPwgBGl56Er01BZ9
 Rudeg8LXi/nhL1rZuQaNK1AnL/jg4mjKByLw5nQjjxPN9Hj0J6Zh4Asu5eYlS3w=
 =c2GL
 -----END PGP SIGNATURE-----

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>
2013-11-19 12:59:48 -08:00
Anthony Liguori 38dc74907e 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>
2013-11-19 12:59:26 -08:00
Anthony Liguori 7af31519e2 Block fixes for 1.7.0
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJShl8dAAoJEH8JsnLIjy/WYf4P/jKDUuMPGtGI4jbM3TnM4nl7
 6mwwGJK+6SpX/HJfNaIs88X6sV3iblwWvOd20hsctBp8n8yuN7cr/KPfmqdXzF2L
 UfPYq0kcrzrCeVFgpKM8r7Ve10QK9UbQDntjv3cB/bI6SeTQ0kwoxFvjV/MpgBAR
 RerdBKIh//mp6irhIWfwrsebY8Ihmqi722ECNy6o7XVUml07Bxy0vYF/874IWbOX
 zcIYaZ/GSGpZ8yTN+F1IV6wLPorxnliSP5dpS4Dd5qWDIJdflRcmn3PNTje0cq4X
 PCukClg/LFDxhSeGr6etE0xW7TdYqo8AK9IO9Lkabh3ZjDk+E+O0lejljZItoZnJ
 sdELCIxYGL0gRGzuKOJ5WtW1/sE2Ndw9rsBNGn1+v3WFnlLY9hW4vuw2/Za7TPYd
 lTuoA0aE9iU/4yNt+HTjglqLS47J9YKeAy8gOaupsHFE/rW9spMoHbSVxIVEqBx6
 OeYzPb9Rzmb40ULnBZB06QOJcEpdDz42mB4qUqI6d5cnruzqaKzBLZj7WAvY3sLx
 ht7t2mfzqOcYdXBWPUg3bDalHscbv5sPg5CO1Rmyo0JGhiGL6jTHWBxXIvvIjhVT
 r55PS7FceOMst7trwDv9M8aW10/kW3zEVgIDuBKJytMHKhsmOwQXTfenOpKKyILt
 cVc0O96eukkwGK8nwKkT
 =Dvpg
 -----END PGP SIGNATURE-----

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>
2013-11-19 12:59:09 -08:00
Anthony Liguori 88a47b9de2 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>
2013-11-19 12:58:32 -08:00
Anthony Liguori 8c630d5150 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 '?'.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJSfFveAAoJECszeR4D/txgR2wQAIFh/RrahBHVpPU4zDxSy0KG
 1oafAEPltwc2+CH3F3aIczPp5FjqLoJN86Xxk7JmuMOQY4avnJTu55aFNBQKBUZ8
 t6dX2LKfzfrT4IAdpg1E8mQ5GSVS3KErOgvEoifCZDTBCkth/vplXlQyJavTA9/f
 D94l7hMNzuOBMFR37wc/jE4KQ6cxHHDn6lbQK8KCgoVBpNifeVi+BbbigaCVstRK
 clzXtgZKMgbtr8ycz2EZptD5B4qDJHTduGpWjn5A4VMGpIaiv55x8TUs1QkyxNLu
 G+AuM8iDfQp4LEBfPHM59VHAVPQvHwU1R1IiGgqd12aYnt4+HLLDkgDazEME8egx
 MPcVEqfcN7Cre3EqPmTSNxw/YHI5L825bJ6hqrEamEUicIUnwCEPjDGxsqU7Cadh
 /pou3lfxcxrSVqnLbityO/YptUITZX1aaIWMkQz6lowFqVTRg2m2V6aVX9JoGy6y
 2okXGylr7c4bKW1jV3XVfmzGPUS79cgumyqSH64BsgMowDQOA3GxnDyF3FU0kbA2
 zjK6f36sF+iUqi/PDI8kD5MPJ0XAudb+mcTwbpl7Yluh3ddbeHUgbf5GADb6yz1a
 OAjXySuAZbR2JwfMGSGA3RN8hfChUjoJ2/osO/rLinYKOrpMpFbZGuBfhlCXVbIF
 YuqwFW+OFXPB6sYVkjdC
 =6SSx
 -----END PGP SIGNATURE-----

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>
2013-11-19 12:57:16 -08:00
Peter Lieven fc1c4a5d32 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>
2013-11-19 17:23:57 +01:00
Vlad Yasevich 2d3aa28cc2 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.org
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Reviewed-by: Amos Kong <akong@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-11-19 10:58:21 +01:00
Andreas Färber 2ad645d285 qtest: Use -display none by default
This avoids each test needing to add it to suppress windows popping up.

[Commit 7ceeedd016 ("blockdev-test: add
test case for drive_add duplicate IDs") and commit
43cd209803 ("qdev-monitor-test: add
device_add leak test cases") added qtest tests without specifying
-display none.

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>
2013-11-19 10:28:14 +01:00
Amos Kong 96e35046e4 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>
2013-11-19 10:26:55 +01:00
Amos Kong 420508fbba 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>
2013-11-18 13:45:10 +02:00
Richard Henderson 463230d85e tcg-ia64: Introduce tcg_opc_bswap64_i
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:57:59 +10:00
Richard Henderson db008a8de2 tcg-ia64: Introduce tcg_opc_ext_i
Being able to "extend" from 64-bits (with a mov) simplifies
a few places where the conditional breaks the train of thought.

Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:57:54 +10:00
Richard Henderson fa0cdb6c2a tcg-ia64: Introduce tcg_opc_movi_a
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:57:50 +10:00
Richard Henderson 3b9ccdcc74 tcg-ia64: Introduce tcg_opc_mov_a
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:57:46 +10:00
Richard Henderson 25c9c73bdc tcg-ia64: Use A3 form of logical operations
We can and/or/xor/andcm small constants, saving one cycle.

Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:57:40 +10:00
Richard Henderson f940fb086c 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.

Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:57:33 +10:00
Richard Henderson 8642088a3d 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 work
and don't expect the first operand of the add to be constant.

Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:57:23 +10:00
Richard Henderson 3c289cba9b 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>
2013-11-18 15:57:16 +10:00
Richard Henderson d15de15ca0 tcg-ia64: Move AREG0 to R32
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>
2013-11-18 15:57:08 +10:00
Richard Henderson 6d264b38fc tcg-ia64: Simplify brcond
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>
2013-11-18 15:56:42 +10:00
Richard Henderson 6f65c780b9 tcg-ia64: Handle constant calls
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>
2013-11-18 15:56:30 +10:00
Richard Henderson 5f7b16877a tcg-ia64: Use shortcuts for nop insns
There's no need to go through the full opcode-to-insn function call
to generate nops.  This makes the source a bit more readable.

Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:56:25 +10:00
Richard Henderson e3afa1c4ad tcg-ia64: Use TCGMemOp within qemu_ldst routines
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-11-18 15:56:12 +10:00
Michael Tokarev 0478f37ce2 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>
2013-11-17 00:30:14 +04:00
Stefan Weil 52510f8b2c configure: Use -B switch only for Python versions which support it
Commit 1d984a67a9 added the -B switch
unconditionally. This breaks Python versions before 2.6 which don't
support that switch.

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>
2013-11-17 00:29:15 +04:00
whitearchey 485e741cd1 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>
2013-11-16 14:04:45 +04:00
Kevin Wolf 06d22aa367 block: Fail if requested driver is not available
If an explicit driver option is present, but doesn't specify a valid
driver, 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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-15 13:37:48 +01:00
Stefan Hajnoczi f05b328c9d 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>
2013-11-15 13:37:48 +01:00
Fam Zheng 36452f12f8 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>
2013-11-15 13:37:48 +01:00
Kevin Wolf a1144c0dbf qemu-iotests: Test qcow2 count_contiguous_clusters()
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-11-15 13:37:43 +01:00
Sebastian Huber 8b7acc79b9 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>
2013-11-15 13:25:39 +01:00
Peter Lieven 78a52ad5ac 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>
2013-11-14 13:09:07 +01:00
Amos Kong 968854c8a1 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>
2013-11-14 13:09:07 +01:00
Stefan Hajnoczi d48adddac7 MAINTAINERS: add block tree repo URLs
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-11-14 13:09:06 +01:00
Max Reitz c15badee20 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>
2013-11-14 13:09:06 +01:00
Max Reitz 1452686495 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>
2013-11-14 13:09:06 +01:00
Max Reitz 1296c2f0bc 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>
2013-11-14 13:09:06 +01:00
Fam Zheng b04b6b6ec3 block: Print its file name if backing file opening failed
If backing file doesn't exist, the error message is confusing and
misleading:

    $ qemu /tmp/a.qcow2
    qemu: could not open disk image /tmp/a.qcow2: Could not open file: No
    such file or directory

But...

    $ ls /tmp/a.qcow2
    /tmp/a.qcow2

    $ qemu-img info /tmp/a.qcow2
    image: /tmp/a.qcow2
    file format: qcow2
    virtual size: 8.0G (8589934592 bytes)
    disk size: 196K
    cluster_size: 65536
    backing file: /tmp/b.qcow2

Because...

    $ 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>
2013-11-14 13:09:06 +01:00
Igor Mammedov 7f1bb742be 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>
2013-11-14 09:12:13 +02:00
Anthony Liguori 5c5432e7d6 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>
2013-11-13 11:49:27 -08:00
Anthony Liguori 29c5b77d3d 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>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSf4ZyAAoJECgfDbjSjVRp9DIIAK7yEMa9ie5n3sInKH+xHT3R
 Sf4uErqx55WfT/54dnLJPrs7DTfXblW+Qjnq/7RuaoJ32Dfshgxz64mPF+Lm2s3+
 ghjdQrKo2YkdSbbxy+AnBNO4eHMSeUs/rM2yIfi7FZU0nwC7wNe1QpAN3UjM4yAF
 5vE18xZE0Rxz/prXgofLtPHa1czvGPFk1qbS7Vag6HCSkfEI4N1Jxf9otDRV6KZP
 9hX0kTvZyOKdbhccN05G4VCWwx5YUrpBsNSoph4Jx1aokEBoucr4sgE1FPDp0H9H
 bJqDaAM2G5HNrDtIiDov5WOzRNT/ly011Q4mcaQh3va0pqUXttKCHgE1KRgn76I=
 =iMNW
 -----END PGP SIGNATURE-----

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>
2013-11-13 11:48:35 -08:00
Anthony Liguori b873a55cf4 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>
2013-11-13 11:48:03 -08:00
Anthony Liguori deb0f50065 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>
2013-11-13 11:47:44 -08:00
Anthony Liguori 70c4c5b562 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSfHdjAAoJEFH5zJH4P6BEaVIP/1PQIpsbsESuc6LNebScQhi4
 FnjNxBAkDy3v0D3fi5ltG/MxMA9KEykr5iwuQB61ypD2J6b5jLbpSPWjgy2P4n4T
 R3z8ZYvhiJBT8DmBLrK/wwvvw1hXhKrCxiBbz3TWmYB1Iz2dCeYAwVPvdZYP6AB1
 5UUMebd8Wg2Fgy/CO92IraVrhZVEHxFbJpWMq1OaQf81s01EQUVgor1kUPaPXLdg
 I3SEvym9lEEtrAaleZjf2WbhLAytgim5x6fhRUQgR/JaU+gNHmjZEtGj97ufKRBw
 QWUbvKq1Dh9Ryz6+X7XwedR9YBxX6ww6TuPL3pQZbY1Sp5qXxNR107he5FAuoDn8
 Z/BCl95qoIfD49J2mofQbAG7r37E4RHHkF2QvECAPf61h7Rf6G6rZac49SWbYRqb
 LU5PuWd9vzaJ/J6lRHcbnlwweTQDEwXe1EsaeMmKGkSp8Z1Je9KoZwpxI0/OdTIX
 LmicmB6LvWxUWXa4tfNGPLhTFSNQKcbt0c3peULbl52+96AnYEIqDXi5c2hc3Hhr
 DQip7wzwngZx9i1TcF+VLf8sE6hU6lDYQFCvW/G5bx9e9fyqqPHiJbNKID8/f/hG
 sePWG6+WrdMIfQ/eqvlrtGeIPfH+HKJKvDL3rUwkSH3Mx6M6q+OqM/6Tra1TWrP6
 /0492SeVzPOPJmE+7S2a
 =6DLv
 -----END PGP SIGNATURE-----

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>
2013-11-13 11:47:06 -08:00
Anthony Liguori 9f43a3f541 Merge remote-tracking branch 'kraxel/audio.3' into staging
# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/audio.3:
  ossaudio: check for oss support in oss_audio_init
  Revert "ossaudio: do not enable by default"

Message-id: 1383823947-5132-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
2013-11-13 11:46:23 -08:00