Commit Graph

33094 Commits

Author SHA1 Message Date
Peter Maydell
1673e89e93 sdl2: add support for text consoles
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTjIuoAAoJEEy22O7T6HE4qYQQALToHNyddpNlMHRUIbmCqKsY
 vDPxUJIy/DGcW8wzH6dvrPFa28QVYGBnrhfpj9ck4Kc1YpN8NrQE+0I8wS3snpuw
 LRwUkmzc+we07iPK0pFn1vpgXek0BYAZVtXUayDQnf79j83rVkHoOB8cFu/2IwA3
 FJR9pvBrQuqdblrEEFMmAvw6cBtSoqWXae+fjxzRdopC9Oz0pJUfr1FT+MXvhOPY
 FjC6G00JmAN3cGStanbs4HL4RFWEf7PSmETJXHOIPe6OA6ky1peINw37Z4AXGJNZ
 Gv9A59spjC3vhqO1DzhuA1eDZjLrQf+YfPsvAXvEq7GkLJ9j8TJu+uoaZuMhQ+6n
 RqoUG9TgDX9Hhfr07tYD2IOZdQiZ6Epb43OjZaJqp1NcS0LGdvt4/ewu6UxrzRw4
 gU0x1p47BsQc1RJJ4668rswjqmwaOhkDhwaWgCCQ0PdSGxN2SC/4sGqO9WCLkL3L
 MjgnNL3ZqxEN6UDW8o80JzZ0VEFLq8jlKOT8wBMquM4zgV3+ICi+StaLuOMnetmM
 LVKqpm3DcxvKWoDx7GZHQkk2ExXND4O41yLV1Q1mYXJSM7YZtDBz5VwZqFKVRqJl
 aE/xP0IIZIPXjO14uz7aH+kQoc43WSIZEeKv3KvJNqpdP9H6a9o//0PzKfdDsUB/
 nw93tGaQVlwGzaD5wEmf
 =Ma/a
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-3' into staging

sdl2: add support for text consoles

# gpg: Signature made Mon 02 Jun 2014 15:35:20 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-sdl-3:
  sdl2: textinput + terminal
  sdl2: make Ctrl-Alt-<nr> hotkeys show and hide windows
  console: add kbd_put_string_console
  console: add kbd_put_qcode_console

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-06-02 16:10:12 +01:00
Peter Maydell
36f5db59cf misc minor vnc patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTjIrZAAoJEEy22O7T6HE4ZyYQAN0C+pnrzqMP+BSJ3vgnC7cR
 cFkg/03jHM/IBpbqmTyqnkJ/15KNLouuP6kCXYSJi/bYZJ3VLJcw0kaJGuHSx+cN
 trJMsQUMr8bMjR15A18gerisnrkKfmcuQ1gz/dzNj7KWaQ4kO8IsRxrX4SD5qxSF
 1qmGQwu2hJWQ1eY7UzM+IZgKst6eiXh4nkCtz+gCOGsmGMHML/D6LWVKGuL83EWh
 pu7ToByzcPdzw80uRDRcwGO1Xjs+quMsIA+Z5N19cbACps6pnMgySj3qNBLF3BY8
 dKRpLANX6QpI58DqQiX1DEfmBO0ObRYeo0Fy38bPGlKdlnhFzibrtZ8gITyWUR/l
 WZSancv8ExdXh+DKepFbRwxSQ9VMdKp9ICl25WYFEyChza1lF3Tax12QBxOy0v4U
 nDfZaCVQQFQxEZKLKPCguExdTashPZ3FbNVZDgWkZ99V9eBFIiNLAWxjOw8cQdOw
 pvP55vH73xwuG4ZdwnXGrkXMwBIONYyv1AbUWgkmNxMrDyKqOLf1UnZB950iCxUw
 P7f5d5N1nI+Vm/M13pxTY/yBU2ryNNwZ1YN1P5+laMgwPoPj+93b21nhoWTDB56q
 9GOpWyF3yWKzt5DNIkXO4H+BhMHvb/LGUBTWIidShyLSyEXHslWPbYxpjsuQmeEn
 U6xmn6eD2FySOrDuEEgR
 =ZPEW
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-3' into staging

misc minor vnc patches

# gpg: Signature made Mon 02 Jun 2014 15:31:53 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-vnc-3:
  vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16,24,32}
  vnc: add trace events for key events
  vnc: refuse to set a password with VNC_AUTH_NONE

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-06-02 15:47:40 +01:00
Gonglei
b52991537c vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16,24,32}
Spotted by Coverity:

(1) Event assignment:  Assigning: "pixels" = "0".
(2) Event cond_true:  Condition "y < h", taking true branch
(3) Event cond_false:  Condition "x < w", taking false branch
(4) Event loop_end:  Reached end of loop
(5) Event divide_by_zero:  In expression "(stats[0] + stats[1]) * 100U / pixels",
division by expression "pixels" which may be zero has undefined behavior.

290     DEFINE_DETECT_FUNCTION(16)
291     DEFINE_DETECT_FUNCTION(32)

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:30:52 +02:00
Gerd Hoffmann
4006617552 vnc: add trace events for key events
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:29:01 +02:00
Gerd Hoffmann
cf864569cd vnc: refuse to set a password with VNC_AUTH_NONE
Current code silently changes the authentication settings
in case you try to set a password without password authentication
turned on.  This is bad.  Return an error instead.

If we want allow changing auth settings at runtime this should
be done explicitly using a separate monitor command, not as
side effect of set_passwd.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:29:01 +02:00
Gerd Hoffmann
f2335791fd sdl2: textinput + terminal
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:28:58 +02:00
Gerd Hoffmann
363f59d9e4 sdl2: make Ctrl-Alt-<nr> hotkeys show and hide windows
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:28:58 +02:00
Gerd Hoffmann
bdef972474 console: add kbd_put_string_console
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:28:58 +02:00
Gerd Hoffmann
50ef467923 console: add kbd_put_qcode_console
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:28:58 +02:00
Peter Maydell
f72b49398f Block patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTjIJwAAoJEH8JsnLIjy/WVGsQALIytTnSQcYtB2R0Npw0R9pO
 Zhp1hcAN8sQKEbfA7t4lp9rmc2+JhgwQO7KI/3Dhk43/LQFLOEPtDsEINZT830QZ
 gvaHQVNLGhxhuIZG2njeJB2CEfBRjJjZ5DtA5sHAsKLcQKbA0xBCqhlCAL5gZ7/O
 Up/TOXOP396n4oIjBzUGY0WRxVYTaixpEQuk7oCh2/s3hihj3GU6PKjB8bqHd9PE
 bwaXv2gIkaHnsTyHn9QvRTci9EqNcpV1uSPGvjU7C7hDhIx30EXBC0ptY619PtYc
 nTqRkc0jU+jq2CMUbOwkKFDMN4rivYwxpWs8iOZZViFUuSWfmsMWXXTNRNybWGwa
 o6FCBwXqTYVa+a7048oDZAEGZkbiM4upzWtlztjSGEoRGgra81WQUiltUsJi+U3s
 kySVCCNdMWY5jwN3ceEuhZpQ8Uv8qpMS857TFax1tQb0RjLu2vKHf1rUuNmtAyJ1
 fPYvsXAgEozavhl63vOCo1mgZknvId9keO8p9h23HObZJhcMORNZ/eMKzK2OjMQe
 T1QmWBTBXs0ULkuv4E7CwSQ9Dr09VJnTHM5EjekhxXfu1Dq4N/6gZmcoWu49VIvg
 Ho6Xg72z+sFdJ7Y/l8oCqUKCJdmQT2GeqKEkS3QiH0nY+J26ZtGNnylm1cUQzY7Z
 3tbAuQi/mIDVF++M08CA
 =WVw4
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block patches

# gpg: Signature made Mon 02 Jun 2014 14:56:00 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"

* remotes/kevin/tags/for-upstream:
  qemu-img: Report error even with --oformat=json
  vmdk: Fix local_err in vmdk_create
  block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX
  qemu-img: Plug memory leak in convert command
  block/sheepdog: Plug memory leak in sd_snapshot_create()
  block/vvfat: Plug memory leak in read_directory()
  block/vvfat: Plug memory leak in check_directory_consistency()
  block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR
  blockdev: Plug memory leak in drive_init()
  blockdev: Plug memory leak in blockdev_init()
  qemu-io: Don't print NULL when open without non-option arg fails
  qemu-io: Plug memory leak in open command
  qemu-io: Support multiple -o in open command
  block: Plug memory leak on brv_open_image() error path
  qcow2: Plug memory leak on qcow2_invalidate_cache() error paths
  block/vvfat: Plug memory leak in enable_write_target()
  qemu-img: Plug memory leak on block option help error path

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-06-02 15:27:18 +01:00
Peter Maydell
9bb931802e Revert "bsd-user: replace fprintf(stderr, ...) with error_report()"
This reverts commit 1fba509527.

That commit converted various fprintf(stderr, ...) calls to
use error_report(); however none of these bsd-user files include
a header which gives a prototype for error_report, so this
causes compiler warnings. Since these are just straightforward
reporting of command line errors, we should handle these in the
obvious way by printing to stderr, as we do for linux-user.
There's no need to drag in the error-handling framework for this,
especially since user-mode doesn't have the "maybe we need to
send this to the monitor" issues system emulation does.

Acked-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-06-02 13:26:59 +01:00
Max Reitz
55d492d760 qemu-img: Report error even with --oformat=json
img_check() should report that the format of the given image does not
support checks even if JSON output is desired. JSON data is output to
stdout, as opposed to error messages, which are (in the case of
qemu-img) printed to stderr. Therefore, it is easy to distinguish
between the two.

Also, img_info() does already use error_report() for human-readable
messages even though JSON output is desired (through
collect_image_info_list()).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-06-02 13:58:40 +02:00
Fam Zheng
c13959c745 vmdk: Fix local_err in vmdk_create
In vmdk_create and vmdk_create_extent, initialize local_err before using
it, and don't leak it on error.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Peter Maydell
675036e4da block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX
In the MacOSX specific code in raw-posix.c we use the define
LONG_LONG_MAX. This is actually a non-standard pre-C99 define;
switch to using the standard LLONG_MAX instead.

This apparently fixes a compilation failure with certain
compiler/OS versions (though it is unclear which).

Reported-by: Peter Bartoli <peter@bartoli.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
bb9cd2ee99 qemu-img: Plug memory leak in convert command
Introduced in commit 661a0f7.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
2df5fee2db block/sheepdog: Plug memory leak in sd_snapshot_create()
Has always been leaky.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
b122c3b6d0 block/vvfat: Plug memory leak in read_directory()
Has always been leaky.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
6262bbd363 block/vvfat: Plug memory leak in check_directory_consistency()
On error path.  Introduced in commit a046433a.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
f25391c2a6 block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR
Introduced in commit a8d8ecb.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
3cb0e25c4b blockdev: Plug memory leak in drive_init()
bs_opts is leaked on all paths from its qdev_new() that don't got
through blockdev_init().  Add the missing QDECREF(), and zap bs_opts
after blockdev_init(), so the new QDECREF() does nothing when we go
through blockdev_init().

Leak introduced in commit f298d07.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
6376f95223 blockdev: Plug memory leak in blockdev_init()
blockdev_init() leaks bs_opts when qemu_opts_create() fails, i.e. when
the ID is bad.  Missed in commit ec9c10d.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
543f7bef13 qemu-io: Don't print NULL when open without non-option arg fails
Reproducer: "open -o a=b".  Broken in commit fd0fee3.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
29f2601aa6 qemu-io: Plug memory leak in open command
Introduced in commit b543c5c.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
443422fde7 qemu-io: Support multiple -o in open command
Instead of ignoring all option values but the last one, multiple -o
options now have the same meaning as having a single option with all
settings in the order of their respective -o options.

Same as commit 2dc8328 for qemu-img convert, except here we do it with
QemuOpts rather than QEMUOptionParameter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
b20e61e0d5 block: Plug memory leak on brv_open_image() error path
Introduced in commit da557a.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
a1904e48c4 qcow2: Plug memory leak on qcow2_invalidate_cache() error paths
Introduced in commit 5a8a30d.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
75e347d66a block/vvfat: Plug memory leak in enable_write_target()
I figure the leak originated in bdrv_create2(), and was duplicated
into callers when commit 91a073a dropped that function.  Looks like
the other places have since been fixed.

Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:26:54 +02:00
Markus Armbruster
ebee92b4fe qemu-img: Plug memory leak on block option help error path
Introduced in commit a283cb6; mostly harmless.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-05-30 14:25:58 +02:00
Peter Maydell
d7d3d6092c QOM/QTest infrastructure fixes and device conversions
* qom-test extension
 * QEMUMachineInitArgs conversion to MachineState
 * -machine options turned into /machine properties
 * Named GPIO IRQs for devices
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJThhu0AAoJEPou0S0+fgE/tokP/i3xzx9zYMPSVkymwKsozTsV
 j7+aW6/XhRom7V3pmGGSeG8OrRjH4rC9tiS3610+gks/tfE5RtqvNVotJ1Py7EVW
 BoBNOHG9Lsx8UZVarO+aiQnqDJgKpEzkTb5cD5hopQ4c0jTrXWa0JCRGG0nxLSU/
 vVnIkOs2FgzyJio5j9IX+ULyA6MYA0iZDBKCfuk0S7RiIRm0VopXftcREbiA8rXN
 1pJXVY7ciLdJLOk+m7o7BD/b9KcRVKFkWkS2BhcF4HbdTbKmannDCxuyYTJ+y9vn
 Lxo/sDzIZl4bknKmTM2lVQ50QpVWvNOoS6nwmvx2fVeiLIt+URoYmQh61O9xYO3H
 Lb+I68X4NYIz59nzgQPFMUjzbqI3xriO9A7/SSZt5GO0ylCwcELpzSFYZyYorVDQ
 KxVpJG+o4ZYuDw4oOySKitVtmPyR7/uXjlhJOYWs8w0pwX3ffj2lHCFFQDWwAIwG
 1lT+whTCSyonpAGbn6WM5Cn7cuKWyD9swHEgxTVAcR9wwT9WYkZYGiQQRuVzIfg7
 KJoJJcS7CDvci6vKlpzGuxi0bF8AxLMcvEfHfdQUu1vKEbOno2dDpsksWxPhvwSn
 n4E+LZYgtAjDvib+otrVM+dPZRSPVyWh/bvK+Cu4BHT/uTbW/SA+Hq1wzgxOUArF
 e1aoE6qUtGfh7elgK5W3
 =JVpT
 -----END PGP SIGNATURE-----

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

QOM/QTest infrastructure fixes and device conversions

* qom-test extension
* QEMUMachineInitArgs conversion to MachineState
* -machine options turned into /machine properties
* Named GPIO IRQs for devices

# gpg: Signature made Wed 28 May 2014 18:24:04 BST using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

* remotes/afaerber/tags/qom-devices-for-peter:
  ssi: Name the CS GPIO
  qdev: Implement named GPIOs
  machine: Make -machine opts properties of MachineState
  tests: Check empty QMP output visitor
  qapi: Avoid output visitor crashing if it encounters a NULL value
  vl.c: Do not set 'type' property in obj_set_property()
  machine: Conversion of QEMUMachineInitArgs to MachineState
  qom-test: Test qom-list on link<> properties

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-28 18:38:39 +01:00
Peter Maydell
66226ffd05 Merge remote-tracking branch 'remotes/rth/tcg-next' into staging
* remotes/rth/tcg-next:
  tcg/optimize: Remember garbage high bits for 32-bit ops
  tcg/optimize: Move updating of gen_opc_buf into tcg_opt_gen_mov*
  tcg-sparc: Make debug_frame const
  tcg-s390: Make debug_frame const
  tcg-arm: Make debug_frame const
  tcg-aarch64: Make debug_frame const
  tcg-i386: Make debug_frame const
  tcg: Allow the debug_frame data structure to be constant
  tcg: Move size effects out of dh_arg
  tcg: Remove sizemask and flags arguments to tcg_gen_callN
  tcg: Save flags and computed sizemask in TCGHelperInfo
  tcg: Register the helper info struct rather than the name
  tcg: Move side effects out of dh_sizemask
  tcg: Inline tcg_gen_helperN
  tcg: Use helper-gen.h in tcg-op.h
  tcg: Push tcg-runtime routines into exec/helper-*
  tcg: Invert the inclusion of helper.h
  tcg: Optimize brcond2 and setcond2 ne/eq

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-28 17:44:45 +01:00
Richard Henderson
24666baf1f tcg/optimize: Remember garbage high bits for 32-bit ops
For a 64-bit host, the high bits of a register after a 32-bit operation
are undefined.  Adjust the temps mask for all 32-bit ops to reflect that.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:56 -07:00
Richard Henderson
a62f6f5600 tcg/optimize: Move updating of gen_opc_buf into tcg_opt_gen_mov*
No functional change, just reduce a bit of redundancy.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:56 -07:00
Richard Henderson
ae18b28dd1 tcg-sparc: Make debug_frame const
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:56 -07:00
Richard Henderson
d2e16f2ce1 tcg-s390: Make debug_frame const
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:55 -07:00
Richard Henderson
1695974187 tcg-arm: Make debug_frame const
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:55 -07:00
Richard Henderson
3d9bddb30b tcg-aarch64: Make debug_frame const
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:55 -07:00
Richard Henderson
e9a9a5b605 tcg-i386: Make debug_frame const
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:55 -07:00
Richard Henderson
2c90784abf tcg: Allow the debug_frame data structure to be constant
Adjust the FDE to point to the code_buffer after we've copied it
to the image, rather than requiring that the backend set it prior.
This allows the backend to use read-only storage for its data.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:55 -07:00
Richard Henderson
011209e19f tcg: Move size effects out of dh_arg
Tidying the initialization of the args arrays at the same time.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:55 -07:00
Richard Henderson
bbb8a1b455 tcg: Remove sizemask and flags arguments to tcg_gen_callN
Take them from the TCGHelperInfo struct instead.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:55 -07:00
Richard Henderson
afb49896fa tcg: Save flags and computed sizemask in TCGHelperInfo
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:54 -07:00
Richard Henderson
72866e823e tcg: Register the helper info struct rather than the name
This will let us find all the info from the hash table.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:54 -07:00
Richard Henderson
a5ed2de10a tcg: Move side effects out of dh_sizemask
Moving them into dh_arg instead.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:54 -07:00
Richard Henderson
836d6ed96e tcg: Inline tcg_gen_helperN
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:54 -07:00
Richard Henderson
c017230d9b tcg: Use helper-gen.h in tcg-op.h
No need to open-code the setup of the builtin helpers.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:54 -07:00
Richard Henderson
944eea962b tcg: Push tcg-runtime routines into exec/helper-*
Rather than special casing them, use the standard mechanisms
for tcg helper generation.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:54 -07:00
Richard Henderson
2ef6175aa7 tcg: Invert the inclusion of helper.h
Rather than include helper.h with N values of GEN_HELPER, include a
secondary file that sets up the macros to include helper.h.  This
minimizes the files that must be rebuilt when changing the macros
for file N.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:54 -07:00
Richard Henderson
a763551ad5 tcg: Optimize brcond2 and setcond2 ne/eq
If either the high or low pair can be resolved, we can
simplify to either a constant or to a 32-bit comparison.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-28 09:33:53 -07:00
Peter Crosthwaite
de77914e50 ssi: Name the CS GPIO
To get it out of the default GPIO list. This allows child devices to
use the un-named GPIO namespace without having to be SSI aware. That
is, there is no more need for machines to know about the obscure
policy where GPIO 0 is the SSI chip-select and GPIO 1..N are the
concrete class GPIOs (defined locally as 0..N-1).

This is most notable in stellaris, which uses a device which has both
SSI and concrete level GPIOs.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-05-28 17:36:21 +02:00
Peter Crosthwaite
a5f54290ce qdev: Implement named GPIOs
Implement named GPIOs on the Device layer. Listifies the existing GPIOs
stuff using string keys. Legacy un-named GPIOs are preserved by using
a NULL name string - they are just a single matchable element in the
name list.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-05-28 17:36:21 +02:00