Commit graph

61628 commits

Author SHA1 Message Date
Philippe Mathieu-Daudé d1b322182b sdcard: Disable SEND_IF_COND (CMD8) for Spec v1
CMD8 is "Reserved" in Spec v1.10.

Spec v2.00 introduces the SEND_IF_COND command:

  6.4.1 Power Up

    CMD8 is newly added in the Physical Layer Specification Version
    2.00 to support multiple voltage ranges and used to check whether
    the card supports supplied voltage. The version 2.00 or later host
    shall issue CMD8 and verify voltage before card initialization.
    The host that does not support CMD8 shall supply high voltage range.

Message-Id: 201204252110.20873.paul@codesourcery.com
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180607180641.874-5-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:34 +01:00
Philippe Mathieu-Daudé 2f0939c234 sdcard: Add a 'spec_version' property, default to Spec v2.00
As of this commit, the Spec v1 is not working, and all controllers
expect the cards to be conformant to Spec v2.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20180607180641.874-4-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé e2fce16edb sdcard: Allow commands valid in SPI mode
From the "Physical Layer Simplified Specification Version 1.10"
  Chapter 7.3 "SPI Mode Transaction Packets"
    Table 57: "Commands and arguments"

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20180607180641.874-3-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 9e1245795f sdcard: Update the Configuration Register (SCR) to Spec Version 1.10
The initial implementation is based on the Specs v1.10 (see a1bb27b1e9).

However the SCR is anouncing the card being v1.01.

The new chapters added in version 1.10 are:

    4.3.10 Switch function command

    Switch function command (CMD6) 1 is used to switch or expand
    memory card functions. [...]
    This is a new feature, introduced in SD physical Layer
    Specification Version 1.10. Therefore, cards that are
    compatible with earlier versions of the spec do not support
    it. The host shall check the "SD_SPEC" field in the SCR
    register to recognize what version of the spec the card
    complies with before using CMD6. It is mandatory for SD
    memory card of Ver1.10 to support CMD6.

    4.3.11 High-Speed mode (25MB/sec interface speed)

    Though the Rev 1.01 SD memory card supports up to 12.5MB/sec
    interface speed, the speed of 25MB/sec is necessary to support
    increasing performance needs of the host and because of memory
    size which continues to grow.
    To achieve 25MB/sec interface speed, clock rate is increased to
    50MHz and CLK/CMD/DAT signal timing and circuit conditions are
    reconsidered and changed from Physical Layer Specification
    Version 1.01.

    4.3.12 Command system (This chapter is newly added in version 1.10)

    SD commands CMD34-37, CMD50, CMD57 are reserved for SD command
    system expansion via the switch command.
    [These commands] will be considered as illegal commands (as
    defined in revision 1.01 of the SD physical layer specification).

The SWITCH_FUNCTION is implemented since the first commit, a1bb27b1e9.

The 25MB/sec High-Speed mode was already updated in d7ecb86752.

The current implementation does not implements CMD34-37, CMD50 and
CMD57, thus these commands already return ILLEGAL.

With this patch, the SCR register now matches the description of the header:

 * SD Memory Card emulation as defined in the "SD Memory Card Physical
 * layer specification, Version 1.10."

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180607180641.874-2-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 8e96f59441 target/xtensa: Add trailing '\n' to qemu_log() calls
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Message-id: 20180606152128.449-12-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 0cd3f644fe RISC-V: Add trailing '\n' to qemu_log() calls
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606152128.449-11-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 21528149eb target/m68k: Add trailing '\n' to qemu_log() call
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-id: 20180606152128.449-10-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 0221c8fdf2 target/arm: Add trailing '\n' to qemu_log() calls
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606152128.449-9-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 9492e4b2de stellaris: Add trailing '\n' to qemu_log() calls
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606152128.449-8-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé c4c98835c6 hw/mips/boston: Add trailing '\n' to qemu_log() calls
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606152128.449-7-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 697f4958ae hw/core/register: Add trailing '\n' to qemu_log() call
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20180606152128.449-6-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé c7e71a182d ppc/pnv: Add trailing '\n' to qemu_log() calls
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-id: 20180606152128.449-5-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé f2bbb68628 xilinx-dp: Add trailing '\n' to qemu_log() call
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20180606152128.449-4-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 428d42ce23 hw/digic: Add trailing '\n' to qemu_log() calls
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606152128.449-3-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé c78d6a6466 hw/sd/milkymist-memcard: Add trailing '\n' to qemu_log() call
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606152128.449-2-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Philippe Mathieu-Daudé 08bb9b347b hw/i2c: Add trace events
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606191801.6331-1-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:33 +01:00
Thomas Huth da969774af hw/arm: Remove the deprecated xlnx-ep108 machine
It has been marked as deprecated since QEMU v2.11, so it is time to
remove this now. The xlnx-zcu102 machine is very much the same and
can be used as a replacement instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 99a00e55c7 ftgmac100: remove check on runt messages
This is a ethernet wire limitation not needed in emulation. It breaks
U-Boot n/w stack also.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-id: 20180530061711.23673-5-clg@kaod.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 44effc1f99 ftgmac100: fix multicast hash routine
Based on the multicast hash calculation of the FTGMAC100 Linux driver.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180530061711.23673-4-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 8576b12df7 ftgmac100: add IEEE 802.1Q VLAN support
The ftgmac100 NIC supports VLAN tag insertion and the MAC engine also
has a control to remove VLAN tags from received packets.

The VLAN control bits and VLAN tag information are contained in the
second word of the transmit and receive descriptors. The Insert VLAN
bit and the VLAN Tag available bit are only valid in the first segment
of the packet.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180530061711.23673-3-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater cd679a76a0 ftgmac100: compute maximum frame size depending on the protocol
The maximum frame size includes the CRC and depends if a VLAN tag is
inserted or not. Adjust the frame size limit in the transmit handler
using on the FTGMAC100State buffer size and in the receive handler use
the packet protocol.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180530061711.23673-2-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 8c9a61d7e0 aspeed: add the pc9552 chips to the witherspoon machine
The pca9552 LED blinkers on the Witherspoon machine are used for leds
but also as GPIOs to control fans and GPUs.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180530064049.27976-8-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 5141d4158c misc: add pca9552 LED blinker model
Specs are available here :

    https://www.nxp.com/docs/en/application-note/AN264.pdf

This is a simple model supporting the basic registers for led and GPIO
mode. The device also supports two blinking rates but not the model
yet.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180530064049.27976-7-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 3d165f12db aspeed: Add EEPROM I2C devices
The Aspeed boards have at least one EEPROM to hold the Vital Product
Data (VPD).

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Message-id: 20180530064049.27976-6-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater e222421413 smbus: add a smbus_eeprom_init_one() routine
This is an helper routine to add a single EEPROM on an I2C bus. It can
be directly used by smbus_eeprom_init() which adds a certain number of
EEPROMs on mips and x86 machines.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180530064049.27976-5-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 6c4567c730 aspeed: add an I2C RTC device to all machines
The AST2500 EVB does not have an RTC but we can pretend that one is
plugged on the I2C bus header.

The romulus and witherspoon boards expects an Epson RX8900 I2C RTC but
a ds1338 is good enough for the basic features we need.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Message-id: 20180530064049.27976-4-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 62c2c2ebde aspeed: add support for the witherspoon-bmc board
The Witherspoon boards are OpenPOWER system hosting POWER9 Processors.
Add support for their BMC including a couple of I2C devices as found
on real HW.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Message-id: 20180530064049.27976-3-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Cédric Le Goater 72ee64b6a7 aspeed: remove ignore_memory_transaction_failures on all boards
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20180530064049.27976-2-clg@kaod.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Shannon Zhao 910e204841 arm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR
While we skip the GIC_INTERNAL irqs, we don't change the register offset
accordingly. This will overlap the GICR registers value and leave the
last GIC_INTERNAL irq's registers out of update.

Fix this by skipping the registers banked by GICR.

Also for migration compatibility if the migration source (old version
qemu) doesn't send gicd_no_migration_shift_bug = 1 to destination, then
we shift the data of PPI to get the right data for SPI.

Fixes: 367b9f527b
Cc: qemu-stable@nongnu.org
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Message-id: 1527816987-16108-1-git-send-email-zhaoshenglong@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 13:15:32 +01:00
Peter Maydell bac5ba3dc5 slirp updates
Prasad J Pandit (2):
   slirp: Fix buffer overflow on packet reassembling
 
 Samuel Thibault (3):
   slirp: Add Samuel Thibault's staging tree for slirp
   slirp: fix domainname version availability
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEOjpdRkZg6GdhDKQnmWhJwc9WBHgFAlsaHkgACgkQmWhJwc9W
 BHgC+A//aLlgQuto9TscHvvvzQX4KsoempDxa3BAHc+eCpWrSdg8ddh16b4NkXTD
 nDhrbN64nOO0EfplRWNyakIsf8K/gX9KuRks+ZpPyIydPWfRB4NnZQPObRZ17c0X
 mSL06qIdBuK/9DJIzm6iJ8L4DT/UmNJlvVmwna1FdWwlthJnynskKXjTCIfs5LfQ
 ld7qMK1RAGQNAtXxaXxkEWm+oBUeswBfrc7i3kfX7W4/fhO+idWeu6sCXJFVZtnP
 hfH8GmWaz1rapsRb7sTjG6KK+OPGY5gDLb/okj9DlVP/n/Ksx18rOMS2uNwUKT14
 YmRQBPGq1sZF+RU3GoyLDcNlzqxOQ8KXMWjlY5eLc54NOVJ1sTdzArgUNwDvCGOn
 zS6CGxGtX2KkL1l8mn76l/j+OO3yqqLyLsz0PEi5ahMA75uShmHhX1MMB+tKCGnl
 YB953Qh7lGDQFt0w/op1etiVkrDFevDq95fntqJjAvdo5CVtaMooMEiolji/3t1u
 6rWzzrgKfWgeXKGWymh0AQPeLVkmXRPOA+L7JqNwWn6wxl6yJGOcDRVuwVaNNYE0
 OrKgfRa6vDI+YTHghlawJg4hFCMBmUlEsLyuc+rbOy+hSbHg9mDrV8XyHL5dhufL
 cYvpRuroDCo4X3CKTFGy/GkPQCz1hExCM2JcjuhFtTL7s2Rb5Bs=
 =ZIdm
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging

slirp updates

Prasad J Pandit (2):
  slirp: Fix buffer overflow on packet reassembling

Samuel Thibault (3):
  slirp: Add Samuel Thibault's staging tree for slirp
  slirp: fix domainname version availability

# gpg: Signature made Fri 08 Jun 2018 07:12:24 BST
# gpg:                using RSA key 996849C1CF560478
# gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>"
# gpg:                 aka "Samuel Thibault <sthibault@debian.org>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@gnu.org>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@inria.fr>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@labri.fr>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@ens-lyon.org>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>"
# 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: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#      Subkey fingerprint: 3A3A 5D46 4660 E867 610C  A427 9968 49C1 CF56 0478

* remotes/thibault/tags/samuel-thibault:
  slirp: reformat m_inc routine
  slirp: correct size computation while concatenating mbuf
  slirp: fix domainname version availability
  slirp: Add Samuel Thibault's staging tree for slirp
  slirp: Fix spurious error report when sending directly

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-08 10:26:16 +01:00
Prasad J Pandit c22098c74a slirp: reformat m_inc routine
Coding style changes to the m_inc routine and minor refactoring.

Reported-by: ZDI Disclosures <zdi-disclosures@trendmicro.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2018-06-08 09:08:30 +03:00
Prasad J Pandit 864036e251 slirp: correct size computation while concatenating mbuf
While reassembling incoming fragmented datagrams, 'm_cat' routine
extends the 'mbuf' buffer, if it has insufficient room. It computes
a wrong buffer size, which leads to overwriting adjacent heap buffer
area. Correct this size computation in m_cat.

Reported-by: ZDI Disclosures <zdi-disclosures@trendmicro.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2018-06-08 09:08:30 +03:00
Samuel Thibault 3835c310bd slirp: fix domainname version availability
The change missed the 2.12 deadline.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
2018-06-08 09:08:30 +03:00
Samuel Thibault 02cffe24a2 slirp: Add Samuel Thibault's staging tree for slirp
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Thomas Huth <thuth@redhat.com>
2018-06-08 09:08:21 +03:00
Peter Maydell a674da0ab7 Mostly bug fixes and code sanitization motivated by the upcoming
support for Darwin hosts. Thanks to Keno Fischer.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEtIKLr5QxQM7yo0kQcdTV5YIvc9YFAlsZCWAACgkQcdTV5YIv
 c9blAg//U76b27YdGeYQoBVbNJpgOxz9aVfzHZccMRDFCaQypBa1IpJFwvho550a
 Xp8kTGJIzI/mEnTkiDTzaHXZusYCZwwlArY+3Qi3hygJh2vN7Yx/l9247NtWWTUC
 l9lXV5tFGkMwd0WH9wajyy+rFfLTQ5aFkc+mTrl2fcabYIMMztKXEz1LFS/bX8wO
 r/ezqp0AnNDB4rGGaHPhwAxwPw186hhsVOBpTRNgBlrxP4zrZ/Thhth7ORV10lMX
 koJVY4SmwvhpiozXU1a5RasiXizg0N/LlR2y3fBFZDr1znk0hcE4h/2AP2VJwSAp
 SJ5sq9QfDy3FEtHeDLQY6ypKhxh26mjLEGHkQG7E56kqjwnrsMnV/y2IJLpK7vvX
 FuQ1g/hQrB7hbvHGkTo4wW/01xoTKCqXDEMNNJhyjU2AoVjfsF3g0M/EB/UOrLlr
 51YslBqBNIKQ0e/TIIz0ovyT4y9SGWZy3gpx7Ri4g4QG1NeV0QPj7XquclcvGo6k
 l7z7lauwdHfR/Koo0tfxsrHiircUCsJEDh0YmiWusqrMnN7TY3v9gzAUUgXN4JpU
 UyFtM86qrlBIA8X0pyaWICIyf9EGPn9xKgUQMtmvmAQopiCwtCUuF7+pau8Ahd6g
 cGo2WpyyOkcl1w5tmilrHH7omEFEFt6a5QmB0HUSEd+GtFUkJ+U=
 =30AO
 -----END PGP SIGNATURE-----

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

Mostly bug fixes and code sanitization motivated by the upcoming
support for Darwin hosts. Thanks to Keno Fischer.

# gpg: Signature made Thu 07 Jun 2018 11:30:56 BST
# gpg:                using RSA key 71D4D5E5822F73D6
# gpg: Good signature from "Greg Kurz <groug@kaod.org>"
# gpg:                 aka "Gregory Kurz <gregory.kurz@free.fr>"
# gpg:                 aka "[jpeg image of size 3330]"
# Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6

* remotes/gkurz/tags/for-upstream:
  9p: xattr: Properly translate xattrcreate flags
  9p: Properly check/translate flags in unlinkat
  9p: local: Avoid warning if FS_IOC_GETVERSION is not defined
  9p: xattr: Fix crashes due to free of uninitialized value
  9p: Move a couple xattr functions to 9p-util
  9p: local: Properly set errp in fstatfs error path
  9p: proxy: Fix size passed to `connect`

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-07 16:22:57 +01:00
Keno Fischer aca6897fba 9p: xattr: Properly translate xattrcreate flags
As with unlinkat, these flags come from the client and need to
be translated to their host values. The protocol values happen
to match linux, but that need not be true in general.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-06-07 12:17:22 +02:00
Keno Fischer 67e8734574 9p: Properly check/translate flags in unlinkat
The 9p-local code previously relied on P9_DOTL_AT_REMOVEDIR and AT_REMOVEDIR
having the same numerical value and deferred any errorchecking to the
syscall itself. However, while the former assumption is true on Linux,
it is not true in general. 9p-handle did this properly however. Move
the translation code to the generic 9p server code and add an error
if unrecognized flags are passed.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-06-07 12:17:22 +02:00
Keno Fischer 5b7b2f9a85 9p: local: Avoid warning if FS_IOC_GETVERSION is not defined
Both `stbuf` and `local_ioc_getversion` where unused when
FS_IOC_GETVERSION was not defined, causing a compiler warning.

Reorganize the code to avoid this warning.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-06-07 12:17:22 +02:00
Keno Fischer a647502c58 9p: xattr: Fix crashes due to free of uninitialized value
If the size returned from llistxattr/lgetxattr is 0, we skipped
the malloc call, leaving xattr.value uninitialized. However, this
value is later passed to `g_free` without any further checks,
causing an error. Fix that by always calling g_malloc unconditionally.
If `size` is 0, it will return NULL, which is safe to pass to g_free.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-06-07 12:17:22 +02:00
Keno Fischer ec70b956fd 9p: Move a couple xattr functions to 9p-util
These functions will need custom implementations on Darwin. Since the
implementation is very similar among all of them, and 9p-util already
has the _nofollow version of fgetxattrat, let's move them all there.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-06-07 12:17:22 +02:00
Keno Fischer 2306271c38 9p: local: Properly set errp in fstatfs error path
In the review of

    9p: Avoid warning if FS_IOC_GETVERSION is not defined

Grep Kurz noted this error path was failing to set errp.
Fix that.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
[added local: to commit title, Greg Kurz]
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-06-07 12:17:21 +02:00
Keno Fischer fde1f3e4a0 9p: proxy: Fix size passed to connect
The size to pass to the `connect` call is the size of the entire
`struct sockaddr_un`. Passing anything shorter than this causes errors
on darwin.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2018-06-07 12:17:21 +02:00
Peter Maydell 8e36d27c5a Merge tpm 2018/06/06 v1
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJbGDqRAAoJEHWtZYAqC0IR5ssH/i2r7rFdUYpZ7yq+VMo1w2rH
 Fisuq4yympndSCn3Eaf54vegU1Wn4sEaEoPXUGLGza67Ivz2E90w4eMG/Ln2F1XM
 xLuvmRZvCsaORB+kpbmjDkXncpK/DOZ7wmdk0oTHUQYVjIZ9bCZgKLGFwMjTohl9
 /l1Y5J/zeAvTv89u/zb8/VslZ0Y6YUaw7vfkkVCa6iZ57RFQ77yUJyjuBHVS3m2v
 qP/6u/eLXjtyrjWT6oX/k2h3bKeKrQn9mRTJ2fJKfuVIfFJ3D9IPXlhhXs4/taRR
 1FtQ/3rBHpCluC0PGQLBtdNcYVWWFICb5zfAY1TGCnHtReME/qqaYw9vgI1kGXk=
 =KKjm
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-06-06-1' into staging

Merge tpm 2018/06/06 v1

# gpg: Signature made Wed 06 Jun 2018 20:48:33 BST
# gpg:                using RSA key 75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>"
# 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: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211

* remotes/stefanberger/tags/pull-tpm-2018-06-06-1:
  test: Add swtpm migration test for the TPM TIS interface
  test: Pass TPM interface model to functions creating command line
  test: Move common TPM test functions to tpm-tests.c
  test: Move reusable code from tpm-crb-swtpm-test.c to tpm-util.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-07 09:55:42 +01:00
Peter Maydell 5d328d7d2f VFIO updates 2018-06-05
- Removed unused DPRINTF (Tiwei Bie)
  - KVM & VFIO ioeventfd support for NVIDIA MSI ACK (Alex Williamson)
  - Default vfio-pci display support to "off" (Alex Williamson)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJbFumyAAoJECObm247sIsiK4YP/iYtLTCUl+Mx4u5tl81kVvCn
 y9VBXWyx/02RGSg9reSO4D3i143opK8ZvN4pUkd0GedEzOkYb3c681/y3C46xROY
 eB+02Ozdiy9tcZhNx64NhIK/DBWHCgwhZ3aS6hY8TEQ+uoSXO63c2PFAyoZxxgU9
 nqtrRNhORt8aiuVsP+1e3x7K4IDvvNcYs4Wks8TyXjvTnEOyofj5A5jS6BJRBZ0j
 8nNpnDA6X0N2o6RbkDnQBL4ZB9nu6P4avq6VY03GbeAW2TGpGQbQgLKCUaxWQ0Xz
 oz4bqYGqTMBEv6zbMsLxs+ir1dzsY3BcGfZgD6Ur8YYFUCSqCGi78dttfoeW7qnD
 eHJ9oChvXy+vO9Cbc//u8xhN4nu6Cuzb5qOvifnTbsfx+u7bviHCMqNBfIkPmwkL
 exgSnGAezI0CXpLkBPdqbgNsxMwHeNYNzeGlrYKpXdTfkstRP5UVEmo5t0I3b3Y7
 lju8jyMtiwoygZ5LdfJHeAZ3SKkskzv6DLImHYJC3Dvh6tQz2LzfTNxHRwQWSeaD
 4v/hJzEIlXKQl19wwbtE1tpeIhoFZgKGoeipX4wwlDrQkUCD9gU4I1yunxup+nWw
 mZrnFg3ozDurjHvcDiUcD+rZQ0Mn2hzscVbeNeY5WRoNUBUjdAfih8Y40l5iZQiN
 HnxDdUbxGwZCJcHg1YMv
 =KKVL
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20180605.0' into staging

VFIO updates 2018-06-05

 - Removed unused DPRINTF (Tiwei Bie)
 - KVM & VFIO ioeventfd support for NVIDIA MSI ACK (Alex Williamson)
 - Default vfio-pci display support to "off" (Alex Williamson)

# gpg: Signature made Tue 05 Jun 2018 20:51:14 BST
# gpg:                using RSA key 239B9B6E3BB08B22
# gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>"
# gpg:                 aka "Alex Williamson <alex@shazbot.org>"
# gpg:                 aka "Alex Williamson <alwillia@redhat.com>"
# gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>"
# Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22

* remotes/awilliam/tags/vfio-update-20180605.0:
  vfio/pci: Default display option to "off"
  vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly
  vfio/quirks: ioeventfd quirk acceleration
  vfio/quirks: Add quirk reset callback
  vfio/quirks: Add common quirk alloc helper
  vfio: remove DPRINTF() definition from vfio-common.h

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-07 08:59:28 +01:00
Stefan Berger 70663851ed test: Add swtpm migration test for the TPM TIS interface
Add a test case for testing swtpm migration with the TPM TIS
interface.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-06 15:44:12 -04:00
Stefan Berger ea71a33691 test: Pass TPM interface model to functions creating command line
Pass the TPM interface model, such as 'tpm-crb', through to the functions
that create the command line for QEMU.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-06 15:44:07 -04:00
Stefan Berger 2b4ccb87ec test: Move common TPM test functions to tpm-tests.c
Move common TPM test functions from tpm-crb-swtpm-test.c to tpm-tests.c
so that for example test cases with the TPM TIS interface can use the
same code. Prefix all funcions with 'tpm_test_'.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-06 15:44:01 -04:00
Stefan Berger b1e4b7c6b2 test: Move reusable code from tpm-crb-swtpm-test.c to tpm-util.c
Move code we can reuse from tpm-crb-swtpm-test.c into tpm-util.c
and prefix functions with 'tpm_util_'.

Remove some unnecessary #include's.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-06 15:43:54 -04:00
Peter Maydell c1c2a43590 Docker related updates
- configure/probe for docker
   - TARGET_DIRS -> TARGET_LIST cleanup
   - new fedora-i386-cross and debian/tricore images
   - test-mingw use SDL2/GTK3
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAlsWrSUACgkQ+9DbCVqe
 KkQxRgf/XbNaRfMtZx2FX847NLp+AyCqUOmtQyU58pkI6g6Ld7RsRTcTI9S0bsdk
 GJhDIbP+B6hqou998BUIifNT4Ofd1KcTJ/8IodDXGMkO00DgW/igq5KWc/ZDW2EI
 nfAVd1lqZiH4a0iOWKpRmfGqlKK5yTStVOtU82SEOnDjMQMD8ESLtPD/oSghLrGA
 AWPmrE1lBoTQq6Ly2NXQrFcM9SkvEwFAkXQSuuoYA3DELoIkX6rSqKHzzJL1wdqK
 /38nlC+oELRTjJBSVQ9TDfRduwd5JqW0h1gnlUDoFrsSVN45OibLlK2TAlNxRQ26
 xiyeFB4tBG7jp8xtYIOIWuAW/DJgsw==
 =NdC0
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-docker-updates-050618-1' into staging

Docker related updates

  - configure/probe for docker
  - TARGET_DIRS -> TARGET_LIST cleanup
  - new fedora-i386-cross and debian/tricore images
  - test-mingw use SDL2/GTK3

# gpg: Signature made Tue 05 Jun 2018 16:32:53 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-docker-updates-050618-1:
  docker: add debian/tricore image
  docker: test-mingw: use SDL2 and GTK+3
  docker: Add fedora-i386-cross image
  Makefile: Rename TARGET_DIRS to TARGET_LIST
  configure: add test for docker availability
  docker: add "probe" command for configure

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-06-05 17:06:23 +01:00
Philippe Mathieu-Daudé 36dc5fedab docker: add debian/tricore image
TriCore binutils is built from Bastian Koppelmann repository.

Note: There is no TriCore compiler in this image (only assembler/linker).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[AJB: base of Debian9, add to Makefile.include]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2018-06-05 16:25:43 +01:00