]> Git Repo - qemu.git/log
qemu.git
6 years agosdcard: simplify SEND_IF_COND (CMD8)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:54 +0000 (15:12 +0000)]
sdcard: simplify SEND_IF_COND (CMD8)

replace switch(single case) -> if()

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: warn if host uses an incorrect address for APP CMD (CMD55)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:54 +0000 (15:12 +0000)]
sdcard: warn if host uses an incorrect address for APP CMD (CMD55)

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: check the card is in correct state for APP CMD (CMD55)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:54 +0000 (15:12 +0000)]
sdcard: check the card is in correct state for APP CMD (CMD55)

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: handles more commands in SPI mode
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: handles more commands in SPI mode

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: use a more descriptive label 'unimplemented_spi_cmd'
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: use a more descriptive label 'unimplemented_spi_cmd'

Suggested-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: handle the Security Specification commands
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: handle the Security Specification commands

returning sd_illegal, since they are not implemented.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
[PMM: tweak multiline comment format]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: handle CMD54 (SDIO)
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: handle CMD54 (SDIO)

Linux uses it to poll the bus before polling for a card.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: use the registerfields API for the CARD_STATUS register masks
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: use the registerfields API for the CARD_STATUS register masks

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: use the correct masked OCR in the R3 reply
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: use the correct masked OCR in the R3 reply

use the registerfields API to access the OCR register

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: simplify using the ldst API
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: simplify using the ldst API

the code is easier to review/refactor.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: remove commands from unsupported old MMC specification
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: remove commands from unsupported old MMC specification

This device does not model MMCA Specification previous to v4.2

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: clean the SCR register and add few comments
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: clean the SCR register and add few comments

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: fix the 'maximum data transfer rate' to 25MHz
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: fix the 'maximum data transfer rate' to 25MHz

To comply with Spec v1.10 (and 2.00, 3.01):

. TRAN_SPEED

for current SD Memory Cards that field must be always 0_0110_010b (032h) which is
equal to 25MHz - the mandatory maximum operating frequency of SD Memory Card.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
[PMM: fixed comment indent]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: update the CSD CRC register regardless the CSD structure version
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:53 +0000 (15:12 +0000)]
sdcard: update the CSD CRC register regardless the CSD structure version

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: Don't always set the high capacity bit
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: Don't always set the high capacity bit

Don't set the high capacity bit by default as it will be set if required
in the sd_set_csd() function.

[based on a patch from Alistair Francis <[email protected]>
 and Peter Ogden <[email protected]> from qemu/xilinx tag xilinx-v2015.4]
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215221325[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: use the registerfields API to access the OCR register
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: use the registerfields API to access the OCR register

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: use G_BYTE from cutils
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: use G_BYTE from cutils

code is now easier to read.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: define SDMMC_CMD_MAX instead of using the magic '64'
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: define SDMMC_CMD_MAX instead of using the magic '64'

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: add more trace events
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: add more trace events

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: replace fprintf() by qemu_hexdump()
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: replace fprintf() by qemu_hexdump()

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: add a trace event for command responses
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: add a trace event for command responses

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20180215220540[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: replace DPRINTF() by trace events
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: replace DPRINTF() by trace events

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agosdcard: reorder SDState struct members
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
sdcard: reorder SDState struct members

place card registers first, this will ease further code movements.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180215220540[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agohw/sd/ssi-sd: use the SDBus API, connect the SDCard to the bus
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
hw/sd/ssi-sd: use the SDBus API, connect the SDCard to the bus

On reset the bus will reset the card,
we can now drop the device_reset() call.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: 20180216022933[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agohw/sd/milkymist-memcard: expose a SDBus and connect the SDCard to it
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:52 +0000 (15:12 +0000)]
hw/sd/milkymist-memcard: expose a SDBus and connect the SDCard to it

using the sdbus_*() API.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Acked-by: Michael Walle <[email protected]>
Message-id: 20180216022933[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agohw/sd/milkymist-memcard: split realize() out of SysBusDevice init()
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
hw/sd/milkymist-memcard: split realize() out of SysBusDevice init()

Create the SDCard in the realize() function.

Suggested-by: Michael Walle <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Acked-by: Michael Walle <[email protected]>
Message-id: 20180216022933[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agohw/sd/milkymist-memcard: use qemu_log_mask()
Philippe Mathieu-Daudé [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
hw/sd/milkymist-memcard: use qemu_log_mask()

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Acked-by: Michael Walle <[email protected]>
Message-id: 20180216022933[email protected]
Signed-off-by: Peter Maydell <[email protected]>
6 years agoFix ast2500 protection register emulation
Hugo Landau [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
Fix ast2500 protection register emulation

Some register blocks of the ast2500 are protected by protection key
registers which require the right magic value to be written to those
registers to allow those registers to be mutated.

Register manuals indicate that writing the correct magic value to these
registers should cause subsequent reads from those values to return 1,
and writing any other value should cause subsequent reads to return 0.

Previously, qemu implemented these registers incorrectly: the registers
were handled as simple memory, meaning that writing some value x to a
protection key register would result in subsequent reads from that
register returning the same value x. The protection was implemented by
ensuring that the current value of that register equaled the magic
value.

This modifies qemu to have the correct behaviour: attempts to write to a
ast2500 protection register results in a transition to 1 or 0 depending
on whether the written value is the correct magic. The protection logic
is updated to ensure that the value of the register is nonzero.

This bug caused deadlocks with u-boot HEAD: when u-boot is done with a
protectable register block, it attempts to lock it by writing the
bitwise inverse of the correct magic value, and then spinning forever
until the register reads as zero. Since qemu implemented writes to these
registers as ordinary memory writes, writing the inverse of the magic
value resulted in subsequent reads returning that value, leading to
u-boot spinning forever.

Signed-off-by: Hugo Landau <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Acked-by: Andrew Jeffery <[email protected]>
Message-id: 20180220132627[email protected]
[PMM: fixed incorrect code indentation]
Signed-off-by: Peter Maydell <[email protected]>
6 years agohw/char/stm32f2xx_usart: fix TXE/TC bit handling
Richard Braun [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
hw/char/stm32f2xx_usart: fix TXE/TC bit handling

I/O currently being synchronous, there is no reason to ever clear the
SR_TXE bit. However the SR_TC bit may be cleared by software writing
to the SR register, so set it on each write.

In addition, fix the reset value of the USART status register.

Signed-off-by: Richard Braun <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
[PMM: removed XXX tag from comment, since it isn't something
 we need to come back and fix in QEMU]
Signed-off-by: Peter Maydell <[email protected]>
6 years agoraspi: Add "raspi3" machine type
Pekka Enberg [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
raspi: Add "raspi3" machine type

This patch adds a "raspi3" machine type, which can now be selected as
the machine to run on by users via the "-M" command line option to QEMU.

The machine type does *not* ignore memory transaction failures so we
likely need to add some dummy devices later when people run something
more complicated than what I'm using for testing.

Signed-off-by: Pekka Enberg <[email protected]>
[PMM: added #ifdef TARGET_AARCH64 so we don't provide the 64-bit
 board in the 32-bit only arm-softmmu build.]
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
6 years agotarget/arm: Fix register definitions for VMIDR and VMPIDR
Peter Maydell [Thu, 22 Feb 2018 15:12:51 +0000 (15:12 +0000)]
target/arm: Fix register definitions for VMIDR and VMPIDR

The register definitions for VMIDR and VMPIDR have separate
reginfo structs for the AArch32 and AArch64 registers. However
the 32-bit versions are wrong:
 * they use offsetof instead of offsetoflow32 to mark where
   the 32-bit value lives in the uint64_t CPU state field
 * they don't mark themselves as ARM_CP_ALIAS

In particular this means that if you try to use an Arm guest CPU
which enables EL2 on a big-endian host it will assert at reset:
 target/arm/cpu.c:114: cp_reg_check_reset: Assertion `oldvalue == newvalue' failed.

because the reset of the 32-bit register writes to the top
half of the uint64_t.

Correct the errors in the structures.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
---
This is necessary for 'make check' to pass on big endian
systems with the 'raspi3' board enabled, which is the
first board which has an EL2-enabled-by-default CPU.

6 years agoMerge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging
Peter Maydell [Thu, 22 Feb 2018 11:37:05 +0000 (11:37 +0000)]
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging

Update OpenBIOS images

# gpg: Signature made Thu 22 Feb 2018 08:12:01 GMT
# gpg:                using RSA key 5BC2C56FAE0F321F
# gpg: Good signature from "Mark Cave-Ayland <[email protected]>"
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* remotes/mcayland/tags/qemu-openbios-signed:
  Update OpenBIOS images to 54d959d9 built from submodule.

Signed-off-by: Peter Maydell <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/stsquad/tags/pull-softfloat-refactor-210218...
Peter Maydell [Thu, 22 Feb 2018 10:01:23 +0000 (10:01 +0000)]
Merge remote-tracking branch 'remotes/stsquad/tags/pull-softfloat-refactor-210218-1' into staging

This is the re-factor of softfloat:

  - shared common code path float16/32/64
  - well commented and easy to follow code
  - added a bunch of float16 support

While some operations are slower the key ones exercised by the
floating point dbt-bench are the same: https://i.imgur.com/oXNJNql.png

# gpg: Signature made Wed 21 Feb 2018 10:44:14 GMT
# gpg:                using RSA key FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <[email protected]>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-softfloat-refactor-210218-1: (22 commits)
  fpu/softfloat: re-factor sqrt
  fpu/softfloat: re-factor compare
  fpu/softfloat: re-factor minmax
  fpu/softfloat: re-factor scalbn
  fpu/softfloat: re-factor int/uint to float
  fpu/softfloat: re-factor float to int/uint
  fpu/softfloat: re-factor round_to_int
  fpu/softfloat: re-factor muladd
  fpu/softfloat: re-factor div
  fpu/softfloat: re-factor mul
  fpu/softfloat: re-factor add/sub
  fpu/softfloat: define decompose structures
  fpu/softfloat: move the extract functions to the top of the file
  fpu/softfloat: improve comments on ARM NaN propagation
  include/fpu/softfloat: add some float16 constants
  include/fpu/softfloat: implement float16_set_sign helper
  include/fpu/softfloat: implement float16_chs helper
  include/fpu/softfloat: implement float16_abs helper
  target/*/cpu.h: remove softfloat.h
  fpu/softfloat-types: new header to prevent excessive re-builds
  ...

Signed-off-by: Peter Maydell <[email protected]>
6 years agoUpdate OpenBIOS images to 54d959d9 built from submodule.
Mark Cave-Ayland [Thu, 22 Feb 2018 07:55:01 +0000 (07:55 +0000)]
Update OpenBIOS images to 54d959d9 built from submodule.

Signed-off-by: Mark Cave-Ayland <[email protected]>
6 years agofpu/softfloat: re-factor sqrt
Alex Bennée [Fri, 12 Jan 2018 11:24:02 +0000 (11:24 +0000)]
fpu/softfloat: re-factor sqrt

This is a little bit of a departure from softfloat's original approach
as we skip the estimate step in favour of a straight iteration. There
is a minor optimisation to avoid calculating more bits of precision
than we need however this still brings a performance drop, especially
for float64 operations.

Suggested-by: Richard Henderson <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agofpu/softfloat: re-factor compare
Alex Bennée [Tue, 5 Dec 2017 17:14:42 +0000 (17:14 +0000)]
fpu/softfloat: re-factor compare

The compare function was already expanded from a macro. I keep the
macro expansion but move most of the logic into a compare_decomposed.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agofpu/softfloat: re-factor minmax
Alex Bennée [Tue, 5 Dec 2017 12:36:01 +0000 (12:36 +0000)]
fpu/softfloat: re-factor minmax

Let's do the same re-factor treatment for minmax functions. I still
use the MACRO trick to expand but now all the checking code is common.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agofpu/softfloat: re-factor scalbn
Alex Bennée [Thu, 30 Nov 2017 11:31:40 +0000 (11:31 +0000)]
fpu/softfloat: re-factor scalbn

This is one of the simpler manipulations you could make to a floating
point number.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agofpu/softfloat: re-factor int/uint to float
Alex Bennée [Thu, 30 Nov 2017 10:57:08 +0000 (10:57 +0000)]
fpu/softfloat: re-factor int/uint to float

These are considerably simpler as the lower order integers can just
use the higher order conversion function. As the decomposed fractional
part is a full 64 bit rounding and inexact handling comes from the
pack functions.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agofpu/softfloat: re-factor float to int/uint
Alex Bennée [Wed, 29 Nov 2017 10:56:06 +0000 (10:56 +0000)]
fpu/softfloat: re-factor float to int/uint

We share the common int64/uint64_pack_decomposed function across all
the helpers and simply limit the final result depending on the final
size.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agofpu/softfloat: re-factor round_to_int
Alex Bennée [Wed, 29 Nov 2017 10:21:25 +0000 (10:21 +0000)]
fpu/softfloat: re-factor round_to_int

We can now add float16_round_to_int and use the common round_decomposed and
canonicalize functions to have a single implementation for
float16/32/64 round_to_int functions.

Signed-off-by: Alex Bennée <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agofpu/softfloat: re-factor muladd
Alex Bennée [Tue, 28 Nov 2017 17:04:44 +0000 (17:04 +0000)]
fpu/softfloat: re-factor muladd

We can now add float16_muladd and use the common decompose and
canonicalize functions to have a single implementation for
float16/32/64 muladd functions.

Signed-off-by: Alex Bennée <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agofpu/softfloat: re-factor div
Alex Bennée [Mon, 27 Nov 2017 16:13:36 +0000 (16:13 +0000)]
fpu/softfloat: re-factor div

We can now add float16_div and use the common decompose and
canonicalize functions to have a single implementation for
float16/32/64 versions.

Signed-off-by: Alex Bennée <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agofpu/softfloat: re-factor mul
Alex Bennée [Thu, 7 Dec 2017 18:56:50 +0000 (18:56 +0000)]
fpu/softfloat: re-factor mul

We can now add float16_mul and use the common decompose and
canonicalize functions to have a single implementation for
float16/32/64 versions.

Signed-off-by: Alex Bennée <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agofpu/softfloat: re-factor add/sub
Alex Bennée [Mon, 27 Nov 2017 14:15:17 +0000 (14:15 +0000)]
fpu/softfloat: re-factor add/sub

We can now add float16_add/sub and use the common decompose and
canonicalize functions to have a single implementation for
float16/32/64 add and sub functions.

Signed-off-by: Alex Bennée <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
6 years agofpu/softfloat: define decompose structures
Alex Bennée [Mon, 27 Nov 2017 14:02:26 +0000 (14:02 +0000)]
fpu/softfloat: define decompose structures

These structures pave the way for generic softfloat helper routines
that will operate on fully decomposed numbers.

Signed-off-by: Alex Bennée <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
6 years agofpu/softfloat: move the extract functions to the top of the file
Alex Bennée [Mon, 27 Nov 2017 13:58:23 +0000 (13:58 +0000)]
fpu/softfloat: move the extract functions to the top of the file

This is pure code-motion during re-factoring as the helpers will be
needed earlier.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agofpu/softfloat: improve comments on ARM NaN propagation
Alex Bennée [Wed, 19 Jul 2017 10:49:42 +0000 (11:49 +0100)]
fpu/softfloat: improve comments on ARM NaN propagation

Mention the pseudo-code fragment from which this is based.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agoinclude/fpu/softfloat: add some float16 constants
Alex Bennée [Fri, 8 Dec 2017 17:13:19 +0000 (17:13 +0000)]
include/fpu/softfloat: add some float16 constants

This defines the same set of common constants for float 16 as defined
for 32 and 64 bit floats. These are often used by target helper
functions. I've also removed constants that are not used by anybody.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agoinclude/fpu/softfloat: implement float16_set_sign helper
Alex Bennée [Fri, 8 Dec 2017 17:03:13 +0000 (17:03 +0000)]
include/fpu/softfloat: implement float16_set_sign helper

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agoinclude/fpu/softfloat: implement float16_chs helper
Alex Bennée [Thu, 7 Dec 2017 19:09:24 +0000 (19:09 +0000)]
include/fpu/softfloat: implement float16_chs helper

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agoinclude/fpu/softfloat: implement float16_abs helper
Alex Bennée [Mon, 3 Jul 2017 13:33:08 +0000 (14:33 +0100)]
include/fpu/softfloat: implement float16_abs helper

This will be required when expanding the MINMAX() macro for 16
bit/half-precision operations.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agotarget/*/cpu.h: remove softfloat.h
Alex Bennée [Fri, 19 Jan 2018 18:24:22 +0000 (18:24 +0000)]
target/*/cpu.h: remove softfloat.h

As cpu.h is another typically widely included file which doesn't need
full access to the softfloat API we can remove the includes from here
as well. Where they do need types it's typically for float_status and
the rounding modes so we move that to softfloat-types.h as well.

As a result of not having softfloat in every cpu.h call we now need to
add it to various helpers that do need the full softfloat.h
definitions.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
[For PPC parts]
Acked-by: David Gibson <[email protected]>
6 years agofpu/softfloat-types: new header to prevent excessive re-builds
Alex Bennée [Fri, 19 Jan 2018 16:36:40 +0000 (16:36 +0000)]
fpu/softfloat-types: new header to prevent excessive re-builds

The main culprit here is bswap.h which pulled in softfloat.h so it
could use the types in its CPU_Float* and ldfl/stfql functions. As
bswap.h is very widely included this added a compile dependency every
time we touch softfloat.h. Move the typedefs for each float type into
their own file so we don't re-build the world every time we tweak the
main softfloat.h header.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agoinclude/fpu/softfloat: remove USE_SOFTFLOAT_STRUCT_TYPES
Alex Bennée [Fri, 5 Jan 2018 20:18:55 +0000 (20:18 +0000)]
include/fpu/softfloat: remove USE_SOFTFLOAT_STRUCT_TYPES

It's not actively built and when enabled things fail to compile. I'm
not sure the type-checking is really helping here. Seeing as we "own"
our softfloat now lets remove the cruft.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
6 years agofpu/softfloat: implement float16_squash_input_denormal
Alex Bennée [Mon, 3 Jul 2017 13:30:06 +0000 (14:30 +0100)]
fpu/softfloat: implement float16_squash_input_denormal

This will be required when expanding the MINMAX() macro for 16
bit/half-precision operations.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/ui-20180220-pull-request' into...
Peter Maydell [Tue, 20 Feb 2018 14:05:00 +0000 (14:05 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180220-pull-request' into staging

ui: reorganize and cleanup display command line parsing.
gtk: fix gtk3 warnings.

# gpg: Signature made Tue 20 Feb 2018 13:46:53 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <[email protected]>"
# gpg:                 aka "Gerd Hoffmann <[email protected]>"
# gpg:                 aka "Gerd Hoffmann (private) <[email protected]>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20180220-pull-request:
  ui: Reorder vte terminal packing to avoid gtk3 warnings
  vl: drop display_type variable
  vl: drop request_opengl variable
  vl: drop full_screen variable
  cocoa: use DisplayOptions
  curses: use DisplayOptions
  egl-headless: use DisplayOptions
  vl: drop no_quit variable
  sdl: use DisplayOptions
  gtk: add and use DisplayOptions + DisplayGTK
  vl: rename DisplayType to LegacyDisplayType
  vl: deprecate -no-frame

Signed-off-by: Peter Maydell <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
Peter Maydell [Tue, 20 Feb 2018 11:52:24 +0000 (11:52 +0000)]
Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging

Fix memory leak in synth backend.

# gpg: Signature made Mon 19 Feb 2018 17:29:49 GMT
# gpg:                using RSA key 71D4D5E5822F73D6
# gpg: Good signature from "Greg Kurz <[email protected]>"
# gpg:                 aka "Gregory Kurz <[email protected]>"
# 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: fix leak in synth_name_to_path()
  9p: v9fs_path_copy() readability

Signed-off-by: Peter Maydell <[email protected]>
6 years agoui: Reorder vte terminal packing to avoid gtk3 warnings
Jan Kiszka [Sat, 17 Feb 2018 11:26:49 +0000 (12:26 +0100)]
ui: Reorder vte terminal packing to avoid gtk3 warnings

Fill the terminal box from right to left to avoid

Gtk-WARNING **: Allocating size to GtkScrollbar 0x55f6d54b0200 without
    calling gtk_widget_get_preferred_width/height(). How does the code
    know the size to allocate?

Signed-off-by: Jan Kiszka <[email protected]>
Message-id: 902aaef8-d20e-0530-dea2-cdfe3db33ff3@web.de
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agovl: drop display_type variable
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:22 +0000 (12:10 +0100)]
vl: drop display_type variable

Switch over all leftover users to qapi DisplayType.
Then delete the unused display_type variable.

Add 'default' DisplayType, which isn't an actual display type but
a placeholder for "user didn't specify a display".  It will be replaced
by the DisplayType actually used, which in turn depends on the
DisplayTypes availabel in the particular build.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agovl: drop request_opengl variable
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:21 +0000 (12:10 +0100)]
vl: drop request_opengl variable

Switch over the one leftover user to qapi DisplayType.
The delete the unused request_opengl variable.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agovl: drop full_screen variable
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:20 +0000 (12:10 +0100)]
vl: drop full_screen variable

Not used any more, delete it.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agococoa: use DisplayOptions
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:19 +0000 (12:10 +0100)]
cocoa: use DisplayOptions

Switch cocoa ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agocurses: use DisplayOptions
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:18 +0000 (12:10 +0100)]
curses: use DisplayOptions

Switch curses ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agoegl-headless: use DisplayOptions
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:17 +0000 (12:10 +0100)]
egl-headless: use DisplayOptions

Switch egl-headless ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agovl: drop no_quit variable
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:16 +0000 (12:10 +0100)]
vl: drop no_quit variable

Not used any more, delete it.

Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agosdl: use DisplayOptions
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:15 +0000 (12:10 +0100)]
sdl: use DisplayOptions

Switch sdl ui to use qapi DisplayOptions for configuration.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agogtk: add and use DisplayOptions + DisplayGTK
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:14 +0000 (12:10 +0100)]
gtk: add and use DisplayOptions + DisplayGTK

Add QAPI DisplayType enum, DisplayOptions union and DisplayGTK struct.
Switch gtk configuration to use the qapi type.

Some bookkeeping (fullscreen for example) is done twice now, this is
temporary until more/all UIs are switched over to qapi configuration.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agovl: rename DisplayType to LegacyDisplayType
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:13 +0000 (12:10 +0100)]
vl: rename DisplayType to LegacyDisplayType

qapi DisplayType will replace the current enum.  For the transition both
will coexist though, so rename it so we don't have a name clash.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agovl: deprecate -no-frame
Gerd Hoffmann [Fri, 2 Feb 2018 11:10:11 +0000 (12:10 +0100)]
vl: deprecate -no-frame

Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: 20180202111022[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request...
Peter Maydell [Tue, 20 Feb 2018 09:40:51 +0000 (09:40 +0000)]
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging

# gpg: Signature made Tue 20 Feb 2018 09:16:18 GMT
# gpg:                using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <[email protected]>"
# gpg:                 aka "Laurent Vivier <[email protected]>"
# gpg:                 aka "Laurent Vivier (Red Hat) <[email protected]>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-2.12-pull-request:
  linux-user: Remove THREAD macro
  linux-user: Fix sched_getaffinity mask size
  linux-user: Fix register used for 6th and 7th syscall argument on aarch64
  linux-user: Implement ioctl cmd TIOCGPTPEER

Signed-off-by: Peter Maydell <[email protected]>
6 years ago9p: fix leak in synth_name_to_path()
Marc-André Lureau [Mon, 19 Feb 2018 17:27:15 +0000 (18:27 +0100)]
9p: fix leak in synth_name_to_path()

Leak found thanks to ASAN:

Direct leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x55995789ac90 in __interceptor_malloc (/home/elmarco/src/qemu/build/x86_64-softmmu/qemu-system-x86_64+0x1510c90)
    #1 0x7f0a91190f0c in g_malloc /home/elmarco/src/gnome/glib/builddir/../glib/gmem.c:94
    #2 0x5599580a281c in v9fs_path_copy /home/elmarco/src/qemu/hw/9pfs/9p.c:196:17
    #3 0x559958f9ec5d in coroutine_trampoline /home/elmarco/src/qemu/util/coroutine-ucontext.c:116:9
    #4 0x7f0a8766ebbf  (/lib64/libc.so.6+0x50bbf)

Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
6 years ago9p: v9fs_path_copy() readability
Marc-André Lureau [Mon, 19 Feb 2018 17:27:15 +0000 (18:27 +0100)]
9p: v9fs_path_copy() readability

lhs/rhs doesn't tell much about how argument are handled, dst/src is
and const arguments is clearer in my mind. Use g_memdup() while at it.

Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Peter Maydell [Mon, 19 Feb 2018 16:44:12 +0000 (16:44 +0000)]
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

# gpg: Signature made Mon 19 Feb 2018 16:19:46 GMT
# gpg:                using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <[email protected]>"
# gpg:                 aka "Stefan Hajnoczi <[email protected]>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  trace: avoid SystemTap "char const" warnings
  tracetool: For ust trace bool type as ctf_integer
  tracetool: Update argument format regex to non-greedy star

Signed-off-by: Peter Maydell <[email protected]>
6 years agotrace: avoid SystemTap "char const" warnings
Stefan Hajnoczi [Thu, 1 Feb 2018 16:26:25 +0000 (16:26 +0000)]
trace: avoid SystemTap "char const" warnings

SystemTap's dtrace(1) produces the following warning when it encounters
"char const" instead of "const char":

  Warning: /usr/bin/dtrace:trace-dtrace-root.dtrace:66: syntax error near:
  probe flatview_destroy_rcu

  Warning: Proceeding as if --no-pyparsing was given.

This is a limitation in current SystemTap releases.  I have sent a patch
upstream to accept "char const" since it is valid C:

  https://sourceware.org/ml/systemtap/2018-q1/msg00017.html

In QEMU we still wish to avoid warnings in the current SystemTap
release.  It's simple enough to replace "char const" with "const char".

I'm not changing the documentation or implementing checks to prevent
this from occurring again in the future.  The next release of SystemTap
will hopefully resolve this issue.

Cc: Daniel P. Berrange <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Message-id: 20180201162625[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
6 years agotracetool: For ust trace bool type as ctf_integer
Jon Emil Jahren [Mon, 29 Jan 2018 04:16:48 +0000 (05:16 +0100)]
tracetool: For ust trace bool type as ctf_integer

Previously functions having arguments of type bool was not traced
properly. The bool arguments were missing from the trace.

Signed-off-by: Jon Emil Jahren <[email protected]>
Message-id: 20180129041648[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
6 years agotracetool: Update argument format regex to non-greedy star
Jon Emil Jahren [Mon, 29 Jan 2018 04:16:47 +0000 (05:16 +0100)]
tracetool: Update argument format regex to non-greedy star

Using the greedy star matching, arguments like "...%"PRIx64 caused issues
for functions with multiple PRI formats.

The issue was only seen with the ust backend, as it is the only one
using the format regex.

The result for many functions was that the arguments coming after the
greedy star end was left out of the tracepoint, and in some cases some
of the arguments that was traced had the wrong format.

Signed-off-by: Jon Emil Jahren <[email protected]>
Message-id: 20180129041648[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging
Peter Maydell [Mon, 19 Feb 2018 12:51:11 +0000 (12:51 +0000)]
Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging

PVRDMA implementation

# gpg: Signature made Mon 19 Feb 2018 11:08:49 GMT
# gpg:                using RSA key 36D4C0F0CF2FE46D
# gpg: Good signature from "Marcel Apfelbaum <[email protected]>"
# 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: B1C6 3A57 F92E 08F2 640F  31F5 36D4 C0F0 CF2F E46D

* remotes/marcel/tags/rdma-pull-request:
  MAINTAINERS: add entry for hw/rdma
  hw/rdma: Implementation of PVRDMA device
  hw/rdma: PVRDMA commands and data-path ops
  hw/rdma: Implementation of generic rdma device layers
  hw/rdma: Definitions for rdma device and rdma resource manager
  hw/rdma: Add wrappers and macros
  include/standard-headers: add pvrdma related headers
  scripts/update-linux-headers: import pvrdma headers
  docs: add pvrdma device documentation.
  mem: add share parameter to memory-backend-ram

Signed-off-by: Peter Maydell <[email protected]>
6 years agoMAINTAINERS: add entry for hw/rdma
Marcel Apfelbaum [Thu, 14 Dec 2017 15:32:23 +0000 (17:32 +0200)]
MAINTAINERS: add entry for hw/rdma

Signed-off-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
6 years agohw/rdma: Implementation of PVRDMA device
Yuval Shaia [Fri, 9 Feb 2018 13:44:14 +0000 (15:44 +0200)]
hw/rdma: Implementation of PVRDMA device

PVRDMA is the QEMU implementation of VMware's paravirtualized RDMA device.
It works with its Linux Kernel driver AS IS, no need for any special
guest modifications.

While it complies with the VMware device, it can also communicate with
bare metal RDMA-enabled machines and does not require an RDMA HCA in the
host, it can work with Soft-RoCE (rxe).

It does not require the whole guest RAM to be pinned allowing memory
over-commit and, even if not implemented yet, migration support will be
possible with some HW assistance.

Implementation is divided into 2 components, rdma general and pvRDMA
specific functions and structures.

The second PVRDMA sub-module - interaction with PCI layer.
- Device configuration and setup (MSIX, BARs etc).
- Setup of DSR (Device Shared Resources)
- Setup of device ring.
- Device management.

Reviewed-by: Dotan Barak <[email protected]>
Reviewed-by: Zhu Yanjun <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
6 years agohw/rdma: PVRDMA commands and data-path ops
Yuval Shaia [Fri, 9 Feb 2018 13:39:19 +0000 (15:39 +0200)]
hw/rdma: PVRDMA commands and data-path ops

First PVRDMA sub-module - implementation of the PVRDMA device.
- PVRDMA commands such as create CQ and create MR.
- Data path QP operations - post_send and post_recv.
- Completion handler.

Reviewed-by: Dotan Barak <[email protected]>
Reviewed-by: Zhu Yanjun <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
6 years agohw/rdma: Implementation of generic rdma device layers
Yuval Shaia [Fri, 9 Feb 2018 13:23:18 +0000 (15:23 +0200)]
hw/rdma: Implementation of generic rdma device layers

This layer is composed of two sub-modules, backend and resource manager.
Backend sub-module is responsible for all the interaction with IB layers
such as ibverbs and umad (external libraries).
Resource manager is a collection of functions and structures to manage
RDMA resources such as QPs, CQs and MRs.

Reviewed-by: Dotan Barak <[email protected]>
Reviewed-by: Zhu Yanjun <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
6 years agohw/rdma: Definitions for rdma device and rdma resource manager
Yuval Shaia [Fri, 9 Feb 2018 13:00:59 +0000 (15:00 +0200)]
hw/rdma: Definitions for rdma device and rdma resource manager

Definition of various structures and constants used in backend and
resource manager modules.

Reviewed-by: Dotan Barak <[email protected]>
Reviewed-by: Zhu Yanjun <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
6 years agohw/rdma: Add wrappers and macros
Yuval Shaia [Fri, 9 Feb 2018 13:15:00 +0000 (15:15 +0200)]
hw/rdma: Add wrappers and macros

As all mapping for this device are from driver to device,
declare wrappers on top of pci_dma_*map functions.

In addition, declare macros to be used for debug messages.

Reviewed-by: Dotan Barak <[email protected]>
Reviewed-by: Zhu Yanjun <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
6 years agoinclude/standard-headers: add pvrdma related headers
Marcel Apfelbaum [Mon, 12 Feb 2018 11:49:08 +0000 (13:49 +0200)]
include/standard-headers: add pvrdma related headers

Import the headers used by the pvrdma device.
Part of them are interfaces between the guest driver and the device,
imported under include/standart-headers/drivers/infiniband/... .

Signed-off-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
6 years agoscripts/update-linux-headers: import pvrdma headers
Marcel Apfelbaum [Wed, 14 Feb 2018 17:35:27 +0000 (19:35 +0200)]
scripts/update-linux-headers: import pvrdma headers

Modify the script to import the headers used by the pvrdma device.
Part of them are interfaces between the guest driver and the device,
import them under include/standart-headers/drivers/infiniband/... .

Remove the unused functions from pvrdma_verbs.h avoiding the
unnecessary import of several infiniband/networking/other headers.

Reviewed-by: Gal Hammer <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
6 years agodocs: add pvrdma device documentation.
Marcel Apfelbaum [Thu, 14 Dec 2017 15:26:37 +0000 (17:26 +0200)]
docs: add pvrdma device documentation.

Signed-off-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Yuval Shaia <[email protected]>
Reviewed-by: Shamir Rabinovitch <[email protected]>
6 years agomem: add share parameter to memory-backend-ram
Marcel Apfelbaum [Wed, 13 Dec 2017 14:37:37 +0000 (16:37 +0200)]
mem: add share parameter to memory-backend-ram

Currently only file backed memory backend can
be created with a "share" flag in order to allow
sharing guest RAM with other processes in the host.

Add the "share" flag also to RAM Memory Backend
in order to allow remapping parts of the guest RAM
to different host virtual addresses. This is needed
by the RDMA devices in order to remap non-contiguous
QEMU virtual addresses to a contiguous virtual address range.

Moved the "share" flag to the Host Memory base class,
modified phys_mem_alloc to include the new parameter
and a new interface memory_region_init_ram_shared_nomigrate.

There are no functional changes if the new flag is not used.

Reviewed-by: Eduardo Habkost <[email protected]>
Signed-off-by: Marcel Apfelbaum <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/cohuck/tags/stable-doc-20180219' into staging
Peter Maydell [Mon, 19 Feb 2018 10:28:34 +0000 (10:28 +0000)]
Merge remote-tracking branch 'remotes/cohuck/tags/stable-doc-20180219' into staging

Add some doc for the stable process.

# gpg: Signature made Mon 19 Feb 2018 10:01:19 GMT
# gpg:                using RSA key DECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <[email protected]>"
# gpg:                 aka "Cornelia Huck <[email protected]>"
# gpg:                 aka "Cornelia Huck <[email protected]>"
# gpg:                 aka "Cornelia Huck <[email protected]>"
# gpg:                 aka "Cornelia Huck <[email protected]>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/stable-doc-20180219:
  docs: document our stable process

Signed-off-by: Peter Maydell <[email protected]>
6 years agodocs: document our stable process
Cornelia Huck [Fri, 9 Feb 2018 13:03:33 +0000 (14:03 +0100)]
docs: document our stable process

Some pointers on how to get a patch into stable.

[contains some suggestions by mdroth and eblake]
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Michael Roth <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
6 years agolinux-user: Remove THREAD macro
Peter Maydell [Tue, 13 Feb 2018 13:22:46 +0000 (13:22 +0000)]
linux-user: Remove THREAD macro

Back when we used to support compiling either with or without
NPTL threading library support, we used a macro THREAD which would
expand either to nothing (no thread support) or to __thread (threads
supported). For a long time now we have required thread support,
so remove the macro and just use __thread directly as other parts
of QEMU do.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <20180213132246[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
6 years agolinux-user: Fix sched_getaffinity mask size
Samuel Thibault [Sun, 11 Feb 2018 17:47:04 +0000 (18:47 +0100)]
linux-user: Fix sched_getaffinity mask size

We properly computed the capped mask size to be put to the application
buffer, but didn't actually used it. Also, we need to return the capped mask
size instead of 0 on success.

Signed-off-by: Samuel Thibault <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Message-Id: <20180211174704[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
6 years agolinux-user: Fix register used for 6th and 7th syscall argument on aarch64
Guido Günther [Fri, 2 Feb 2018 10:02:25 +0000 (11:02 +0100)]
linux-user: Fix register used for 6th and 7th syscall argument on aarch64

This unbreaks the testcase from

    http://lists.nongnu.org/archive/html/qemu-arm/2018-01/msg00514.html

Thanks to Laurent Vivier for spotting the 7th one.

Signed-off-by: Guido Günther <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Suggested-by: Laurent Vivier <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <671eaa99f4e0bf3a58f76f9151f7cfa24662227f.1517565566[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
6 years agolinux-user: Implement ioctl cmd TIOCGPTPEER
Andreas Schwab [Mon, 29 Jan 2018 10:47:06 +0000 (11:47 +0100)]
linux-user: Implement ioctl cmd TIOCGPTPEER

With glibc 2.27 the openpty function prefers the TIOCGPTPEER ioctl.

Signed-off-by: Andreas Schwab <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20180216' into staging
Peter Maydell [Fri, 16 Feb 2018 18:39:04 +0000 (18:39 +0000)]
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20180216' into staging

HMP pull 2018-02-16

# gpg: Signature made Fri 16 Feb 2018 17:45:06 GMT
# gpg:                using RSA key 0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <[email protected]>"
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-hmp-20180216:
  monitor.c: Fix infinite loop in monitor's auto-complete
  monitor: Remove legacy "-mon default=on" parameter

Signed-off-by: Peter Maydell <[email protected]>
6 years agocuda.h: Fix multiple typedef
Dr. David Alan Gilbert [Fri, 16 Feb 2018 17:31:11 +0000 (17:31 +0000)]
cuda.h: Fix multiple typedef

RHEL6's compilers don't like the repeated typedef.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
6 years agomonitor.c: Fix infinite loop in monitor's auto-complete
Dr. David Alan Gilbert [Tue, 13 Feb 2018 12:51:43 +0000 (12:51 +0000)]
monitor.c: Fix infinite loop in monitor's auto-complete

The QEMU monitor enters an infinite loop when trying to auto-complete commands
that accept only optional parameters. The commands currently affected by this
issue are 'info registers' and 'info mtree'.

Reported-by: Dimitris Karagkasidis <[email protected]>
Fixes: 48fe86f6400574165979e0db6f5937ad487b6888
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Message-Id: <20180213125143[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
6 years agomonitor: Remove legacy "-mon default=on" parameter
Thomas Huth [Tue, 19 Dec 2017 16:17:33 +0000 (17:17 +0100)]
monitor: Remove legacy "-mon default=on" parameter

The "default" parameter of the "-mon" option is useless since
QEMU v2.4.0, and marked as deprecated since QEMU v2.8.0. That
should have been long enough to let people update their scripts,
so time to remove it now.

Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <1513700253[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/kraxel/tags/ui-20180216-pull-request' into...
Peter Maydell [Fri, 16 Feb 2018 15:55:45 +0000 (15:55 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180216-pull-request' into staging

bugfixes for vnc and sdl2

# gpg: Signature made Fri 16 Feb 2018 11:53:37 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <[email protected]>"
# gpg:                 aka "Gerd Hoffmann <[email protected]>"
# gpg:                 aka "Gerd Hoffmann (private) <[email protected]>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20180216-pull-request:
  ui: extend VNC trottling tracing to SASL codepaths
  ui: check VNC audio frequency limit at time of reading from client
  ui: avoid 'local_err' variable shadowing in VNC SASL auth
  ui: avoid risk of 32-bit int overflow in VNC buffer check
  sdl2: fix mouse grab
  sdl: restore optimized redraw
  vnc: fix segfault in closed connection handling
  vnc: add qapi/error.h include to stubs
  vnc: remove bogus object_unref on client socket

Signed-off-by: Peter Maydell <[email protected]>
6 years agoMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.12-20180216' into staging
Peter Maydell [Fri, 16 Feb 2018 14:26:12 +0000 (14:26 +0000)]
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.12-20180216' into staging

ppc patch queue 2018-02-16

Highlights of this batch:
  * Conversion to TranslatorOps (Emilio Cota)
  * Further bugfixes and cleanups to vcpu id allocation for pseries
    (Greg Kurz)
  * Another bugfix for HPT resizing (Daniel Henrique-Barboza)
  * Macintosh CUDA cleanups (Mark Cave-Ayland)
  * Further tweaks to Spectre/Meltdown mitigations (Suraj Singh)

# gpg: Signature made Fri 16 Feb 2018 10:00:02 GMT
# gpg:                using RSA key 6C38CACA20D9B392
# gpg: Good signature from "David Gibson <[email protected]>"
# gpg:                 aka "David Gibson (Red Hat) <[email protected]>"
# gpg:                 aka "David Gibson (ozlabs.org) <[email protected]>"
# gpg:                 aka "David Gibson (kernel.org) <[email protected]>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-2.12-20180216:
  ppc4xx: Add device models found in PPC440 core SoCs
  ppc/spapr-caps: Disallow setting workaround for spapr-cap-ibs
  target/ppc: convert to TranslatorOps
  target/ppc: convert to DisasContextBase
  spapr: consolidate the VCPU id numbering logic in a single place
  spapr: rename spapr_vcpu_id() to spapr_get_vcpu_id()
  spapr: move VCPU calculation to core machine code
  spapr: use spapr->vsmt to compute VCPU ids
  ppc/spapr-caps: Change migration macro to take full spapr-cap name
  hw/char: remove legacy interface escc_init()
  hw/ppc/spapr_hcall: set htab_shift after kvmppc_resize_hpt_commit
  cuda: convert to trace-events
  ppc: move CUDAState and other CUDA-related definitions into separate cuda.h file
  cuda: convert to use the shared mos6522 device

Signed-off-by: Peter Maydell <[email protected]>
This page took 0.144049 seconds and 4 git commands to generate.