Commit Graph

61816 Commits

Author SHA1 Message Date
Peter Maydell f81804a52b hw/core/or-irq: Support more than 16 inputs to an OR gate
For the IoTKit MPC support, we need to wire together the
interrupt outputs of 17 MPCs; this exceeds the current
value of MAX_OR_LINES. Increase MAX_OR_LINES to 32 (which
should be enough for anyone).

The tricky part is retaining the migration compatibility for
existing OR gates; we add a subsection which is only used
for larger OR gates, and define it such that we can freely
increase MAX_OR_LINES in future (or even move to a dynamically
allocated levels[] array without an upper size limit) without
breaking compatibility.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20180604152941.20374-10-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell 95f875654a arm: Don't crash if user tries to use a Cortex-M CPU without an NVIC
The Cortex-M CPU and its NVIC are two intimately intertwined parts of
the same hardware; it is not possible to use one without the other.
Unfortunately a lot of our board models don't do any sanity checking
on the CPU type the user asks for, so a command line like
    qemu-system-arm -M versatilepb -cpu cortex-m3
will create an M3 without an NVIC, and coredump immediately.
In the other direction, trying a non-M-profile CPU in an M-profile
board won't blow up, but doesn't do anything useful either:
    qemu-system-arm -M lm3s6965evb -cpu arm926

Add some checking in the NVIC and CPU realize functions that the
user isn't trying to use an NVIC without an M-profile CPU or
an M-profile CPU without an NVIC, so we can produce a helpful
error message rather than a core dump.

Fixes: https://bugs.launchpad.net/qemu/+bug/1766896
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180601160355.15393-1-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell 38d81dafb3 hw/arm/armv7m: Remove unused armv7m_init() function
Remove the now-unused armv7m_init() function. This was a legacy from
before we properly QOMified ARMv7M, and it has some flaws:

 * it combines work that needs to be done by an SoC object (creating
   and initializing the TYPE_ARMV7M object) with work that needs to
   be done by the board model (setting the system up to load the ELF
   file specified with -kernel)
 * TYPE_ARMV7M creation failure is fatal, but an SoC object wants to
   arrange to propagate the failure outward
 * it uses allocate-and-create via qdev_create() whereas the current
   preferred style for SoC objects is to do creation in-place

Board and SoC models can instead do the two jobs this function
was doing themselves, in the right places and with whatever their
preferred style/error handling is.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180601144328.23817-3-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell f04d44654d stellaris: Stop using armv7m_init()
The stellaris board is still using the legacy armv7m_init() function,
which predates conversion of the ARMv7M into a proper QOM container
object. Make the board code directly create the ARMv7M object instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20180601144328.23817-2-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell 05b4940bf1 hw/char/parallel: Convert away from old_mmio
Convert the parallel device away from using the old_mmio field
of MemoryRegionOps. This change only affects the memory-mapped
variant, which is used by the MIPS Jazz boards 'magnum' and 'pica61'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180601141223.26630-7-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell 5876503c0f hw/input/pckbd: Convert away from old_mmio
Convert the pckbd device away from using the old_mmio field
of MemoryRegionOps. This change only affects the memory-mapped
variant of the i8042, which is used by the Unicore32 'puv3'
board and the MIPS Jazz boards 'magnum' and 'pica61'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180601141223.26630-6-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell a821541edf hw/watchdog/wdt_i6300esb: Convert away from old_mmio
Convert the wdt_i6300esb device away from using the old_mmio field
of MemoryRegionOps.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180601141223.26630-5-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell a4afb28dae hw/block/pflash_cfi02: Convert away from old_mmio
Convert the pflash_cfi02 device away from using the old_mmio field
of MemoryRegionOps.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180601141223.26630-4-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell bb428791c8 hw/m68k/mcf5206: Convert away from old_mmio
Convert the mcf5206 device away from using the old_mmio field
of MemoryRegionOps. This device is used by the an5206 board.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Thomas Huth <huth@tuxfamily.org>
Message-id: 20180601141223.26630-3-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell d2af524a18 hw/sh/sh7750: Convert away from old_mmio
Convert the sh7750 device away from using the old_mmio field
of MemoryRegionOps. This device is used by the sh4 r2d board.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180601141223.26630-2-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Peter Maydell 519655e625 hw/arm/mps2-tz: Put ethernet controller behind PPC
The ethernet controller in the AN505 MPC FPGA image is behind
the same AHB Peripheral Protection Controller that handles
the graphics and GPIOs. (In the documentation this is clear
in the block diagram but the ethernet controller was omitted
from the table listing devices connected to the PPC.)
The ethernet sits behind AHB PPCEXP0 interface 5. We had
incorrectly claimed that this was a "gpio4", but there are
only 4 GPIOs in this image.

Correct the QEMU model to match the hardware.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20180515171446.10834-1-peter.maydell@linaro.org
2018-06-15 15:23:34 +01:00
Shannon Zhao 1dcf367519 arm_gicv3_kvm: kvm_dist_get/put_priority: skip the registers banked by GICR_IPRIORITYR
While for_each_dist_irq_reg loop starts from GIC_INTERNAL, it forgot to
offset the date array and index. This will overlap the GICR registers
value and leave the last GIC_INTERNAL irq's registers out of update.

Fixes: 367b9f527b
Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-15 14:57:13 +01:00
Peter Maydell 2702c2d3eb Travis updates
- show config.log when failing
   - reduce time for gprof build
   - reduce time for alternate trace builds
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAlsiwjcACgkQ+9DbCVqe
 KkQzTgf/cwfPV5jy6MeTEbNz89Aez8E1hki3K8ldtOxYPGpgM7ZlBI3EuvuozvBR
 wt/3LvMIRMLoGLNciyQXaEfJwrPh3RpgfdWUfJNRW5tkdPwSEo4jBGmztOinfTwn
 w2tvMVjMi+o2isy6fAWIiSApx8zljyYSo4z+g5Ol6z1OlIvys01sroJSCJDgtzAD
 VP1T0toWLCocpkgklqyeq9/HDJUIoz8986NYjjv+XUgmj/YzW2nR3QlUgwEbfDpl
 RFRUm+v8762j8OPf9WPzh0gTmw3YvFG1E+eY5nMat4u9rdr2DBVGJ6ldXl39jdZs
 a9o9OwdJZzmndP4qp2J+fr+IhXssYg==
 =q7Wl
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-updates-140618-1' into staging

Travis updates

  - show config.log when failing
  - reduce time for gprof build
  - reduce time for alternate trace builds

# gpg: Signature made Thu 14 Jun 2018 20:29:59 BST
# gpg:                using RSA key FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-travis-updates-140618-1:
  travis: reduce time taken for trace-backend testing
  travis: reduce coverage of gprof build
  travis: display config.log when configure fails

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-15 12:49:36 +01:00
Peter Maydell 91fe7a376a -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
 
 iQEcBAABAgAGBQJbIyitAAoJEO8Ells5jWIRQdEH/jPK2fYDsdh9p0eXRKEG8+3U
 BIwr3zilQ74U+DntKPaz6YioLbvdZitqxKh+UFLOvri7Fy8THqbvBRH0FkiXcKfh
 nvFA/7lOZ/P77R0Pa4oIAWsUA9LIEznwVhL9Z0MWuE/qh95XaQgj4QX+TorsHMU+
 mnAlkON7OlAvxXPqrZq6DRUGdZiKbHcX2wXHr6iMq7fIbdnmK6CcLvEmbTYP4SJV
 6JfAyKCXw+M/pq7eAYMYDvSv0aNRgU2dDoNS301VVnUTfim/I4aNfmjQyEFW7lbd
 lq1pspdVAjsOr78p4J9+VBCgiNqRxSXz2zN5eul3tJtv1jDQeMjB8cEYTVqHvMw=
 =LkfN
 -----END PGP SIGNATURE-----

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

# gpg: Signature made Fri 15 Jun 2018 03:47:09 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  vhost-user: delete net client if necessary
  e1000e: Do not auto-clear ICR bits which aren't set in EIAC
  net: Fix a potential segfault
  tap: set vhostfd passed from qemu cli to non-blocking

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-15 11:41:44 +01:00
linzhecheng c67daf4a24 vhost-user: delete net client if necessary
As qemu_new_net_client create new ncs but error happens later,
ncs will be left in global net_clients list and we can't use them any
more, so we need to cleanup them.

Cc: qemu-stable@nongnu.org
Signed-off-by: linzhecheng <linzhecheng@huawei.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2018-06-15 10:39:53 +08:00
Jan Kiszka 2285a00c11 e1000e: Do not auto-clear ICR bits which aren't set in EIAC
The spec does not justify clearing of any E1000_ICR_OTHER_CAUSES when
E1000_ICR_OTHER is set in EIAC. In fact, removing this code fixes the
issue the Linux driver runs into since 4aea7a5c5e94 ("e1000e: Avoid
receiver overrun interrupt bursts") and was worked around by
745d0bd3af99 ("e1000e: Remove Other from EIAC").

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2018-06-15 10:39:53 +08:00
Lin Ma 8b43f964f9 net: Fix a potential segfault
If user forgets to provide any backend types for '-netdev' in qemu CLI,
It triggers seg fault.

e.g.

Expected:
$ qemu -netdev id=net0
qemu-system-x86_64: Parameter 'type' is missing

Actual:
$ qemu -netdev id=net0
Segmentation fault (core dumped)

Fixes: 547203ead4 ("net: List available netdevs with "-netdev help")
Reviewed-by: Thomas Huth <thuth@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2018-06-15 10:39:53 +08:00
Brijesh Singh d542800d1e tap: set vhostfd passed from qemu cli to non-blocking
A guest boot hangs while probing the network interface when
iommu_platform=on is used.

The following qemu cli hangs without this patch:

# $QEMU \
  -netdev tap,fd=3,id=hostnet0,vhost=on,vhostfd=4 3<>/dev/tap67 4<>/dev/host-net \
  -device virtio-net-pci,netdev=hostnet0,id=net0,iommu_platform=on,disable-legacy=on \
  ...

Commit: c471ad0e9b (vhost_net: device IOTLB support) took care of
setting vhostfd to non-blocking when QEMU opens /dev/host-net but if
the fd is passed from qemu cli then we need to ensure that fd is set
to non-blocking.

Fixes: c471ad0e9b ("vhost_net: device IOTLB support")
Cc: qemu-stable@nongnu.org
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2018-06-15 10:39:53 +08:00
Alex Bennée f8309de9b7 travis: reduce time taken for trace-backend testing
These builds are reaching regular timeouts and probably don't need to
be so widely exercised. ftrace and ust in particular are used in
conjunction with whole system profiling which makes most sense with
KVM setups, hence the native softmmu target.

We also expand simple to cover the multiple log backends while
restricting its scope to user-mode testing only.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-06-14 20:24:07 +01:00
Alex Bennée 73d99c11d2 travis: reduce coverage of gprof build
This build is regularly timing out and even switching off linux-user
wasn't enough. Instead explicitly choose a target list of broadly the
"major" architectures. This is enough to check the gprof build
machinery works without worrying about the actual coverage results.

I did try various YAML constructs for specifying CONFIG with
continuation but couldn't get any of them to work hence the very long
line.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2018-06-14 20:24:05 +01:00
Daniel P. Berrangé 6a259f8d75 travis: display config.log when configure fails
When configure fails in CI systems we must be able to see the contents
of the config.log file to diagnose the root cause.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
[AJB: used Eric's suggested {} form]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-06-14 20:23:36 +01:00
Peter Maydell 409c241f88 ui: bugfixes for sdl and gtk
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJbIigtAAoJEEy22O7T6HE4Y94QAKgXLVAZj53zdIdsX72nlni4
 XFgtMfYtybBS7uM12Oz552OPgmwd4wofp/+yuARh2DZiW2vXBdOuH5bNqgoSgBej
 BO1XemUckQWYXZf+OQDhSZgKUkpOKjCCcP7FwGO0kDCUTkRpfblrHUYT+yTxFDj8
 A6lkuzIjAEBQGEM2dKK7VL95hIb+VWnORjOhEEFz5YSS+BtCLUa90+KXN62s/WCN
 jvMmFleE/zH2TzNhk6/mL2n7Oc7FNuJhrt6s+olUGrSEkzXZGzXBW/wwoEPnrGJb
 9DJiz7iMSfXbUCLphtlB3EKWaqlprMN5pBIK+9buJixdJts9r3ku9VEMQnP5VFys
 +Q+dQvgYYYweMBrNznnUup3x5dG/YyiGp9pgzv2YXTCDMsOG/C7okGd+Fr1L8MMN
 lUWjp55zdZOYm9V+c12uStPv/hT7Mo0rPJzH2UiK/CeUN0+u52gqegXcnUobMLfl
 zNQPXAktKL+CR0gpmf28rOHbWj1g5uAnGvQSfVBkZ6ne4l1CckDsWchWdwMzztS1
 xw7ZzNG+OEmBFoKkhvVimWsd0kbVMK+PEQbTcTO0kJFSDI2VUjQx48F3bJXBqZkJ
 Fq16kEVd/JNVTCI3mTEJR1N0CA5EbJ+Pe6IHRU9ZprLxXEEHGADpuSUPULkCsOzl
 j+EOmgrwCXpYPD2zBvFx
 =Fshe
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180614-pull-request' into staging

ui: bugfixes for sdl and gtk

# gpg: Signature made Thu 14 Jun 2018 09:32:45 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# 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>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20180614-pull-request:
  sdl2: restore window dimensions by resize
  ui: darwin: gtk: Add missing input keymap

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-14 14:04:14 +01:00
Peter Maydell 666b0e732f -----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJbIS+rAAoJEL2+eyfA3jBXYQEP/jjdZ+8MGc44fxyYuvb+9dq8
 xU8x5EFxA6UCzPJyN1iUCDx5hGkYrGMMjITnHWR9rkxBc6gBbNf5Gs3FLF355Cs1
 McoFxTqgYsQlRrvhlu1bWqZKwsr8JnLf5T9X/ot4wIl+1/qR40NK2ww3xtMj/Xex
 KzqqP0k/pjUhvBENORAg5hU9MhLs0zxuRku+B9tc05/AyS0sP/Us8mFUHzqRuI8b
 /GwFussES5GFmw6z1oCwjPYS4i1YKYPoPrRl8HewH93AxDKw9eWdK9fp06HIPeE2
 bSbNSNa96L7WMBfQNmbNm82bpPrgR1ih53vRtWH7AOKj455EEqxvB9uDcqe+Cvu5
 L010DdrlbBtWyQo26k7cTugsSEwOzH6hMVaLl+B17ArGxb2yfls3+TUNv8ESU9ch
 ntDSy+EgVo7J5EmrCA+D9tdBtjdqIQFP8uk8pV10UM1mbc713A2XDH4CT3U4awMC
 JwWLHkkuB5avRd/vWVXNgpEJYTvqWMUMlBuWV7mcrluPdWK2jsbuLqHFd7BkoKAI
 WIgSFX8qbEh6wOhtZKB0v7oBrP+Bm8DuAyN5Wt3Xn/aQHlOmRZa/pnTPxp0C2pZL
 dL4vMvPYKYrT/mMTCjwld0G2jOZjY2bpCwm/VRxUe8cNw8Xp5WaWBdR8VHtOrZQm
 xzFY6fS1j+fo8J3TH0L1
 =RoHA
 -----END PGP SIGNATURE-----

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

# gpg: Signature made Wed 13 Jun 2018 15:52:27 BST
# gpg:                using RSA key BDBE7B27C0DE3057
# gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
# gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
# gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
# Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057

* remotes/cody/tags/block-pull-request:
  block: Ignore generated job QAPI files

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-14 13:16:20 +01:00
Peter Maydell 945741da77 Miscellaneous patches for 2018-06-13
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJbIRNnAAoJEDhwtADrkYZTUegP/26bCanBdGq8NEH18EdzXU6u
 OZ5Xzx+ZvZCCsLJ3C+m+rxB82eEMVJq5Pj9/Sp/OP/Rebbj+JlGZDzV51T3KCmoA
 VxJ89mKCuDTC5Bqcac41AdDT0d9XkkiwTQNtbTzJwXef9TCygthpvzk4DeE2IfQB
 oYuMfeFt93xPXVuNUyUAHuVY5Z0uVeyRWZyqQ354leD53k0qO5TG0f87h7Awx7Cc
 mXgP6yMqBTBb4WnhHfhagg0TdSXr3OlXJ+265/2bpTNdbVz1e0dTjCU28ej1rmpw
 z01oZCrB1cCSoOrz9jNMG+HGmbarwbQ7EBwRZQZK5V89W8TiBKHdt7MIFlbgnTNI
 HK2RCh92X3ndk01vOn029yk4wYJhj3XNmKfIoWzBal+SIkd9BlJ92xckD7Iso9Pm
 WLf+DNCa46x+yiA+UXHdLmxZEGkclPnRvxW8Iz1l61iHjc3bW/ApWAMjQNPMJ1Vh
 4exOV+iisnrzaJZn4kfNnQXwTawDj/c11XxwwLOvk9NUPZBOIFm4PjX+hsXZSfuS
 8cxACWC+EvIFeOIN1fX2DQHyhdjYT976dIi+jMsxipGo1Ob9D8+oArUsKN5SWWkq
 O8+lwbkT02T7WmWuexRbgmkon/LDbjwDBGGdTjdcIutJUCu7KmPgHqLzd6SXHTPT
 jjYi0bmiI/pQY72+F8vZ
 =2uvo
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-06-13' into staging

Miscellaneous patches for 2018-06-13

# gpg: Signature made Wed 13 Jun 2018 13:51:51 BST
# gpg:                using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-misc-2018-06-13:
  Purge uses of banned g_assert_FOO()
  coverity-model: replay data is considered trusted
  Revert "Makefile: add target to print generated files"

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-14 11:35:22 +01:00
Amadeusz Sławiński 64bf97e56f sdl2: restore window dimensions by resize
instead of destroying and recreating window, fixes segfault caused by
handle_keyup trying to access no more existing window when using
Ctrl-Alt-U to restore window "un-scaled" dimensions

 Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0x7ffff7f92b80 (LWP 3711)]
 handle_keyup (ev=0x7fffffffd010) at ui/sdl2.c:416
 416         scon->ignore_hotkeys = false;
 (gdb) bt
 #0  handle_keyup (ev=0x7fffffffd010) at ui/sdl2.c:416
 #1  sdl2_poll_events (scon=0x100fee5a8) at ui/sdl2.c:608
 #2  0x0000000100585bf2 in dpy_refresh (s=0x101ad3e00) at ui/console.c:1658
 #3  gui_update (opaque=0x101ad3e00) at ui/console.c:205
 #4  0x0000000100690f2c in timerlist_run_timers (timer_list=0x100ede130) at util/qemu-timer.c:536
 #5  0x0000000100691177 in qemu_clock_run_timers (type=QEMU_CLOCK_REALTIME) at util/qemu-timer.c:547
 #6  qemu_clock_run_all_timers () at util/qemu-timer.c:674
 #7  0x0000000100691651 in main_loop_wait (nonblocking=<optimized out>) at util/main-loop.c:503
 #8  0x00000001003d650f in main_loop () at vl.c:1848
 #9  0x0000000100289681 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4605

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
Message-id: 20180613172707.31530-1-amade@asmblr.net
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-14 09:55:09 +02:00
Keno Fischer 656282d245 ui: darwin: gtk: Add missing input keymap
In appears the input keymap for osx was forgotten in the commit that
converted the gtk frontend to keycodemapdb. Add it.

Fixes: 2ec78706 ("ui: convert GTK and SDL1 frontends to keycodemapdb")
CC: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Message-id: 1528933916-40670-1-git-send-email-keno@juliacomputing.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-14 09:52:23 +02:00
Eric Blake b61acdecbf block: Ignore generated job QAPI files
Commit bf42508f introduced new generated files; make sure they
don't get accidentally committed from an in-tree build.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20180531212435.165261-1-eblake@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
2018-06-13 10:51:49 -04:00
Markus Armbruster 719a30776b Purge uses of banned g_assert_FOO()
We banned use of certain g_assert_FOO() functions outside tests, and
made checkpatch.pl flag them (commit 6e9389563e).  We neglected to
purge existing uses.  Do that now.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180608170231.27912-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: John Snow <jsnow@redhat.com>
2018-06-13 13:47:35 +02:00
Paolo Bonzini 04a0afe528 coverity-model: replay data is considered trusted
Replay data is not considered a possible attack vector; add a model that
does not use getc so that "tainted data" warnings are suppressed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20180514141218.28438-1-pbonzini@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Whitespace tweaked]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2018-06-13 13:47:35 +02:00
Markus Armbruster 717ea844a7 Revert "Makefile: add target to print generated files"
This reverts commit 9578f8cc3e.

The patch snuck in by accident without having been posted to
qemu-devel.  It's entirely redundant: existing target print-% already
serves the purpose.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180504054241.6833-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2018-06-13 13:47:35 +02:00
Peter Maydell 3b2a4d3901 Fixes in syscall numbers,
disable the build of binaries not needed for linux-user,
 update of qemu-binfmt-conf.sh and cleanup around is_error()
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJbH6cOAAoJEPMMOL0/L748Qx0P/154ARvl8Rfa1JyxFp87vcWW
 N/WbtxsqKJupdaGSkdZQTOIBQ9Xf51z1EkKaD++oEgN2bYtw0CUQ5MVlfOw2uCoY
 0SnSGrB5qHcEkoN5p+0CwOgQlSoGLNKRZKdkqFIOkXlQUe20DmKqWROB1N5Jpt7x
 ezsaMKKTu+qSd4nlcF2wyJxeW7v6ofJkOsVRZHktxOPBYqbcwV4rQV3Mg+3ZCumt
 6NxvrRvdCLOPMqKJeMSXUWfAE194PiIwtJwwdPG8GbNpV/w/hfse0tAeUZASZoSd
 xBhS6Ne8T19lCpn62ENrtQj5l9zV5Dt1ZVFLMRGFrHDaZvnsr5UKLmr2yDCwvETN
 D023PHWfNaWt+fWoCSVQ8Kr3rB3UgTryEQTnuKiCg6MCj8hbbS90wn+26dlXo5XQ
 dBatlMuLsw6ASPyqPl3alPogS+ies6/sK52EEJU5KQJ3bxcFcETX5bBO1QEDAhJs
 Eo0nDyAjcTIXv7ICQQaVyJnb1QGw0TK7KBKq5wACkvHMqEc++Q8U54NiA8O/nsIu
 XCZlsO0pktJgT0EftS+alnygMAy158eO8u49egVWDDjBdKri6kgu9poljCKZGwTN
 CfAO0+kjfnrCFuCub0q4Ssp641rjeVF20uQ8O8bx4qqWTILD6PtKK5FiYHq2jYnN
 cBYRvu7w2N741o2LXiRD
 =oWiH
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging

Fixes in syscall numbers,
disable the build of binaries not needed for linux-user,
update of qemu-binfmt-conf.sh and cleanup around is_error()

# gpg: Signature made Tue 12 Jun 2018 11:57:18 BST
# gpg:                using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-3.0-pull-request:
  linux-user/sparc64: Add inotify_rm_watch and tee syscalls
  linux-user/microblaze: Fix typo in accept4 syscall
  linux-user/hppa: Fix typo in mknodat syscall
  linux-user/alpha: Fix epoll syscalls
  qemu-binfmt-conf.sh: ignore the OS/ABI field
  linux-user: disable qemu-bridge-helper and socket_scm_helper build
  linux-user: Use is_error() to avoid warnings and make the code clearer
  linux-user: Export use is_error(), use it to avoid warnings

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12 16:42:53 +01:00
Peter Maydell 2ab09bf2f9 usb: bug fix collection, doc update.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJbH6QBAAoJEEy22O7T6HE4ZwMP/RHEknxR+tGKYfUxtVP24+ta
 tKMVuewqnDuIjUQsYj/tMvtGEvPd827Cy1X+ocqNq1Gk9aJez+DWWoDlrSXlLyiG
 r4EBMmOasFdmp1D9iQEDUF0pbnbXQv7kqhnM7XbyO+rjNe1rX7HElmRXtcjBcY2I
 QCIpekUBVGzFO97pVzB66gwYpJvmQu2YS2783NaujeS9VEEUFy6RFCFhfNwxhA4W
 C264zFVk68oK1fL+71Y3Kq0WKmetBwfW2ozcBAnqLB5z0hGd9bHJocaLwqgaaQWC
 uaGUJS70Q7iWZ8NwOYvrpK/2ZetjPAeU6ERXeR7tK6yfkjV9UmpPXQ0aqu1OSgEr
 VjuMPEDK0tL8pgcuhhxkJOD6S/HNyCe8y7WLeHKpd21Mv+R2yB1zs2xsWrdMqreZ
 2YXUpgvIaZJBycO8vzmzWwiSNInOGO/3Vu1kpUP4T/rdmFZ1q5f8tGgwMlq/JsU4
 Ce/p0BCcCXvcG+2x5uouffIuTur4DUPn93BCUmjy/TuyggtXVNoQHEVGrMDjiyO/
 9RFVUgJl32mTbIqfVaWkweTch/yXm4XVrlbcTW3VhCCVWyA9O0m+MwyjIoNeXn8L
 yPLF+3ndYgMoTJBFZ20HWEGhZ2+I54fhn/iRW6Nq7qtZ2rOP//K2CqyEp/CuQWis
 vxb796sHEPPUeTCoCiVY
 =sxQ0
 -----END PGP SIGNATURE-----

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

usb: bug fix collection, doc update.

# gpg: Signature made Tue 12 Jun 2018 11:44:17 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# 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>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20180612-pull-request:
  usb-mtp: Return error on suspicious TYPE_DATA packet from initiator
  usb-hcd-xhci-test: add a test for ccid hotplug
  usb-ccid: fix bus leak
  object: fix OBJ_PROP_LINK_UNREF_ON_RELEASE ambivalence
  bus: do not unref the added child bus on realize
  usb/dev-mtp: Fix use of uninitialized values
  usb: correctly handle Zero Length Packets
  usb: update docs

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12 15:34:34 +01:00
Peter Maydell 3b68de85b9 ppc patch queue 2018-06-12
Here's another batch of ppc patches towards the 3.0 release.  There's
 a fair bit here, because I've been working through my mail backlog
 after a holiday.  There's not much of a central theme, amongst other
 things we have:
     * ppc440 / sam460ex improvements
     * logging and error cleanups
     * 40p (PReP) bugfixes
     * Macintosh fixes and cleanups
     * Add emulation of the new POWER9 store-forwarding barrier
       instruction variant
     * Hotplug cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlsfa4kACgkQbDjKyiDZ
 s5IdhxAA1ZDgEMyQkMPlnjYBNSpw9ICo/v+Lj1ZvlVjIbtjP6ZWdmaNHbBLi1N/U
 jbY7Yb+a43xj96WigN2kxu16aL7AvgrGayscht+P+ZXGWaEAt0R1EhiqhheKjkOH
 n0gAxe5c9wN18tJ7ZMtq7HmWw/MyWVjPQ4Pr38npyDU037LG4xY55DigcFu9D/6N
 rSYtB3gWIEvbGhx2Sm+gzbkleKufUNhSJMJI9diRS2KvyocH8ENQUqcMqK//Y6w7
 /Lk/j+qcAOAfCS+QWH9/XQvYdOGR9Gaw4oWLViOCD+EpTJHAYFMzVsp5ZLZZByw/
 S51W3e9mfxzgtIjoDxaetrW95yx2bAcFekP+H8KQesWpydSprsnAlh3SE3dfO2Jp
 Z1yVPHZv2fYZQjNZ0t62Z248iJ4YiBDttDpQYzsiGTiGVfx1IKTNz+gfNwV78CCJ
 SkyIktky2TYAemAB+U90JL3gYSn0GHwgBFLTJ4Rrrf3kC0wNslgosGTEB9v3D+Mb
 zsWxaBftFwZsRnNggBtE2/35zccJ2YURASlDu9ccmczyCUrRZbKE57/GftRXdIcY
 Oqjf48/NSwBm98bIEQGTOw7H1NgWuTazAc2+VS4mAHtUEEYIunuRmC+eTKNM01Yu
 qSMCg6tPADEXwRg6z062sb6T0vvpicv+X1U++tbHNqV3gprOlts=
 =g3bP
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180612' into staging

ppc patch queue 2018-06-12

Here's another batch of ppc patches towards the 3.0 release.  There's
a fair bit here, because I've been working through my mail backlog
after a holiday.  There's not much of a central theme, amongst other
things we have:
    * ppc440 / sam460ex improvements
    * logging and error cleanups
    * 40p (PReP) bugfixes
    * Macintosh fixes and cleanups
    * Add emulation of the new POWER9 store-forwarding barrier
      instruction variant
    * Hotplug cleanups

# gpg: Signature made Tue 12 Jun 2018 07:43:21 BST
# gpg:                using RSA key 6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-3.0-20180612: (33 commits)
  spapr_pci: Remove unhelpful pagesize warning
  xics_kvm: use KVM helpers
  ppc/pnv: fix LPC HC firmware address space
  spapr: handle cpu core unplug via hotplug handler chain
  spapr: handle pc-dimm unplug via hotplug handler chain
  spapr: introduce machine unplug handler
  spapr: move memory hotplug support check into spapr_memory_pre_plug()
  spapr: move lookup of the node into spapr_memory_plug()
  spapr: no need to verify the node
  target/ppc: Allow PIR read in privileged mode
  ppc4xx_i2c: Clean up and improve error logging
  target/ppc: extend eieio for POWER9
  mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR
  mos6522: move timer frequency initialisation to mos6522_reset
  cuda: embed mos6522_cuda device directly rather than using QOM object link
  mos6522: fix vmstate_mos6522_timer version in vmstate_mos6522
  ppc: add missing FW_CFG_PPC_NVRAM_FLAT definition
  ppc: remove obsolete macio_init() definition from mac.h
  ppc: remove obsolete pci_pmac_init() definitions from mac.h
  hw/misc/mos6522: Add trailing '\n' to qemu_log() calls
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12 14:32:19 +01:00
Peter Maydell 98d11a6e72 bitmaps pull request
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJbHs51AAoJEH3vgQaq/DkOgUwP/3KugXgtQWmg4SO4w5XZpxz+
 q19BKrAJxbgKGrb5vGqQ6GBvORTdN2cdgHeOgHARaeOYy3WUiZOOwaktRHVWWG3k
 EpfPmlAeNYoSrXNMuebvCIDjhqf3XnPQ1DKalU9Al7EXrWkKLGO5bTpJtFXZ2bnh
 UCPlfkaibhJqiZ4LrqzGvdPlCjVjby32s8enzRjV9J1OfZQ5SndPz9txZ+jSd0Ta
 mvJsNQtdWFyhTzu/I8Nz7Hf+IpcQ65jlkk52W+d2zYBVC3SW/l5sEKHD0MILULtx
 C5EobPB7l48hZly5EBc2leR+ckbQ04yjrSgD6tJ6Dcu/ryxXe3un137TBsWNzsbu
 Ngmg4JQZ6Az4o8xREBVNulT2gX4qR9gq73RvkigXV9rU3VQR2EWT229Tsgw9dnGk
 iURrb2aa59T/mu2vYR126aqB7VtSO5YRwwjME6Esx5J1qQqJSQliu7Ar93v28uYF
 XwsVYY6brHuvp5fMmPadnldudCuSaHYFWS07u8KCMRrcsmV1MQIMEbwASPpENLrn
 B2gi05XC7vAl5mFQegSSf9aHzAjTAUsgDgaOhGKK2PpPsI8Z9ZICllqCOEQ+S0/4
 KOwXcMhmMTGIjKnBSSROQOMhYzxsEvvn4O8W1v1PLmqcUyLRCPMOe2UgZedEu5zy
 eu0GErzWdwr+N4heaAPZ
 =0Au5
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging

bitmaps pull request

# gpg: Signature made Mon 11 Jun 2018 20:33:09 BST
# gpg:                using RSA key 7DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jnsnow/tags/bitmaps-pull-request:
  qapi: add disabled parameter to block-dirty-bitmap-add
  qapi: add x-block-dirty-bitmap-merge
  qmp: transaction support for x-block-dirty-bitmap-enable/disable
  qapi: add x-block-dirty-bitmap-enable/disable
  block/dirty-bitmap: add lock to bdrv_enable/disable_dirty_bitmap
  block: simplify code around releasing bitmaps
  block: remove bdrv_dirty_bitmap_make_anon

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12 13:33:23 +01:00
Peter Maydell 59f3a1c6ac pc: fixes
A couple of fixes to acpi and nvdimm.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJbHsufAAoJECgfDbjSjVRp7rUH/ivy7ZOfJU98VemRJK325KJ2
 AzsJgn3jKBvlaq4WtsQdspi+eTi9p0kupFJqFxRdpDgPnYjjegDGOjY0RrnhPL19
 lXpwWixZvWAL5zZ60p8RYZxYP9AeFUDQ8wX091uB8phQfBdTUwxCE88bznv2ZUbz
 He3rEMJpMZIorUe8P+RVrUNWHcIdvCZkqYhxt0nZR4YkeaANVCngXGaexBzxdRXR
 oT3cKsmshFPMV+LUr3/os3I5YiOSLCWflTCgnlhhW0rKPbDWFJOtqF78bjLJrR/p
 9SuqW0vmB3JcXXsSWUFvuBo4K0hXgNZEI2hrFVxhkXtw5Ij35ufCCizhmalAaVk=
 =m9VP
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pc: fixes

A couple of fixes to acpi and nvdimm.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Mon 11 Jun 2018 20:21:03 BST
# gpg:                using RSA key 281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  nvdimm: make persistence option symbolic
  hw/i386: Update SSDT table used by "make check"

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12 12:42:15 +01:00
Peter Maydell 5eca450b2e Python queue, 2018-06-11
* Make code compatible with Python 3 using 'futurize --stage1'
 * Require Python >= 2.7 and remove Python 2.6 compatibility
   modules
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJbHrRGAAoJECgHk2+YTcWmeV8P/ReYBQvv4QxFrGgFJs0unWR3
 OLU/zZ3Uaf1U8Q/oJ/pLSYK+XFWJYC9utXApTpBr4Xaxd1eavHl/EpjS/iHaL8VB
 HguuvA2SdlU9+5ZJMk8IdG1Hft/cYLiLNCMJRQzrAL/CL/ToZOQyOPU0NNmyk0S5
 J3cug4VCDJMs+unKPHL/ThxXoWS1sRq7DZyYeaFBqOuDBLf7ZXSGOWPTC4KKwGbl
 N7sXxhDUbXFnY6HYpdShB8gACeI4P0WN0UCtGkvMwjF17DbHMohgoaXkzUks4wCI
 gJF7m0tFY9rR2w/RPiHeZmPcuWsxFxKjLCE93qrxNSoq7DWQyS6UprIf1CaW6rgz
 rPJAbxjHedKhW3M4gW9utpqYlSweTg7kQP1jLStZATvCnRgjQ5BtDcBJFrXa0zdb
 6+py9MlvE0ysiXPl6vmbcn8VzDq+TnmyXMj2zrpcXMLJphnUcJlD1EgbXMTqXRY5
 HUN61ZWyc6nj3go52QaC1hupcCSf4macgoXWh8BORuHQZcL5xom4rOJL4MwhQIu/
 5crYp/Xa9SA1FU7c0we8Np53feSU+5PGY5VyHJJyRoVSEriJnvvN9kCBpziln+Y/
 v0CIFt7ohVB1OzsdNvFLSsRrlPd1RReiGOE9ixgcb37mIKBPWc2u73Mws37lxxiC
 BO64VpDUXdwpyIrHXxTU
 =d1wy
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging

Python queue, 2018-06-11

* Make code compatible with Python 3 using 'futurize --stage1'
* Require Python >= 2.7 and remove Python 2.6 compatibility
  modules

# gpg: Signature made Mon 11 Jun 2018 18:41:26 BST
# gpg:                using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/python-next-pull-request:
  python: Remove scripts/ordereddict.py
  python: Remove scripts/argparse.py
  configure: Require Python 2.7 or newer
  python: futurize -f lib2to3.fixes.fix_numliterals
  python: futurize -f lib2to3.fixes.fix_except
  python: futurize -f lib2to3.fixes.fix_renames
  python: futurize -f lib2to3.fixes.fix_tuple_params
  python: futurize -f lib2to3.fixes.fix_reduce
  python: futurize -f lib2to3.fixes.fix_standarderror
  python: futurize -f lib2to3.fixes.fix_has_key
  python: futurize -f libfuturize.fixes.fix_next_call
  python: futurize -f libfuturize.fixes.fix_absolute_import
  python: futurize -f libfuturize.fixes.fix_print_with_import

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12 11:56:21 +01:00
Bandan Das 3c969a6022 usb-mtp: Return error on suspicious TYPE_DATA packet from initiator
CID 1390604
If the initiator sends a packet with TYPE_DATA set without
initiating a CMD_GET_OBJECT_INFO first, then usb_mtp_get_data
can trip on a null s->data_out.

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-Id: <jpgr2m8ajfk.fsf_-_@linux.bootlegged.copy>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-12 12:08:12 +02:00
Marc-André Lureau 1a3ff20e67 usb-hcd-xhci-test: add a test for ccid hotplug
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180531195119.22021-5-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-12 12:07:30 +02:00
Marc-André Lureau 410a096adf usb-ccid: fix bus leak
qbus_create_inplace() creates a new reference in realize(), it must be
released in unrealize().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180531195119.22021-4-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-12 12:07:30 +02:00
Marc-André Lureau 265b578c58 object: fix OBJ_PROP_LINK_UNREF_ON_RELEASE ambivalence
A link property can be set during creation, with
object_property_add_link() and later with object_property_set_link().

add_link() doesn't add a reference to the target object, while
set_link() does.

Furthemore, OBJ_PROP_LINK_UNREF_ON_RELEASE flags, set during add_link,
says whether a reference must be released when the property is destroyed.
This can lead to leaks if the property was later set_link(), as the
added reference is never released.

Instead, rename OBJ_PROP_LINK_UNREF_ON_RELEASE to OBJ_PROP_LINK_STRONG
and use that has an indication on how the link handle reference
management in set_link().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180531195119.22021-3-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-12 12:07:30 +02:00
Marc-André Lureau f3d58385a6 bus: do not unref the added child bus on realize
When the parent bus removes the child property, it takes care of
removing the added reference, in object_finalize_child_property().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180531195119.22021-2-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-12 12:07:29 +02:00
Philippe Mathieu-Daudé 62713a2e50 usb/dev-mtp: Fix use of uninitialized values
This fixes:

  hw/usb/dev-mtp.c:971:5: warning: 4th function call argument is an uninitialized value
      trace_usb_mtp_op_get_partial_object(s->dev.addr, o->handle, o->path,
                                           c->argv[1], c->argv[2]);
                                                       ^~~~~~~~~~
and:

  hw/usb/dev-mtp.c:981:12: warning: Assigned value is garbage or undefined
      offset = c->argv[1];
               ^ ~~~~~~~~~~

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180604151421.23385-3-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-12 12:07:02 +02:00
Philippe Mathieu-Daudé bf78fb1c1b usb: correctly handle Zero Length Packets
USB Specification Revision 2.0, §5.5.3:
  The Data stage of a control transfer from an endpoint to the host is complete when the endpoint does one of the following:
  • Has transferred exactly the amount of data specified during the Setup stage
  • Transfers a packet with a payload size less than wMaxPacketSize or transfers a zero-length packet"

hw/usb/redirect.c:802:9: warning: Declared variable-length array (VLA) has zero size
        uint8_t buf[size];
        ^~~~~~~~~~~ ~~~~

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180604151421.23385-2-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-06-12 12:07:02 +02:00
Gerd Hoffmann 649ae1040d usb: update docs
xhci is rock solid meanwhile.  So move it up in the docs and feature it
as prefered usb host adapter, instead of the old shy version saying "you
might want try ...".

While being at it rework the text on ehci and companion controllers too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20180605132915.3640-1-kraxel@redhat.com
2018-06-12 12:06:52 +02:00
Peter Maydell 6e3bd76991 Machine queue, 2018-06-11
* Fix -daemonize hang caused by --preconfig code
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJbHrJEAAoJECgHk2+YTcWmw5gQAJiXvqRv7ZVNc+Xec8Ndx5UR
 ahYZ4rK+Hw9g0prIZCQyeX6KvQaggIZgA/D4k1sC4YDARboxduGyD7GmNFcx2liF
 KCWxOhnOffOU8GVd3TMCTuh7iVGB0gSMZFsKWwi7bKSFKFHkO1dpQ0bp1eDeolaL
 sBYU2OVOV18NyXYghDEhZ09w2I/76ivRJi0SGNwa5/pZa0K7/7ZC0LTs6PdqPHYR
 Zka28y+P61s9S3n7/txhouTXurjaYRMtmBAtYIMmLck9VkMTVKYj9oE43g6q5uEA
 lSD9/jgoc6p8Cqj7iWwApT8MhmuxfXIMfbWD1tzIk73vY0DSgAIBdJ23qUwSLgXH
 Db3kOyOo1Gan+kk9w8GZR2QCRXq144MPxJmLdcmpTGZJ6jS47msZuCvYV1skpI+u
 0ktI6SxkTG5HUTMwIbIzEJIWOOeCldG2lQbtXR5gL+ZQGW57thPMb74z7BccurKV
 eaUOEWzptbnVMpVgRG2hX75+LFD4KRL8YWICFAj/stCkLCfyrwoccLpsuhZA/vZq
 1c80k5eMMtjXkFtCjV3/eKxFWCM5xu6i28Se/vYylBReZHjZDNA7ysnNkeb8lcgp
 ljk+4iIKX2SgNpr1ljdQ5PVfk3HjVbhDJrjPX06+ML4V3TkkEpCg6nUFmZO33sIv
 p0pBo76uSFQ9n7h60wue
 =SISo
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging

Machine queue, 2018-06-11

* Fix -daemonize hang caused by --preconfig code

# gpg: Signature made Mon 11 Jun 2018 18:32:52 BST
# gpg:                using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/machine-next-pull-request:
  cli: Don't run early event loop if no --preconfig was specified

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-12 10:39:42 +01:00
David Gibson 30f79dc13f spapr_pci: Remove unhelpful pagesize warning
By default, the IOMMU model built into the spapr virtual PCI host bridge
supports 4kiB and 64kiB IOMMU page sizes.  However this can be overridden
which may be desirable to allow larger IOMMU page sizes when running a
guest with hugepage backing and passthrough devices.  For that reason a
warning was printed when the device wasn't configured to allow the pagesize
with which guest RAM is backed.

Experience has proven, however, that this message is more confusing than
useful.  Worse it sometimes makes little sense when the host-available page
sizes don't match those available on the guest, which can happen with
a POWER8 guest running on a POWER9 KVM host.

Long term we do want better handling to allow large IOMMU page sizes to be
used, but for now this parameter and warning don't really accomplish it.
So, remove the message, pending a better solution.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-06-12 10:44:36 +10:00
Cédric Le Goater bf358b541b xics_kvm: use KVM helpers
The KVM helpers hide the low level interface used to communicate to
the XICS KVM device and provide a good cleanup to the XICS KVM models.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-06-12 10:44:36 +10:00
Cédric Le Goater d61c285703 ppc/pnv: fix LPC HC firmware address space
A specific MemoryRegion is required for the LPC HC Firmware address
space.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-06-12 10:44:36 +10:00
David Hildenbrand a4261be172 spapr: handle cpu core unplug via hotplug handler chain
Factor out cpu core unplug into separate function from
spapr_core_release(). Then use generic hotplug_handler_unplug() to trigger
cpu core unplug, which would call spapr_machine_device_unplug() ->
spapr_core_unplug() in the end.

This way unplug operation is not buried in spapr internals and located
in the same place like in other targets, following similar
logic/call chain across targets.

Acked-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-06-12 10:44:36 +10:00
David Hildenbrand 3ec71474ca spapr: handle pc-dimm unplug via hotplug handler chain
Factor out memory unplug into separate function from spapr_lmb_release().
Then use generic hotplug_handler_unplug() to trigger memory unplug,
which will call spapr_machine_device_unplug() -> spapr_memory_unplug()
in the end.

This way unplug operation is not buried in lmb internals and located in
the same place like in other targets, following similar logic/call chain
across targets.

Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-06-12 10:44:36 +10:00