]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
5 years agoi386: Clean up cache CPUID code
Eduardo Habkost [Thu, 24 May 2018 15:43:30 +0000 (11:43 -0400)]
i386: Clean up cache CPUID code

Always initialize CPUCaches structs with cache information, even
if legacy_cache=true.  Use different CPUCaches struct for
CPUID[2], CPUID[4], and the AMD CPUID leaves.

This will simplify a lot the logic inside cpu_x86_cpuid().

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
Message-Id: <1527176614-26271-2-git-send-email-babu.moger@amd.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
5 years agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180608' into...
Peter Maydell [Fri, 8 Jun 2018 15:26:51 +0000 (16:26 +0100)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180608' into staging

target-arm queue:
 * arm_gicv3_kvm: fix migration of registers corresponding to
   IRQs 992 to 1020 in the KVM GIC
 * aspeed: remove ignore_memory_transaction_failures on all boards
 * aspeed: add support for the witherspoon-bmc board
 * aspeed: add an I2C RTC device and EEPROM I2C devices
 * aspeed: add the pc9552 chips to the witherspoon machine
 * ftgmac100: fix various bugs
 * hw/arm: Remove the deprecated xlnx-ep108 machine
 * hw/i2c: Add trace events
 * add missing '\n' on various qemu_log() logging strings
 * sdcard: clean up spec version support so we report the
   right spec version to the guest and only implement the
   commands that are supposed to be present in that version

# gpg: Signature made Fri 08 Jun 2018 13:36:37 BST
# gpg:                using RSA key 3C2525ED14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20180608: (31 commits)
  sdcard: Disable CMD19/CMD23 for Spec v2
  sdcard: Reflect when the Spec v3 is supported in the Config Register (SCR)
  sdcard: Disable SEND_IF_COND (CMD8) for Spec v1
  sdcard: Add a 'spec_version' property, default to Spec v2.00
  sdcard: Allow commands valid in SPI mode
  sdcard: Update the Configuration Register (SCR) to Spec Version 1.10
  target/xtensa: Add trailing '\n' to qemu_log() calls
  RISC-V: Add trailing '\n' to qemu_log() calls
  target/m68k: Add trailing '\n' to qemu_log() call
  target/arm: Add trailing '\n' to qemu_log() calls
  stellaris: Add trailing '\n' to qemu_log() calls
  hw/mips/boston: Add trailing '\n' to qemu_log() calls
  hw/core/register: Add trailing '\n' to qemu_log() call
  ppc/pnv: Add trailing '\n' to qemu_log() calls
  xilinx-dp: Add trailing '\n' to qemu_log() call
  hw/digic: Add trailing '\n' to qemu_log() calls
  hw/sd/milkymist-memcard: Add trailing '\n' to qemu_log() call
  hw/i2c: Add trace events
  hw/arm: Remove the deprecated xlnx-ep108 machine
  ftgmac100: remove check on runt messages
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agosdcard: Disable CMD19/CMD23 for Spec v2
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:34 +0000 (13:15 +0100)]
sdcard: Disable CMD19/CMD23 for Spec v2

These commands got introduced by Spec v3
(see 0c3fb03f7ec and 4481bbc79d2).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180607180641.874-7-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agosdcard: Reflect when the Spec v3 is supported in the Config Register (SCR)
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:34 +0000 (13:15 +0100)]
sdcard: Reflect when the Spec v3 is supported in the Config Register (SCR)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20180607180641.874-6-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agosdcard: Disable SEND_IF_COND (CMD8) for Spec v1
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:34 +0000 (13:15 +0100)]
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>
5 years agosdcard: Add a 'spec_version' property, default to Spec v2.00
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agosdcard: Allow commands valid in SPI mode
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agosdcard: Update the Configuration Register (SCR) to Spec Version 1.10
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
sdcard: Update the Configuration Register (SCR) to Spec Version 1.10

The initial implementation is based on the Specs v1.10 (see a1bb27b1e98).

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, a1bb27b1e98.

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

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>
5 years agotarget/xtensa: Add trailing '\n' to qemu_log() calls
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agoRISC-V: Add trailing '\n' to qemu_log() calls
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agotarget/m68k: Add trailing '\n' to qemu_log() call
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agotarget/arm: Add trailing '\n' to qemu_log() calls
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agostellaris: Add trailing '\n' to qemu_log() calls
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agohw/mips/boston: Add trailing '\n' to qemu_log() calls
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agohw/core/register: Add trailing '\n' to qemu_log() call
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agoppc/pnv: Add trailing '\n' to qemu_log() calls
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agoxilinx-dp: Add trailing '\n' to qemu_log() call
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agohw/digic: Add trailing '\n' to qemu_log() calls
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agohw/sd/milkymist-memcard: Add trailing '\n' to qemu_log() call
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agohw/i2c: Add trace events
Philippe Mathieu-Daudé [Fri, 8 Jun 2018 12:15:33 +0000 (13:15 +0100)]
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>
5 years agohw/arm: Remove the deprecated xlnx-ep108 machine
Thomas Huth [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoftgmac100: remove check on runt messages
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoftgmac100: fix multicast hash routine
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoftgmac100: add IEEE 802.1Q VLAN support
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoftgmac100: compute maximum frame size depending on the protocol
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoaspeed: add the pc9552 chips to the witherspoon machine
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agomisc: add pca9552 LED blinker model
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoaspeed: Add EEPROM I2C devices
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agosmbus: add a smbus_eeprom_init_one() routine
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoaspeed: add an I2C RTC device to all machines
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoaspeed: add support for the witherspoon-bmc board
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoaspeed: remove ignore_memory_transaction_failures on all boards
Cédric Le Goater [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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>
5 years agoarm_gicv3_kvm: kvm_dist_get/put: skip the registers banked by GICR
Shannon Zhao [Fri, 8 Jun 2018 12:15:32 +0000 (13:15 +0100)]
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: 367b9f527becdd20ddf116e17a3c0c2bbc486920
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>
5 years agochardev: Restore CR,LF on stdio
Philippe Mathieu-Daudé [Thu, 7 Jun 2018 21:08:18 +0000 (18:08 -0300)]
chardev: Restore CR,LF on stdio

Remove the 'stair-step output' on stdio.

This partially reverts commit 12fb0ac05, which was correct
on the mailing list but got corrupted by the maintainer :p

Introduced-by: 3b876140-c035-dd39-75d0-d54c48128fac@redhat.com
Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180607210818.12727-1-f4bug@amsat.org
Suggested-by: Thomas Huth <thuth@redhat.com>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agoMerge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging
Peter Maydell [Fri, 8 Jun 2018 09:26:16 +0000 (10:26 +0100)]
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>
5 years agoslirp: reformat m_inc routine
Prasad J Pandit [Tue, 5 Jun 2018 18:08:35 +0000 (23:38 +0530)]
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>
5 years agoslirp: correct size computation while concatenating mbuf
Prasad J Pandit [Tue, 5 Jun 2018 18:08:35 +0000 (23:38 +0530)]
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>
5 years agoslirp: fix domainname version availability
Samuel Thibault [Thu, 31 May 2018 19:51:02 +0000 (21:51 +0200)]
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>
5 years agoslirp: Add Samuel Thibault's staging tree for slirp
Samuel Thibault [Thu, 31 May 2018 19:45:10 +0000 (21:45 +0200)]
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>
5 years agoMerge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
Peter Maydell [Thu, 7 Jun 2018 15:22:57 +0000 (16:22 +0100)]
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>
5 years ago9p: xattr: Properly translate xattrcreate flags
Keno Fischer [Thu, 7 Jun 2018 10:17:22 +0000 (12:17 +0200)]
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>
5 years ago9p: Properly check/translate flags in unlinkat
Keno Fischer [Thu, 7 Jun 2018 10:17:22 +0000 (12:17 +0200)]
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>
5 years ago9p: local: Avoid warning if FS_IOC_GETVERSION is not defined
Keno Fischer [Thu, 7 Jun 2018 10:17:22 +0000 (12:17 +0200)]
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>
5 years ago9p: xattr: Fix crashes due to free of uninitialized value
Keno Fischer [Thu, 7 Jun 2018 10:17:22 +0000 (12:17 +0200)]
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>
5 years ago9p: Move a couple xattr functions to 9p-util
Keno Fischer [Thu, 7 Jun 2018 10:17:22 +0000 (12:17 +0200)]
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>
5 years ago9p: local: Properly set errp in fstatfs error path
Keno Fischer [Thu, 7 Jun 2018 10:17:21 +0000 (12:17 +0200)]
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>
5 years ago9p: proxy: Fix size passed to `connect`
Keno Fischer [Thu, 7 Jun 2018 10:17:21 +0000 (12:17 +0200)]
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>
5 years agoMerge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2018-06-06-1' into...
Peter Maydell [Thu, 7 Jun 2018 08:55:42 +0000 (09:55 +0100)]
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>
5 years agoMerge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20180605.0' into...
Peter Maydell [Thu, 7 Jun 2018 07:59:28 +0000 (08:59 +0100)]
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>
5 years agotest: Add swtpm migration test for the TPM TIS interface
Stefan Berger [Wed, 30 May 2018 17:44:41 +0000 (13:44 -0400)]
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>
5 years agotest: Pass TPM interface model to functions creating command line
Stefan Berger [Wed, 30 May 2018 18:31:12 +0000 (14:31 -0400)]
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>
5 years agotest: Move common TPM test functions to tpm-tests.c
Stefan Berger [Wed, 30 May 2018 16:30:26 +0000 (12:30 -0400)]
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>
5 years agotest: Move reusable code from tpm-crb-swtpm-test.c to tpm-util.c
Stefan Berger [Wed, 30 May 2018 16:12:50 +0000 (12:12 -0400)]
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>
5 years agoMerge remote-tracking branch 'remotes/stsquad/tags/pull-docker-updates-050618-1'...
Peter Maydell [Tue, 5 Jun 2018 16:06:23 +0000 (17:06 +0100)]
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>
5 years agodocker: add debian/tricore image
Philippe Mathieu-Daudé [Wed, 2 May 2018 00:21:43 +0000 (21:21 -0300)]
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>
5 years agodocker: test-mingw: use SDL2 and GTK+3
Paolo Bonzini [Fri, 16 Mar 2018 12:25:39 +0000 (13:25 +0100)]
docker: test-mingw: use SDL2 and GTK+3

Do not test the deprecated API versions.  debian-win32-cross and debian-win64-cross
are already using SDL2 (they do not cover GTK+ at all).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[AJB: fix merge conflicts]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
5 years agodocker: Add fedora-i386-cross image
Fam Zheng [Fri, 8 Sep 2017 09:16:56 +0000 (17:16 +0800)]
docker: Add fedora-i386-cross image

It has some basic *-devel.i686 packages to be used with "gcc -m32" as a
32 bit cross build environment.

Signed-off-by: Fam Zheng <famz@redhat.com>
[AJB: add glibc-static]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
5 years agoMakefile: Rename TARGET_DIRS to TARGET_LIST
Fam Zheng [Fri, 8 Sep 2017 09:16:54 +0000 (17:16 +0800)]
Makefile: Rename TARGET_DIRS to TARGET_LIST

To be more accurate on its purpose and make code that looks for a certain
target out of this variable more readable.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
5 years agoconfigure: add test for docker availability
Alex Bennée [Wed, 4 Apr 2018 13:24:39 +0000 (14:24 +0100)]
configure: add test for docker availability

This tests for a working docker installation without sudo and sets up
config-host.mak accordingly. This will be useful from cross compiling
things in the future.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
5 years agodocker: add "probe" command for configure
Alex Bennée [Thu, 10 May 2018 09:45:55 +0000 (10:45 +0100)]
docker: add "probe" command for configure

This is a helper function for the configure script. It replies yes,
sudo or no to inform the user if non-interactive docker support is
available. We trap the Exception to fail gracefully.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
5 years agovfio/pci: Default display option to "off"
Alex Williamson [Tue, 5 Jun 2018 14:23:18 +0000 (08:23 -0600)]
vfio/pci: Default display option to "off"

Commit a9994687cb9b ("vfio/display: core & wireup") added display
support to vfio-pci with the default being "auto", which breaks
existing VMs when the vGPU requires GL support but had no previous
requirement for a GL compatible configuration.  "Off" is the safer
default as we impose no new requirements to VM configurations.

Fixes: a9994687cb9b ("vfio/display: core & wireup")
Cc: qemu-stable@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
5 years agovfio/quirks: Enable ioeventfd quirks to be handled by vfio directly
Alex Williamson [Tue, 5 Jun 2018 14:23:17 +0000 (08:23 -0600)]
vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly

With vfio ioeventfd support, we can program vfio-pci to perform a
specified BAR write when an eventfd is triggered.  This allows the
KVM ioeventfd to be wired directly to vfio-pci, entirely avoiding
userspace handling for these events.  On the same micro-benchmark
where the ioeventfd got us to almost 90% of performance versus
disabling the GeForce quirks, this gets us to within 95%.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
5 years agovfio/quirks: ioeventfd quirk acceleration
Alex Williamson [Tue, 5 Jun 2018 14:23:17 +0000 (08:23 -0600)]
vfio/quirks: ioeventfd quirk acceleration

The NVIDIA BAR0 quirks virtualize the PCI config space mirrors found
in device MMIO space.  Normally PCI config space is considered a slow
path and further optimization is unnecessary, however NVIDIA uses a
register here to enable the MSI interrupt to re-trigger.  Exiting to
QEMU for this MSI-ACK handling can therefore rate limit our interrupt
handling.  Fortunately the MSI-ACK write is easily detected since the
quirk MemoryRegion otherwise has very few accesses, so simply looking
for consecutive writes with the same data is sufficient, in this case
10 consecutive writes with the same data and size is arbitrarily
chosen.  We configure the KVM ioeventfd with data match, so there's
no risk of triggering for the wrong data or size, but we do risk that
pathological driver behavior might consume all of QEMU's file
descriptors, so we cap ourselves to 10 ioeventfds for this purpose.

In support of the above, generic ioeventfd infrastructure is added
for vfio quirks.  This automatically initializes an ioeventfd list
per quirk, disables and frees ioeventfds on exit, and allows
ioeventfds marked as dynamic to be dropped on device reset.  The
rationale for this latter feature is that useful ioeventfds may
depend on specific driver behavior and since we necessarily place a
cap on our use of ioeventfds, a machine reset is a reasonable point
at which to assume a new driver and re-profile.

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
5 years agovfio/quirks: Add quirk reset callback
Alex Williamson [Tue, 5 Jun 2018 14:23:17 +0000 (08:23 -0600)]
vfio/quirks: Add quirk reset callback

Quirks can be self modifying, provide a hook to allow them to cleanup
on device reset if desired.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
5 years agovfio/quirks: Add common quirk alloc helper
Alex Williamson [Tue, 5 Jun 2018 14:23:16 +0000 (08:23 -0600)]
vfio/quirks: Add common quirk alloc helper

This will later be used to include list initialization.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
5 years agovfio: remove DPRINTF() definition from vfio-common.h
Tiwei Bie [Tue, 5 Jun 2018 14:23:16 +0000 (08:23 -0600)]
vfio: remove DPRINTF() definition from vfio-common.h

This macro isn't used by any VFIO code. And its name is
too generic. The vfio-common.h (in include/hw/vfio) can
be included by other modules in QEMU. It can introduce
conflicts.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
5 years agoMerge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging
Peter Maydell [Tue, 5 Jun 2018 14:22:07 +0000 (15:22 +0100)]
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging

# gpg: Signature made Tue 05 Jun 2018 15:17:18 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:
  sheepdog: remove huge BSS object
  sheepdog: cleanup repeated expression

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agosheepdog: remove huge BSS object
Paolo Bonzini [Wed, 23 May 2018 16:07:21 +0000 (18:07 +0200)]
sheepdog: remove huge BSS object

block/sheepdog.o has a 4M static variable that is 90% of QEMU's whole .bss
section.  Replace it with a heap-allocated block, and make it smaller too
since only the inode header is actually being used.

bss size goes down from 4464280 to 269976.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20180523160721.14018-3-pbonzini@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
5 years agosheepdog: cleanup repeated expression
Paolo Bonzini [Wed, 23 May 2018 16:07:20 +0000 (18:07 +0200)]
sheepdog: cleanup repeated expression

The expression "SD_INODE_SIZE - sizeof(inode.data_vdi_id)" already has a macro
defined for the same value (though with a nicer definition using offsetof).
Replace it.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20180523160721.14018-2-pbonzini@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
5 years agoMerge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request...
Peter Maydell [Tue, 5 Jun 2018 09:38:33 +0000 (10:38 +0100)]
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging

move more data to arch specific files
fix SPARC %tick
replace strcpy() by g_strlcpy() in syscall.c

# gpg: Signature made Mon 04 Jun 2018 16:19:44 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: remove useless #if
  linux-user: move hppa signal definitions to hppa/target_signal.h
  linux-user: move alpha signal definitions to alpha/target_signal.h
  linux-user: move openrisc signal definitions to openrisc/target_signal.h
  linux-user: move mips signal definitions to mips/target_signal.h
  linux-user: move sparc signal definitions to sparc/target_signal.h
  linux-user: move generic signal definitions to generic/signal.h
  linux-user: move get_sp_from_cpustate() to target_cpu.h
  linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h
  linux-user: move ppc fcntl definitions to ppc/target_fcntl.h
  linux-user: move mips/mips64 fcntl definitions to mips/target_fcntl.h
  linux-user: move arm/aarch64/m68k fcntl definitions to [arm|aarch64|m68k]/target_fcntl.h
  linux-user: move hppa fcntl definitions to hppa/target_fcntl.h
  linux-user: move alpha fcntl definitions to alpha/target_fcntl.h
  linux-user: move generic fcntl definitions to generic/fcntl.h
  linux-user: SPARC "rd %tick" can be used by user application
  syscall: replace strcpy() by g_strlcpy()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agoMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Peter Maydell [Mon, 4 Jun 2018 17:34:04 +0000 (18:34 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Pull request

 * Copy offloading for qemu-img convert (iSCSI, raw, and qcow2)

   If the underlying storage supports copy offloading, qemu-img convert will
   use it instead of performing reads and writes.  This avoids data transfers
   and thus frees up storage bandwidth for other purposes.  SCSI EXTENDED COPY
   and Linux copy_file_range(2) are used to implement this optimization.

 * Drop spurious "WARNING: I\/O thread spun for 1000 iterations" warning

# gpg: Signature made Mon 04 Jun 2018 12:20:08 BST
# gpg:                using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  main-loop: drop spin_counter
  qemu-img: Convert with copy offloading
  block-backend: Add blk_co_copy_range
  iscsi: Implement copy offloading
  iscsi: Create and use iscsi_co_wait_for_task
  iscsi: Query and save device designator when opening
  file-posix: Implement bdrv_co_copy_range
  qcow2: Implement copy offloading
  raw: Implement copy offloading
  raw: Check byte range uniformly
  block: Introduce API for copy offloading

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agoMerge remote-tracking branch 'remotes/kraxel/tags/vga-20180604-pull-request' into...
Peter Maydell [Mon, 4 Jun 2018 14:46:15 +0000 (15:46 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180604-pull-request' into staging

Two little vga fixes.

# gpg: Signature made Mon 04 Jun 2018 09:48:53 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/vga-20180604-pull-request:
  vga: cleanup surface handling
  bochs-display: add missing break

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agoMerge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging
Peter Maydell [Mon, 4 Jun 2018 13:24:16 +0000 (14:24 +0100)]
Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging

# gpg: Signature made Mon 04 Jun 2018 08:09:27 BST
# gpg:                using RSA key CA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <famz@redhat.com>"
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/docker-pull-request:
  docker: Update fedora image to 28
  tests/docker/Makefile.include: handle empty TARGET_LIST

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agoMerge remote-tracking branch 'remotes/juanquintela/tags/migration/20180604' into...
Peter Maydell [Mon, 4 Jun 2018 11:54:00 +0000 (12:54 +0100)]
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20180604' into staging

migration/next for 20180604

# gpg: Signature made Mon 04 Jun 2018 05:14:24 BST
# gpg:                using RSA key F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg:                 aka "Juan Quintela <quintela@trasno.org>"
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* remotes/juanquintela/tags/migration/20180604:
  migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
  migration: remove unnecessary variables len in QIOChannelRDMA
  migration: Don't activate block devices if using -S
  migration: discard non-migratable RAMBlocks
  migration: introduce decompress-error-check

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agoMerge remote-tracking branch 'remotes/rth/tags/tcg-next-pull-request' into staging
Peter Maydell [Mon, 4 Jun 2018 10:28:31 +0000 (11:28 +0100)]
Merge remote-tracking branch 'remotes/rth/tags/tcg-next-pull-request' into staging

tcg-next queue

# gpg: Signature made Sat 02 Jun 2018 00:12:42 BST
# gpg:                using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>"
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/tcg-next-pull-request:
  tcg: Pass tb and index to tcg_gen_exit_tb separately

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agoMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
Peter Maydell [Mon, 4 Jun 2018 09:15:16 +0000 (10:15 +0100)]
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

acpi, vhost, misc: fixes, features

vDPA support, fix to vhost blk RO bit handling, some include path
cleanups, NFIT ACPI table.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 01 Jun 2018 17:25:19 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: (31 commits)
  vhost-blk: turn on pre-defined RO feature bit
  ACPI testing: test NFIT platform capabilities
  nvdimm, acpi: support NFIT platform capabilities
  tests/.gitignore: add entry for generated file
  arch_init: sort architectures
  ui: use local path for local headers
  qga: use local path for local headers
  colo: use local path for local headers
  migration: use local path for local headers
  usb: use local path for local headers
  sd: fix up include
  vhost-scsi: drop an unused include
  ppc: use local path for local headers
  rocker: drop an unused include
  e1000e: use local path for local headers
  ioapic: fix up includes
  ide: use local path for local headers
  display: use local path for local headers
  trace: use local path for local headers
  migration: drop an unused include
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
5 years agovga: cleanup surface handling
Gerd Hoffmann [Fri, 25 May 2018 13:13:18 +0000 (15:13 +0200)]
vga: cleanup surface handling

Just set the full_update flag if we need a new DisplaySurface.  Create
a new surface when the flag is set instead of having two places where
qemu_create_displaysurface_from() is called.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180525131318.28437-1-kraxel@redhat.com

5 years agobochs-display: add missing break
Gerd Hoffmann [Fri, 25 May 2018 04:53:44 +0000 (06:53 +0200)]
bochs-display: add missing break

Fixes: CID 1391291
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180525045344.28347-1-kraxel@redhat.com

5 years agodocker: Update fedora image to 28
Fam Zheng [Fri, 1 Jun 2018 02:35:57 +0000 (10:35 +0800)]
docker: Update fedora image to 28

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20180601023557.9770-1-famz@redhat.com>

5 years agotests/docker/Makefile.include: handle empty TARGET_LIST
Alex Bennée [Mon, 21 May 2018 10:35:04 +0000 (11:35 +0100)]
tests/docker/Makefile.include: handle empty TARGET_LIST

If the user doesn't specify a TARGET_LIST they get the current
configuration but with spaces and hilarity ensues. This adds some make
magic to turn the TARGET_LIST back into a comma separated list.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20180521103504.26432-1-alex.bennee@linaro.org>
Signed-off-by: Fam Zheng <famz@redhat.com>
5 years agomigration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect
Lidong Chen [Wed, 30 May 2018 09:43:31 +0000 (17:43 +0800)]
migration: not wait RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect

When cancel migration during RDMA precopy, the source qemu main thread hangs sometime.

The backtrace is:
    (gdb) bt
    #0  0x00007f249eabd43d in write () from /lib64/libpthread.so.0
    #1  0x00007f24a1ce98e4 in rdma_get_cm_event (channel=0x4675d10, event=0x7ffe2f643dd0) at src/cma.c:2189
    #2  0x00000000007b6166 in qemu_rdma_cleanup (rdma=0x6784000) at migration/rdma.c:2296
    #3  0x00000000007b7cae in qio_channel_rdma_close (ioc=0x3bfcc30, errp=0x0) at migration/rdma.c:2999
    #4  0x00000000008db60e in qio_channel_close (ioc=0x3bfcc30, errp=0x0) at io/channel.c:273
    #5  0x00000000007a8765 in channel_close (opaque=0x3bfcc30) at migration/qemu-file-channel.c:98
    #6  0x00000000007a71f9 in qemu_fclose (f=0x527c000) at migration/qemu-file.c:334
    #7  0x0000000000795b96 in migrate_fd_cleanup (opaque=0x3b46280) at migration/migration.c:1162
    #8  0x000000000093a71b in aio_bh_call (bh=0x3db7a20) at util/async.c:90
    #9  0x000000000093a7b2 in aio_bh_poll (ctx=0x3b121c0) at util/async.c:118
    #10 0x000000000093f2ad in aio_dispatch (ctx=0x3b121c0) at util/aio-posix.c:436
    #11 0x000000000093ab41 in aio_ctx_dispatch (source=0x3b121c0, callback=0x0, user_data=0x0)
        at util/async.c:261
    #12 0x00007f249f73c7aa in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
    #13 0x000000000093dc5e in glib_pollfds_poll () at util/main-loop.c:215
    #14 0x000000000093dd4e in os_host_main_loop_wait (timeout=28000000) at util/main-loop.c:263
    #15 0x000000000093de05 in main_loop_wait (nonblocking=0) at util/main-loop.c:522
    #16 0x00000000005bc6a5 in main_loop () at vl.c:1944
    #17 0x00000000005c39b5 in main (argc=56, argv=0x7ffe2f6443f8, envp=0x3ad0030) at vl.c:4752

It does not get the RDMA_CM_EVENT_DISCONNECTED event after rdma_disconnect sometime.

According to IB Spec once active side send DREQ message, it should wait for DREP message
and only once it arrived it should trigger a DISCONNECT event. DREP message can be dropped
due to network issues.
For that case the spec defines a DREP_timeout state in the CM state machine, if the DREP is
dropped we should get a timeout and a TIMEWAIT_EXIT event will be trigger.
Unfortunately the current kernel CM implementation doesn't include the DREP_timeout state
and in above scenario we will not get DISCONNECT or TIMEWAIT_EXIT events.

So it should not invoke rdma_get_cm_event which may hang forever, and the event channel
is also destroyed in qemu_rdma_cleanup.

Signed-off-by: Lidong Chen <lidongchen@tencent.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
5 years agomigration: remove unnecessary variables len in QIOChannelRDMA
Lidong Chen [Wed, 30 May 2018 09:43:27 +0000 (17:43 +0800)]
migration: remove unnecessary variables len in QIOChannelRDMA

Because qio_channel_rdma_writev and qio_channel_rdma_readv maybe invoked
by different threads concurrently, this patch removes unnecessary variables
len in QIOChannelRDMA and use local variable instead.

Signed-off-by: Lidong Chen <lidongchen@tencent.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Lidong Chen <jemmy858585@gmail.com>
5 years agomigration: Don't activate block devices if using -S
Dr. David Alan Gilbert [Mon, 16 Apr 2018 17:09:30 +0000 (18:09 +0100)]
migration: Don't activate block devices if using -S

Activating the block devices causes the locks to be taken on
the backing file.  If we're running with -S and the destination libvirt
hasn't started the destination with 'cont', it's expecting the locks are
still untaken.

Don't activate the block devices if we're not going to autostart the VM;
'cont' already will do that anyway.   This change is tied to the new
migration capability 'late-block-activate' that defaults to off, keeping
the old behaviour by default.

bz: https://bugzilla.redhat.com/show_bug.cgi?id=1560854
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
5 years agomigration: discard non-migratable RAMBlocks
Cédric Le Goater [Mon, 14 May 2018 06:57:00 +0000 (08:57 +0200)]
migration: discard non-migratable RAMBlocks

On the POWER9 processor, the XIVE interrupt controller can control
interrupt sources using MMIO to trigger events, to EOI or to turn off
the sources. Priority management and interrupt acknowledgment is also
controlled by MMIO in the presenter sub-engine.

These MMIO regions are exposed to guests in QEMU with a set of 'ram
device' memory mappings, similarly to VFIO, and the VMAs are populated
dynamically with the appropriate pages using a fault handler.

But, these regions are an issue for migration. We need to discard the
associated RAMBlocks from the RAM state on the source VM and let the
destination VM rebuild the memory mappings on the new host in the
post_load() operation just before resuming the system.

To achieve this goal, the following introduces a new RAMBlock flag
RAM_MIGRATABLE which is updated in the vmstate_register_ram() and
vmstate_unregister_ram() routines. This flag is then used by the
migration to identify RAMBlocks to discard on the source. Some checks
are also performed on the destination to make sure nothing invalid was
sent.

This change impacts the boston, malta and jazz mips boards for which
migration compatibility is broken.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
5 years agomigration: introduce decompress-error-check
Xiao Guangrong [Thu, 3 May 2018 08:06:11 +0000 (16:06 +0800)]
migration: introduce decompress-error-check

QEMU 3.0 enables strict check for compression & decompression to
make the migration more robust, that depends on the source to fix
the internal design which triggers the unexpected error conditions

To make it work for migrating old version QEMU to 2.13 QEMU, we
introduce this parameter to disable the error check on the
destination which is the default behavior of the machine type
which is older than 2.13, alternately, the strict check can be
enabled explicitly as followings:
      -M pc-q35-2.11 -global migration.decompress-error-check=true

Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
5 years agolinux-user: remove useless #if
Laurent Vivier [Tue, 29 May 2018 19:42:07 +0000 (21:42 +0200)]
linux-user: remove useless #if

Remove a "#if defined(XX) || defined(YY) || ..." with all available
targets

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-16-laurent@vivier.eu>

5 years agolinux-user: move hppa signal definitions to hppa/target_signal.h
Laurent Vivier [Tue, 29 May 2018 19:42:06 +0000 (21:42 +0200)]
linux-user: move hppa signal definitions to hppa/target_signal.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-15-laurent@vivier.eu>

5 years agolinux-user: move alpha signal definitions to alpha/target_signal.h
Laurent Vivier [Tue, 29 May 2018 19:42:05 +0000 (21:42 +0200)]
linux-user: move alpha signal definitions to alpha/target_signal.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-14-laurent@vivier.eu>

5 years agolinux-user: move openrisc signal definitions to openrisc/target_signal.h
Laurent Vivier [Tue, 29 May 2018 19:42:04 +0000 (21:42 +0200)]
linux-user: move openrisc signal definitions to openrisc/target_signal.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-13-laurent@vivier.eu>

5 years agolinux-user: move mips signal definitions to mips/target_signal.h
Laurent Vivier [Tue, 29 May 2018 19:42:03 +0000 (21:42 +0200)]
linux-user: move mips signal definitions to mips/target_signal.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-12-laurent@vivier.eu>

5 years agolinux-user: move sparc signal definitions to sparc/target_signal.h
Laurent Vivier [Tue, 29 May 2018 19:42:02 +0000 (21:42 +0200)]
linux-user: move sparc signal definitions to sparc/target_signal.h

Remove sparc64/target_signal.h, use sparc/target_signal.h instead.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-11-laurent@vivier.eu>

5 years agolinux-user: move generic signal definitions to generic/signal.h
Laurent Vivier [Tue, 29 May 2018 19:42:01 +0000 (21:42 +0200)]
linux-user: move generic signal definitions to generic/signal.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-10-laurent@vivier.eu>

5 years agolinux-user: move get_sp_from_cpustate() to target_cpu.h
Laurent Vivier [Tue, 29 May 2018 19:42:00 +0000 (21:42 +0200)]
linux-user: move get_sp_from_cpustate() to target_cpu.h

Remove useless includes
Fix HPPA include guard.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180529194207.31503-9-laurent@vivier.eu>

5 years agolinux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h
Laurent Vivier [Tue, 29 May 2018 19:41:59 +0000 (21:41 +0200)]
linux-user: move sparc/sparc64 fcntl definitions to sparc/target_fcntl.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-8-laurent@vivier.eu>

5 years agolinux-user: move ppc fcntl definitions to ppc/target_fcntl.h
Laurent Vivier [Tue, 29 May 2018 19:41:58 +0000 (21:41 +0200)]
linux-user: move ppc fcntl definitions to ppc/target_fcntl.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-7-laurent@vivier.eu>

5 years agolinux-user: move mips/mips64 fcntl definitions to mips/target_fcntl.h
Laurent Vivier [Tue, 29 May 2018 19:41:57 +0000 (21:41 +0200)]
linux-user: move mips/mips64 fcntl definitions to mips/target_fcntl.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-6-laurent@vivier.eu>

5 years agolinux-user: move arm/aarch64/m68k fcntl definitions to [arm|aarch64|m68k]/target_fcntl.h
Laurent Vivier [Tue, 29 May 2018 19:41:56 +0000 (21:41 +0200)]
linux-user: move arm/aarch64/m68k fcntl definitions to [arm|aarch64|m68k]/target_fcntl.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180529194207.31503-5-laurent@vivier.eu>

5 years agolinux-user: move hppa fcntl definitions to hppa/target_fcntl.h
Laurent Vivier [Tue, 29 May 2018 19:41:55 +0000 (21:41 +0200)]
linux-user: move hppa fcntl definitions to hppa/target_fcntl.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180529194207.31503-4-laurent@vivier.eu>

5 years agolinux-user: move alpha fcntl definitions to alpha/target_fcntl.h
Laurent Vivier [Tue, 29 May 2018 19:41:54 +0000 (21:41 +0200)]
linux-user: move alpha fcntl definitions to alpha/target_fcntl.h

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180529194207.31503-3-laurent@vivier.eu>

5 years agolinux-user: move generic fcntl definitions to generic/fcntl.h
Laurent Vivier [Tue, 29 May 2018 19:41:53 +0000 (21:41 +0200)]
linux-user: move generic fcntl definitions to generic/fcntl.h

add a per target target_fcntl.h and include the generic one from them

No code change.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180529194207.31503-2-laurent@vivier.eu>