OSDN Git Service

qmiga/qemu.git
2 years agomeson: Fix 'interpretor' typo
Philippe Mathieu-Daudé [Fri, 21 May 2021 10:34:23 +0000 (12:34 +0200)]
meson: Fix 'interpretor' typo

Fix a typo from commit fa2f7b0b9b7 ("meson: Warn when TCI is
selected but TCG backend is available").

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210521103423.2780345-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2 years ago.mailmap: Fix more contributor entries
Philippe Mathieu-Daudé [Wed, 27 Oct 2021 04:32:54 +0000 (06:32 +0200)]
.mailmap: Fix more contributor entries

These authors have some incorrect author email field.

Acked-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Hyman Huang <huangy81@chinatelecom.cn>
Reviewed-by: Haibin Zhang <haibinzhang@tencent.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211027043254.1248097-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2 years agohw/m68k: Fix typo in SPDX tag
Philippe Mathieu-Daudé [Wed, 3 Nov 2021 10:53:11 +0000 (11:53 +0100)]
hw/m68k: Fix typo in SPDX tag

Fix 'Identifer' -> 'Identifier' typo.

Cc: Laurent Vivier <laurent@vivier.eu>
Fixes: 8c6df16ff60 ("hw/char: add goldfish-tty")
Fixes: 87855593903 ("hw/intc: add goldfish-pic")
Fixes: 2fde99ee312 ("m68k: add an interrupt controller")
Fixes: 0791bc02b8f ("m68k: add a system controller")
Fixes: e1cecdca559 ("m68k: add Virtual M68k Machine")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211103105311.3399293-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2 years agohmp: Add shortcut to stop command to match cont
BALATON Zoltan [Sat, 30 Oct 2021 09:49:37 +0000 (11:49 +0200)]
hmp: Add shortcut to stop command to match cont

Some commands such as quit or cont have one letter alternatives but
stop is missing that. Add stop|s to match cont|c for consistency and
convenience.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20211030095225.513D4748F48@zero.eik.bme.hu>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2 years agoMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-6.2-20211109' into staging
Richard Henderson [Tue, 9 Nov 2021 06:18:33 +0000 (07:18 +0100)]
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-6.2-20211109' into staging

ppc patch queue for 2021-11-09

Here's the latest set of ppc related patches for qemu-6.2, which I
hope will squeeze in just barely before the hard freeze.

This set includes a change to MAINTAINERS moving maintainership of ppc
from myself and Greg Kurz to Cédric le Goater and Daniel Henrique
Barboza.  So, I expect this to be my last pull request as ppc
maintainer.  It's been great, but it's time I moved onto other things.

Apart from that, this patchset is mostly a lot of updates to TCG
implementations of ISA 3.1 (POWER10) instructions from the El Dorado
team.  There are also a handful of other fixes.

# gpg: Signature made Tue 09 Nov 2021 05:14:33 AM CET
# gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]

* remotes/dgibson/tags/ppc-for-6.2-20211109: (54 commits)
  spapr_numa.c: FORM2 table handle nodes with no distance info
  target/ppc, hw/ppc: Change maintainers
  target/ppc: cntlzdm/cnttzdm implementation without brcond
  target/ppc: Implement lxvkq instruction
  target/ppc: Implement xxblendvb/xxblendvh/xxblendvw/xxblendvd instructions
  target/ppc: implemented XXSPLTIDP instruction
  target/ppc: Implemented XXSPLTIW using decodetree
  target/ppc: implemented XXSPLTI32DX
  target/ppc: moved XXSPLTIB to using decodetree
  target/ppc: moved XXSPLTW to using decodetree
  target/ppc: added the instructions PLXVP and PSTXVP
  target/ppc: added the instructions PLXV and PSTXV
  target/ppc: added the instructions LXVPX and STXVPX
  target/ppc: added the instructions LXVP and STXVP
  target/ppc: moved stxvx and lxvx from legacy to decodtree
  target/ppc: moved stxv and lxv from legacy to decodtree
  target/ppc: receive high/low as argument in get/set_cpu_vsr
  target/ppc: Introduce REQUIRE_VSX macro
  target/ppc: Implement Vector Extract Double to VSR using GPR index insns
  target/ppc: Move vinsertb/vinserth/vinsertw/vinsertd to decodetree
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agospapr_numa.c: FORM2 table handle nodes with no distance info
Nicholas Piggin [Fri, 5 Nov 2021 13:51:37 +0000 (23:51 +1000)]
spapr_numa.c: FORM2 table handle nodes with no distance info

A configuration that specifies multiple nodes without distance info
results in the non-local points in the FORM2 matrix having a distance of
0. This causes Linux to complain "Invalid distance value range" because
a node distance is smaller than the local distance.

Fix this by building a simple local / remote fallback for points where
distance information is missing.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20211105135137.1584840-1-npiggin@gmail.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc, hw/ppc: Change maintainers
David Gibson [Fri, 5 Nov 2021 03:28:51 +0000 (14:28 +1100)]
target/ppc, hw/ppc: Change maintainers

As our day jobs and interests have moved onto other things, Greg and I have
been struggling to keep on top of maintainership of target/ppc and
associated pieces like the pseries and powernv machine types, with their
platform specific devices.

We've therefore discussed and plan to transfer maintainership to Cédric Le
Goater (primary) and Daniel Henrique Barboza (backup).  Cédric and Daniel
have been actively contributing to the area for some time, and they're
supported in this by their current employer, IBM, who has an obvious
interest in the platform.

Greg and I do plan to stay around in some capacity for at least the next
6 months, providing reviews and advice to assist the new maintainers into
the role.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Acked-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: cntlzdm/cnttzdm implementation without brcond
Matheus Ferst [Thu, 4 Nov 2021 12:37:19 +0000 (09:37 -0300)]
target/ppc: cntlzdm/cnttzdm implementation without brcond

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-26-matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement lxvkq instruction
Matheus Ferst [Thu, 4 Nov 2021 12:37:18 +0000 (09:37 -0300)]
target/ppc: Implement lxvkq instruction

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-25-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement xxblendvb/xxblendvh/xxblendvw/xxblendvd instructions
Matheus Ferst [Thu, 4 Nov 2021 12:37:17 +0000 (09:37 -0300)]
target/ppc: Implement xxblendvb/xxblendvh/xxblendvw/xxblendvd instructions

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-24-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: implemented XXSPLTIDP instruction
Bruno Larsen (billionai) [Thu, 4 Nov 2021 12:37:16 +0000 (09:37 -0300)]
target/ppc: implemented XXSPLTIDP instruction

Implemented the instruction XXSPLTIDP using decodetree.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-23-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implemented XXSPLTIW using decodetree
Bruno Larsen (billionai) [Thu, 4 Nov 2021 12:37:15 +0000 (09:37 -0300)]
target/ppc: Implemented XXSPLTIW using decodetree

Implemented the XXSPLTIW instruction, using decodetree.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-22-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: implemented XXSPLTI32DX
Bruno Larsen (billionai) [Thu, 4 Nov 2021 12:37:14 +0000 (09:37 -0300)]
target/ppc: implemented XXSPLTI32DX

Implemented XXSPLTI32DX emulation using decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-21-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: moved XXSPLTIB to using decodetree
Bruno Larsen (billionai) [Thu, 4 Nov 2021 12:37:13 +0000 (09:37 -0300)]
target/ppc: moved XXSPLTIB to using decodetree

Changed the function that handles XXSPLTIB emulation to using
decodetree, but still use the same logic as before

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-20-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: moved XXSPLTW to using decodetree
Bruno Larsen (billionai) [Thu, 4 Nov 2021 12:37:12 +0000 (09:37 -0300)]
target/ppc: moved XXSPLTW to using decodetree

Changed the function that handles XXSPLTW emulation to using decodetree,
but still using the same logic.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-19-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: added the instructions PLXVP and PSTXVP
Lucas Mateus Castro (alqotel) [Thu, 4 Nov 2021 12:37:11 +0000 (09:37 -0300)]
target/ppc: added the instructions PLXVP and PSTXVP

Implemented the instructions plxvp and pstxvp using decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-18-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: added the instructions PLXV and PSTXV
Lucas Mateus Castro (alqotel) [Thu, 4 Nov 2021 12:37:10 +0000 (09:37 -0300)]
target/ppc: added the instructions PLXV and PSTXV

Implemented the instructions plxv and pstxv using decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-17-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: added the instructions LXVPX and STXVPX
Lucas Mateus Castro (alqotel) [Thu, 4 Nov 2021 12:37:09 +0000 (09:37 -0300)]
target/ppc: added the instructions LXVPX and STXVPX

Implemented the instructions lxvpx and stxvpx using decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-16-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: added the instructions LXVP and STXVP
Lucas Mateus Castro (alqotel) [Thu, 4 Nov 2021 12:37:08 +0000 (09:37 -0300)]
target/ppc: added the instructions LXVP and STXVP

Implemented the instructions lxvp and stxvp using decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-15-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: moved stxvx and lxvx from legacy to decodtree
Lucas Mateus Castro (alqotel) [Thu, 4 Nov 2021 12:37:07 +0000 (09:37 -0300)]
target/ppc: moved stxvx and lxvx from legacy to decodtree

Moved stxvx and lxvx implementation from the legacy system to
decodetree.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-14-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: moved stxv and lxv from legacy to decodtree
Lucas Mateus Castro (alqotel) [Thu, 4 Nov 2021 12:37:06 +0000 (09:37 -0300)]
target/ppc: moved stxv and lxv from legacy to decodtree

Moved stxv and lxv implementation from the legacy system to
decodetree.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.castro@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-13-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: receive high/low as argument in get/set_cpu_vsr
Matheus Ferst [Thu, 4 Nov 2021 12:37:05 +0000 (09:37 -0300)]
target/ppc: receive high/low as argument in get/set_cpu_vsr

Changes get_cpu_vsr to receive a new argument indicating whether the
high or low part of the register is being accessed. This change improves
consistency between the interfaces used to access Vector and VSX
registers and helps to handle endianness in some cases.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-12-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Introduce REQUIRE_VSX macro
Bruno Larsen (billionai) [Thu, 4 Nov 2021 12:37:04 +0000 (09:37 -0300)]
target/ppc: Introduce REQUIRE_VSX macro

Introduce the macro to centralize checking if the VSX facility is
enabled and handle it correctly.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-11-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement Vector Extract Double to VSR using GPR index insns
Matheus Ferst [Thu, 4 Nov 2021 12:37:03 +0000 (09:37 -0300)]
target/ppc: Implement Vector Extract Double to VSR using GPR index insns

Implement the following PowerISA v3.1 instructions:
vextdubvlx: Vector Extract Double Unsigned Byte to VSR using
            GPR-specified Left-Index
vextduhvlx: Vector Extract Double Unsigned Halfword to VSR using
            GPR-specified Left-Index
vextduwvlx: Vector Extract Double Unsigned Word to VSR using
            GPR-specified Left-Index
vextddvlx: Vector Extract Double Doubleword to VSR using
           GPR-specified Left-Index
vextdubvrx: Vector Extract Double Unsigned Byte to VSR using
            GPR-specified Right-Index
vextduhvrx: Vector Extract Double Unsigned Halfword to VSR using
            GPR-specified Right-Index
vextduwvrx: Vector Extract Double Unsigned Word to VSR using
            GPR-specified Right-Index
vextddvrx: Vector Extract Double Doubleword to VSR using
           GPR-specified Right-Index

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-10-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move vinsertb/vinserth/vinsertw/vinsertd to decodetree
Matheus Ferst [Thu, 4 Nov 2021 12:37:02 +0000 (09:37 -0300)]
target/ppc: Move vinsertb/vinserth/vinsertw/vinsertd to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-9-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement Vector Insert from VSR using GPR index insns
Matheus Ferst [Thu, 4 Nov 2021 12:37:01 +0000 (09:37 -0300)]
target/ppc: Implement Vector Insert from VSR using GPR index insns

Implements the following PowerISA v3.1 instructions:
vinsbvlx: Vector Insert Byte from VSR using GPR-specified Left-Index
vinshvlx: Vector Insert Halfword from VSR using GPR-specified
          Left-Index
vinswvlx: Vector Insert Word from VSR using GPR-specified Left-Index
vinsbvrx: Vector Insert Byte from VSR using GPR-specified Right-Index
vinshvrx: Vector Insert Halfword from VSR using GPR-specified
          Right-Index
vinswvrx: Vector Insert Word from VSR using GPR-specified Right-Index

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-8-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement Vector Insert Word from GPR using Immediate insns
Matheus Ferst [Thu, 4 Nov 2021 12:37:00 +0000 (09:37 -0300)]
target/ppc: Implement Vector Insert Word from GPR using Immediate insns

Implements the following PowerISA v3.1 instructions:
vinsw: Vector Insert Word from GPR using immediate-specified index
vinsd: Vector Insert Doubleword from GPR using immediate-specified
       index

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-7-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement Vector Insert from GPR using GPR index insns
Matheus Ferst [Thu, 4 Nov 2021 12:36:59 +0000 (09:36 -0300)]
target/ppc: Implement Vector Insert from GPR using GPR index insns

Implements the following PowerISA v3.1 instructions:
vinsblx: Vector Insert Byte from GPR using GPR-specified Left-Index
vinshlx: Vector Insert Halfword from GPR using GPR-specified Left-Index
vinswlx: Vector Insert Word from GPR using GPR-specified Left-Index
vinsdlx: Vector Insert Doubleword from GPR using GPR-specified
         Left-Index
vinsbrx: Vector Insert Byte from GPR using GPR-specified Right-Index
vinshrx: Vector Insert Halfword from GPR using GPR-specified
         Right-Index
vinswrx: Vector Insert Word from GPR using GPR-specified Right-Index
vinsdrx: Vector Insert Doubleword from GPR using GPR-specified
         Right-Index

The helpers and do_vinsx receive i64 to allow code sharing with the
future implementation of Vector Insert from VSR using GPR Index.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-6-matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement vsldbi/vsrdbi instructions
Matheus Ferst [Thu, 4 Nov 2021 12:36:58 +0000 (09:36 -0300)]
target/ppc: Implement vsldbi/vsrdbi instructions

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-5-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement vpdepd/vpextd instruction
Matheus Ferst [Thu, 4 Nov 2021 12:36:57 +0000 (09:36 -0300)]
target/ppc: Implement vpdepd/vpextd instruction

pdepd and pextd helpers are moved out of #ifdef (TARGET_PPC64) to allow
them to be reused as GVecGen3.fni8.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-4-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement vclzdm/vctzdm instructions
Matheus Ferst [Thu, 4 Nov 2021 12:36:56 +0000 (09:36 -0300)]
target/ppc: Implement vclzdm/vctzdm instructions

The signature of do_cntzdm is changed to allow reuse as GVecGen3i.fni8.
The method is also moved out of #ifdef TARGET_PPC64, as PowerISA doesn't
say vclzdm and vctzdm are 64-bit only.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-3-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move vcfuged to vmx-impl.c.inc
Matheus Ferst [Thu, 4 Nov 2021 12:36:55 +0000 (09:36 -0300)]
target/ppc: Move vcfuged to vmx-impl.c.inc

There's no reason to keep vector-impl.c.inc separate from
vmx-impl.c.inc. Additionally, let GVec handle the multiple calls to
helper_cfuged for us.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211104123719.323713-2-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agoppc/pegasos2: Suppress warning when qtest enabled
BALATON Zoltan [Mon, 1 Nov 2021 15:08:31 +0000 (16:08 +0100)]
ppc/pegasos2: Suppress warning when qtest enabled

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20211101151023.F0D02748F5A@zero.eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agoppc/pnv: Fix check on block device before updating drive contents
Cédric Le Goater [Tue, 2 Nov 2021 16:29:05 +0000 (17:29 +0100)]
ppc/pnv: Fix check on block device before updating drive contents

Test is wrong and the backend can never updated. It could have led to
a QEMU crash but since the firmware deactivates flash access if a valid
layout is not detected, it went unnoticed.

Reported-by: Coverity CID 1465223
Fixes: 35dde5766211 ("ppc/pnv: Add a PNOR model")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211102162905.762078-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move ddedpd[q],denbcd[q],dscli[q],dscri[q] to decodetree
Luis Pires [Fri, 29 Oct 2021 19:24:17 +0000 (16:24 -0300)]
target/ppc: Move ddedpd[q],denbcd[q],dscli[q],dscri[q] to decodetree

Move the following instructions to decodetree:
ddedpd:  DFP Decode DPD To BCD
ddedpdq: DFP Decode DPD To BCD Quad
denbcd:  DFP Encode BCD To DPD
denbcdq: DFP Encode BCD To DPD Quad
dscli:   DFP Shift Significand Left Immediate
dscliq:  DFP Shift Significand Left Immediate Quad
dscri:   DFP Shift Significand Right Immediate
dscriq:  DFP Shift Significand Right Immediate Quad

Also deleted dfp-ops.c.inc, now that all PPC DFP instructions were
moved to decodetree.

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-16-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move dct{dp,qpq},dr{sp,dpq},dc{f,t}fix[q],dxex[q] to decodetree
Luis Pires [Fri, 29 Oct 2021 19:24:16 +0000 (16:24 -0300)]
target/ppc: Move dct{dp,qpq},dr{sp,dpq},dc{f,t}fix[q],dxex[q] to decodetree

Move the following instructions to decodetree:
dctdp:   DFP Convert To DFP Long
dctqpq:  DFP Convert To DFP Extended
drsp:    DFP Round To DFP Short
drdpq:   DFP Round To DFP Long
dcffix:  DFP Convert From Fixed
dcffixq: DFP Convert From Fixed Quad
dctfix:  DFP Convert To Fixed
dctfixq: DFP Convert To Fixed Quad
dxex:    DFP Extract Biased Exponent
dxexq:   DFP Extract Biased Exponent Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-15-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move dqua[q], drrnd[q] to decodetree
Luis Pires [Fri, 29 Oct 2021 19:24:15 +0000 (16:24 -0300)]
target/ppc: Move dqua[q], drrnd[q] to decodetree

Move the following instructions to decodetree:
dqua:   DFP Quantize
dquaq:  DFP Quantize Quad
drrnd:  DFP Reround
drrndq: DFP Reround Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-14-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move dquai[q], drint{x,n}[q] to decodetree
Luis Pires [Fri, 29 Oct 2021 19:24:14 +0000 (16:24 -0300)]
target/ppc: Move dquai[q], drint{x,n}[q] to decodetree

Move the following instructions to decodetree:
dquai:   DFP Quantize Immediate
dquaiq:  DFP Quantize Immediate Quad
drintx:  DFP Round to FP Integer With Inexact
drintxq: DFP Round to FP Integer With Inexact Quad
drintn:  DFP Round to FP Integer Without Inexact
drintnq: DFP Round to FP Integer Without Inexact Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-13-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move dcmp{u,o}[q],dts{tex,tsf,tsfi}[q] to decodetree
Luis Pires [Fri, 29 Oct 2021 19:24:13 +0000 (16:24 -0300)]
target/ppc: Move dcmp{u,o}[q],dts{tex,tsf,tsfi}[q] to decodetree

Move the following instructions to decodetree:
dcmpu:    DFP Compare Unordered
dcmpuq:   DFP Compare Unordered Quad
dcmpo:    DFP Compare Ordered
dcmpoq:   DFP Compare Ordered Quad
dtstex:   DFP Test Exponent
dtstexq:  DFP Test Exponent Quad
dtstsf:   DFP Test Significance
dtstsfq:  DFP Test Significance Quad
dtstsfi:  DFP Test Significance Immediate
dtstsfiq: DFP Test Significance Immediate Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-12-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move d{add,sub,mul,div,iex}[q] to decodetree
Luis Pires [Fri, 29 Oct 2021 19:24:12 +0000 (16:24 -0300)]
target/ppc: Move d{add,sub,mul,div,iex}[q] to decodetree

Move the following instructions to decodetree:
dadd:  DFP Add
daddq: DFP Add Quad
dsub:  DFP Subtract
dsubq: DFP Subtract Quad
dmul:  DFP Multiply
dmulq: DFP Multiply Quad
ddiv:  DFP Divide
ddivq: DFP Divide Quad
diex:  DFP Insert Biased Exponent
diexq: DFP Insert Biased Exponent Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-11-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move dtstdc[q]/dtstdg[q] to decodetree
Luis Pires [Fri, 29 Oct 2021 19:24:11 +0000 (16:24 -0300)]
target/ppc: Move dtstdc[q]/dtstdg[q] to decodetree

Move the following instructions to decodetree:
dtstdc:  DFP Test Data Class
dtstdcq: DFP Test Data Class Quad
dtstdg:  DFP Test Data Group
dtstdgq: DFP Test Data Group Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-10-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Do not update nip on DFP instructions
Luis Pires [Fri, 29 Oct 2021 19:24:10 +0000 (16:24 -0300)]
target/ppc: Do not update nip on DFP instructions

Before moving the existing DFP instructions to decodetree, drop the
nip update that shouldn't be done for these instructions.

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-9-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement DCTFIXQQ
Luis Pires [Fri, 29 Oct 2021 19:24:09 +0000 (16:24 -0300)]
target/ppc: Implement DCTFIXQQ

Implement the following PowerISA v3.1 instruction:
dctfixqq: DFP Convert To Fixed Quadword Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-8-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agolibdecnumber: Introduce decNumberIntegralToInt128
Luis Pires [Fri, 29 Oct 2021 19:24:08 +0000 (16:24 -0300)]
libdecnumber: Introduce decNumberIntegralToInt128

This will be used to implement PowerPC's dctfixqq.

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-7-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agohost-utils: Introduce mulu128
Luis Pires [Fri, 29 Oct 2021 19:24:07 +0000 (16:24 -0300)]
host-utils: Introduce mulu128

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-6-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement DCFFIXQQ
Luis Pires [Fri, 29 Oct 2021 19:24:06 +0000 (16:24 -0300)]
target/ppc: Implement DCFFIXQQ

Implement the following PowerISA v3.1 instruction:
dcffixqq: DFP Convert From Fixed Quadword Quad

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-5-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Introduce REQUIRE_FPU
Fernando Valle [Fri, 29 Oct 2021 19:24:05 +0000 (16:24 -0300)]
target/ppc: Introduce REQUIRE_FPU

Signed-off-by: Fernando Valle <fernando.valle@eldorado.org.br>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-4-luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move REQUIRE_ALTIVEC/VECTOR to translate.c
Bruno Larsen [Fri, 29 Oct 2021 19:24:04 +0000 (16:24 -0300)]
target/ppc: Move REQUIRE_ALTIVEC/VECTOR to translate.c

Move REQUIRE_ALTIVEC to translate.c and rename it to REQUIRE_VECTOR.

Signed-off-by: Bruno Larsen <bruno.larsen@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Signed-off-by: Fernando Valle <fernando.valle@eldorado.org.br>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20211029192417.400707-3-luis.pires@eldorado.org.br>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agolibdecnumber: introduce decNumberFrom[U]Int128
Luis Pires [Fri, 29 Oct 2021 19:24:03 +0000 (16:24 -0300)]
libdecnumber: introduce decNumberFrom[U]Int128

This will be used to implement PowerPC's dcffixqq.

Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211029192417.400707-2-luis.pires@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement pextd instruction
Matheus Ferst [Fri, 29 Oct 2021 20:24:00 +0000 (17:24 -0300)]
target/ppc: Implement pextd instruction

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-11-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement pdepd instruction
Matheus Ferst [Fri, 29 Oct 2021 20:23:59 +0000 (17:23 -0300)]
target/ppc: Implement pdepd instruction

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-10-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement cnttzdm
Luis Pires [Fri, 29 Oct 2021 20:23:58 +0000 (17:23 -0300)]
target/ppc: Implement cnttzdm

Implement the following PowerISA v3.1 instruction:
cnttzdm: Count Trailing Zeros Doubleword Under Bit Mask

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-9-matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement cntlzdm
Luis Pires [Fri, 29 Oct 2021 20:23:57 +0000 (17:23 -0300)]
target/ppc: Implement cntlzdm

Implement the following PowerISA v3.1 instruction:
cntlzdm: Count Leading Zeros Doubleword Under Bit Mask

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-8-matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement PLQ and PSTQ
Matheus Ferst [Fri, 29 Oct 2021 20:23:56 +0000 (17:23 -0300)]
target/ppc: Implement PLQ and PSTQ

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-7-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move LQ and STQ to decodetree
Matheus Ferst [Fri, 29 Oct 2021 20:23:55 +0000 (17:23 -0300)]
target/ppc: Move LQ and STQ to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-6-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Implement PLFS, PLFD, PSTFS and PSTFD instructions
Fernando Eckhardt Valle [Fri, 29 Oct 2021 20:23:54 +0000 (17:23 -0300)]
target/ppc: Implement PLFS, PLFD, PSTFS and PSTFD instructions

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Fernando Eckhardt Valle <fernando.valle@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-5-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: Move load and store floating point instructions to decodetree
Fernando Eckhardt Valle [Fri, 29 Oct 2021 20:23:53 +0000 (17:23 -0300)]
target/ppc: Move load and store floating point instructions to decodetree

Move load floating point instructions (lfs, lfsu, lfsx, lfsux, lfd, lfdu, lfdx, lfdux)
and store floating point instructions(stfs, stfsu, stfsx, stfsux, stfd, stfdu, stfdx,
stfdux) from legacy system to decodetree.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Fernando Eckhardt Valle <fernando.valle@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-4-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: move resolve_PLS_D to translate.c
Fernando Eckhardt Valle [Fri, 29 Oct 2021 20:23:52 +0000 (17:23 -0300)]
target/ppc: move resolve_PLS_D to translate.c

Move resolve_PLS_D from fixedpoint-impl.c.inc to translate.c
because this way the function can be used not only by fixed
point instructions.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Fernando Eckhardt Valle <phervalle@gmail.com>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-3-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agotarget/ppc: introduce do_ea_calc
Fernando Eckhardt Valle [Fri, 29 Oct 2021 20:23:51 +0000 (17:23 -0300)]
target/ppc: introduce do_ea_calc

The do_ea_calc function will calculate the effective address(EA)
according to PowerIsa 3.1. With that, it was replaced part of
do_ldst() that calculates the EA by this new function.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Fernando Eckhardt Valle (pherde) <phervalle@gmail.com>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20211029202424.175401-2-matheus.ferst@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2 years agoMerge remote-tracking branch 'remotes/philmd/tags/avocado-20211108' into staging
Richard Henderson [Mon, 8 Nov 2021 17:50:09 +0000 (18:50 +0100)]
Merge remote-tracking branch 'remotes/philmd/tags/avocado-20211108' into staging

Integration testing patches

- Rename tests/acceptance/ -> tests/avocado/
- Rename avocado_qemu.Test -> avocado_qemu.QemuSystemTest
- Introduce QemuUserTest class
- Add the first linux-user test, covering the bFLT loader

# gpg: Signature made Mon 08 Nov 2021 05:16:46 PM CET
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]

* remotes/philmd/tags/avocado-20211108:
  tests/avocado: Remove p7zip binary availability check
  tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest
  tests/avocado: Add bFLT loader linux-user test
  tests/avocado: Share useful helpers from virtiofs_submounts test
  tests/avocado: Introduce QemuUserTest base class
  tests/avocado: Make pick_default_qemu_bin() more generic
  tests/avocado: Extract QemuBaseTest from Test
  tests/acceptance: rename tests acceptance to tests avocado
  tests/acceptance: introduce new check-avocado target

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agotests/avocado: Remove p7zip binary availability check
Philippe Mathieu-Daudé [Sat, 6 Nov 2021 09:07:18 +0000 (10:07 +0100)]
tests/avocado: Remove p7zip binary availability check

The single use of the 7z binary has been removed in commit a30e114f3
("tests/acceptance: remove Armbian 19.11.3 test for orangepi-pc"),
we don't need to check for this binary availability anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Joaquin de Andres <me@xcancerberox.com.ar>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20211106091059.465109-1-philmd@redhat.com>

2 years agotests/avocado: Rename avocado_qemu.Test -> QemuSystemTest
Philippe Mathieu-Daudé [Mon, 27 Sep 2021 16:14:33 +0000 (18:14 +0200)]
tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest

To run user-mode emulation tests, we introduced the
avocado_qemu.QemuUserTest which inherits from avocado_qemu.QemuBaseTest.
System-mode emulation tests are based on the avocado_qemu.Test class,
which also inherits avocado_qemu.QemuBaseTest. To avoid confusion,
rename it as avocado_qemu.QemuSystemTest.

Suggested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211105143416.148332-7-f4bug@amsat.org>

2 years agotests/avocado: Add bFLT loader linux-user test
Philippe Mathieu-Daudé [Fri, 21 Jun 2019 13:26:38 +0000 (15:26 +0200)]
tests/avocado: Add bFLT loader linux-user test

Add a very quick test that runs a busybox binary in bFLT format:

  $ AVOCADO_ALLOW_UNTRUSTED_CODE=1 \
    avocado --show=app run -t linux_user tests/avocado/load_bflt.py
  JOB ID     : db94d5960ce564c50904d666a7e259148c27e88f
  JOB LOG    : ~/avocado/job-results/job-2019-06-25T10.52-db94d59/job.log
   (1/1) tests/avocado/load_bflt.py:LoadBFLT.test_stm32: PASS (0.15 s)
  RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
  JOB TIME   : 0.54 s

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211105143416.148332-6-f4bug@amsat.org>

2 years agotests/avocado: Share useful helpers from virtiofs_submounts test
Philippe Mathieu-Daudé [Mon, 15 Mar 2021 22:55:43 +0000 (23:55 +0100)]
tests/avocado: Share useful helpers from virtiofs_submounts test

Move the useful has_cmd()/has_cmds() helpers from the virtiofs
test to the avocado_qemu public class.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211105143416.148332-5-f4bug@amsat.org>

2 years agotests/avocado: Introduce QemuUserTest base class
Philippe Mathieu-Daudé [Sun, 14 Feb 2021 17:59:10 +0000 (18:59 +0100)]
tests/avocado: Introduce QemuUserTest base class

Similarly to the 'System' Test base class with methods for testing
system emulation, the QemuUserTest class contains methods useful to
test user-mode emulation.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211105143416.148332-4-f4bug@amsat.org>

2 years agotests/avocado: Make pick_default_qemu_bin() more generic
Philippe Mathieu-Daudé [Sun, 14 Feb 2021 17:59:09 +0000 (18:59 +0100)]
tests/avocado: Make pick_default_qemu_bin() more generic

Make pick_default_qemu_bin() generic to find qemu-system or
qemu-user binaries.

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211105143416.148332-3-f4bug@amsat.org>

2 years agotests/avocado: Extract QemuBaseTest from Test
Philippe Mathieu-Daudé [Sun, 14 Feb 2021 17:59:08 +0000 (18:59 +0100)]
tests/avocado: Extract QemuBaseTest from Test

The Avocado Test::fetch_asset() is handy to download artifacts
before running tests. The current class is named Test but only
tests system emulation. As we want to test user emulation,
refactor the common code as QemuBaseTest.

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211105143416.148332-2-f4bug@amsat.org>

2 years agotests/acceptance: rename tests acceptance to tests avocado
Willian Rampazzo [Fri, 5 Nov 2021 15:53:54 +0000 (12:53 -0300)]
tests/acceptance: rename tests acceptance to tests avocado

In the discussion about renaming the `tests/acceptance` [1], the
conclusion was that the folders inside `tests` are related to the
framework running the tests and not directly related to the type of
the tests.

This changes the folder to `tests/avocado` and adjusts the MAKEFILE, the
CI related files and the documentation.

[1] https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg06553.html

Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20211105155354.154864-3-willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2 years agotests/acceptance: introduce new check-avocado target
Willian Rampazzo [Fri, 5 Nov 2021 15:53:53 +0000 (12:53 -0300)]
tests/acceptance: introduce new check-avocado target

This introduces a new `make` target, `check-avocado`, and adds a
deprecation message about the `check-acceptance` target. This is
a preparation for renaming the `tests/acceptance` folder to
`tests/avocado`.

The plan is to remove the call to the `check-avocado` target one
or two months after the release and leave the warning to force
people to move to the new `check-avocado` target.

Later, the `check-acceptance` target can be removed. The intent
is to avoid a direct impact during the current soft freeze.

Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20211105155354.154864-2-willianr@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2 years agoMerge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
Richard Henderson [Mon, 8 Nov 2021 15:23:32 +0000 (16:23 +0100)]
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* Fix off-by-one in MODE SELECT commands
* extend --extra-*flags behavior to meson-based tests
* allow using snappy in static builds
* i386 TCG fixes
* fix build failure when libgbm is not available

# gpg: Signature made Mon 08 Nov 2021 12:20:24 PM CET
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]

* remotes/bonzini/tags/for-upstream:
  ui/gtk-egl: Fix build failure when libgbm is not available
  configure: ignore preexisting QEMU_*FLAGS envvars
  configure: propagate --extra-cflags and --extra-ldflags to meson compile tests
  configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status
  configure: simplify calls to meson_quote
  docs: adjust for demise of scripts/create_config
  meson: perform snappy test with the C++ compiler if used
  hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
  target-i386: mmu: fix handling of noncanonical virtual addresses
  target-i386: mmu: use pg_mode instead of HF_LMA_MASK

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoMerge remote-tracking branch 'remotes/marcandre.lureau/tags/sphinx-pull-request'...
Richard Henderson [Mon, 8 Nov 2021 13:56:10 +0000 (14:56 +0100)]
Merge remote-tracking branch 'remotes/marcandre.lureau/tags/sphinx-pull-request' into staging

Some Sphinx improvements

PR for 2 series:
https://patchew.org/QEMU/20211015105344.152591-1-marcandre.lureau@redhat.com/
https://patchew.org/QEMU/20211004215238.1523082-1-jsnow@redhat.com/

# gpg: Signature made Mon 08 Nov 2021 10:01:03 AM CET
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]

* remotes/marcandre.lureau/tags/sphinx-pull-request:
  docs/sphinx: change default role to "any"
  docs: (further) remove non-reference uses of single backticks
  docs: remove non-reference uses of single backticks
  docs/sphinx: add 's' keyboard binding to focus search
  docs/sphinx: set navigation_with_keys=True
  meson: drop sphinx_template_files
  meson: drop sphinx_extn_depends
  tests/qapi-schema/meson: add depfile to sphinx doc
  docs/sphinx: add templates files to generated depfile
  docs/sphinx: add static files to generated depfile
  docs/sphinx: add loaded modules to generated depfile

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoui/gtk-egl: Fix build failure when libgbm is not available
Philippe Mathieu-Daudé [Mon, 8 Nov 2021 08:31:29 +0000 (09:31 +0100)]
ui/gtk-egl: Fix build failure when libgbm is not available

Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs
to be regenerated when reinitializing egl") we get on Ubuntu
18.04.4 LTS and Debian Buster (oldstable):

  $ ../configure --enable-virglrenderer
  [...]
  ui/gtk-egl.c: In function 'gd_egl_refresh':
  ui/gtk-egl.c:159:13: error: implicit declaration of function 'egl_dmabuf_release_texture' [-Werror=implicit-function-declaration]
    159 |             egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
  ui/gtk-egl.c:159:13: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
  ui/gtk-egl.c:159:13: error: nested extern declaration of 'egl_dmabuf_release_texture' [-Werror=nested-externs]

Fix by restricting the egl_dmabuf_release_texture() call to the
availability of the generic buffer management library (libgbm).

Fixes: 4872a023a593e6519b272a
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reported-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211108083129.1262040-1-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure: ignore preexisting QEMU_*FLAGS envvars
Paolo Bonzini [Mon, 8 Nov 2021 07:58:23 +0000 (08:58 +0100)]
configure: ignore preexisting QEMU_*FLAGS envvars

User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS,
or --extra-cflags/extra-cxxflags/--extra-ldflags on the
command line.

QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved
for flags detected by configure, so do not add to them
and clear them at the beginning of the script.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure: propagate --extra-cflags and --extra-ldflags to meson compile tests
Paolo Bonzini [Fri, 5 Nov 2021 09:09:26 +0000 (10:09 +0100)]
configure: propagate --extra-cflags and --extra-ldflags to meson compile tests

Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links
tests, as they are supposed to be independent of the specific sets of
compilation flags used to build the programs.  However, the user can
still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option
to specify -I or -L options that apply to cc.compiles/cc.links as well.

This is also the intended use of configure's --extra-cflags,
--extra-cxxflags and --extra-ldflags options.  For example, if
one has netmap's header in a nonstandard directory, up to commit
837b84b1c078bf3e909 it used to work fine to do:

.../configure --enable-netmap \
     --extra-cflags=-I/path/to/netmap/sys

but since the test was converted to meson, this does not work anymore.

Pass these options to meson via the toolchain file instead of via
config-host.mak, since both have the same purpose.

Reported-by: Owen LaGarde
Reported-by: Thomas Huth <thuth@redhat.com>
Fixes: 47b30835e4 ("configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson", 2020-10-06)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status
Paolo Bonzini [Fri, 5 Nov 2021 09:08:43 +0000 (10:08 +0100)]
configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status

CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they include
-L or -I options), so they should be kept from the invocation of configure
to the subsequent reinvocations via config.status.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoconfigure: simplify calls to meson_quote
Paolo Bonzini [Fri, 5 Nov 2021 09:07:37 +0000 (10:07 +0100)]
configure: simplify calls to meson_quote

meson_quote assumes a non-empty argument list, and incorrectly returns a
one-entry array if passed nothing.  Move the check for an empty argument
list from the invocations to the function itself.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodocs: adjust for demise of scripts/create_config
Paolo Bonzini [Fri, 5 Nov 2021 12:45:40 +0000 (13:45 +0100)]
docs: adjust for demise of scripts/create_config

The config-host.h, $TARGET_NAME-config-target.h,
$TARGET_NAME-config-devices.h files are now generated by
configure_file() rather than scripts/create_config.  Adjust
he relevant paragraph in docs/devel/build-system.rst, and take
the occasion to fix a preexisting confusion of *.h vs *.mak.

Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson: perform snappy test with the C++ compiler if used
Paolo Bonzini [Thu, 4 Nov 2021 13:35:14 +0000 (14:35 +0100)]
meson: perform snappy test with the C++ compiler if used

Snappy is written in C++ and as such needs to link against libstdc++.  When
linking statically, this means that the compile test cannot succeed unless
performed with a C++ compiler.  Do so if link_language is set to C++; if it
is C, the test will usually fail and snappy will be disabled.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodocs/sphinx: change default role to "any"
John Snow [Mon, 4 Oct 2021 21:52:38 +0000 (17:52 -0400)]
docs/sphinx: change default role to "any"

This interprets single-backtick syntax in all of our Sphinx docs as a
cross-reference to *something*, including Python symbols.

From here on out, new uses of `backticks` will cause a build failure if
the target cannot be referenced.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20211004215238.1523082-4-jsnow@redhat.com>

2 years agodocs: (further) remove non-reference uses of single backticks
John Snow [Mon, 4 Oct 2021 21:52:37 +0000 (17:52 -0400)]
docs: (further) remove non-reference uses of single backticks

The series rotted already. Here's the new changes.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
[ extra backticks fixes ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20211004215238.1523082-3-jsnow@redhat.com>

2 years agodocs: remove non-reference uses of single backticks
John Snow [Mon, 4 Oct 2021 21:52:36 +0000 (17:52 -0400)]
docs: remove non-reference uses of single backticks

The single backtick markup in ReST is the "default role". Currently,
Sphinx's default role is called "content". Sphinx suggests you can use
the "Any" role instead to turn any single-backtick enclosed item into a
cross-reference.

This is useful for things like autodoc for Python docstrings, where it's
often nicer to reference other types with `foo` instead of the more
laborious :py:meth:`foo`. It's also useful in multi-domain cases to
easily reference definitions from other Sphinx domains, such as
referencing C code definitions from outside of kerneldoc comments.

Before we do that, though, we'll need to turn all existing usages of the
"content" role to inline verbatim markup wherever it does not correctly
resolve into a cross-refernece by using double backticks instead.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20211004215238.1523082-2-jsnow@redhat.com>

2 years agodocs/sphinx: add 's' keyboard binding to focus search
Marc-André Lureau [Fri, 8 Oct 2021 21:47:56 +0000 (01:47 +0400)]
docs/sphinx: add 's' keyboard binding to focus search

This is pretty ubiquitous. ('/' is already taken by some browsers for
quick search)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodocs/sphinx: set navigation_with_keys=True
Marc-André Lureau [Fri, 8 Oct 2021 21:06:38 +0000 (01:06 +0400)]
docs/sphinx: set navigation_with_keys=True

Allow navigating to the previous/next page using the keyboard's left and
right arrows. I wish this would be the default, and that the themes
would provide more key navigation, but that doesn't seem on the roadmap.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson: drop sphinx_template_files
Marc-André Lureau [Fri, 15 Oct 2021 10:37:52 +0000 (14:37 +0400)]
meson: drop sphinx_template_files

Static files dependencies is now handled by depfile.py.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agomeson: drop sphinx_extn_depends
Marc-André Lureau [Fri, 15 Oct 2021 10:36:16 +0000 (14:36 +0400)]
meson: drop sphinx_extn_depends

Module dependencies is now handled by depfile.py.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agotests/qapi-schema/meson: add depfile to sphinx doc
Marc-André Lureau [Fri, 15 Oct 2021 10:35:10 +0000 (14:35 +0400)]
tests/qapi-schema/meson: add depfile to sphinx doc

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodocs/sphinx: add templates files to generated depfile
Marc-André Lureau [Fri, 8 Oct 2021 21:57:51 +0000 (01:57 +0400)]
docs/sphinx: add templates files to generated depfile

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodocs/sphinx: add static files to generated depfile
Marc-André Lureau [Fri, 8 Oct 2021 21:46:10 +0000 (01:46 +0400)]
docs/sphinx: add static files to generated depfile

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agodocs/sphinx: add loaded modules to generated depfile
Marc-André Lureau [Fri, 8 Oct 2021 18:31:06 +0000 (22:31 +0400)]
docs/sphinx: add loaded modules to generated depfile

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agohw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
Mauro Matteo Cascella [Thu, 4 Nov 2021 16:31:38 +0000 (17:31 +0100)]
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands

This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().

Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pages in a table")
Fixes: #546
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agotarget-i386: mmu: fix handling of noncanonical virtual addresses
Paolo Bonzini [Thu, 4 Nov 2021 13:47:46 +0000 (14:47 +0100)]
target-i386: mmu: fix handling of noncanonical virtual addresses

mmu_translate is supposed to return an error code for page faults; it is
not able to handle other exceptions.  The #GP case for noncanonical
virtual addresses is not handled correctly, and incorrectly raised as
a page fault with error code 1.  Since it cannot happen for nested
page tables, move it directly to handle_mmu_fault, even before the
invocation of mmu_translate.

Fixes: #676
Fixes: 661ff4879e ("target/i386: extract mmu_translate", 2021-05-11)
Cc: qemu-stable@nongnu.org
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agotarget-i386: mmu: use pg_mode instead of HF_LMA_MASK
Paolo Bonzini [Thu, 4 Nov 2021 13:45:20 +0000 (14:45 +0100)]
target-i386: mmu: use pg_mode instead of HF_LMA_MASK

Correctly look up the paging mode of the hypervisor when it is using 64-bit
mode but the guest is not.

Fixes: 68746930ae ("target/i386: use mmu_translate for NPT walk", 2021-05-11)
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2 years agoMerge remote-tracking branch 'remotes/juanquintela/tags/migration-20211106-pull-reque...
Richard Henderson [Sat, 6 Nov 2021 23:43:42 +0000 (19:43 -0400)]
Merge remote-tracking branch 'remotes/juanquintela/tags/migration-20211106-pull-request' into staging

Migration Pull request

- fix vhost-user crash when using postcopy (me)
- fix incorrect tag for docs (hyman)

Please apply, Juan.

# gpg: Signature made Sat 06 Nov 2021 07:29:37 PM EDT
# gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
# gpg:                 aka "Juan Quintela <quintela@trasno.org>" [full]

* remotes/juanquintela/tags/migration-20211106-pull-request:
  docs: fix qemu incorrect tag
  migration: Check that postcopy fd's are not NULL

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agodocs: fix qemu incorrect tag
Hyman Huang(黄勇) [Fri, 5 Nov 2021 13:01:16 +0000 (21:01 +0800)]
docs: fix qemu incorrect tag

The patchset merged in 71864eadd9a ("migration/dirtyrate:
introduce struct and adjust DirtyRateStat") was targeting
QEMU 6.1 but got merged later, so correct the tag for 6.2.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2 years agomigration: Check that postcopy fd's are not NULL
Juan Quintela [Wed, 3 Nov 2021 19:24:27 +0000 (20:24 +0100)]
migration: Check that postcopy fd's are not NULL

If postcopy has finished, it frees the array.
But vhost-user unregister it at cleanup time.

fixes: c4f7538
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2 years agoMerge remote-tracking branch 'remotes/kraxel/tags/egl-20211105-pull-request' into...
Richard Henderson [Fri, 5 Nov 2021 15:42:06 +0000 (11:42 -0400)]
Merge remote-tracking branch 'remotes/kraxel/tags/egl-20211105-pull-request' into staging

gtk: a collection of egl fixes.

# gpg: Signature made Fri 05 Nov 2021 07:30:21 AM EDT
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]

* remotes/kraxel/tags/egl-20211105-pull-request:
  ui/gtk-egl: blitting partial guest fb to the proper scanout surface
  ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
  ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl
  ui/gtk-egl: make sure the right context is set as the current
  ui/gtk-egl: un-tab and re-tab should destroy egl surface and context
  virtio-gpu: splitting one extended mode guest fb into n-scanouts

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoMerge remote-tracking branch 'remotes/jasonwang/tags/net-pull-request' into staging
Richard Henderson [Fri, 5 Nov 2021 13:59:19 +0000 (09:59 -0400)]
Merge remote-tracking branch 'remotes/jasonwang/tags/net-pull-request' into staging

# gpg: Signature made Thu 04 Nov 2021 11:42:00 PM EDT
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasonwang/tags/net-pull-request:
  Fix virtio-net-pci* "vectors" compat
  e1000: fix tx re-entrancy problem

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoui/gtk-egl: blitting partial guest fb to the proper scanout surface
Dongwon Kim [Thu, 4 Nov 2021 06:51:53 +0000 (23:51 -0700)]
ui/gtk-egl: blitting partial guest fb to the proper scanout surface

eb_fb_blit should be able to blit partial image of guest display (blob res)
in case multiple displays are configured for the guest and they are set as extended-
desktop mode.

v2: egl_fb includes dmabuf info then make egl_fb_blit position and size
    parameters programmed in dmabuf structure (previously position/size
    parameters were given to egl_fb_blit separately)
    (Vivek Kasireddy)

    changed the commit message as there is no interface change to egl_fb_blit

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-6-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2 years agoui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
Dongwon Kim [Thu, 4 Nov 2021 06:51:51 +0000 (23:51 -0700)]
ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound

gd_draw_event shouldn't try to repaint if surface does not exist
for the VC.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-4-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2 years agoui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl
Dongwon Kim [Thu, 4 Nov 2021 06:51:50 +0000 (23:51 -0700)]
ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl

If guest fb is backed by dmabuf (blob-resource), the texture bound to the
old context needs to be recreated in case the egl is re-initialized (e.g.
new window for vc is created in case of detaching/reattaching of the tab)

v2: call egl_dmabuf_release_texutre instead of putting 0 to dmabuf->texture
    (Vivek Kasireddy)

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-3-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>