Commit Graph

35755 Commits

Author SHA1 Message Date
Markus Armbruster e218052f92 aio / timers: De-document -clock
Commit 6d32717 "aio / timers: Remove alarm timers" has issues:

1. It silently ignores -clock for backward compatibility.
Incompatible change: -clock help no longer terminates the program.
Tolerable.

2. Failed to update option documentation.  In particular, -help still
advises users to try -clock help for available timers.  Drop all
documentation on -clock.

3. The 'query-alarm-clock' example in docs/writing-commands.txt no
longer works, and needs to be redone.  Can't do that right now, so I
just stick in a FIXME.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-27 16:11:45 +01:00
Bin Wu 024d9adc79 hw/scsi/virtio-scsi.c: fix the "type" use error in virtio_scsi_handle_ctrl
The local variable "type" in virtio_scsi_handle_ctl represents the tmf
command type from the guest and it has the same meaning as the
req->req.tmf.type. However, before the invoking of virtio_scsi_parse_req
the req->req.tmf.type doesn't has the correct value(just initialized to
zero). Therefore, we need to use the "type" variable to judge the case.

Cc: qemu-stable@nongnu.org
Signed-off-by: Bin Wu <wu.wubin@huawei.com>
[Actually make it compile, "type" must be uint32_t in order to pass
 it to virtio_tswap32s. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-27 16:11:45 +01:00
Ting Wang b7890c40e5 virtio-scsi: sense in virtio_scsi_command_complete
If req->resp.cmd.status is not GOOD, the address of sense for
qemu_iovec_from_buf should be modified from &req->resp to sense.

Cc: qemu-stable@nongnu.org
Signed-off-by: Ting Wang <kathy.wangting@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-27 16:10:53 +01:00
Chao Peng 9aecd6f8ae target-i386: add Intel AVX-512 support
Add AVX512 feature bits, register definition and corresponding
xsave/vmstate support.

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-24 18:03:14 +02:00
Paolo Bonzini c6561586f0 get_maintainer.pl: restrict cases where it falls back to --git
The list emitted by --git-fallback often leads inexperienced contributors
to add pointless CCs.  While not discouraging usage of --git-fallback,
we want to:

1) disable the fallback if only some files lack a maintainer

    $ scripts/get_maintainer.pl -f util/cutils.c hw/ide/core.c
    Kevin Wolf <kwolf@redhat.com> (odd fixer:IDE)
    Stefan Hajnoczi <stefanha@redhat.com> (odd fixer:IDE)

This behavior is taken even if --git-fallback is specified.

2) warn the contributors about what we're doing, asking them to use their
common sense:

    $ scripts/get_maintainer.pl -f util/cutils.c
    get_maintainer.pl: No maintainers found, printing recent contributors.
    get_maintainer.pl: Do not blindly cc: them on patches!  Use common sense.

    Luiz Capitulino <lcapitulino@redhat.com> (commit_signer:1/2=50%)
    ...
    $

Explicitly disabling the fallback will not result in the warning message:

    $ scripts/get_maintainer.pl -f util/cutils.c   --no-git-fallback
    $ echo $?
    0

(Returning 1 would break usage of scripts/get_maintainer.pl as a cccmd
for git-send-email).

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:27 +02:00
Paolo Bonzini 8ad2c0f0f8 get_maintainer.pl: move git loop under "if ($email) {"
All checks in the loop are guarded by that condition, and there is a
handy "if" just below.  Simplify the code.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:27 +02:00
Li Liu 107684c05d qtest: fix qtest log fd should be initialized before qtest chardev
qtest_log_fp should be inited before qemu_chr_add_handlers.
If not the log dumped from callback functions may be lost.

easy to reproduce it by command:
"QTEST_LOG=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
gtester -k --verbose -m=quick tests/qdev-monitor-test"

The log "[I xxxxxx] OPENED" should be printed out by
qtest_event, but does not.

Signed-off-by: Li Liu <john.liuli@huawei.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:27 +02:00
Paolo Bonzini 5dd4a88c37 MAINTAINERS: avoid M entries that point to mailing lists
"L" entries that point to qemu-devel are not much better either, but at least
the get_maintainer.pl output is clearer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:27 +02:00
Paolo Bonzini c0bd0b509b MAINTAINERS: add some tests directories
Low-hanging fruit...

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:27 +02:00
Paolo Bonzini 486bbe5f14 MAINTAINERS: Add more TCG files
Unfortunately, TCG files do not really have a maintainer yet.
But at least there will be fewer unmaintained files.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:27 +02:00
Paolo Bonzini d46d72fd10 MAINTAINERS: add myself for X86
Still not moving it beyond "Odd fixes".  Richard Henderson also has
reviewed a bunch of X86 TCG patches, so add him as well.  All we want
is to avoid that patches fall on the floor.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:27 +02:00
Paolo Bonzini e26082fd0b MAINTAINERS: add Samuel Thibault as usb-serial.c and baum.c maintainer
He wrote "I've written mostly all of usb-serial.c and baum.c, and keep
maintaining them, since I use them regularly."

Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:26 +02:00
Paolo Bonzini da26f37a3e MAINTAINERS: grab more files from Anthony's pile
I am picking up character devices and the main loop, as agreed during
QEMU Summit.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:26 +02:00
Wei Huang e48638fdb3 target-i386: warns users when CPU threads>1 for non-Intel CPUs
Only Intel CPUs support hyperthreading. When users select threads>1 in
-smp option, QEMU fixes it by adjusting CPUID_0000_0001_EBX and
CPUID_8000_0008_ECX based on inputs (sockets, cores, threads);
so guest VM can boot correctly. However it is still better to gives
users a warning when such case happens.

Signed-off-by: Wei Huang <wei@redhat.com>
[As suggested by Eduardo, check for !IS_INTEL instead of AMD. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:26 +02:00
Peter Crosthwaite b591721909 sysbus: Use TYPE_DEVICE GPIO functionality
Re-implement the Sysbus GPIOs to use the existing TYPE_DEVICE
GPIO named framework. A constant string name is chosen to avoid
conflicts with existing unnamed GPIOs.

This unifies GPIOs are IRQs for sysbus devices and allows removal
of all Sysbus state for GPIOs.

Any existing and future-added functionality for GPIOs is now
also available for sysbus IRQs.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:26 +02:00
Peter Crosthwaite 17a96a146c qdev: gpio: Define qdev_pass_gpios()
Allows a container to take ownership of GPIOs in a contained
device and automatically connect them as GPIOs to the container.

This prepares for deprecation of the SYSBUS IRQ functionality, which
has this feature. We push it up to the device level instead of sysbus
level. There's nothing sysbus specific about passing GPIOs to
containers so its a legitimate device-level generic feature.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:26 +02:00
Peter Crosthwaite aef0869e8e qdev: gpio: Remove qdev_init_gpio_out x1 restriction
Previously this was restricted to a single call per-dev/per-name. With
the conversion of the GPIO output state to QOM the implementation can
now handle repeated calls. Remove the restriction.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:26 +02:00
Peter Crosthwaite 15942b6569 qdev: gpio: delete NamedGPIOList::out
All users of GPIO outputs are fully QOMified, using QOM properties to
access the GPIO data. Delete.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:26 +02:00
Peter Crosthwaite b58c303590 irq: Remove qemu_irq_intercept_out
No more users left and obsoleted by qdev_intercept_gpio_out.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:25 +02:00
Peter Crosthwaite 60a79016ae qtest/irq: Rework IRQ interception
Change the qtest intercept handler to accept just the individual IRQ
being intercepted as opaque. n is still expected to be correctly set
as for the original intercepted irq. qemu_intercept_irq_in is updated
accordingly.

Then covert the qemu_irq_intercept_out call to use qdev intercept
version. This stops qtest from having to mess with the raw IRQ pointers
(still has to mess with names and counts but a step in the right
direction).

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:25 +02:00
Peter Crosthwaite 0c24db2b8c qdev: gpio: Add API for intercepting a GPIO
To replace the old qemu_irq intercept API (which had users reaching
into qdev private state for GPIOs).

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:25 +02:00
Peter Crosthwaite 02757df2ad qdev: gpio: Re-implement qdev_connect_gpio QOM style
Re-implement as a link setter. This should allow the QOM framework to
keep track of ref counts properly etc.

We need to add a default parent for the connecting input incase it's
coming from a non-qdev source. We simply parent the IRQ to the machine
in this case.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:25 +02:00
Peter Crosthwaite 8faa2f8571 qom: Demote already-has-a-parent to a regular error
Rather than an abort(). This allows callers to decide whether parenting
an already-parented object is a fatal error condition.

Useful for providing a default value for an object's parent in the case
where you want to set one iff it doesn't already have one.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:25 +02:00
Peter Crosthwaite d3c4931647 qom: Allow clearing of a Link property
By passing in "" to object_property_set_link.

The lead user of this is the QDEV GPIO framework which will implement
GPIO disconnects via an "unlink".  GPIO disconnection is used by
qtest's irq_intercept_out command.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:25 +02:00
Cornelia Huck 4adea8042f virtio-scsi: dataplane: stop trying on notifier error
There's no use to constantly trying to enable dataplane if we failed
to set up guest or host notifiers, so fence it off in that case.
We'll try again if the device is reinitialized.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:25 +02:00
Cornelia Huck 361dcc790d virtio-scsi: dataplane: fail setup gracefully
The dataplane code is currently doing a hard exit on various setup
failures. In practice, this may mean that a guest suddenly dies after
a dataplane device failed to come up (e.g., when a file descriptor
limit is hit for the nth device).

Let's just try to unwind the setup instead and return.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:24 +02:00
Cornelia Huck 6d2c83165b virtio-scsi: dataplane: print why starting failed
Setting up guest or host notifiers may fail, but the user will have
no idea why: Let's print the error returned by the callback.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:24 +02:00
Fam Zheng 3e2b2a9c49 virtio-scsi-dataplane: Add op blocker
We need this to protect dataplane thread from race conditions with block
jobs until the latter is made dataplane-safe.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-23 16:41:22 +02:00
Peter Maydell e40830afa1 qga: remove readdir_r usage and fix use-after-free
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUR6lzAAoJEDNTyc7xCLWE/iYH/jtAEpHxB3dBjq1h1Q3P29qm
 2tKa9FBtZyqzS1epLevQL4lI+TzQCDFtdwh9T61H58kVbLqOEZYDThUNXya58tLw
 3dLqA3bgOyZzaMtxp8K65UMS5Dgq2fi5nY+qmC/vWpoo27fijOEocLCQK49xi/t9
 +YiwA0lNIXV8FggYSn0sfJF9zkeV2gdu5Map98B+JrD3S6+ITaFD4qkyOLtAioAK
 I7IceAFygh9a/mmb4ngZtCLtekyr2UOB9b8Q4m0uitgtH/Qe/wO0Hb2eIaioM4Xj
 O9vpbElKSD/sRAX2zY/DHN+QFeU6EXsrE5kR4qKRMIEjgPyLt3HVP8ZkYmVzL7Q=
 =ksu6
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2014-10-22-tag' into staging

qga: remove readdir_r usage and fix use-after-free

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>

# gpg: Signature made Wed 22 Oct 2014 13:56:19 BST using RSA key ID F108B584
# gpg: Can't check signature: public key not found

* remotes/mdroth/tags/qga-pull-2014-10-22-tag:
  qga: Rewrite code where using readdir_r

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 21:42:33 +01:00
Peter Maydell 6de4e7fdf6 TriCore ABS, ABSB, B, BIT, BO instructions added
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCgAGBQJURo4kAAoJEArSxjlracoUmtsP/i4F+nXQ7+kRP0GFM8qdilRv
 x5t1q3wKWfjYOk5z0/gQ0Tz3ojjfR6N95tDZIbv2iuBpPHW54sgnmvUeIMgGudjd
 GdDv9alrVw/pCRmGWaZI5SBCxXYBIxIdOjav8PQ4xWE3xrKSnVC9fDxMB4X6GS5X
 YF2TEaa5IK4vrvZvkimiNUYBcMxbiv+6latTfpeivu0CBu8F0JLcQLt6D9ysaLHL
 s5MzCgIMqAZDCXU5JwqlBYDIswUCSzYiuBzb/zEPnI8vYWuXx65ObgGVoXJAkBL0
 WwRykeN9Ofbl2E2OomA9CWzTSJFCFSurDQxr/TPkkO2KD0VAoAArkItxSs2mSQ0U
 FS556zvsruUchItD+qjN3AoLnsGkjkUVxNoQsQPJptEb51Cbt0AQVeHX/vboUqDM
 fjQcAKy5NK1BWPyRS5agHe5g9nI8+XpR4CS7xoNRSq4PwdVzcxCmookysI4rulJQ
 /YOjDO44V5NRBn1qd61j7hQiSGXCk0dfQXhp2G0i+VwfJ0beSRT3fUyBXo1PXD/x
 XfJWTy0cwRdaGk7Ha7wgxn/dQstMPf3SRleOJ+CnhCcflS88294DtuyU0CmmSkEy
 XGDMLbXet6hRIjbvtPmyh03hdhydJzOCO5MtOgSPHUTqBaOFQC83wIHcVDH58jUR
 faVrffo/ivwfZq0Y7RhM
 =imlc
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-20141021' into staging

TriCore ABS, ABSB, B, BIT, BO instructions added

# gpg: Signature made Tue 21 Oct 2014 17:47:32 BST using RSA key ID 6B69CA14
# gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>"

* remotes/bkoppelmann/tags/pull-tricore-20141021:
  target-tricore: Add instructions of BO opcode format
  target-tricore: Add instructions of BIT opcode format
  target-tricore: Add instructions of B opcode format
  target-tricore: Add instructions of ABS, ABSB opcode format
  target-tricore: Cleanup and Bugfixes

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 18:43:35 +01:00
Peter Maydell 60b6381ffb add missing s390x files to MAINTAINERS
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJURjwIAAoJEN7Pa5PG8C+v5SsQAIwC2ka1xFKT3KOMAoo7nrRN
 Iy8SLrzZoRXDdzZ+yg2EEcS9u34qtHxpmLf/iKaezFfBgH5kGhVSQ3PyN4YWHsFB
 b2PFXU80A37deoZFyracS2smaejnj+68J6IBGICIeYbMiL7GVnnPEVkEUzZDb0rG
 jG3sDJ71hNuRGmIP6IIgaoi7kWngGKAc9QcrhIvOWcI1XJXbKFKNs0TiBEuxnhY/
 Yjr+2RvGyUusX0kN4nFGT8/mKCRDnCNBZuipJFsqNi6OY6v4zkE1vbQ0KaK/ZGk+
 XKhsJ+Pe8XHiGerEwITKvWTS7pUO1i+iDxS+0VDLd6ktKTC7fjLR0zSOszjB8Sfo
 6BFoqkJoEj0TrDhBX8aplWJb+ZRk61KAOHYPJcjlAdfLCFCobk3ycX7syc9Fdo8z
 wq0dvlllJu0nBOS8ePs7BISfYfD0JqVmi33UmQ2VuyOp7Nya8KizvYdp/BNxSQr+
 WSvOrmxPplUsx0tkotFv6C2eVq3bG/nGehK+1ODOf1s7SAYdfU79wFZxKz4mj0Ic
 cxPtdbvrffGYqIPJxgxG26DEBNjbxysr0VAMmllc1LVuaE2cBJOcmg2XaAU0wWLu
 dq3GFHt9b80iROu0mH4kEc8b8YsHlz5xa+MhvL4I2BZrHh+Dm3Tpr0KLF7lLaSgM
 AkWRviP9JawKB+AJWTXx
 =1pzi
 -----END PGP SIGNATURE-----

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

add missing s390x files to MAINTAINERS

# gpg: Signature made Tue 21 Oct 2014 11:57:12 BST using RSA key ID C6F02FAF
# gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"

* remotes/cohuck/tags/s390x-20141021:
  s390x: sweep up unmaintained files

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 18:41:38 +01:00
Peter Maydell 8f4699d873 Block patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJURPo5AAoJEH8JsnLIjy/WK1gP/2PhKD4lsjQ0O9TYlwu2aWCc
 eej/z2wp47996KAkhRgS4mf/E0FnPSh80cHV1wobPJfRSTPPNuGgrmhX+HLcjlPz
 fWb3qN6Ikneou1TYCO/r1wMwhPpE1GKjZmuHQcH3B27GW5cqx/s1sPCxqwDJJnYq
 oBbbcIGZGNYLHlyJvl88gBTkIHBs5/nxhzVnPnpQi6JqtGz8CAbo6e36A5RQCqyV
 RoYEe5Lif81lZpaTpYFsoUhOcH9YtQnKoUSdAnqtXtLO9fOHsn7/75hnmT4bs5CR
 p6UAiutN+jiUcRrlF//TK5TNlS7KvOAf+LirEURAY0j5IJNXh30/5x8hXzHJxb60
 eY6ePrhnbkPeLfg1Qh/7LJyi/W0cl2YN6I2oslnMUfcumu9Ns1FfsFrFpKtgT/yM
 fkjQEo7w9khKT+iZaOm1XaNDliUKZiG2wLhni6KYAGM2edmE8W7VCkjSTFcz/4eQ
 vn7G3T1OnglW1cSt0onTAKNWn2swh0lXOXv7iBupmiNoy+hafNwTa1eHw+jjvXeF
 3WdfMxT6fRKAQUC/hwVlvyeJcZyBMG11BuovX9gNgdx5/UpWJFjxHsEmbiP9TtkO
 CJ5dGi+PgM/fxLJj4IW0zSVSL+mnhQmQdtzksU+l4GBHuErXdkt9W61sOHHQJGTf
 NGIkh6DwV4VfFZd6bzf0
 =8BaC
 -----END PGP SIGNATURE-----

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

Block patches

# gpg: Signature made Mon 20 Oct 2014 13:04:09 BST using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"

* remotes/kevin/tags/for-upstream: (28 commits)
  block: Make device model's references to BlockBackend strong
  block: Lift device model API into BlockBackend
  blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend
  block/qapi: Convert qmp_query_block() to BlockBackend
  blockdev: Fix blockdev-add not to create DriveInfo
  blockdev: Drop superfluous DriveInfo member id
  pc87312: Drop unused members of PC87312State
  ide: Complete conversion from BlockDriverState to BlockBackend
  hw: Convert from BlockDriverState to BlockBackend, mostly
  virtio-blk: Rename VirtIOBlkConf variables to conf
  virtio-blk: Drop redundant VirtIOBlock member conf
  block: Rename BlockDriverCompletionFunc to BlockCompletionFunc
  block: Rename BlockDriverAIOCB* to BlockAIOCB*
  block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()
  block: Merge BlockBackend and BlockDriverState name spaces
  block: Eliminate BlockDriverState member device_name[]
  block: Eliminate bdrv_iterate(), use bdrv_next()
  blockdev: Eliminate drive_del()
  block: Make BlockBackend own its BlockDriverState
  block: Code motion to get rid of stubs/blockdev.c
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 16:39:49 +01:00
Peter Maydell 895b810c12 usb: add high speed mouse & keyboard configuration
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJUPl2cAAoJEEy22O7T6HE4HikP/Aoq2JHGLtEqQKzS/hH3+T7C
 FA2vyneUWKAZN5JMMArOTmIhL5lZJ4nxi6lD4+lX88RLvn2RC7mSxwE9tH412jKO
 d093y6WEpTmXfNN5uP2sy2RXr4DF+Hc2nCozMTGgnjFk5D+YN2iAEExy0UyDOmFZ
 xBbvVs61YyuC6EIGpr1gY/R7yxsflZS5KfbbhZt4sBmd9X6khXzKif3gLkIMF1SB
 jBg8zXTlnfaiFerso72sW+zRCKcK/UmwaC0lg8clIGp5s7tPRFM/6njaEHDzSYr8
 4Sgjx1qHoN5uq89W0SnKFPUbYHMZ4jkDCSN88wLmCQhJzuymoHH94SXhj9hNhhRC
 r0RUjBSGxuvwqEQImknHZ8Yis62hySK/TE8aFCEB9OB2L+4kUOxJMdDmy7E5O4vT
 anzvkL7MHOEgHc5M+T0dIzRlF/4OaHMZ4eRXe76AqqHGAa2jK8JpNYuweNjDLUJ9
 tcSS0EzLb2sZlM9eMn5xzTh1gZqoARqiWE6Q3vYyCMJgLor3IsYSC2eaL3mVezxb
 JtKEFycR1PLIEOiKC8aw0HFf3bsUhhQLYdawipSpRUNSW4143/YRcYYXB5jljuHY
 61ylv9JeRGcqzLKwmUVIsn41xDOFthnOWtC1d+y+uZ1HGk04v7K+tMyJEd6knQwd
 Ro1SUYPn/bIfGoB+AHBY
 =oWcL
 -----END PGP SIGNATURE-----

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

usb: add high speed mouse & keyboard configuration

* remotes/kraxel/tags/pull-usb-20141015-2:
  xhci: remove dead code
  usb-hid: Add high speed keyboard configuration
  usb-hid: Add high speed mouse configuration
  usb-hid: Move descriptor decision to usb-hid initfn

Conflicts:
	include/hw/i386/pc.h
[Fixed trivial merge conflict in the pc-2.1 property list]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 15:48:32 +01:00
Peter Maydell 19f3772995 qxl: keep going if reaching guest bug on empty area
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJUPlBRAAoJEEy22O7T6HE4JsUP/2h5qgXitZCQGuc3p4pR08IQ
 LGIAWKNVuCKJXexd4EqYaAeQBC6u49WyfTviyoFKEoKE2A4/1vQ447zrnkCNhHyX
 rngLT6QDUrMX2lSUvhohl1EIaXmfEB7Fhwb8yTRFnTDrN3KYASSmoIklo7L3kx7R
 z1LHRY04hyOqUtOUY4jYBXko0pQwA+wpX9LC1ZisLUCW6/VHctdYYF/rRPHrC5EH
 yRxRn6g0vfcgdZt583mrxJLZ8pVz6wBbveoIZ0R7ThIFI33PVFTwTZ4u4Q8Rb+gS
 +0pDwwfUFUazfK64Si2KKaeFxInTcelKrN45dVbukf0grHIbR1u+5JEo5+2ofVKJ
 h3BcDyJOBVny2lwxwW+jQdBaq8ARn9/6E6jB3vf947/DWwB71okkxWA8HeqWmlI6
 6M+8DczxmaZ6l5glpcnNKsY/RYYOVP9GyvoFomVQHnmFPozVlzzZDpuFDgnEJgSS
 PK4BZd8VvLLTpWD+8f4kIiY0wdpTuiloQO126zIar5jHfw/JT4/DFh2PuJObfmLd
 WugQ0v3j/CB0dQAi5eGHAv5eZp4H7ZsjwoKiTgpPLFjXFfntfU9cr0EFsyKX5sz4
 5mxcsjAEXs6/1z46PPZE98SDyNKubnKKsr85RyTEa7Jee0ou3oK+ATBRpDJsIyH8
 YxE3Zd/wYj0pmvqOhh4w
 =tb6i
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20141015-1' into staging

qxl: keep going if reaching guest bug on empty area

# gpg: Signature made Wed 15 Oct 2014 11:45: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/spice/tags/pull-spice-20141015-1:
  qxl: keep going if reaching guest bug on empty area

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 14:49:37 +01:00
Peter Maydell 4b4ce6c2b8 gtk: fix memory leak, add pause key support.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJUPkzPAAoJEEy22O7T6HE4c7kQAKY6VYxQbtRQxhU5H4Il2f2X
 q2J+/0JZa6oeB3cSLztGiB3N+Rdt9Hdj8wpCI1AP70L9jerpTn7zoO6knalySYc9
 vVPJbNbyrMv5ABlJrQ2Ls3k+UDJF2Kusb+Nxk5TIKkG1O+ys4wXL3vdW3/PjX6MO
 nOGkRz7nzmFnXmxos6ziltWleQXggI46YpomMFukOlh2p7uOf4dMUG7QcW4GgGza
 xCF2nqpLJAjyYWSQGP5YqH0/laa7yyQd9UWPZ0fqk7xEbFTccU+eGo9wqSs3DY1N
 pza0iVBAx8hgS38g5zzLoq4pWlLL7W2vlljIBpAIIWPA43Tmhs90z0pPlSuMmwe5
 Xtv4r7KWd5I5dYtxBD6OYbVhgx+lF92cw2/mdKx2AOa+11xNqPaMZQ5RJ4ExajWP
 u5u9gzm0ZSl1aTyKZt0SV4s9ljnaHf1QKeMqc75t2d//GAAyGo5xGprJzF1CcIRw
 zovc3C5rzwjzU5yakUKFYvQ1EBhyqW4DKbqndj2IkdGChu3WNDn6M64lJvkA9ag/
 B2MIyJ9T1b88yJX7aVrNLBEG0Z/eZo4Mix7Z2gIGnblTuunMJQbC3t1DmjE7up+/
 WlYEnho8QGrpAboHXlUuty81D+HrWmhLLWoHNKmkcZ38E90AibRbRGFmBtsPt6l0
 dzUfEHEmq4OAbqPxxFOh
 =MJ00
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20141015-1' into staging

gtk: fix memory leak, add pause key support.

# gpg: Signature made Wed 15 Oct 2014 11:30:39 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-gtk-20141015-1:
  gtk: add support for the Pause key
  gtk.c: Fix memory leak in gd_set_keycode_type()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 14:01:42 +01:00
zhanghailiang e668d1b854 qga: Rewrite code where using readdir_r
If readdir_r fails, error_setg_errno will reference the freed
pointer *dirpath*.

Moreover, readdir_r may cause a buffer overflow, using readdir instead.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-10-22 07:49:52 -05:00
Peter Maydell ad089894a8 configure: Prepend pixman and ftd flags to overrule system-provided ones
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJUPkqZAAoJEEy22O7T6HE4WrEP/AgNKJWlhvNKNpUcqDB9Xcz8
 liGVvzC9+8Kk2FKHb4MqY0j/BudFuKx5+GAp0aVtbvtssjJdNbSxc6cHzCprJXKc
 0vF79d5VYXwNT41xlCdFPz2v4akqhhv0CNbF4rZErDF3JH4QDA42CeF/l6Wf0IRd
 zEo6Z+lX9Wy7Hdx+KZAispB8rGzk3CMRWnR7bcDcy8fVgxJ8NGYvk0mV1wLGly2n
 nBP5JE6dahjV454KOMLf/aFJd+3WcqBZsUEy0rUsU2a7vLBAR6ySZ/VU0AbaeZc1
 FrTiiOrYeYa+SjQ3ylaqoxf+10FOZuGZlwRddWGqKmlXcp3TjFFrcAYUluYv8piT
 rGIv71TALU+KBBzFhYW1paK1iE5Ofrn/OVLCe9jndEAoFeDd2fZ6lwyJIZUihR9k
 emrGHAFMqhtlasroQ5Rsn2GhGDzCLJqbiyx49P0QfnFR2JE25ngIwQyANNZ0wph5
 4r8gSpfZrCrWJUX63D/ldECViBh3pTHlm7xf1/0/yxZIBhE9pEo6AKF5DMLOVqhc
 QTkHxa++KDew2oj5/4qUHrG28ZDihJdnB6h1atz4xdBxYMlRo1l2tXtmEvEJUWAq
 oX4jvVcN4cMxAiM3Z7PtN08e0vi+TWP6FHWFCBZV6Py1dHrnYZHBWmL2mcLAdJ6G
 Ko6VLvs5rWbU6UDTPhOp
 =swr9
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-console-20141015-1' into staging

configure: Prepend pixman and ftd flags to overrule system-provided ones

# gpg: Signature made Wed 15 Oct 2014 11:21:13 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-console-20141015-1:
  configure: Prepend pixman and ftd flags to overrule system-provided ones

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 13:08:43 +01:00
Peter Maydell 31cc9514a5 Merge remote-tracking branch 'remotes/lalrae/tags/mips-20141015' into staging
* remotes/lalrae/tags/mips-20141015: (28 commits)
  target-mips: Remove unused gen_load_ACX, gen_store_ACX and cpu_ACX
  target-mips/dsp_helper.c: Add ifdef guards around various functions
  target-mips/translate.c: Add ifdef guard around check_mips64()
  target-mips/op_helper.c: Remove unused do_lbu() function
  target-mips/dsp_helper.c: Remove unused function get_DSPControl_24()
  target-mips: fix broken MIPS16 and microMIPS
  target-mips/translate.c: Update OPC_SYNCI
  target-mips: define a new generic CPU supporting MIPS64 Release 6 ISA
  mips_malta: update malta's pseudo-bootloader - replace JR with JALR
  target-mips: remove JR, BLTZAL, BGEZAL and add NAL, BAL instructions
  target-mips: do not allow Status.FR=0 mode in 64-bit FPU
  target-mips: add new Floating Point Comparison instructions
  target-mips: add new Floating Point instructions
  softfloat: add functions corresponding to IEEE-2008 min/maxNumMag
  target-mips: add AUI, LSA and PCREL instruction families
  target-mips: add compact and CP1 branches
  target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions
  target-mips: Status.UX/SX/KX enable 32-bit address wrapping
  target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6
  target-mips: redefine Integer Multiply and Divide instructions
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-10-22 12:06:47 +01:00
Peter Maydell 01a2050fa5 hw/i386/pc_q35.c: Avoid g_assert_cmpint() as it is not in glib 2.12
The function g_assert_cmpint() is not in glib 2.12, which is our current
minimum requirement. Rephrase the recently added assertion to avoid it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
2014-10-22 11:32:44 +01:00
Cornelia Huck 4277af19d9 s390x: sweep up unmaintained files
Several s390x/kvm/ccw related files don't have an entry in MAINTAINERS:
Sort them into the appropriate sections.

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-10-21 12:40:34 +02:00
Markus Armbruster 84ebe3755f block: Make device model's references to BlockBackend strong
Doesn't make a difference just yet, but it's the right thing to do.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoît Canet <benoit.canet@nodalink.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:51 +02:00
Markus Armbruster a7f53e26a6 block: Lift device model API into BlockBackend
Move device model attachment / detachment and the BlockDevOps device
model callbacks and their wrappers from BlockDriverState to
BlockBackend.

Wrapper calls in block.c change from

    bdrv_dev_FOO_cb(bs, ...)

to

    if (bs->blk) {
        bdrv_dev_FOO_cb(bs->blk, ...);
    }

No change, because both bdrv_dev_change_media_cb() and
bdrv_dev_resize_cb() do nothing when no device model is attached, and
a device model can be attached only when bs->blk.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:50 +02:00
Markus Armbruster 6007cdd448 blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend
Much more command code needs conversion.  I'm converting these now
because they're using bdrv_dev_* functions, which I'm about to lift
into BlockBackend.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoît Canet <benoit.canet@nodalink.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:50 +02:00
Markus Armbruster d829a2115f block/qapi: Convert qmp_query_block() to BlockBackend
Much more command code needs conversion.  I start with this one
because it's using bdrv_dev_* functions, which I'm about to lift into
BlockBackend.

While there, give bdrv_query_info() internal linkage.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoît Canet <benoit.canet@nodalink.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:50 +02:00
Markus Armbruster 26f8b3a847 blockdev: Fix blockdev-add not to create DriveInfo
blockdev_init() always creates a DriveInfo, but only drive_new() fills
it in.  qmp_blockdev_add() leaves it blank.  This results in a drive
with type = IF_IDE, bus = 0, unit = 0.  Screwed up in commit ee13ed1c.

Board initialization code looking for IDE drive (0,0) can pick up one
of these bogus drives.  The QMP command has to execute really early to
be visible.  Not sure how likely that is in practice.

Fix by creating DriveInfo in drive_new().  Block backends created by
blockdev-add don't get one.

Breaks the test for "has been created by qmp_blockdev_add()" in
blockdev_mark_auto_del() and do_drive_del(), because it changes the
value of dinfo && !dinfo->enable_auto_del from true to false.  Simply
test !dinfo instead.

Leaves DriveInfo member enable_auto_del unused.  Drop it.

A few places assume a block backend always has a DriveInfo.  Fix them
up.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:50 +02:00
Markus Armbruster d3aeb1b7da blockdev: Drop superfluous DriveInfo member id
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoît Canet <benoit.canet@nodalink.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:50 +02:00
Markus Armbruster b8864be5f3 pc87312: Drop unused members of PC87312State
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Benoît Canet <benoit.canet@nodalink.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:50 +02:00
Markus Armbruster a987ee1f1b ide: Complete conversion from BlockDriverState to BlockBackend
Add a BlockBackend member to TrimAIOCB, so ide_issue_trim_cb() can use
blk_aio_discard() instead of bdrv_aio_discard().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:03:50 +02:00
Markus Armbruster 4be746345f hw: Convert from BlockDriverState to BlockBackend, mostly
Device models should access their block backends only through the
block-backend.h API.  Convert them, and drop direct includes of
inappropriate headers.

Just four uses of BlockDriverState are left:

* The Xen paravirtual block device backend (xen_disk.c) opens images
  itself when set up via xenbus, bypassing blockdev.c.  I figure it
  should go through qmp_blockdev_add() instead.

* Device model "usb-storage" prompts for keys.  No other device model
  does, and this one probably shouldn't do it, either.

* ide_issue_trim_cb() uses bdrv_aio_discard() instead of
  blk_aio_discard() because it fishes its backend out of a BlockAIOCB,
  which has only the BlockDriverState.

* PC87312State has an unused BlockDriverState[] member.

The next two commits take care of the latter two.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:02:25 +02:00
Markus Armbruster 2a30307f70 virtio-blk: Rename VirtIOBlkConf variables to conf
This is consistent with how VirtIOFOOConf variables are named
elsewhere, and makes blk available for BlockBackend variables.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-10-20 14:02:21 +02:00