Commit graph

32346 commits

Author SHA1 Message Date
Peter Maydell 13de54eedd Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
  monitor: fix qmp_getfd() fd leak in error case
  HMP: support specifying dump format for dump-guest-memory
  HMP: fix doc of dump-guest-memory
  qmp: object-add: Validate class before creating object
  monitor: Add device_add and device_del completion.
  monitor: Add command_completion callback to mon_cmd_t.
  monitor: Fix drive_del id argument type completion.
  error: Remove some unused headers
  qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED
  qerror.h: Remove QERR defines that are only used once
  qerror.h: Remove unused error classes
  error: Print error_report() to stderr if using qmp
  monitor: Remove unused monitor_print_filename
  error: Privatize error_print_loc
  vnc: Remove default_mon usage
  slirp: Remove default_mon usage

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 12:56:34 +01:00
Peter Maydell a41b2c995b Block pull request
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTWoe5AAoJEJykq7OBq3PI9hMH/0uF2rrn2z+Q5q2NzetLI8V7
 QoOIZETT4bgMyNXdnm7A0EIiPmRLhGt7DtUvbrA1BFxQCgw2xMN0bOmUiSwPGrrV
 Bbhb/9oVTM9lvyHkPW4DH2a0JYU+0VJ+McdOcD72/hv7xaEs+WoZoAPJkMsPD2yE
 iNnHWTH3D/6S5SMpZYAUTMn54ZS/1qV9YW46izsGgkqW8OHxeRKnPuX1FgRL06Uy
 r70iejNwZXbeH7DJZ4nIgLeQHwpYOVBzGXyV7v4UgoZdISLVlQb0neI3x+oYmhfo
 bwnV9lN4XqLveBna+zZTuW9eyb/2epUn9YJYsa2tbcE/3GaBz14dM82spnpWVnA=
 =u7ts
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Block pull request

# gpg: Signature made Fri 25 Apr 2014 17:05:13 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/block-pull-request:
  iscsi: Don't use error_is_set() to suppress additional errors
  blockdev: Clean up fragile use of error_is_set()
  nbd: Use return values instead of error_is_set(errp)
  qemu-img: Consistently name Error * objects err, and not errp
  Use error_is_set() only when necessary (again)
  block: Expose host_* drivers in blockdev-add
  MAINTAINERS: Add qemu-img/io to block subsystem
  qemu-iotests: Improve and make use of QMPTestCase.wait_until_completed()
  doc: add -drive rerror=,werror= to qemu --help output
  block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 11:50:31 +01:00
Peter Maydell d09a18d44d Net patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTWmwjAAoJEJykq7OBq3PI32kH+gMZlANje8MPlPn0rjuQC3Eb
 9dt5Oz7dbRbEbRJQHvadbKSvV0beeIdSBxVe8vD3IOyPwGQQg0LqwTnUfXadwNYD
 SGYwOXMNgKe/+o9NRAcZonRxNLoU9J+cSCfLnqXUPdhLzlPF1uuaglBBjlcrhOOE
 YQfDIEe3UcPLpehl6ALrgtiF6+ZrjDnvFnL0KZcMKomQlCnMHvBuzVJ26lQ0m+38
 JxYYc99q6qGvBleH/tHMT7jRWPdEud5rEINKAFnb/OB82YL44fbVTboDFmGVW5WI
 keWiWbs2BwpxXjOwyf7ZunmSMLWIdSVLiSja+WE0YUMiNh+DFxdO7I9YVNlYK4Q=
 =0oRs
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging

Net patches

# gpg: Signature made Fri 25 Apr 2014 15:07:31 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/net-pull-request:
  net: Don't use error_is_set() to suppress additional errors
  net: Make qmp_query_rx_filter() with name argument more obvious
  net: xilinx_axienet.c: Add phy soft reset bit clearing
  net/net.c: Remove unnecessary semicolon
  pcnet: remove duplicate assignment
  tap: Avoid extra iterations while closing file fd

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 11:29:03 +01:00
Peter Maydell 4a39cbb034 Some s390x patches:
- gdb stubs to make it compile if gdb support is pulled in
 - linux-headers update for new oneregs
 - two onereg enhancements
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTWko2AAoJEN7Pa5PG8C+v4EIP/2+tCVaNV03OcdHrXWezOsaV
 +gkPp0F6csHQG2HxznoIV/IlZIdN8OyH3QqzUkVP585dfw7nyogZ3IbuFXxwfKPu
 umn9e63VfUnlZVkVNG0wVl0UXIo9nyvoS4XQkywni44BEgniGctQBoxNkKXiXVun
 JRYRLpaBcB3QxDVT1sGYkIIfcKw5MOct6bICVaS1IHj0gy7vh/T9mtrqnR4cnJao
 UzIurB6rSa2G8HaOKG9V17WdSE4IDfV/Rs3+Vn/a7ckXDqM+r/ki+VAWkSud8h+7
 +PxpH+MThG3XfYQDJ3K67LVzKYj1Tyq97sAO5/e48M15TRZ7+yk8qcBeplA9ZTv9
 IJzKzAZRRet+e6HCtrB1V+yMqVb/spX9BGzDn2oaq5dxBL82r1fN5rtgSXm56dsJ
 Zw08mhQd7pXRTDBMBxXfYj0BSjCphyA2uXFGXBBOp1S9f8hEa7DwPgKwkAC963yh
 rQGKTkSchVwayQb0yhfL8yT30T/K/PfWFvkB/ot4ZT6F7rm5CvJrseCLh6MXm+8G
 ql3yBNkJ9B/DjX6O7yirq3cxV7FfEjN5M4eISH+87YrK97/MzfEEXdaO1GwLUv4w
 l5vc1aJ0DjrtROecl6zz7EfI8g4WIUNZntX3JAbxmCEHuIsaYHdmc604mnVFNeIY
 wrcxrVQ+pwfC+fMKsdDa
 =uy70
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20140425' into staging

Some s390x patches:

- gdb stubs to make it compile if gdb support is pulled in
- linux-headers update for new oneregs
- two onereg enhancements

# gpg: Signature made Fri 25 Apr 2014 12:42:46 BST using RSA key ID C6F02FAF
# gpg: Can't check signature: public key not found

* remotes/cohuck/tags/s390x-20140425:
  s390x/kvm: sync gbea and pp register
  s390x/kvm: rework KVM synchronize to tracing for some ONEREGS
  linux-headers update
  s390x: empty function stubs in preparation for __KVM_HAVE_GUEST_DEBUG

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 10:51:32 +01:00
Markus Armbruster 172fc4dd33 iscsi: Don't use error_is_set() to suppress additional errors
Using error_is_set(errp) that way can sweep programming errors under
the carpet when we get called incorrectly with an error set.

Commit 24d3bd6 added a broken error path to iscsi_do_inquiry(): it
first calls error_setg(), then jumps to the preexisting error label,
where error_setg() gets called again, triggering an assertion failure.

Commit cbee81f fixed this by guarding the second error_setg() with an
error_is_set().

Replace this fix by a simpler and safer one: jump right behind the
second error_setg().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:06 +02:00
Markus Armbruster f70edf9948 blockdev: Clean up fragile use of error_is_set()
Using error_is_set(ERRP) to find out whether a function failed is
either wrong, fragile, or unnecessarily opaque.  It's wrong when ERRP
may be null, because errors go undetected when it is.  It's fragile
when proving ERRP non-null involves a non-local argument.  Else, it's
unnecessarily opaque (see commit 84d18f0).

The error_is_set(errp) in internal_snapshot_prepare() is merely
fragile, because the caller never passes a null errp argument.

Make the code more robust and more obviously correct: receive the
error in a local variable, then propagate it through the parameter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:06 +02:00
Markus Armbruster 92de901290 nbd: Use return values instead of error_is_set(errp)
Using error_is_set(errp) to check whether a function call failed is
fragile: it breaks when errp is null.  Check perfectly suitable return
values instead when possible.  errp can't be null there now, but this
is more robust and more obviously correct

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:06 +02:00
Markus Armbruster 4399c438a4 qemu-img: Consistently name Error * objects err, and not errp
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:06 +02:00
Markus Armbruster 0fb6395c0c Use error_is_set() only when necessary (again)
error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out.  Unnecessarily hard for
optimizers, static checkers, and human readers.  Commit 84d18f0 dumbed
it down to obvious, but a few more have crept in since, and
documentation was overlooked.  Dumb these down, too.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:06 +02:00
Kevin Wolf a28315ebaf block: Expose host_* drivers in blockdev-add
All the functionality to use the host_device, host_cdrom and host_floppy
drivers is already there, they just need to be added to the schema.

The block driver names containing underscores are preexisting and cannot
be changed without breaking command line compatibility.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:06 +02:00
Kevin Wolf 460787605e MAINTAINERS: Add qemu-img/io to block subsystem
qemu-img and qemu-io were not covered by any MAINTAINERS entry so far.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:05 +02:00
Fam Zheng 9974ad40bf qemu-iotests: Improve and make use of QMPTestCase.wait_until_completed()
This eliminates code duplication.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:05 +02:00
Stefan Hajnoczi d1db760d7b doc: add -drive rerror=,werror= to qemu --help output
These options are already documented on the man page but missing from
qemu --help.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2014-04-25 18:05:05 +02:00
Benoît Canet 1ba4b6a553 block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file.
In 1.7.1 qcow2_create2 reopen the file for flushing without the BDRV_O_NO_BACKING
flags.

As a consequence the code would recursively open the whole backing chain.

These three stack arrays would pile up through the recursion and lead to a coroutine
stack overflow.

Convert these array to malloced buffers in order to streamline the coroutine
footprint.

Symptoms where freezes or segfaults on production machines while taking QMP externals
snapshots. The overflow disturbed coroutine switching.

[Resolved conflicts on qemu.git/master since the patch was against v1.7.1
--Stefan]

Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 18:05:05 +02:00
Stefan Hajnoczi 0b9f0e2fd7 monitor: fix qmp_getfd() fd leak in error case
qemu_chr_fe_get_msgfd() transfers ownership of the file descriptor to
the caller.  Therefore all code paths in qmp_getfd() should either
register the file descriptor somewhere or close it.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 11:41:41 -04:00
Qiao Nuohan 1b7a0f758b HMP: support specifying dump format for dump-guest-memory
Dumping guest memory is available to specify the dump format now. This patch
adds options '-z|-l|-s' to HMP command dump-guest-memory to specify dumping in
kdump-compression format, with zlib/lzo/snappy compression. And without these
options ELF format will be used.

The discussion about this feature is here:

http://lists.nongnu.org/archive/html/qemu-devel/2014-03/msg04235.html

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> (on s390x/kvm)
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 11:18:33 -04:00
Qiao Nuohan c20499d985 HMP: fix doc of dump-guest-memory
Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 11:17:38 -04:00
Eduardo Habkost c3481247e5 qmp: object-add: Validate class before creating object
Currently it is very easy to crash QEMU by issuing an object-add command
using an abstract class or a class that doesn't support
TYPE_USER_CREATABLE as parameter.

Example: with the following QMP command:

    (QEMU) object-add qom-type=cpu id=foo

QEMU aborts at:

    ERROR:qom/object.c:335:object_initialize_with_type: assertion failed: (type->abstract == false)

This patch moves the check for TYPE_USER_CREATABLE before object_new(),
and adds a check to prevent the code from trying to instantiate abstract
classes.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Tested-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 11:08:34 -04:00
Markus Armbruster 9083da1d4c net: Don't use error_is_set() to suppress additional errors
Using error_is_set(errp) that way can sweep programming errors under
the carpet when we get called incorrectly with an error set.

qmp_query_rx_filter() breaks its loop when it detects an error.  It
needs to set another error when the loop completes normally.

Return right away instead of merely breaking the loop.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 15:58:07 +02:00
Markus Armbruster 638fb14169 net: Make qmp_query_rx_filter() with name argument more obvious
With a client name, the QMP command is specified to return a list of
one element.  This isn't locally obvious in the code.  Make it so.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 15:58:07 +02:00
Hani Benhabiles 2da1b3abbc monitor: Add device_add and device_del completion.
Also fix device_add completion including non-hotpluggable devices.

Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:37:12 -04:00
Hani Benhabiles bfa40f77af monitor: Add command_completion callback to mon_cmd_t.
Convert object_add and object_del commands to use the new callback.

Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:27:49 -04:00
Hani Benhabiles f7bdc41acc monitor: Fix drive_del id argument type completion.
Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:59 -04:00
Cole Robinson 073a341151 error: Remove some unused headers
Makes it a bit clear how the interdependencies work.

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:59 -04:00
Cole Robinson 0b15abfcbc qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED
The former is only used twice, the latter is used over 30 times, and
has a nicer error message.

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:59 -04:00
Cole Robinson f231b88db1 qerror.h: Remove QERR defines that are only used once
Just hardcode them in the callers

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:59 -04:00
Cole Robinson d73f0beadb qerror.h: Remove unused error classes
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:59 -04:00
Cole Robinson 4ad417baa4 error: Print error_report() to stderr if using qmp
monitor_printf will drop the requested output if cur_mon is qmp (for
good reason). However these messages are often helpful for debugging
issues with via libvirt.

If we know the message won't hit the monitor, send it to stderr.

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:58 -04:00
Cole Robinson 4a66d3bf9a monitor: Remove unused monitor_print_filename
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:58 -04:00
Cole Robinson d876f60d14 error: Privatize error_print_loc
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:58 -04:00
Cole Robinson 027a79c373 vnc: Remove default_mon usage
These errors don't seem user initiated, so forcibly printing to the
monitor doesn't seem right. Just use error_report.

Cc: Anthony Liguori <aliguori@amazon.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:58 -04:00
Cole Robinson 02d1608980 slirp: Remove default_mon usage
These errors don't seem user initiated, so forcibly printing to the
monitor doesn't seem right. Just use error_report.

Drop lprint since it's now unused.

Cc: Jan Kiszka <jan.kiszka@siemens.com>

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25 09:19:58 -04:00
Peter Maydell 411f491e0a target-alpha queue pull for 20140424
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTWWmXAAoJEK0ScMxN0CebsZkIANjGnHRgWcrTOBqsjFZ0liaH
 1QtQPW4iCoTv+LmyW9BD2xWZGeGvst/sE6mpFCIu2Rp6F4ZUVpsmoKJt8KSXmWhS
 SfX1qc/yOIo1/zq5gNl5e9aQXqey8qmq3sTRuSowVQ9T8+r7Rhs0bRgg5Q3SCqrk
 gfb/EzzzfXUw/618vyOy6OReetL0ueZswyXFchnVl33NqnELz9Qf5J+eaxw/5vx1
 t+eQ36HifAAz0VUkEE5rSfkX7+Uu8/XzmYZsao3f+MxJPjU78tvZs+i1QdZv4GC+
 B0FYEGx6jXBZYeCfZ4ZlMXM2flu3tiB32ZANATrxV9iOvKk1fyDRTqdMucSuPr0=
 =o672
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/tgt-axp-pull-20140424' into staging

target-alpha queue pull for 20140424

# gpg: Signature made Thu 24 Apr 2014 20:44:23 BST using RSA key ID 4DD0279B
# gpg: Can't check signature: public key not found

* remotes/rth/tags/tgt-axp-pull-20140424: (40 commits)
  target-alpha: Remove cpu_unique, cpu_sysval, cpu_usp
  target-alpha: Tidy alpha_translate_init
  target-alpha: Don't issue goto_tb under singlestep
  target-alpha: Use non-local temps for zero/sink
  target-alpha: Use extract to get insn fields
  target-alpha: Convert mfpr/mtpr to source/sink
  target-alpha: Convert gen_cpys et al to source/sink
  target-alpha: Convert gen_fcvtlq/ql to source/sink
  target-alpha: Convert gen_fcmov to source/sink
  target-alpha: Convert gen_bcond to source/sink
  target-alpha: Convert most ieee insns to source/sink
  target-alpha: Convert gen_ieee_input to source/sink
  target-alpha: Convert MVIOP2 to source/sink
  target-alpha: Convert ARITH3 to source/sink
  target-alpha: Convert FARITH3 to source/sink
  target-alpha: Convert FARITH2 to source/sink
  target-alpha: Convert gen_zap/not to source/sink
  target-alpha: Convert gen_ins_h/l to source/sink
  target-alpha: Convert gen_ext_h/l to source/sink
  target-alpha: Convert gen_msk_h/l to source/sink
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-25 13:25:22 +01:00
Nathan Rossi f663faac3e net: xilinx_axienet.c: Add phy soft reset bit clearing
Clear the BMCR Reset when writing to registers.

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
[ PC:
 * Trivial style fixes to commit message
]
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 13:40:10 +02:00
Igor Ryzhov b925965294 net/net.c: Remove unnecessary semicolon
Signed-off-by: Igor Ryzhov <iryzhov@arccn.ru>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 13:40:04 +02:00
Prasad Joshi 16cf0b2b34 pcnet: remove duplicate assignment
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 13:40:03 +02:00
Pankaj Gupta 13a12f869b tap: Avoid extra iterations while closing file fd
Avoid iterations for fd 0, 1 & 2 when we are closing file fds in child process.

Signed-off-by: Pankaj Gupta <pagupta@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25 13:40:03 +02:00
Peter Maydell 7931b05987 Block patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTV4+1AAoJEH8JsnLIjy/Wx+wP+gJfhqxu8VJghro3YD1idhre
 iGBlKRWkkNqQmKNRV7coN2qb9rAEtHOPTkdlbYFSCd+mg/1vhZVS79wLa4jpwCMJ
 sfP4pmeJRj4XT2/3aFGuI3cLPMpZHD+lXMsldt+0f/tcmcF5LUHas+ss6grk52fb
 /u4WKPxl+BRc1zXRFXYTBVZyX2x2RaS0gUL0HTzXd9cXY76eXDyONKXsGUREgHE3
 O+paV6b4m8Hfnvahce5lM1Gz6wXUXk7JM9ZiQdZXqTe0Cnz9bjfhuMNTPlNlzWio
 TAnjBBEM2yLgwT9oPt6liMviPeb1NdY0m+SIhu+yrSqnxUto5AfMt3JawV8njP42
 TemQv4uGHUu60rSFb7MaPXkzzR3XoTMEAy2U2jXLeXgAfAfqdUhE3gcHwSDU6ctv
 Oxh7eWVoWzxJ92cUe88XMCv+KlQFZteF3WHYQZmPCRXJ8fb21W/ZQXtui0+sJArq
 /qjpOiOHk3F+geId3OLWcwHDLUV6GUfR2bLvS8ayQdRIVq2orltJqICnoAiRq4cM
 IwWxrZRlhPaLhnryeGeNS7AkmK0JopIBYTa+3CL7yUBFP8ziPDiQC6qS82dIsXGF
 5emPJux1Wg7qcZ56J21LydnsXjpzAOw9HxQzOBRWpgh8Ougd5NyxVer3UsZx9NAH
 2Dpu2uTqXJsLJq0KAPLZ
 =iitJ
 -----END PGP SIGNATURE-----

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

Block patches

# gpg: Signature made Wed 23 Apr 2014 11:02:29 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"

* remotes/kevin/tags/for-upstream:
  block/cloop: use PRIu32 format specifier for uint32_t
  vmdk: Fix "%x" to PRIx32 in format strings for cid
  qemu-img: Improve error messages
  qemu-iotests: Check common namespace for id and node-name
  block: Catch duplicate IDs in bdrv_new()
  qemu-img: Avoid duplicate block device IDs
  block: Add errp to bdrv_new()
  convert fprintf() calls to error_setg() in block/qed.c:bdrv_qed_create()
  block: Remove -errno return value from bdrv_assign_node_name
  curl: Replaced old error handling with error reporting API.
  block: Handle error of bdrv_getlength in bdrv_create_dirty_bitmap
  vmdk: Fix %d and %lld to PRI* in format strings
  block: Check bdrv_getlength() return value in bdrv_make_zero()
  block: Catch integer overflow in bdrv_rw_co()
  block: Limit size to INT_MAX in bdrv_check_byte_request()
  block: Fix nb_sectors check in bdrv_check_byte_request()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-25 12:22:37 +01:00
Christian Borntraeger 44b0c0bbb5 s390x/kvm: sync gbea and pp register
We also need to sync guest breaking event address and program parameter
register for migration support.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-25 12:59:57 +02:00
Christian Borntraeger 860643bc5a s390x/kvm: rework KVM synchronize to tracing for some ONEREGS
Some ONE_REGS on s390 are not protected by a capability. Older kernels
might not provide those and return an error. Fortunately these registers
are only critical for the migration path. There is no need to error out
on reset and normal runtime. Furthermore, these kernels don't provide
a proper dirty bitmap anyway, so let's use tracing for those errors.

Also provide generic one reg helper to simplify the code.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-25 12:59:57 +02:00
Cornelia Huck 9ffd26859d linux-headers update
linux-headers update against v3.15-rc2 (a798c10f)

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-25 12:59:57 +02:00
David Hildenbrand 8c0124490b s390x: empty function stubs in preparation for __KVM_HAVE_GUEST_DEBUG
This patch creates empty function stubs (used by the gdbserver) in preparation
for the hw debugging support by kvm on s390, which will enable the
__KVM_HAVE_GUEST_DEBUG define in the linux headers and require these methods on
the qemu side.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-25 11:07:02 +02:00
Peter Maydell 0e96643c98 usb: mtp filesharing
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTV3m1AAoJEEy22O7T6HE49N4P+QFtqY3HOWbxguzALuRMAnhB
 yZyujJOdC4N5W41kHrC7cG3rK5gLeQ24BcYVJOimreDtD1QRFyz5yC6Rb/FTT9+M
 4ldEO0WwD4bfewej4ax3ptopMGmpin/RgTslYyhq3QKAHICGcjtb9l5CV/ozHuyR
 ZgB7LaZBk49a5RL7QYd9EwcIH3X+5GtnPnDI1qG8IK6/ivvOGYVmPo9fdE5hm0YL
 Y2YO2nnIwgHCPiqlY1YGPwhiwhqiCWlQoumRvidSKDNgWCu2uraAERajgrcmUYBc
 oB8JHW+KTZJ/4JyO2okFVSpq+sSsSCnFlTvIDK6zSdvA4CPuNiFKhoqSkW/2Ioc5
 GZJ5/DLOor1kzcPbEDiBvosiNtUCWNyI1/UnzFnyc5XJyrfZ0INhR6w1++3N62nT
 w6InjD+BgdpXP+BHtWqnypEwKGXCfXeC8CUD5iUwYyj5mbg+FrTVXCGePk8x8UXP
 zn12MkM8Awh+Dm/EoVnmGKdt+rbT1qUu3cB+DSyuFNfFUT7FrwVvfmwOYv1FfJ2h
 I34jHw6r+GvV4awAdzNibT24/vQw+82iOPOzzo8RZpL65OEne/v+mrsyXl5GDiGG
 rW4TwO+2R717PpD5cmji/DO1BtkgmjjP/nkzHbnvPPq4S46PpinzDEICQ3WputeB
 oP8VESG0/3os3cIeCoB2
 =KDFB
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-5' into staging

usb: mtp filesharing

# gpg: Signature made Wed 23 Apr 2014 09:28:37 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-usb-5:
  usb: mtp filesharing
  usb: add CompatibleID support to msos

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-24 16:16:57 +01:00
Peter Maydell ad600a4d49 Pull tcg 2014-04-22
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTVthUAAoJEK0ScMxN0Ceb5OUH/0Ri4engOQim3mV1jAOr2Vca
 3zg+Hl8b+UioXD0se24Iipr6s+02G1DApbbLPX7DZAnoh9jEBvDtHOdde3pNbMkQ
 jcTpShTyT7OKSsklRN19ckvk0ffBch5W3Ekkw6/Hg6ys2HIvirRpEL6R58oJNlP6
 xcCkQZISZVkakbv5xft8YQo1v8wnU5q2l85OaC1aaDB6g+Y6ZgoA1qkWjqlHkmQk
 1asflfbC0r5ke+yx7vz6310f5xBDLSVv17dqsDUr70o1m/6bem6wQXMczwmYUfk5
 99OCPiqdiCZLJyVFvIvfwSakL9Bq/nvnmywXTkrB7rovk5VZz3gc4sJkuUkL+KM=
 =URV1
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/tcg-next-20140422' into staging

Pull tcg 2014-04-22

# gpg: Signature made Tue 22 Apr 2014 22:00:04 BST using RSA key ID 4DD0279B
# gpg: Can't check signature: public key not found

* remotes/rth/tags/tcg-next-20140422:
  tcg: Use HOST_WORDS_BIGENDIAN
  tcg: Fix fallback from muls2_i64 to mulu2_i64
  tcg: Use tcg_gen_mulu2_i32 in tcg_gen_muls2_i32
  tcg: Relax requirement for mulu2_i32 on 32-bit hosts
  tcg-s390: Remove W constraint
  tcg-sparc: Use the type parameter to tcg_target_const_match
  tcg-ppc64: Use the type parameter to tcg_target_const_match
  tcg-aarch64: Remove w constraint
  tcg: Add TCGType parameter to tcg_target_const_match
  tcg: Fix out of range shift in deposit optimizations
  tci: Mask shift counts to avoid undefined behavior
  tcg: Mask shift quantities while folding
  tcg: Use "unspecified behavior" for shifts
  tcg: Fix warning (1 bit signed bitfield entry) and replace int by bool

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-24 15:24:52 +01:00
Peter Maydell ba3627ec38 Pull for 20140421
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTVU30AAoJEK0ScMxN0CebrMgH/16I+uED2phrizgnbAYngwA0
 ZS8BpImCpg84KGXOVR7dlaUKhESFTfqrOHyFNycpq417ig32euvLhxleEFFcflsJ
 oKTCsfxqcXyAgNjxuNKObafJ1mNrgtNm8vj8n0kpd8Suzn8j/DXawLrIG1KzSuKz
 eoJJyLBhVouahKs7gaFRh6p2URpU5qx0hD8wmg0ljZ/+51mvWDKPnxD6TEpWCMDR
 UvlBw+vjYc5+nr8B/nKEE+I5O1NRtJsAPEpYi2NeJhkC9b8j2GMaOu9q6FSZPkE2
 8xsVIO3Qu9rO1porxSPJIuCsK8avyu77+12Co4zOuxCpGYMPlIHC35trsww+muA=
 =DkMn
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/tcg-ia64-pull-20140421' into staging

Pull for 20140421

# gpg: Signature made Mon 21 Apr 2014 17:57:24 BST using RSA key ID 4DD0279B
# gpg: Can't check signature: public key not found

* remotes/rth/tags/tcg-ia64-pull-20140421:
  tcg-ia64: Convert to new ldst opcodes
  tcg-ia64: Move part of softmmu slow path out of line
  tcg-ia64: Convert to new ldst helpers
  tcg-ia64: Reduce code duplication in tcg_out_qemu_ld
  tcg-ia64: Move tlb addend load into tlb read
  tcg-ia64: Move bswap for store into tlb load
  tcg-ia64: Re-bundle the tlb load
  tcg-ia64: Optimize small arguments to exit_tb

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-24 14:14:51 +01:00
Peter Maydell 4b8abfb78e trivial patches for 2014-04-18
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJTUMffAAoJEL7lnXSkw9fb5YQH/1SHIUFYl85Z/qIXQppcLQXm
 Og32R7N82Z+E/FSBCuYWXB2Xo9jih4Pfn49A5tMyoITYQkrhNpHx3iXbZ2Ggk8/S
 FmD5Uuc3lCfhfldDyfKtKGMli0CYsxXfBKupUTrImHEGeQ4WSU8fkzuQy6MP9W+m
 HCms7nVXBgNqJ6mWBHkSgcXWbiKCPcfCJ5AvFQYDWHV83OF43jPnttXzKw/0ZNtZ
 COLW9j5KdFHerQx02mFOT0Ne8TUgEEUgihaKm5fJqaSZ6+xAA7LuHnSdXrRCyMOQ
 m9lY6WTQjf4XlSc4C13cAXSGgxfLeh8//DUa72huRuVMNRD66TGizoqlrS2NKuM=
 =AXjD
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-04-18' into staging

trivial patches for 2014-04-18

# gpg: Signature made Fri 18 Apr 2014 07:36:15 BST using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514  66A7 BEE5 9D74 A4C3 D7DB

* remotes/mjt/tags/trivial-patches-2014-04-18:
  Fix grammar in comment
  doc: grammify "allows to"
  configure: Remove redundant message for -Werror
  scripts: add sample model file for Coverity Scan
  xbzrle.c: Avoid undefined behaviour with signed arithmetic
  int128.h: Avoid undefined behaviours involving signed arithmetic
  hw/ide/ahci.c: Avoid shift left into sign bit
  net: Report error when device / hub combo is not found.
  configure: Fix indentation of help for --enable/disable-debug-info
  qga: trivial fix for unclear documentation of guest-set-time
  vl: Report accelerator not supported for target more nicely

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-24 13:22:16 +01:00
Stefan Hajnoczi 370e681629 block/cloop: use PRIu32 format specifier for uint32_t
PRIu32 is the format string specifier for uint32_t, let's use it.
Variables ->block_size, ->n_blocks, and i are all uint32_t.

Suggested-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-23 11:34:10 +02:00
Gerd Hoffmann 840a178c94 usb: mtp filesharing
Implementation of a USB Media Transfer Device device for easy
filesharing.  Read-only.  No access control inside qemu, it will
happily export any file it is able to open to the guest, i.e.
standard unix access rights for the qemu process apply.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-23 10:28:14 +02:00
Fam Zheng 9b17031ac4 vmdk: Fix "%x" to PRIx32 in format strings for cid
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22 14:14:30 +02:00
Fam Zheng ac1307abfe qemu-img: Improve error messages
Previously, when there is a user error in argv parsing, qemu-img prints
help text and exits.

Add an error_exit function to print a helpful error message and a hint
to run 'qemu-img --help' for more information.

As a bonus, "qemu-img <cmd> --help" now has a more reasonable exit code
0.

In the future the help text should be split by sub command, and only
print the information for the specified command.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22 13:47:46 +02:00