OSDN Git Service

qmiga/qemu.git
2 years agoscripts/bench-block-job: switch to AQMP
John Snow [Mon, 21 Mar 2022 20:33:13 +0000 (16:33 -0400)]
scripts/bench-block-job: switch to AQMP

For this commit, we only need to remove accommodations for the
synchronous QMP library.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Acked-by: Hanna Reitz <hreitz@redhat.com>
Message-id: 20220321203315.909411-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agopython/machine: permanently switch to AQMP
John Snow [Mon, 21 Mar 2022 20:33:12 +0000 (16:33 -0400)]
python/machine: permanently switch to AQMP

Remove the QEMU_PYTHON_LEGACY_QMP environment variable, making the
switch from sync qmp to async qmp permanent. Update exceptions and
import paths as necessary.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Acked-by: Hanna Reitz <hreitz@redhat.com>
Message-id: 20220321203315.909411-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agoMerge tag 'pull-ppc-20220420-2' of https://gitlab.com/danielhb/qemu into staging
Richard Henderson [Thu, 21 Apr 2022 04:54:24 +0000 (21:54 -0700)]
Merge tag 'pull-ppc-20220420-2' of https://gitlab.com/danielhb/qemu into staging

ppc patch queue for 2022-04-20

First batch of ppc patches for QEMU 7.1:

- skiboot firmware version bump
- pseries: add 2M DDW pagesize
- pseries: make virtual hypervisor code TCG only
- powernv: introduce GPIO lines for PSIHB device
- powernv: remove PCIE root bridge LSI
- target/ppc: alternative softfloat 128 bit integer support
- assorted fixes

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCYmB/ngAKCRA82cqW3gMx
# ZE10AP4wPeJQ3fxXb5ylVtL4qkJaLWy6VrJBQSKSb5YEA0fhegEA9ZufpnENQePU
# gZF0eFAQK/DbSnDyvRQVpGcJM0K1UgI=
# =nVRw
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 20 Apr 2022 02:48:14 PM PDT
# gpg:                using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164
# gpg: Can't check signature: No public key

* tag 'pull-ppc-20220420-2' of https://gitlab.com/danielhb/qemu: (23 commits)
  hw/ppc: change indentation to spaces from TABs
  target/ppc: Add two missing register callbacks on POWER10
  ppc/pnv: Remove LSI on the PCIE host bridge
  pcie: Don't try triggering a LSI when not defined
  ppc/vof: Fix uninitialized string tracing
  hw/ppc/ppc405_boards: Initialize g_autofree pointer
  target/ppc: implement xscvqp[su]qz
  target/ppc: implement xscv[su]qqp
  softfloat: add float128_to_int128
  softfloat: add float128_to_uint128
  softfloat: add int128_to_float128
  softfloat: add uint128_to_float128
  qemu/int128: add int128_urshift
  target/ppc: Improve KVM hypercall trace
  spapr: Move nested KVM hypercalls under a TCG only config.
  spapr: Move hypercall_register_softmmu
  ppc/pnv: Remove useless checks in set_irq handlers
  ppc/pnv: Remove PnvPsiClas::irq_set
  ppc/pnv: Remove PnvOCC::psi link
  ppc/pnv: Remove PnvLpcController::psi link
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoMerge tag 'pull-tcg-20220420' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Wed, 20 Apr 2022 23:43:11 +0000 (16:43 -0700)]
Merge tag 'pull-tcg-20220420' of https://gitlab.com/rth7680/qemu into staging

Cleanup sysemu/tcg.h usage.
Fix indirect lowering vs cond branches
Remove ATOMIC_MMU_IDX
Add tcg_constant_ptr

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmJgW38dHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8tpggApfg2CDI0bRMDBh0g
# 04/xwNnzHuSa84/ocMOMUfD5pvBblUmeTH8fAwqcAPDM/EEZwWZl2V1bYzuIrbmR
# 8zV+r1cOenDF5Tz8PWfy8XssinTVtTWh/TE0XNV9R/SbEM9eMsjHNu5osKVuLuq1
# rnHWZf8LuY7xGsy4GYqPN0dLE6HtQOfpj/eLGRAj9mZ7re0jKeWg3GdxYoiYDmks
# NKmNHYcWD+SjjFvXlOafniQsHbBZmQc/qp7AShG/+VcYY9o1VfncWD6I2dV13RdB
# N7++ZhGyQR4NOVo6CN1zLKhfuJqzH2q+qJ7vQ3xtXNAk53LGQ91zjoE+3KaJTrcy
# dmnLUw==
# =aKdS
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 20 Apr 2022 12:14:07 PM PDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]

* tag 'pull-tcg-20220420' of https://gitlab.com/rth7680/qemu:
  tcg: Add tcg_constant_ptr
  accel/tcg: Remove ATOMIC_MMU_IDX
  tcg: Fix indirect lowering vs TCG_OPF_COND_BRANCH
  Don't include sysemu/tcg.h if it is not necessary

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agohw/ppc: change indentation to spaces from TABs
Guo Zhi [Tue, 12 Apr 2022 02:12:41 +0000 (10:12 +0800)]
hw/ppc: change indentation to spaces from TABs

There are still some files in the QEMU PPC code base that use TABs for
indentation instead of using  spaces. The TABs should be replaced so
that we have a consistent coding style.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/374
Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220412021240.2080218-1-qtxuning1999@sjtu.edu.cn>
[danielhb: trimmed commit msg to 72 chars per line]
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agotarget/ppc: Add two missing register callbacks on POWER10
Frederic Barrat [Mon, 11 Apr 2022 12:59:00 +0000 (14:59 +0200)]
target/ppc: Add two missing register callbacks on POWER10

This patch adds tcg accessors for 2 SPRs which were missing on P10:

- the TBU40 register is used to write the upper 40 bits of the
timebase register. It is used by kvm to update the timebase when
entering/exiting the guest on P9 and above. The missing definition was
causing erratic decrementer interrupts in a pseries/kvm guest running
in a powernv10/tcg host, typically resulting in hangs.

- the missing DPDES SPR was found through code inspection. It exists
unchanged on P10.

Both existed on previous versions of the processor and a bit of git
archaeology hints that they were added while the P10 model was already
being worked on so they may have simply fallen through the cracks.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Message-Id: <20220411125900.352028-1-fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/pnv: Remove LSI on the PCIE host bridge
Frederic Barrat [Fri, 8 Apr 2022 13:13:03 +0000 (15:13 +0200)]
ppc/pnv: Remove LSI on the PCIE host bridge

The phb3/phb4/phb5 root ports inherit from the default PCIE root port
implementation, which requests a LSI interrupt (#INTA). On real
hardware (POWER8/POWER9/POWER10), there is no such LSI. This patch
corrects it so that it matches the hardware.

As a consequence, the device tree previously generated was bogus, as
the root bridge LSI was not properly mapped. On some
implementation (powernv9), it was leading to inconsistent interrupt
controller (xive) data. With this patch, it is now clean.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220408131303.147840-3-fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agopcie: Don't try triggering a LSI when not defined
Frederic Barrat [Fri, 8 Apr 2022 13:13:02 +0000 (15:13 +0200)]
pcie: Don't try triggering a LSI when not defined

This patch skips [de]asserting a LSI interrupt if the device doesn't
have any LSI defined. Doing so would trigger an assert in
pci_irq_handler().

The PCIE root port implementation in qemu requests a LSI (INTA), but a
subclass may want to change that behavior since it's a valid
configuration. For example on the POWER8/POWER9/POWER10 systems, the
root bridge doesn't request any LSI.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20220408131303.147840-2-fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/vof: Fix uninitialized string tracing
Alexey Kardashevskiy [Wed, 6 Apr 2022 04:50:13 +0000 (14:50 +1000)]
ppc/vof: Fix uninitialized string tracing

There are error paths which do not initialize propname but the trace_exit
label prints it anyway. This initializes the problem string.

Spotted by Coverity CID 1487241.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220406045013.3610172-1-aik@ozlabs.ru>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agohw/ppc/ppc405_boards: Initialize g_autofree pointer
Bernhard Beschow [Tue, 5 Apr 2022 12:35:34 +0000 (14:35 +0200)]
hw/ppc/ppc405_boards: Initialize g_autofree pointer

Resolves the only compiler warning when building a full QEMU under Arch Linux:

  Compiling C object libqemu-ppc-softmmu.fa.p/hw_ppc_ppc405_boards.c.o
  In file included from /usr/include/glib-2.0/glib.h:114,
                   from qemu/include/glib-compat.h:32,
                   from qemu/include/qemu/osdep.h:132,
                   from ../src/hw/ppc/ppc405_boards.c:25:
  ../src/hw/ppc/ppc405_boards.c: In function ‘ref405ep_init’:
  /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: warning: ‘filename’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     28 |   g_free (*pp);
        |   ^~~~~~~~~~~~
  ../src/hw/ppc/ppc405_boards.c:265:26: note: ‘filename’ was declared here
    265 |         g_autofree char *filename;
        |                          ^~~~~~~~

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220405123534.3395-1-shentey@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agotarget/ppc: implement xscvqp[su]qz
Matheus Ferst [Wed, 30 Mar 2022 17:59:32 +0000 (14:59 -0300)]
target/ppc: implement xscvqp[su]qz

Implement the following PowerISA v3.1 instructions:
xscvqpsqz: VSX Scalar Convert with round to zero Quad-Precision to
           Signed Quadword
xscvqpuqz: VSX Scalar Convert with round to zero Quad-Precision to
           Unsigned Quadword

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220330175932.6995-9-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agotarget/ppc: implement xscv[su]qqp
Matheus Ferst [Wed, 30 Mar 2022 17:59:31 +0000 (14:59 -0300)]
target/ppc: implement xscv[su]qqp

Implement the following PowerISA v3.1 instructions:
xscvsqqp: VSX Scalar Convert with round Signed Quadword to
          Quad-Precision
xscvuqqp: VSX Scalar Convert with round Unsigned Quadword to
          Quad-Precision format

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220330175932.6995-8-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agosoftfloat: add float128_to_int128
Matheus Ferst [Wed, 30 Mar 2022 17:59:30 +0000 (14:59 -0300)]
softfloat: add float128_to_int128

Implements float128_to_int128 based on parts_float_to_int logic.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220330175932.6995-7-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agosoftfloat: add float128_to_uint128
Matheus Ferst [Wed, 30 Mar 2022 17:59:29 +0000 (14:59 -0300)]
softfloat: add float128_to_uint128

Implements float128_to_uint128 based on parts_float_to_uint logic.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220330175932.6995-6-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agosoftfloat: add int128_to_float128
Matheus Ferst [Wed, 30 Mar 2022 17:59:28 +0000 (14:59 -0300)]
softfloat: add int128_to_float128

Based on parts_sint_to_float, implements int128_to_float128 to convert a
signed 128-bit value received through an Int128 argument.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220330175932.6995-5-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agosoftfloat: add uint128_to_float128
Matheus Ferst [Wed, 30 Mar 2022 17:59:27 +0000 (14:59 -0300)]
softfloat: add uint128_to_float128

Based on parts_uint_to_float, implements uint128_to_float128 to convert
an unsigned 128-bit value received through an Int128 argument.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220330175932.6995-4-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoqemu/int128: add int128_urshift
Matheus Ferst [Wed, 30 Mar 2022 17:59:26 +0000 (14:59 -0300)]
qemu/int128: add int128_urshift

Implement an unsigned right shift for Int128 values and add the same
tests cases of int128_rshift in the unit test.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220330175932.6995-3-matheus.ferst@eldorado.org.br>
[danielhb: fixed long lines in test_urshift()]
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agotarget/ppc: Improve KVM hypercall trace
Fabiano Rosas [Fri, 25 Mar 2022 22:33:16 +0000 (19:33 -0300)]
target/ppc: Improve KVM hypercall trace

Before:

  kvm_handle_papr_hcall handle PAPR hypercall
  kvm_handle_papr_hcall handle PAPR hypercall
  kvm_handle_papr_hcall handle PAPR hypercall
  kvm_handle_papr_hcall handle PAPR hypercall
  kvm_handle_papr_hcall handle PAPR hypercall
  kvm_handle_papr_hcall handle PAPR hypercall

After:

  kvm_handle_papr_hcall 0x3a8
  kvm_handle_papr_hcall 0x3ac
  kvm_handle_papr_hcall 0x108
  kvm_handle_papr_hcall 0x104
  kvm_handle_papr_hcall 0x104
  kvm_handle_papr_hcall 0x108

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220325223316.276494-1-farosas@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agospapr: Move nested KVM hypercalls under a TCG only config.
Fabiano Rosas [Fri, 25 Mar 2022 22:11:13 +0000 (19:11 -0300)]
spapr: Move nested KVM hypercalls under a TCG only config.

These are the spapr virtual hypervisor implementation of the nested
KVM API. They only make sense when running with TCG.

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20220325221113.255834-3-farosas@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agospapr: Move hypercall_register_softmmu
Fabiano Rosas [Fri, 25 Mar 2022 22:11:12 +0000 (19:11 -0300)]
spapr: Move hypercall_register_softmmu

I'm moving this because next patch will add more code under the ifdef
and it will be cleaner if we keep them together.

Also switch the ifdef branches to make it more convenient to add code
under CONFIG_TCG in the next patch.

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20220325221113.255834-2-farosas@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/pnv: Remove useless checks in set_irq handlers
Cédric Le Goater [Wed, 23 Mar 2022 07:28:46 +0000 (08:28 +0100)]
ppc/pnv: Remove useless checks in set_irq handlers

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220323072846.1780212-6-clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/pnv: Remove PnvPsiClas::irq_set
Cédric Le Goater [Wed, 23 Mar 2022 07:28:45 +0000 (08:28 +0100)]
ppc/pnv: Remove PnvPsiClas::irq_set

All devices raising PSI interrupts are now converted to use GPIO lines
and the pnv_psi_irq_set() routines have become useless. Drop them.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220323072846.1780212-5-clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/pnv: Remove PnvOCC::psi link
Cédric Le Goater [Wed, 23 Mar 2022 07:28:44 +0000 (08:28 +0100)]
ppc/pnv: Remove PnvOCC::psi link

Use an anonymous output GPIO line to connect the OCC device with the
PSIHB device and raise the appropriate PSI IRQ line depending on the
processor model.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220323072846.1780212-4-clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/pnv: Remove PnvLpcController::psi link
Cédric Le Goater [Wed, 23 Mar 2022 07:28:43 +0000 (08:28 +0100)]
ppc/pnv: Remove PnvLpcController::psi link

Create an anonymous output GPIO line to connect the LPC device with
the PSIHB device and raise the appropriate PSI IRQ line depending on
the processor model.

A temporary __pnv_psi_irq_set() routine is introduced to handle the
transition. It will be removed when all devices raising PSI interrupts
are converted to use GPIOs.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220323072846.1780212-3-clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/pnv: Fix PSI IRQ definition
Cédric Le Goater [Wed, 23 Mar 2022 07:28:42 +0000 (08:28 +0100)]
ppc/pnv: Fix PSI IRQ definition

On HW, the PSI and FSP interrupt levels are muxed under the same
interrupt number. For coding reasons, an extra IRQ number was
introduced to index register values in an array. It increased the
count of IRQs which do not fit in the PSI IRQ range anymore.

The PSI and FSP interrupts should be modeled with an extra level of
GPIO lines but since QEMU does not support them, simply drop the extra
number to stay within the IRQ range.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220323072846.1780212-2-clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/spapr/ddw: Add 2M pagesize
Alexey Kardashevskiy [Mon, 21 Mar 2022 07:19:45 +0000 (18:19 +1100)]
ppc/spapr/ddw: Add 2M pagesize

Recently the LoPAPR spec got a new 2MB pagesize to support in Dynamic DMA
Windows API (DDW), this adds the new flag.

Linux supports it since
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=38727311871

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20220321071945.918669-1-aik@ozlabs.ru>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoppc/pnv: Update skiboot to v7.0
Joel Stanley [Mon, 7 Mar 2022 00:49:39 +0000 (11:19 +1030)]
ppc/pnv: Update skiboot to v7.0

This is skiboot 7.0 (commit 76b349cf7b40). Built using gcc 11.2.0 and
binutils 2.38.

Changes since the previous version:

Christophe Lombard (15):
      npu2: move opal api
      pau: introduce support
      rainier: detect pau devices
      pau: assign bars
      pau: create phb
      pau: enabling opencapi
      pau: translation layer configuration
      pau: enable interrupt on error
      pau: complete phb ops
      pau: hmi scom dump
      pau: phy init
      pau: link training
      pau: update current opal call functions
      pau: mmio invalidates
      pau: Add support for OpenCAPI Persistent Memory devices.

Cédric Le Goater (4):
      xive/p10: Fix xive_special_cache_check when DEBUG=1
      xive/p10: Fix mismatch errors when DEBUG=1
      interrupts: Do not advertise XICS support on P10
      skiboot v6.6.6 release notes

Frederic Barrat (6):
      phb4/5: Escalate page-level TCE kills
      npu3: Remove GPU support on Swift
      phb5: Remove obsolete capp-related properties
      xive/p10:: Declare xive2 DT node as an interrupt-controller
      skiboot v6.0.24 release notes
      opal-api: Drop diagnostics data type symbol for PHB5

Michael Ellerman (3):
      external/mambo: Print more info when the kernel is too big
      doc: Make it clear all existing platforms use Power9N
      docs: Add Swift, Mowgli & Rainier

Nicholas Piggin (12):
      external/mambo: Updates for POWER10 configuration for DD2.0
      external/mambo: Updates POWER9 SIM_CTRL1 to remove hardware atomic RC
      external/mambo: Add POWER10 small-core mode
      HBRT: fix clobbered r16 when host services handlers are called
      interrupts: add_opal_interrupts avoid NULL dereference on P10 mambo
      cpu: cpu_idle_job SMT priority fix
      cpu: add debug check in cpu_relax
      asm/head: Fix P10 HILE for little endian build
      phb4: annotate tbl_pest with endian types
      Remove support for POWER8 DD1
      phb3: make endian-clean
      flash: AST BMC endian fixes

Nick Child (1):
      secvar: Free md context on hash error

Ryan Grimm (1):
      AWAN simulator support for P10

Vasant Hegde (5):
      ci: Bump qemu version
      hello_world: Add p10 mambo tests
      skiboot v6.7.3 release notes
      skiboot v6.8.1 release notes
      skiboot v7.0 release notes

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2 years agoMerge tag 'pull-log-20220420' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Wed, 20 Apr 2022 19:47:15 +0000 (12:47 -0700)]
Merge tag 'pull-log-20220420' of https://gitlab.com/rth7680/qemu into staging

Clean up log locking.
Use the FILE* from qemu_log_trylock more often.
Support per-thread log files with -d tid.

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmJgStUdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+c9Af/ZXnKe6bz5yjXy1mS
# mNIBJUPKrz1RXFfJxuCfEDWrtNc/gvQyvc3weZG5X0cXpiczeWA5V/9xbE9hu5gV
# 4rePiIHWmOrais6GZlqEu2F8P3/XyqdPHtcdBfa1hDneixtpqMHCqnh36nQjHyiU
# ogFxEJ/M9tTwhuWZrXe/JSYAiALEDYMK9bk4RUMOP1c4v37rXqUNOAM1IPhfxLL/
# bK9DQMpz5oUNsWWaqBQ2wQWHkNTOpUEkKGQv0xcQF5SdpYwaxakW9B7/h4QSeOUn
# oY6MFTmkJ4BPrLnkcubn+3PICc9LW0OFuzNnUdMCbeqVbjAUQrdMDalKpy4uNFv9
# U1VqHg==
# =Mt5s
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 20 Apr 2022 11:03:01 AM PDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]

* tag 'pull-log-20220420' of https://gitlab.com/rth7680/qemu: (39 commits)
  util/log: Support per-thread log files
  util/log: Limit RCUCloseFILE to file closing
  util/log: Rename QemuLogFile to RCUCloseFILE
  util/log: Combine two logfile closes
  util/log: Hoist the eval of is_daemonized in qemu_set_log_internal
  util/log: Rename qemu_logfile_mutex to global_mutex
  util/log: Rename qemu_logfile to global_file
  util/log: Rename logfilename to global_filename
  util/log: Remove qemu_log_close
  softmmu: Use qemu_set_log_filename_flags
  linux-user: Use qemu_set_log_filename_flags
  bsd-user: Use qemu_set_log_filename_flags
  util/log: Introduce qemu_set_log_filename_flags
  sysemu/os-win32: Test for and use _lock_file/_unlock_file
  include/qemu/log: Move entire implementation out-of-line
  include/exec/log: Do not reference QemuLogFile directly
  tests/unit: Do not reference QemuLogFile directly
  linux-user: Expand log_page_dump inline
  bsd-user: Expand log_page_dump inline
  util/log: Drop call to setvbuf
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agotcg: Add tcg_constant_ptr
Richard Henderson [Wed, 13 Apr 2022 16:50:17 +0000 (09:50 -0700)]
tcg: Add tcg_constant_ptr

Similar to tcg_const_ptr, defer to tcg_constant_{i32,i64}.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoaccel/tcg: Remove ATOMIC_MMU_IDX
Richard Henderson [Fri, 1 Apr 2022 13:47:32 +0000 (07:47 -0600)]
accel/tcg: Remove ATOMIC_MMU_IDX

The last use of this macro was removed in f3e182b10013
("accel/tcg: Push trace info building into atomic_common.c.inc")

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agotcg: Fix indirect lowering vs TCG_OPF_COND_BRANCH
Richard Henderson [Wed, 16 Mar 2022 16:34:18 +0000 (09:34 -0700)]
tcg: Fix indirect lowering vs TCG_OPF_COND_BRANCH

With TCG_OPF_COND_BRANCH, we extended the lifetimes of
globals across extended basic blocks.  This means that
the liveness computed in pass 1 does not kill globals
in the same way as normal temps.

Introduce TYPE_EBB to match this lifetime, so that we
get correct register allocation for the temps that we
introduce during the indirect lowering pass.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Fixes: b4cb76e6208 ("tcg: Do not kill globals at conditional branches")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoDon't include sysemu/tcg.h if it is not necessary
Thomas Huth [Tue, 15 Mar 2022 14:41:07 +0000 (15:41 +0100)]
Don't include sysemu/tcg.h if it is not necessary

This header only defines the tcg_allowed variable and the tcg_enabled()
function - which are not required in many files that include this
header. Drop the #include statement there.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220315144107.1012530-1-thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoMerge tag 'pull-fixes-for-7.1-200422-1' of https://github.com/stsquad/qemu into staging
Richard Henderson [Wed, 20 Apr 2022 18:13:08 +0000 (11:13 -0700)]
Merge tag 'pull-fixes-for-7.1-200422-1' of https://github.com/stsquad/qemu into staging

Testing, docs and gdbstub updates:

  - make -M virt test exercise -cpu max
  - document how binfmt_misc docker works
  - clean-up the devel TOC generation
  - clean-up check-tcg cross-compile behaviour
  - fix byte swap error in xmm gdbstub access
  - add float_convd test with reference files
  - more reference files for float_convs
  - more cleanly handle gdb crashing during check-tcg

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmJgIgsACgkQ+9DbCVqe
# KkRs3Qf/WnL4YV3l8jO/wEVbls/57aLPk+ak1GuvXJ+iM9gH8Qz6WZxIJIEhhHlu
# ZEixCewahTn8POMMRo4JAr0bRgtfBuh717GerXObiHcS3OuLsGM8rYP2Z1xqKL3L
# 4pR8VqhyUq/Jyl/6MPN5OZB0AdEPIdI5MuflckCeDcFaowpthLjwHao07hG/FU0s
# wQYS7aYTZT33V2Xm6xlePEEMq8YMPCJj00HF3Ljg4eUOmb+C+csFXMQtotsBJRCg
# mC/T2U0IFbrQUkkWJqVmRCPwKraQGDMn6POk298siRWE0kV4BmH8mnmN+/Jxhqgl
# QfFhQrsBxmPPG5TfQhEmlHfQ5EARLQ==
# =8q12
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 20 Apr 2022 08:08:59 AM PDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [undefined]
# 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: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-fixes-for-7.1-200422-1' of https://github.com/stsquad/qemu: (25 commits)
  tests/guest-debug: better handle gdb crashes
  target/i386: fix byte swap issue with XMM register access
  tests/tcg: add missing reference files for float_convs
  tests/tcg: add float_convd test
  tests/tcg: remove duplicate sha512-sse case
  tests/tcg: fix non-static build
  tests/docker: remove SKIP_DOCKER_BUILD
  tests/tcg: isolate from QEMU's config-host.mak
  tests/tcg: invoke Makefile.target directly from QEMU's makefile
  tests/tcg: list test targets in Makefile.prereqs
  tests/tcg: prepare Makefile.prereqs at configure time
  tests/tcg: remove CONFIG_USER_ONLY from config-target.mak
  tests/tcg: remove CONFIG_LINUX_USER from config-target.mak
  tests/tcg: add compiler test variables when using containers
  tests/docker: do not duplicate rules for hexagon-cross
  tests/docker: simplify docker-TEST@IMAGE targets
  tests/docker: remove unnecessary filtering of $(DOCKER_IMAGES)
  tests/docker: inline variable definitions or move close to use
  tests/docker: remove unnecessary default definitions
  tests/docker: remove dead variable
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoutil/log: Support per-thread log files
Richard Henderson [Sun, 17 Apr 2022 18:30:19 +0000 (11:30 -0700)]
util/log: Support per-thread log files

Add a new log flag, tid, to turn this feature on.
Require the log filename to be set, and to contain %d.

Do not allow tid to be turned off once it is on, nor let
the filename be change thereafter.  This avoids the need
for signalling each thread to re-open on a name change.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-40-richard.henderson@linaro.org>

2 years agoutil/log: Limit RCUCloseFILE to file closing
Richard Henderson [Sun, 17 Apr 2022 18:30:18 +0000 (11:30 -0700)]
util/log: Limit RCUCloseFILE to file closing

Use FILE* for global_file.  We can perform an rcu_read on that
just as easily as RCUCloseFILE*.  This simplifies a couple of
places, where previously we required taking the rcu_read_lock
simply to avoid racing to dereference RCUCloseFile->fd.

Only allocate the RCUCloseFile prior to call_rcu.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-39-richard.henderson@linaro.org>

2 years agoutil/log: Rename QemuLogFile to RCUCloseFILE
Richard Henderson [Sun, 17 Apr 2022 18:30:17 +0000 (11:30 -0700)]
util/log: Rename QemuLogFile to RCUCloseFILE

s/QemuLogFile/RCUCloseFILE/
s/qemu_logfile_free/rcu_close_file/

Emphasize that this is only a carrier for passing a pointer
to call_rcu for closing, and not the real logfile.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-38-richard.henderson@linaro.org>

2 years agoutil/log: Combine two logfile closes
Richard Henderson [Sun, 17 Apr 2022 18:30:16 +0000 (11:30 -0700)]
util/log: Combine two logfile closes

Merge the close from the changed_name block with the close
from the !need_to_open_file block.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-37-richard.henderson@linaro.org>

2 years agoutil/log: Hoist the eval of is_daemonized in qemu_set_log_internal
Richard Henderson [Sun, 17 Apr 2022 18:30:15 +0000 (11:30 -0700)]
util/log: Hoist the eval of is_daemonized in qemu_set_log_internal

Only call is_daemonized once.
We require the result on all paths after this point.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-36-richard.henderson@linaro.org>

2 years agoutil/log: Rename qemu_logfile_mutex to global_mutex
Richard Henderson [Sun, 17 Apr 2022 18:30:14 +0000 (11:30 -0700)]
util/log: Rename qemu_logfile_mutex to global_mutex

Rename to emphasize this covers the file-scope global variables.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-35-richard.henderson@linaro.org>

2 years agoutil/log: Rename qemu_logfile to global_file
Richard Henderson [Sun, 17 Apr 2022 18:30:13 +0000 (11:30 -0700)]
util/log: Rename qemu_logfile to global_file

Rename to emphasize this is the file-scope global variable.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-34-richard.henderson@linaro.org>

2 years agoutil/log: Rename logfilename to global_filename
Richard Henderson [Sun, 17 Apr 2022 18:30:12 +0000 (11:30 -0700)]
util/log: Rename logfilename to global_filename

Rename to emphasize this is the file-scope global variable.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-33-richard.henderson@linaro.org>

2 years agoutil/log: Remove qemu_log_close
Richard Henderson [Sun, 17 Apr 2022 18:30:11 +0000 (11:30 -0700)]
util/log: Remove qemu_log_close

The only real use is in cpu_abort, where we have just
flushed the file via qemu_log_unlock, and are just about
to force-crash the application via abort.  We do not
really need to close the FILE before the abort.

The two uses in test-logging.c can be handled with
qemu_set_log_filename_flags.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-32-richard.henderson@linaro.org>

2 years agosoftmmu: Use qemu_set_log_filename_flags
Richard Henderson [Sun, 17 Apr 2022 18:30:10 +0000 (11:30 -0700)]
softmmu: Use qemu_set_log_filename_flags

Perform all logfile setup at startup in one step.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-31-richard.henderson@linaro.org>

2 years agolinux-user: Use qemu_set_log_filename_flags
Richard Henderson [Sun, 17 Apr 2022 18:30:09 +0000 (11:30 -0700)]
linux-user: Use qemu_set_log_filename_flags

Perform all logfile setup in one step.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-30-richard.henderson@linaro.org>

2 years agobsd-user: Use qemu_set_log_filename_flags
Richard Henderson [Sun, 17 Apr 2022 18:30:08 +0000 (11:30 -0700)]
bsd-user: Use qemu_set_log_filename_flags

Perform all logfile setup in one step.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-29-richard.henderson@linaro.org>

2 years agoutil/log: Introduce qemu_set_log_filename_flags
Richard Henderson [Sun, 17 Apr 2022 18:30:07 +0000 (11:30 -0700)]
util/log: Introduce qemu_set_log_filename_flags

Provide a function to set both filename and flags at
the same time.  This is the common case at startup.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-28-richard.henderson@linaro.org>

2 years agosysemu/os-win32: Test for and use _lock_file/_unlock_file
Richard Henderson [Sun, 17 Apr 2022 18:30:06 +0000 (11:30 -0700)]
sysemu/os-win32: Test for and use _lock_file/_unlock_file

The bug referenced in os-win32.h was fixed in mingw-w64 v6.

According to repology, version 5 used by ubuntu 18, which is
not yet out of support, so provide a meson link test for it.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-27-richard.henderson@linaro.org>

2 years agoinclude/qemu/log: Move entire implementation out-of-line
Richard Henderson [Sun, 17 Apr 2022 18:30:05 +0000 (11:30 -0700)]
include/qemu/log: Move entire implementation out-of-line

Move QemuLogFile, qemu_logfile, and all inline functions into qemu/log.c.
No need to expose these implementation details in the api.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-26-richard.henderson@linaro.org>

2 years agoinclude/exec/log: Do not reference QemuLogFile directly
Richard Henderson [Sun, 17 Apr 2022 18:30:04 +0000 (11:30 -0700)]
include/exec/log: Do not reference QemuLogFile directly

Use qemu_log_trylock/unlock instead of the raw rcu_read.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220417183019.755276-25-richard.henderson@linaro.org>

2 years agotests/unit: Do not reference QemuLogFile directly
Richard Henderson [Sun, 17 Apr 2022 18:30:03 +0000 (11:30 -0700)]
tests/unit: Do not reference QemuLogFile directly

Use qemu_log_lock/unlock instead of the raw rcu_read.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-24-richard.henderson@linaro.org>

2 years agolinux-user: Expand log_page_dump inline
Richard Henderson [Sun, 17 Apr 2022 18:30:02 +0000 (11:30 -0700)]
linux-user: Expand log_page_dump inline

We have extra stuff to log at the same time.
Hoist the qemu_log_lock/unlock to the caller and use fprintf.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-23-richard.henderson@linaro.org>

2 years agobsd-user: Expand log_page_dump inline
Richard Henderson [Sun, 17 Apr 2022 18:30:01 +0000 (11:30 -0700)]
bsd-user: Expand log_page_dump inline

We have extra stuff to log at the same time.
Hoist the qemu_log_trylock/unlock to the caller and use fprintf.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-22-richard.henderson@linaro.org>

2 years agoutil/log: Drop call to setvbuf
Richard Henderson [Sun, 17 Apr 2022 18:30:00 +0000 (11:30 -0700)]
util/log: Drop call to setvbuf

Now that the log buffer is flushed after every qemu_log_unlock,
which includes every call to qemu_log, we do not need to force
line buffering (or unbuffering for windows).  Block buffer the
entire loggable unit.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-21-richard.henderson@linaro.org>

2 years agoutil/log: Remove qemu_log_flush
Richard Henderson [Sun, 17 Apr 2022 18:29:59 +0000 (11:29 -0700)]
util/log: Remove qemu_log_flush

All uses flush output immediately before or after qemu_log_unlock.
Instead of a separate call, move the flush into qemu_log_unlock.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-20-richard.henderson@linaro.org>

2 years agoutil/log: Mark qemu_log_trylock as G_GNUC_WARN_UNUSED_RESULT
Richard Henderson [Sun, 17 Apr 2022 18:29:58 +0000 (11:29 -0700)]
util/log: Mark qemu_log_trylock as G_GNUC_WARN_UNUSED_RESULT

Now that all uses have been updated, consider a missing
test of the result of qemu_log_trylock a bug and Werror.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-19-richard.henderson@linaro.org>

2 years agoutil/log: Drop return value from qemu_log
Richard Henderson [Sun, 17 Apr 2022 18:29:57 +0000 (11:29 -0700)]
util/log: Drop return value from qemu_log

The only user of this feature, tcg_dump_ops, has been
converted to use fprintf directly.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-18-richard.henderson@linaro.org>

2 years agoutil/log: Use qemu_log_trylock/unlock in qemu_log
Richard Henderson [Sun, 17 Apr 2022 18:29:56 +0000 (11:29 -0700)]
util/log: Use qemu_log_trylock/unlock in qemu_log

Avoid using QemuLogFile and RCU directly.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-17-richard.henderson@linaro.org>

2 years agotarget/nios2: Remove log_cpu_state from reset
Richard Henderson [Sun, 17 Apr 2022 18:29:55 +0000 (11:29 -0700)]
target/nios2: Remove log_cpu_state from reset

This is redundant with the logging done in cpu_common_reset.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-16-richard.henderson@linaro.org>

2 years agoaccel/tcg: Use cpu_dump_state between qemu_log_trylock/unlock
Richard Henderson [Sun, 17 Apr 2022 18:29:54 +0000 (11:29 -0700)]
accel/tcg: Use cpu_dump_state between qemu_log_trylock/unlock

Inside log_cpu_state, we perform qemu_log_trylock/unlock, which need
not be done if we have already performed the lock beforehand.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-15-richard.henderson@linaro.org>

2 years agoexec/log: Remove log_disas and log_target_disas
Richard Henderson [Sun, 17 Apr 2022 18:29:53 +0000 (11:29 -0700)]
exec/log: Remove log_disas and log_target_disas

These functions are no longer used.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-14-richard.henderson@linaro.org>

2 years agoexec/translator: Pass the locked filepointer to disas_log hook
Richard Henderson [Sun, 17 Apr 2022 18:29:52 +0000 (11:29 -0700)]
exec/translator: Pass the locked filepointer to disas_log hook

We have fetched and locked the logfile in translator_loop.
Pass the filepointer down to the disas_log hook so that it
need not be fetched and locked again.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-13-richard.henderson@linaro.org>

2 years agotcg: Pass the locked filepointer to tcg_dump_ops
Richard Henderson [Sun, 17 Apr 2022 18:29:51 +0000 (11:29 -0700)]
tcg: Pass the locked filepointer to tcg_dump_ops

We have already looked up and locked the filepointer.
Use fprintf instead of qemu_log directly for output
in and around tcg_dump_ops.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-12-richard.henderson@linaro.org>

2 years agoutil/log: Remove qemu_log_vprintf
Richard Henderson [Sun, 17 Apr 2022 18:29:50 +0000 (11:29 -0700)]
util/log: Remove qemu_log_vprintf

This function is no longer used.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-11-richard.henderson@linaro.org>

2 years ago*: Use fprintf between qemu_log_trylock/unlock
Richard Henderson [Sun, 17 Apr 2022 18:29:49 +0000 (11:29 -0700)]
*: Use fprintf between qemu_log_trylock/unlock

Inside qemu_log, we perform qemu_log_trylock/unlock, which need
not be done if we have already performed the lock beforehand.

Always check the result of qemu_log_trylock -- only checking
qemu_loglevel_mask races with the acquisition of the lock on
the logfile.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-10-richard.henderson@linaro.org>

2 years agohw/xen: Split out xen_pv_output_msg
Richard Henderson [Sun, 17 Apr 2022 18:29:48 +0000 (11:29 -0700)]
hw/xen: Split out xen_pv_output_msg

Do not replicate the individual logging statements.
Use qemu_log_trylock/unlock instead of qemu_log directly.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-9-richard.henderson@linaro.org>

2 years agoutil/log: Rename qemu_log_lock to qemu_log_trylock
Richard Henderson [Sun, 17 Apr 2022 18:29:47 +0000 (11:29 -0700)]
util/log: Rename qemu_log_lock to qemu_log_trylock

This function can fail, which makes it more like ftrylockfile
or pthread_mutex_trylock than flockfile or pthread_mutex_lock,
so rename it.

To closer match the other trylock functions, release rcu_read_lock
along the failure path, so that qemu_log_unlock need not be called
on failure.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-8-richard.henderson@linaro.org>

2 years agoutil/log: Move qemu_log_lock, qemu_log_unlock out of line
Richard Henderson [Sun, 17 Apr 2022 18:29:46 +0000 (11:29 -0700)]
util/log: Move qemu_log_lock, qemu_log_unlock out of line

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-7-richard.henderson@linaro.org>

2 years agoos-posix: Use qemu_log_enabled
Richard Henderson [Sun, 17 Apr 2022 18:29:45 +0000 (11:29 -0700)]
os-posix: Use qemu_log_enabled

Do not reference qemu_logfile directly;
use the predicate provided by qemu/log.h.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-6-richard.henderson@linaro.org>

2 years agoutil/log: Pass Error pointer to qemu_set_log
Richard Henderson [Sun, 17 Apr 2022 18:29:44 +0000 (11:29 -0700)]
util/log: Pass Error pointer to qemu_set_log

Do not force exit within qemu_set_log; return bool and pass
an Error value back up the stack as per usual.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-5-richard.henderson@linaro.org>

2 years agoutil/log: Return bool from qemu_set_log_filename
Richard Henderson [Sun, 17 Apr 2022 18:29:43 +0000 (11:29 -0700)]
util/log: Return bool from qemu_set_log_filename

Per the recommendations in qapi/error.h, return false on failure.

Use the return value in the monitor, the only place we aren't
already passing error_fatal or error_abort.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-4-richard.henderson@linaro.org>

2 years agotarget/hexagon: Remove qemu_set_log in hexagon_translate_init
Richard Henderson [Sun, 17 Apr 2022 18:29:42 +0000 (11:29 -0700)]
target/hexagon: Remove qemu_set_log in hexagon_translate_init

This code appears to be trying to make sure there is a logfile.
But that's already true -- the logfile will either be set by -D,
or will be stderr.  In either case, not appropriate here.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-3-richard.henderson@linaro.org>

2 years agoutil/log: Drop manual log buffering
Richard Henderson [Sun, 17 Apr 2022 18:29:41 +0000 (11:29 -0700)]
util/log: Drop manual log buffering

This buffering was introduced during the Paleozoic: 9fa3e853531.

There has never been an explanation as to why we may not allow
glibc to allocate the file buffer itself.  We certainly have
many other uses of mmap and malloc during user-only startup,
so presumably whatever the issue was, it has been fixed during
the preceeding 18 years.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-2-richard.henderson@linaro.org>

2 years agoMerge tag 'pull-block-2022-04-20' of https://gitlab.com/hreitz/qemu into staging
Richard Henderson [Wed, 20 Apr 2022 16:39:33 +0000 (09:39 -0700)]
Merge tag 'pull-block-2022-04-20' of https://gitlab.com/hreitz/qemu into staging

Block patches:
- Some changes for qcow2's refcount repair algorithm to make it work for
  qcow2 images stored on block devices
- Skip test cases that require zstd when support for it is missing
- Some refactoring in the iotests' meson.build

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEy2LXoO44KeRfAE00ofpA0JgBnN8FAmJf/asSHGhyZWl0ekBy
# ZWRoYXQuY29tAAoJEKH6QNCYAZzfYXUQAKQv5qKQBjU4MTwlS8A4h6B6OJgC1Sik
# 9BB7LO/QFjuuF4vNKpcUlf6i0epxPP8B5pmCjaAolMh6u6wZwL7hHq+SOYXvejTo
# vINW+r097U0qYPkSV+cS6tbW92rYJDD7VxF+34udiWXGjozsBTw/k9DfJaa9Ht66
# 2dw3AxUa4lxN1/ejFzDLx3DNaff+HctLhgVpHeBb0eN2zr2Ug5+ZFgMoiWwU6r6J
# EzTORLAzATerlQVYUkhh4Y/UdVLLw1SzTWOQv5b/NqvaLfKmYsQobSfjC2ajO8XJ
# P2REigcOAij5uWVRf4EY7xoqmADP8pXxuOTzw0hyGNLOLNcXoFbfW45WSPoY+YgH
# EH1TtC4vMsg/MlO/A3PJr9v+SNqxz32cul3MVrY3PuG4Dzz0riy9GhtFUU37igbj
# mR6pP3nSa/f2X4+9B6/UrPjLzusRvc8bvzYqVEnSLABav11npphkYaR9QT1fQUVD
# Zw26igXtmLKUcfop/EqShbhblk0ZLYDTj/Lx7X+thC9OCrK1QgF6qAsIUqiS1iHz
# vwdktRTCofo4ZIT/OCz5QeriJqDz0B7VJ8/4i/uvm2eq8BUsn2mJuyAGD2XtaONV
# rmASrV9VbajdxX5VptjKOOHG6aHtqQlKbyBFog8I4nqVFdjdSMalb++gBMCrPu1A
# 1iZPsOOyz/8+
# =BF0c
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 20 Apr 2022 05:33:47 AM PDT
# gpg:                using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
# gpg:                issuer "hreitz@redhat.com"
# gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [undefined]
# 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: CB62 D7A0 EE38 29E4 5F00  4D34 A1FA 40D0 9801 9CDF

* tag 'pull-block-2022-04-20' of https://gitlab.com/hreitz/qemu:
  qcow2: Add errp to rebuild_refcount_structure()
  iotests/108: Test new refcount rebuild algorithm
  qcow2: Improve refcount structure rebuilding
  iotests/303: Check for zstd support
  iotests/065: Check for zstd support
  iotests.py: Add supports_qcow2_zstd_compression()
  tests/qemu-iotests: Move the bash and sanitizer checks to meson.build
  tests/qemu-iotests/meson.build: Improve the indentation

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agotests/guest-debug: better handle gdb crashes
Alex Bennée [Tue, 19 Apr 2022 09:10:20 +0000 (10:10 +0100)]
tests/guest-debug: better handle gdb crashes

There are a number of GDB's on various distros which fail fairly hard
when attempting to talk to a cross-arch guest. The previous attempt to
catch this was incorrect as the shell will deliver signals as 128+n.
Fix the detection and while we are it improve the logging we dump into
the test output.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reported-by: Gautam Agrawal <gautamnagrawal@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-26-alex.bennee@linaro.org>

2 years agotarget/i386: fix byte swap issue with XMM register access
Alex Bennée [Tue, 19 Apr 2022 09:10:19 +0000 (10:10 +0100)]
target/i386: fix byte swap issue with XMM register access

During the conversion to the gdb_get_reg128 helpers the high and low
parts of the XMM register where inadvertently swapped. This causes
reads of the register to report the incorrect value to gdb.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/971
Fixes: b7b8756a9c (target/i386: use gdb_get_reg helpers)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-stable@nongnu.org
Message-Id: <20220419091020.3008144-25-alex.bennee@linaro.org>

2 years agotests/tcg: add missing reference files for float_convs
Alex Bennée [Tue, 19 Apr 2022 09:10:18 +0000 (10:10 +0100)]
tests/tcg: add missing reference files for float_convs

We might as well include a reference file for i386/x86_64. I was going
to include s390x as well but it's broken hence I raised:

  https://gitlab.com/qemu-project/qemu/-/issues/979.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220419091020.3008144-24-alex.bennee@linaro.org>

2 years agotests/tcg: add float_convd test
Alex Bennée [Tue, 19 Apr 2022 09:10:17 +0000 (10:10 +0100)]
tests/tcg: add float_convd test

This is a simple transliteration of the float_convs test but this time
working with doubles. I'm used it to test the handling of vector
registers in gdbstub but wasn't able to find a non-ugly way to
automate it.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-23-alex.bennee@linaro.org>

2 years agotests/tcg: remove duplicate sha512-sse case
Alex Bennée [Tue, 19 Apr 2022 09:10:16 +0000 (10:10 +0100)]
tests/tcg: remove duplicate sha512-sse case

We already generate the sha512-sse case in the i386 makefile which
works for both i386 and x86_64.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: f8a4c6d728 ("tests/tcg: add vectorised sha512 versions")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-22-alex.bennee@linaro.org>

2 years agotests/tcg: fix non-static build
Paolo Bonzini [Tue, 19 Apr 2022 09:10:15 +0000 (10:10 +0100)]
tests/tcg: fix non-static build

If linking with -static fails at configure time, -static should not be used
at build time either. Do not include BUILD_STATIC in $config_target_mak.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-18-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-21-alex.bennee@linaro.org>

2 years agotests/docker: remove SKIP_DOCKER_BUILD
Paolo Bonzini [Tue, 19 Apr 2022 09:10:14 +0000 (10:10 +0100)]
tests/docker: remove SKIP_DOCKER_BUILD

It is now unused.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-17-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-20-alex.bennee@linaro.org>

2 years agotests/tcg: isolate from QEMU's config-host.mak
Paolo Bonzini [Tue, 19 Apr 2022 09:10:13 +0000 (10:10 +0100)]
tests/tcg: isolate from QEMU's config-host.mak

Do not include variables for the QEMU's own compiler, as they
are not necessarily related to the cross compiler used for tests/tcg.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-16-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-19-alex.bennee@linaro.org>

2 years agotests/tcg: invoke Makefile.target directly from QEMU's makefile
Paolo Bonzini [Tue, 19 Apr 2022 09:10:12 +0000 (10:10 +0100)]
tests/tcg: invoke Makefile.target directly from QEMU's makefile

Build the "docker.py cc" invocation directly in tests/tcg/configure.sh, and
remove the Makefile.qemu wrapper around Makefile.target.  The config-*.mak
files now include the actual variables used when building the tests, rather
than the CROSS_* variables that Makefile.qemu used to "translate".

This is a first step towards generalizing the cross-compilation infrastructure
so that it can be used for firmware as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-15-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-18-alex.bennee@linaro.org>

2 years agotests/tcg: list test targets in Makefile.prereqs
Paolo Bonzini [Tue, 19 Apr 2022 09:10:11 +0000 (10:10 +0100)]
tests/tcg: list test targets in Makefile.prereqs

Omit the rules altogether for targets that do not have a compiler.
Makefile.qemu now is only invoked if the tests are actually built/run.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-14-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-17-alex.bennee@linaro.org>

2 years agotests/tcg: prepare Makefile.prereqs at configure time
Paolo Bonzini [Tue, 19 Apr 2022 09:10:10 +0000 (10:10 +0100)]
tests/tcg: prepare Makefile.prereqs at configure time

List the dependencies of the build-tcg-tests-* and run-tcg-tests-*
targets in a Makefile fragment, without going through Makefile.prereqs's
"parsing" of config-*.mak.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-13-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-16-alex.bennee@linaro.org>

2 years agotests/tcg: remove CONFIG_USER_ONLY from config-target.mak
Paolo Bonzini [Tue, 19 Apr 2022 09:10:09 +0000 (10:10 +0100)]
tests/tcg: remove CONFIG_USER_ONLY from config-target.mak

Just check the target name instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-12-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-15-alex.bennee@linaro.org>

2 years agotests/tcg: remove CONFIG_LINUX_USER from config-target.mak
Paolo Bonzini [Tue, 19 Apr 2022 09:10:08 +0000 (10:10 +0100)]
tests/tcg: remove CONFIG_LINUX_USER from config-target.mak

Just check the target name instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220401141326.1244422-11-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-14-alex.bennee@linaro.org>

2 years agotests/tcg: add compiler test variables when using containers
Paolo Bonzini [Tue, 19 Apr 2022 09:10:07 +0000 (10:10 +0100)]
tests/tcg: add compiler test variables when using containers

Even for container-based cross compilation use $(CROSS_CC_HAS_*) variables.
This makes the TCG test makefiles oblivious of whether the compiler is
invoked through a container or not.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220401141326.1244422-10-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-13-alex.bennee@linaro.org>

2 years agotests/docker: do not duplicate rules for hexagon-cross
Paolo Bonzini [Tue, 19 Apr 2022 09:10:06 +0000 (10:10 +0100)]
tests/docker: do not duplicate rules for hexagon-cross

The commands for docker-image-debian-hexagon-cross are the same as those
in debian-toolchain-run, just with a nonstandard path to build-toolchain.sh.
Reuse the definition by renaming the debian-hexagon-cross.docker.d directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-9-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-12-alex.bennee@linaro.org>

2 years agotests/docker: simplify docker-TEST@IMAGE targets
Paolo Bonzini [Tue, 19 Apr 2022 09:10:05 +0000 (10:10 +0100)]
tests/docker: simplify docker-TEST@IMAGE targets

No need to go through the shell when we already have the test and images at
the point where the targets are declared.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-8-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-11-alex.bennee@linaro.org>

2 years agotests/docker: remove unnecessary filtering of $(DOCKER_IMAGES)
Paolo Bonzini [Tue, 19 Apr 2022 09:10:04 +0000 (10:10 +0100)]
tests/docker: remove unnecessary filtering of $(DOCKER_IMAGES)

Now that DOCKER_IMAGES is only defined after DOCKER_VIRTUAL_IMAGES is
complete, there is no need to re-filter DOCKER_IMAGES against it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-7-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-10-alex.bennee@linaro.org>

2 years agotests/docker: inline variable definitions or move close to use
Paolo Bonzini [Tue, 19 Apr 2022 09:10:03 +0000 (10:10 +0100)]
tests/docker: inline variable definitions or move close to use

Variables that are defined with ":=" are handled imperatively, so moving
them closer to the first use ensures that all the assignments prior to
the first use are taken into account.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-6-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-9-alex.bennee@linaro.org>

2 years agotests/docker: remove unnecessary default definitions
Paolo Bonzini [Tue, 19 Apr 2022 09:10:02 +0000 (10:10 +0100)]
tests/docker: remove unnecessary default definitions

The definition of DOCKER_IMAGES and DOCKER_TESTS copes already with an
empty value of $(IMAGES) and $(TESTS), no need to force them to "%" if
undefined.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-5-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-8-alex.bennee@linaro.org>

2 years agotests/docker: remove dead variable
Paolo Bonzini [Tue, 19 Apr 2022 09:10:01 +0000 (10:10 +0100)]
tests/docker: remove dead variable

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220401141326.1244422-4-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-7-alex.bennee@linaro.org>

2 years agotests/docker: remove test targets
Paolo Bonzini [Tue, 19 Apr 2022 09:10:00 +0000 (10:10 +0100)]
tests/docker: remove test targets

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220401141326.1244422-3-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-6-alex.bennee@linaro.org>

2 years agotests/docker: remove dead code for linux-user containers
Paolo Bonzini [Tue, 19 Apr 2022 09:09:59 +0000 (10:09 +0100)]
tests/docker: remove dead code for linux-user containers

debian-powerpc-user-cross was the only linux-user powered cross builder
and it was removed in commit 80394ccf21 ("tests/docker: remove
debian-powerpc-user-cross", 2019-09-26). Remove all the infrastructure
around it since it is now unused.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220401141326.1244422-2-pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-5-alex.bennee@linaro.org>

2 years agodocs/devel: drop :hidden: and :includehidden: tags
Alex Bennée [Tue, 19 Apr 2022 09:09:58 +0000 (10:09 +0100)]
docs/devel: drop :hidden: and :includehidden: tags

This was confusing and in the case of qtest was hiding the details of
the qgraph sub-document in the qtest pages.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-4-alex.bennee@linaro.org>

2 years agodocs/devel: add some notes on the binfmt-image-debian targets
Alex Bennée [Tue, 19 Apr 2022 09:09:57 +0000 (10:09 +0100)]
docs/devel: add some notes on the binfmt-image-debian targets

We document some of this on the wiki but lets move it into our
official developer notes documentation.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-3-alex.bennee@linaro.org>

2 years agotests/avocado: update aarch64_virt test to exercise -cpu max
Alex Bennée [Tue, 19 Apr 2022 09:09:56 +0000 (10:09 +0100)]
tests/avocado: update aarch64_virt test to exercise -cpu max

The Fedora 29 kernel is quite old and importantly fails when running
in LPA2 scenarios. As it's not really exercising much of the CPU space
replace it with a custom 5.16.12 kernel with all the architecture
options turned on. There is a minimal buildroot initramfs included in
the kernel which has a few tools for stress testing the memory
subsystem. The userspace also targets the Neoverse N1 processor so
would fail with a v8.0 cpu like cortex-a53.

While we are at it move the test into its own file so it can have an
assigned maintainer.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-2-alex.bennee@linaro.org>

2 years agoMerge tag 'pull-request-2022-04-20' of https://gitlab.com/thuth/qemu into staging
Richard Henderson [Wed, 20 Apr 2022 14:08:09 +0000 (07:08 -0700)]
Merge tag 'pull-request-2022-04-20' of https://gitlab.com/thuth/qemu into staging

* Drop perl-Test-Harness from the CI containers / VMs
* Some qtest fixes
* Convert ccid doc to restructuredText
* Add compat machines for 7.1
* Allow overwrite smp and memory size in avocado tests

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmJf32MRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbXEHQ//e4S4rlETwKwIQR6SqaOGl9wQr8yPX80r
# V6UFMt+MhTdtItBDa+cDrWY7xkBU3DpIPcfDRfg4P7F/WB5LFaXfYPQHIB28cmkQ
# f5nX4dIVfas/wS+2zk8uvaZEsuv0QiVCKldF2+Z49rE/1UMDfJkHJI+c3MvJToe7
# CPuzR9SL7wfb3gFV5YrDqyZFRtpUurNhQ3j7sfmh+9P+9QVZg118pDI/lE2WIIBT
# HwrB0/keRdgepEv/n+6bwIhf+XRPnKyK8ETRo5vaVaj5BxKDHDVaevNYABp1kBB5
# udyCrEtS4KjPmyNgsMc1ZnIdG2R2pGyRPPYvVUXVpODkAQFoprjTS4yc5Gauqeuj
# EtrDJDnV+EFtZZlnd2T4Uj+ZxTR9suXWF+kJU8R7vXX5Dffu7C7tAw88FqQoG1GR
# mlhtN4fng2PJ/wEZUc+OESVjLUW/3H8yA6rRsbD21gMFaPVxrxc5iXrJoPEWoz1q
# BPbc+1v+lf3PgIDTMokogV0HFaxl8Xoq7T1TaXhQHEbEchfPib55VAHnN7rXKJgs
# eQt7FBqRTCZdFgRnKNZ71NMGdW2suHRk2lpabGPcuGb/bxyJWc6lcdOM8uEMDUlq
# vzAZwbXx3mlGArx7jaGERTrColCgMa0WLbQZ54eP1qCJnqUbzadaIQxmlMaPFWgm
# 2imKnvET5PM=
# =vsLu
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 20 Apr 2022 03:24:35 AM PDT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [undefined]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [undefined]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [undefined]
# 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: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2022-04-20' of https://gitlab.com/thuth/qemu:
  tests/avocado: Allow overwrite smp and memory size command line options
  hw: Add compat machines for 7.1
  docs/ccid: convert to restructuredText
  tests/qtest: properly initialise the vring used idx
  tests/qtest: Move the fuzz tests to x86 only
  tests/qtest: Enable more tests for the "mipsel" target
  tests: Drop perl-Test-Harness from the CI containers / VMs

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoqcow2: Add errp to rebuild_refcount_structure()
Hanna Reitz [Tue, 5 Apr 2022 13:46:52 +0000 (15:46 +0200)]
qcow2: Add errp to rebuild_refcount_structure()

Instead of fprint()-ing error messages in rebuild_refcount_structure()
and its rebuild_refcounts_write_refblocks() helper, pass them through an
Error object to qcow2_check_refcounts() (which will then print it).

Suggested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220405134652.19278-4-hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>