]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
2 years agotarget/ppc: Implement xvcvbf16spn and xvcvspbf16 instructions
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Implement xvcvbf16spn and xvcvspbf16 instructions

Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-47-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement xs{max,min}cqp
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Implement xs{max,min}cqp

Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-46-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Refactor VSX_MAX_MINC helper
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Refactor VSX_MAX_MINC helper

Refactor xs{max,min}cdp VSX_MAX_MINC helper to prepare for
xs{max,min}cqp implementation.

Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-45-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move xs{max, min}[cj]dp to use do_helper_XX3
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Move xs{max, min}[cj]dp to use do_helper_XX3

Also, fixes these instructions not being capitalized.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-44-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move xscmp{eq,ge,gt}dp to decodetree
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Move xscmp{eq,ge,gt}dp to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-43-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement xscmp{eq,ge,gt}qp
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Implement xscmp{eq,ge,gt}qp

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-42-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Refactor VSX_SCALAR_CMP_DP
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Refactor VSX_SCALAR_CMP_DP

Refactor VSX_SCALAR_CMP_DP, changing its name to VSX_SCALAR_CMP and
prepare the helper to be used for quadword comparisons.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-41-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Remove xscmpnedp instruction
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Remove xscmpnedp instruction

xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch
removes this instruction as it was not in the final version of v3.0.

Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Acked-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-40-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement xvtlsbb instruction
Víctor Colombo [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Implement xvtlsbb instruction

Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-39-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement xs[n]maddqp[o]/xs[n]msubqp[o]
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: implement xs[n]maddqp[o]/xs[n]msubqp[o]

Implement the following PowerISA v3.0 instuctions:
xsmaddqp[o]: VSX Scalar Multiply-Add Quad-Precision [using round to Odd]
xsmsubqp[o]: VSX Scalar Multiply-Subtract Quad-Precision [using round
             to Odd]
xsnmaddqp[o]: VSX Scalar Negative Multiply-Add Quad-Precision [using
              round to Odd]
xsnmsubqp[o]: VSX Scalar Negative Multiply-Subtract Quad-Precision
              [using round to Odd]

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-38-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: move xs[n]madd[am][ds]p/xs[n]msub[am][ds]p to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: move xs[n]madd[am][ds]p/xs[n]msub[am][ds]p to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-37-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement xxgenpcv[bhwd]m instruction
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Implement xxgenpcv[bhwd]m instruction

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-36-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement xxeval
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Implement xxeval

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-35-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotcg/tcg-op-gvec.c: Introduce tcg_gen_gvec_4i
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
tcg/tcg-op-gvec.c: Introduce tcg_gen_gvec_4i

Following the implementation of tcg_gen_gvec_3i, add a four-vector and
immediate operand expansion method.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-34-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement xxpermx instruction
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Implement xxpermx instruction

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-33-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move xxpermdi to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: Move xxpermdi to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-32-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: move xxperm/xxpermr to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:38 +0000 (06:51 +0100)]
target/ppc: move xxperm/xxpermr to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-31-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move xxsel to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Move xxsel to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-30-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move vsel and vperm/vpermr to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Move vsel and vperm/vpermr to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-29-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vrlqmi
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vrlqmi

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-28-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vrlqnm
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vrlqnm

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-27-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vrlq
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vrlq

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-26-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: move vrl[bhwd]nm/vrl[bhwd]mi to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: move vrl[bhwd]nm/vrl[bhwd]mi to decodetree

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-25-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: move vrl[bhwd] to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: move vrl[bhwd] to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-24-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vsraq
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vsraq

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-23-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vsrq
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vsrq

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-22-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vslq
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vslq

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-21-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: move vs[lr][a][bhwd] to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: move vs[lr][a][bhwd] to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-20-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vgnb
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vgnb

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-19-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vcntmb[bhwd]
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vcntmb[bhwd]

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-18-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vclrrb
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vclrrb

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-17-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vclrlb
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vclrlb

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-16-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: implement vstri[bh][lr]
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: implement vstri[bh][lr]

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-15-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement Vector Compare Quadword
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Implement Vector Compare Quadword

Implement the following PowerISA v3.1 instructions:
vcmpsq: Vector Compare Signed Quadword
vcmpuq: Vector Compare Unsigned Quadword

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-14-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement Vector Compare Greater Than Quadword
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Implement Vector Compare Greater Than Quadword

Implement the following PowerISA v3.1 instructions:
vcmpgtsq: Vector Compare Greater Than Signed Quadword
vcmpgtuq: Vector Compare Greater Than Unsigned Quadword

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-13-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement Vector Compare Equal Quadword
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Implement Vector Compare Equal Quadword

Implement the following PowerISA v3.1 instructions:
vcmpequq: Vector Compare Equal Quadword

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-12-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move Vector Compare Not Equal or Zero to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Move Vector Compare Not Equal or Zero to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-11-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move Vector Compare Equal/Not Equal/Greater Than to decodetree
Matheus Ferst [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Move Vector Compare Equal/Not Equal/Greater Than to decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-10-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement vextsd2q
Lucas Coutinho [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Implement vextsd2q

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Coutinho <lucas.coutinho@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-9-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Move vexts[bhw]2[wd] to decodetree
Lucas Coutinho [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Move vexts[bhw]2[wd] to decodetree

Move the following instructions to decodetree:
vextsb2w: Vector Extend Sign Byte To Word
vextsh2w: Vector Extend Sign Halfword To Word
vextsb2d: Vector Extend Sign Byte To Doubleword
vextsh2d: Vector Extend Sign Halfword To Doubleword
vextsw2d: Vector Extend Sign Word To Doubleword

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Coutinho <lucas.coutinho@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-8-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement vmsumudm instruction
Víctor Colombo [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Implement vmsumudm instruction

Based on [1] by Lijun Pan <ljp@linux.ibm.com>, which was never merged
into master.

[1]: https://lists.gnu.org/archive/html/qemu-ppc/2020-07/msg00419.html

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-7-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Implement vmsumcud instruction
Víctor Colombo [Wed, 2 Mar 2022 05:51:37 +0000 (06:51 +0100)]
target/ppc: Implement vmsumcud instruction

Based on [1] by Lijun Pan <ljp@linux.ibm.com>, which was never merged
into master.

[1]: https://lists.gnu.org/archive/html/qemu-ppc/2020-07/msg00419.html

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-6-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: vmulh* instructions without helpers
Lucas Mateus Castro (alqotel) [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: vmulh* instructions without helpers

Changed vmulhuw, vmulhud, vmulhsw, vmulhsd to not
use helpers.

Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225210936.1749575-5-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Moved vector multiply high and low to decodetree
Lucas Mateus Castro (alqotel) [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: Moved vector multiply high and low to decodetree

Moved instructions vmulld, vmulhuw, vmulhsw, vmulhud and vmulhsd to
decodetree

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-4-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: moved vector even and odd multiplication to decodetree
Lucas Mateus Castro (alqotel) [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: moved vector even and odd multiplication to decodetree

Moved the instructions vmulesb, vmulosb, vmuleub, vmuloub,
vmulesh, vmulosh, vmuleuh, vmulouh, vmulesw, vmulosw,
muleuw and vmulouw from legacy to decodetree. Implemented
the instructions vmulesd, vmulosd, vmuleud, vmuloud.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Lucas Mateus Castro (alqotel) <lucas.araujo@eldorado.org.br>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-3-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: Introduce TRANS*FLAGS macros
Luis Pires [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: Introduce TRANS*FLAGS macros

New macros that add FLAGS and FLAGS2 checking were added for
both TRANS and TRANS64.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Luis Pires <luis.pires@eldorado.org.br>
[ferst: - TRANS_FLAGS2 instead of TRANS_FLAGS_E
        - Use the new macros in load/store vector insns ]
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220225210936.1749575-2-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: trigger PERFM EBBs from power8-pmu.c
Daniel Henrique Barboza [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: trigger PERFM EBBs from power8-pmu.c

This patch adds the EBB exception support that are triggered by
Performance Monitor alerts. This happens when a Performance Monitor
alert occurs and MMCR0_EBE, BESCR_PME and BESCR_GE are set.

fire_PMC_interrupt() will execute the raise_ebb_perfm_exception() helper
which will check for MMCR0_EBE, BESCR_PME and BESCR_GE bits. If all bits
are set, do_ebb() will attempt to trigger a PERFM EBB event.

If the EBB facility is enabled in both FSCR and HFSCR we consider that
the EBB is valid and set BESCR_PMEO. After that, if we're running in
problem state, fire a POWERPC_EXCP_PERM_EBB immediately. Otherwise we'll
queue a PPC_INTERRUPT_EBB.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220225101140.1054160-5-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: add PPC_INTERRUPT_EBB and EBB exceptions
Daniel Henrique Barboza [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: add PPC_INTERRUPT_EBB and EBB exceptions

PPC_INTERRUPT_EBB is a new interrupt that will be used to deliver EBB
exceptions that had to be postponed because the thread wasn't in problem
state at the time the event-based branch was supposed to occur.

ISA 3.1 also defines two EBB exceptions: Performance Monitor EBB
exception and External EBB exception. They are being added as
POWERPC_EXCP_PERFM_EBB and POWERPC_EXCP_EXTERNAL_EBB.

PPC_INTERRUPT_EBB will check BESCR bits to see the EBB type that
occurred and trigger the appropriate exception. Both exceptions are
doing the same thing in this first implementation: clear BESCR_GE and
enter the branch with env->nip retrieved from SPR_EBBHR.

The checks being done by the interrupt code are msr_pr and BESCR_GE
states. All other checks (EBB facility check, BESCR_PME bit, specific
bits related to the event type) must be done beforehand.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220225101140.1054160-4-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: finalize pre-EBB PMU logic
Daniel Henrique Barboza [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: finalize pre-EBB PMU logic

There are still PMU exclusive bits to handle in fire_PMC_interrupt()
before implementing the EBB support. Let's finalize it now to avoid
dealing with PMU and EBB logic at the same time in the next patches.

fire_PMC_interrupt() will fire an Performance Monitor alert depending on
MMCR0_PMAE. If we are required to freeze the timers (MMCR0_FCECE) we'll
also need to update summaries and delete the existing overflow timers.
In all cases we're going to update the cycle counters.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220225101140.1054160-3-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agotarget/ppc: make power8-pmu.c CONFIG_TCG only
Daniel Henrique Barboza [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
target/ppc: make power8-pmu.c CONFIG_TCG only

This is an exclusive TCG helper. Gating it with CONFIG_TCG and changing
meson.build accordingly will prevent problems --disable-tcg and
--disable-linux-user later on.

We're also changing the uses of !kvm_enabled() to tcg_enabled() to avoid
adding "defined(CONFIG_TCG)" ifdefs, since tcg_enabled() will be
defaulted to false with --disable-tcg and the block will always be
skipped.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220225101140.1054160-2-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoppc/pnv: fix default PHB4 QOM hierarchy
Daniel Henrique Barboza [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
ppc/pnv: fix default PHB4 QOM hierarchy

Commit 3f4c369ea63e ("ppc/pnv: make PECs create and realize PHB4s")
changed phb4_pec code to create the default PHB4 objects in
pnv_pec_default_phb_realize(). In this process the stacks[] PEC array was
removed and each PHB4 object is tied together with its PEC via the
phb->pec pointer.

This change also broke the previous QOM hierarchy - the PHB4 objects are
being created and not being parented to their respective chips. This can
be verified by 'info pic' in a powernv9 domain with default settings.
pnv_chip_power9_pic_print_info() will fail to find the PHBs because
object_child_foreach_recursive() won't find any.

The solution is to set the parent chip and the parent bus, in the same
way done for user created PHB4 devices, for all PHB4 devices.

Fixes: 3f4c369ea63e ("ppc/pnv: make PECs create and realize PHB4s")
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220218202804.413157-1-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agohw/ppc/pnv: Determine ns16550's IRQ number from QOM property
Bernhard Beschow [Wed, 2 Mar 2022 05:51:36 +0000 (06:51 +0100)]
hw/ppc/pnv: Determine ns16550's IRQ number from QOM property

Determine the IRQ number in the same way as for pnv_dt_ipmi_bt(). This
resolves one usage of ISADevice::isairq[] which allows it to be removed
eventually.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220301220037.76555-6-shentey@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoMerge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20220228' into staging
Peter Maydell [Tue, 1 Mar 2022 15:55:31 +0000 (15:55 +0000)]
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20220228' into staging

Fix typecode generation for tcg helpers
Fix single stepping into interrupt handlers
Fix out-of-range offsets for stores in TCI

# gpg: Signature made Mon 28 Feb 2022 18:07:13 GMT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth-gitlab/tags/pull-tcg-20220228:
  tcg/tci: Use tcg_out_ldst in tcg_out_st
  accel/tcg/cpu-exec: Fix precise single-stepping after interrupt
  tcg: Remove dh_alias indirection for dh_typecode

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoMerge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2022-02-28'...
Peter Maydell [Tue, 1 Mar 2022 13:25:54 +0000 (13:25 +0000)]
Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2022-02-28' into staging

* Fix emulation of the SET CLOCK instruction
* Fix the s390x avocado test with Fedora
* Update the s390x Travis jobs to Focal (instead of Bionic)
* Implement the z15 Misc Instruction Extension 3 Facility

# gpg: Signature made Mon 28 Feb 2022 10:34:47 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/thuth-gitlab/tags/pull-request-2022-02-28:
  tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3
  s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z15 GA1
  s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x
  travis.yml: Update the s390x jobs to Ubuntu Focal
  tests/avocado/machine_s390_ccw_virtio: Adapt test to new default resolution
  s390x: sck: load into a temporary not into in1

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoMerge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2022-02-28' into staging
Peter Maydell [Tue, 1 Mar 2022 10:43:35 +0000 (10:43 +0000)]
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2022-02-28' into staging

QAPI patches patches for 2022-02-28

# gpg: Signature made Mon 28 Feb 2022 10:40:22 GMT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2022-02-28:
  qapi: Belatedly adjust limitations documentation
  rtc: Have event RTC_CHANGE identify the RTC by QOM path
  hw/rtc: Compile pl031 once-only
  qapi: Document some missing details of RTC_CHANGE event
  qapi: Move RTC_CHANGE back out of target schema
  qapi/migration: Fix examples document wrong field name for arguments
  qapi: Fix stale reference to scripts/qapi.py in a comment
  keyval: Fix grammar comment to cover downstream prefix
  scripts/qapi: minor delinting

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotcg/tci: Use tcg_out_ldst in tcg_out_st
Richard Henderson [Sat, 26 Feb 2022 01:44:55 +0000 (15:44 -1000)]
tcg/tci: Use tcg_out_ldst in tcg_out_st

The tcg_out_ldst helper will handle out-of-range offsets.
We haven't actually encountered any, since we haven't run
across the assert within tcg_out_op_rrs, but an out-of-range
offset would not be impossible in future.

Fixes: 65089889183 ("tcg/tci: Change encoding to uint32_t units")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoaccel/tcg/cpu-exec: Fix precise single-stepping after interrupt
Luc Michel [Fri, 25 Feb 2022 00:52:42 +0000 (14:52 -1000)]
accel/tcg/cpu-exec: Fix precise single-stepping after interrupt

In some cases, cpu->exit_request can be false after handling the
interrupt, leading to another TB being executed instead of returning
to the main loop.

Fix this by returning true unconditionally when in single-step mode.

Fixes: ba3c35d9c402 ("tcg/cpu-exec: precise single-stepping after an interrupt")
Signed-off-by: Luc Michel <lmichel@kalray.eu>
Message-Id: <20220214132656.11397-1-lmichel@kalray.eu>
[rth: Unlock iothread mutex; simplify indentation]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agotcg: Remove dh_alias indirection for dh_typecode
Richard Henderson [Thu, 17 Feb 2022 01:06:22 +0000 (20:06 -0500)]
tcg: Remove dh_alias indirection for dh_typecode

The dh_alias redirect is intended to handle TCG types as distinguished
from C types.  TCG does not distinguish signed int from unsigned int,
because they are the same size.  However, we need to retain this
distinction for dh_typecode, lest we fail to extend abi types properly
for the host call parameters.

This bug was detected when running the 'arm' emulator on an s390
system. The s390 uses TCG_TARGET_EXTEND_ARGS which triggers code
in tcg_gen_callN to extend 32 bit values to 64 bits; the incorrect
sign data in the typemask for each argument caused the values to be
extended as unsigned values.

This simple program exhibits the problem:

static volatile int num = -9;
static volatile int den = -5;
int main(void)
{
int quo = num / den;
printf("num %d den %d quo %d\n", num, den, quo);
exit(0);
}

When run on the broken qemu, this results in:

num -9 den -5 quo 0

The correct result is:

num -9 den -5 quo 1

Fixes: 7319d83a735 ("tcg: Combine dh_is_64bit and dh_is_signed to dh_typecode")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/876
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Tested-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2 years agoMerge remote-tracking branch 'remotes/legoater/tags/pull-aspeed-20220227' into staging
Peter Maydell [Mon, 28 Feb 2022 16:46:45 +0000 (16:46 +0000)]
Merge remote-tracking branch 'remotes/legoater/tags/pull-aspeed-20220227' into staging

aspeed queue:

* Removal of the swift-bmc machine
* New Secure Boot Controller model
* Improvements on the rainier machine
* Various small cleanups

# gpg: Signature made Sun 27 Feb 2022 08:45:45 GMT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@kaod.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: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* remotes/legoater/tags/pull-aspeed-20220227:
  aspeed/sdmc: Add trace events
  aspeed/smc: Add an address mask on segment registers
  aspeed: Introduce a create_pca9552() helper
  aspeed: rainier: Add strap values taken from hardware
  aspeed: rainier: Add i2c LED devices
  ast2600: Add Secure Boot Controller model
  arm: Remove swift-bmc machine

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoMerge remote-tracking branch 'remotes/shorne/tags/or1k-pull-request' into staging
Peter Maydell [Mon, 28 Feb 2022 11:27:16 +0000 (11:27 +0000)]
Merge remote-tracking branch 'remotes/shorne/tags/or1k-pull-request' into staging

OpenRISC patches

 - Add automatic DTS generation to openrisc_sim

# gpg: Signature made Sat 26 Feb 2022 01:39:55 GMT
# gpg:                using RSA key D9C47354AEF86C103A25EFF1C3B31C2D5E6627E4
# gpg: Good signature from "Stafford Horne <shorne@gmail.com>" [unknown]
# 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: D9C4 7354 AEF8 6C10 3A25  EFF1 C3B3 1C2D 5E66 27E4

* remotes/shorne/tags/or1k-pull-request:
  hw/openrisc/openrisc_sim: Add support for initrd loading
  hw/openrisc/openrisc_sim: Add automatic device tree generation
  hw/openrisc/openrisc_sim: Increase max_cpus to 4
  hw/openrisc/openrisc_sim: Use IRQ splitter when connecting UART
  hw/openrisc/openrisc_sim: Parameterize initialization
  hw/openrisc/openrisc_sim: Create machine state for or1ksim

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoqapi: Belatedly adjust limitations documentation
Markus Armbruster [Fri, 25 Feb 2022 08:45:38 +0000 (09:45 +0100)]
qapi: Belatedly adjust limitations documentation

Commit 57df0dff1a "qapi: Extend -compat to set policy for unstable
interfaces" (v6.2.0) took care of covering experimental features, but
neglected to adjust a comment suggesting to cover it.  Adjust it now.

Fixes: 57df0dff1a1f4c846aa74a082bfd595a8a990015
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220225084538.218876-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2 years agortc: Have event RTC_CHANGE identify the RTC by QOM path
Markus Armbruster [Tue, 22 Feb 2022 12:02:07 +0000 (13:02 +0100)]
rtc: Have event RTC_CHANGE identify the RTC by QOM path

Event RTC_CHANGE is "emitted when the guest changes the RTC time" (and
the RTC supports the event).  What if there's more than one RTC?
Which one changed?  New @qom-path identifies it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <87a6ejnm80.fsf@pond.sub.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2 years agohw/rtc: Compile pl031 once-only
Peter Maydell [Mon, 21 Feb 2022 19:21:23 +0000 (19:21 +0000)]
hw/rtc: Compile pl031 once-only

Now that the RTC_CHANGE event is no longer target-specific,
we can move the pl031 back to a compile-once source file
rather than a compile-per-target one.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220221192123.749970-4-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2 years agoqapi: Document some missing details of RTC_CHANGE event
Peter Maydell [Mon, 21 Feb 2022 19:21:22 +0000 (19:21 +0000)]
qapi: Document some missing details of RTC_CHANGE event

The RTC_CHANGE event's documentation is missing some details:
 * the offset argument is in units of seconds
 * it isn't guaranteed that the RTC will implement the event

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220221192123.749970-3-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2 years agoqapi: Move RTC_CHANGE back out of target schema
Peter Maydell [Mon, 21 Feb 2022 19:21:21 +0000 (19:21 +0000)]
qapi: Move RTC_CHANGE back out of target schema

This commit effectively reverts commit 183e4281a30962, which moved
the RTC_CHANGE event to the target schema.  That change was an
attempt to make the event target-specific to improve introspection,
but the event isn't really target-specific: it's machine or device
specific.  Putting RTC_CHANGE in the target schema with an ifdef list
reduces maintainability (by adding an if: list with a long list of
targets that needs to be manually updated as architectures are added
or removed or as new devices gain the RTC_CHANGE functionality) and
increases compile time (by preventing RTC devices which emit the
event from being "compile once" rather than "compile once per
target", because qapi-events-misc-target.h uses TARGET_* ifdefs,
which are poisoned in "compile once" files.)

Move RTC_CHANGE back to misc.json.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Greg Kurz <groug@kaod.org>
Message-Id: <20220221192123.749970-2-peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2 years agoqapi/migration: Fix examples document wrong field name for arguments
Fabian Holler [Tue, 22 Feb 2022 17:01:16 +0000 (18:01 +0100)]
qapi/migration: Fix examples document wrong field name for arguments

The examples for the snapshot-* and calc-dirty-rate commands document
that arguments for the commands are passed in a 'data' field.
This is wrong, passing them in a "data" field results in
the error:
  {"error": {"class": "GenericError", "desc": "QMP input member 'data'
       is unexpected"}}
Arguments are expected to be passed in an field called "arguments".

Replace "data" with "arguments" in the snapshot-* and calc-dirty-rate
command examples.

Signed-off-by: Fabian Holler <fabian.holler@simplesurance.de>
Message-Id: <20220222170116.63105-1-fabian.holler@simplesurance.de>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2 years agoqapi: Fix stale reference to scripts/qapi.py in a comment
Markus Armbruster [Fri, 18 Feb 2022 14:55:51 +0000 (15:55 +0100)]
qapi: Fix stale reference to scripts/qapi.py in a comment

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220218145551.892787-3-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2 years agokeyval: Fix grammar comment to cover downstream prefix
Markus Armbruster [Fri, 18 Feb 2022 14:55:50 +0000 (15:55 +0100)]
keyval: Fix grammar comment to cover downstream prefix

According to the grammar, a key __com.redhat_foo would be parsed as
two key fragments __com and redhat_foo.  It's actually parsed as a
single fragment.  Fix the grammar.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220218145551.892787-2-armbru@redhat.com>

2 years agoscripts/qapi: minor delinting
John Snow [Fri, 11 Feb 2022 18:36:50 +0000 (13:36 -0500)]
scripts/qapi: minor delinting

Get isort and pylint tools passing again.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20220211183650.2946895-1-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Comment explaining good-names-rgxs tweaked]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2 years agotests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3
David Miller [Wed, 23 Feb 2022 22:31:16 +0000 (17:31 -0500)]
tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3

tests/tcg/s390x/mie3-compl.c: [N]*K instructions
tests/tcg/s390x/mie3-mvcrl.c: MVCRL instruction
tests/tcg/s390x/mie3-sel.c: SELECT instruction

Signed-off-by: David Miller <dmiller423@gmail.com>
Message-Id: <20220223223117.66660-4-dmiller423@gmail.com>
[thuth: Squash mnemonic -> .insn patch, white space cleanup, improve asm usage]
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 years agos390x/cpumodel: Bump up QEMU model to a stripped-down IBM z15 GA1
David Miller [Wed, 23 Feb 2022 22:31:15 +0000 (17:31 -0500)]
s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z15 GA1

TCG implements everything we need to run basic z15 OS+software

Signed-off-by: David Miller <dmiller423@gmail.com>
Message-Id: <20220223223117.66660-3-dmiller423@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 years agos390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x
David Miller [Wed, 23 Feb 2022 22:31:14 +0000 (17:31 -0500)]
s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x

implements:
AND WITH COMPLEMENT   (NCRK, NCGRK)
NAND                  (NNRK, NNGRK)
NOT EXCLUSIVE OR      (NXRK, NXGRK)
NOR                   (NORK, NOGRK)
OR WITH COMPLEMENT    (OCRK, OCGRK)
SELECT                (SELR, SELGR)
SELECT HIGH           (SELFHR)
MOVE RIGHT TO LEFT    (MVCRL)
POPULATION COUNT      (POPCNT)

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/737
Signed-off-by: David Miller <dmiller423@gmail.com>
Message-Id: <20220223223117.66660-2-dmiller423@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 years agotravis.yml: Update the s390x jobs to Ubuntu Focal
Thomas Huth [Mon, 21 Feb 2022 15:34:23 +0000 (16:34 +0100)]
travis.yml: Update the s390x jobs to Ubuntu Focal

QEMU will soon drop the support for Ubuntu 18.04, so let's update
the Travis jobs that were still using this version to 20.04 instead.

While we're at it, also remove an obsolete comment about Ubuntu
Xenial being the default for our Travis jobs.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220221153423.1028465-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 years agoaspeed/sdmc: Add trace events
Cédric Le Goater [Fri, 18 Feb 2022 08:18:15 +0000 (09:18 +0100)]
aspeed/sdmc: Add trace events

This is useful to analyze changes in the U-Boot RAM driver when SDRAM
training is performed.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoaspeed/smc: Add an address mask on segment registers
Cédric Le Goater [Fri, 18 Feb 2022 08:18:14 +0000 (09:18 +0100)]
aspeed/smc: Add an address mask on segment registers

Only a limited set of bits are used for decoding the Start and End
addresses of the mapping window of a flash device.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoaspeed: Introduce a create_pca9552() helper
Cédric Le Goater [Fri, 18 Feb 2022 08:18:13 +0000 (09:18 +0100)]
aspeed: Introduce a create_pca9552() helper

This unifies the way we create the pca9552 devices on the different boards.

Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoaspeed: rainier: Add strap values taken from hardware
Joel Stanley [Fri, 18 Feb 2022 08:18:12 +0000 (09:18 +0100)]
aspeed: rainier: Add strap values taken from hardware

When time permits, we should introduce defines for the HW strapping
registers to cleanly decode the values.

SCU500 = 0x00422016
  Disable ARM JTAG trusted world debug: 0x1
  Disable ARM JTAG debug: 0x1
  VGA Memory Size: 0x1 [16MB]
  Cortex M3: 0x1 [Disabled]
  Boot device: 0x1 [eMMC]
  Reserved: 0x1

SCU510 = 0x80000848
  Secure Boot Enable: 0x1
  Enable boot SPI or eMMC ABR (second boot): 0x1
  Enable LPC mode: 0x1 [LPC]
  Disable LPC SuperIO 0x2e/0x4e: 0x1

Signed-off-by: Joel Stanley <joel@jms.id.au>
[ clg: rewrote the commit log ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoaspeed: rainier: Add i2c LED devices
Joel Stanley [Fri, 18 Feb 2022 08:18:11 +0000 (09:18 +0100)]
aspeed: rainier: Add i2c LED devices

This helps quieten booting the current Rainier kernel.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoast2600: Add Secure Boot Controller model
Joel Stanley [Fri, 18 Feb 2022 08:18:10 +0000 (09:18 +0100)]
ast2600: Add Secure Boot Controller model

Just a stub that indicates the system has booted in secure boot mode.
Used for testing the driver:

 https://lore.kernel.org/all/20211019080608.283324-1-joel@jms.id.au/

Signed-off-by: Joel Stanley <joel@jms.id.au>
[ clg: - Fixed typo
       - Adjusted Copyright dates ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agoarm: Remove swift-bmc machine
Joel Stanley [Fri, 18 Feb 2022 08:18:09 +0000 (09:18 +0100)]
arm: Remove swift-bmc machine

It was scheduled for removal in 7.0.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2 years agohw/openrisc/openrisc_sim: Add support for initrd loading
Stafford Horne [Wed, 9 Feb 2022 21:40:45 +0000 (06:40 +0900)]
hw/openrisc/openrisc_sim: Add support for initrd loading

The initrd passed via the command line is loaded into memory.  It's
location and size is then added to the device tree so the kernel knows
where to find it.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2 years agohw/openrisc/openrisc_sim: Add automatic device tree generation
Stafford Horne [Wed, 9 Feb 2022 21:39:12 +0000 (06:39 +0900)]
hw/openrisc/openrisc_sim: Add automatic device tree generation

Using the device tree means that qemu can now directly tell
the kernel what hardware is configured rather than use having
to maintain and update a separate device tree file.

This patch adds automatic device tree generation support for the
OpenRISC simulator.  A device tree is built up based on the state of the
configure openrisc simulator.

This is then dumped to memory and the load address is passed to the
kernel in register r3.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2 years agotests/avocado/machine_s390_ccw_virtio: Adapt test to new default resolution
Thomas Huth [Mon, 21 Feb 2022 10:19:33 +0000 (11:19 +0100)]
tests/avocado/machine_s390_ccw_virtio: Adapt test to new default resolution

QEMU's default screen resolution recently changed to 1280x800, so the
resolution in the screen shot header changed of course, too.

Fixes: de72c4b7cd ("edid: set default resolution to 1280x800 (WXGA)")
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220221101933.307525-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 years agos390x: sck: load into a temporary not into in1
Nico Boehr [Wed, 26 Jan 2022 08:42:01 +0000 (09:42 +0100)]
s390x: sck: load into a temporary not into in1

We previously loaded into in1, but in1 is not filled during
disassembly and hence always zero. This leads to an assertion failure:

  qemu-system-s390x: /home/nrb/qemu/include/tcg/tcg.h:654: temp_idx:
  Assertion `n >= 0 && n < tcg_ctx->nb_temps' failed.`

Instead, use in2_la2_m64a to load from storage into in2 and pass that to
the helper, which matches what we already do for SCKC.

This fixes the SCK test I sent here under TCG:
<https://www.spinics.net/lists/kvm/msg265169.html>

Fixes: 9dc67537 ("s390x/tcg: implement SET CLOCK ")
Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Message-Id: <20220126084201.774457-1-nrb@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2 years agohw/openrisc/openrisc_sim: Increase max_cpus to 4
Stafford Horne [Sat, 19 Feb 2022 05:57:07 +0000 (14:57 +0900)]
hw/openrisc/openrisc_sim: Increase max_cpus to 4

Now that we no longer have a limit of 2 CPUs due to fixing the
IRQ routing issues we can increase the max.  Here we increase
the limit to 4, we could go higher, but currently OMPIC has a
limit of 4, so we align with that.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2 years agohw/openrisc/openrisc_sim: Use IRQ splitter when connecting UART
Stafford Horne [Sat, 19 Feb 2022 05:48:46 +0000 (14:48 +0900)]
hw/openrisc/openrisc_sim: Use IRQ splitter when connecting UART

Currently the OpenRISC SMP configuration only supports 2 cores due to
the UART IRQ routing being limited to 2 cores.  As was done in commit
1eeffbeb11 ("hw/openrisc/openrisc_sim: Use IRQ splitter when connecting
IRQ to multiple CPUs") we can use a splitter to wire more than 2 CPUs.

This patch moves serial initialization out to it's own function and
uses a splitter to connect multiple CPU irq lines to the UART.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2 years agohw/openrisc/openrisc_sim: Parameterize initialization
Stafford Horne [Wed, 9 Feb 2022 21:26:59 +0000 (06:26 +0900)]
hw/openrisc/openrisc_sim: Parameterize initialization

Move magic numbers to variables and enums. These will be reused for
upcoming fdt initialization.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2 years agohw/openrisc/openrisc_sim: Create machine state for or1ksim
Stafford Horne [Wed, 9 Feb 2022 21:22:46 +0000 (06:22 +0900)]
hw/openrisc/openrisc_sim: Create machine state for or1ksim

This will allow us to attach machine state attributes like
the device tree fdt.

Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2 years agoMerge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into...
Peter Maydell [Thu, 24 Feb 2022 12:48:14 +0000 (12:48 +0000)]
Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging

Python patches

New functionality in qmp-shell from Dan, and some packaging fixes.

# gpg: Signature made Wed 23 Feb 2022 22:08:35 GMT
# gpg:                using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F  18F2 88A9 064D 1835 61EB
#      Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76  CBD0 7DEF 8106 AAFC 390E

* remotes/jsnow-gitlab/tags/python-pull-request:
  MAINTAINERS: python - remove ehabkost and add bleal
  Revert "python: pin setuptools below v60.0.0"
  Python: add setuptools v60.0 workaround
  Python: discourage direct setup.py install
  python: support recording QMP session to a file
  python: introduce qmp-shell-wrap convenience tool

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoMAINTAINERS: python - remove ehabkost and add bleal
John Snow [Tue, 8 Feb 2022 00:05:25 +0000 (19:05 -0500)]
MAINTAINERS: python - remove ehabkost and add bleal

Eduardo Habkost has left Red Hat and has other daily responsibilities to
attend to. In order to stop spamming him on every series, remove him as
"Reviewer" for the python/ library dir and add Beraldo Leal instead.

For the "python scripts" stanza (which is separate due to level of
support), replace Eduardo as maintainer with myself.

(Thanks for all of your hard work, Eduardo!)

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Acked-by: Eduardo Habkost <eduardo@habkost.net>
Message-id: 20220208000525.2601011-1-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agoRevert "python: pin setuptools below v60.0.0"
John Snow [Fri, 4 Feb 2022 22:18:04 +0000 (17:18 -0500)]
Revert "python: pin setuptools below v60.0.0"

This reverts commit 1e4d8b31be35e54b6429fea54f5ecaa0083f91e7.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20220204221804.2047468-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agoPython: add setuptools v60.0 workaround
John Snow [Fri, 4 Feb 2022 22:18:03 +0000 (17:18 -0500)]
Python: add setuptools v60.0 workaround

Setuptools v60 and later include a bundled version of distutils, a
deprecated standard library scheduled for removal in future versions of
Python. Setuptools v60 is only possible to install for Python 3.7 and later.

Python has a distutils.sysconfig.get_python_lib() function that returns
'/usr/lib/pythonX.Y' on posix systems. RPM-based systems actually use
'/usr/lib64/pythonX.Y' instead, so Fedora patches stdlib distutils for
Python 3.7 and Python 3.8 to return the correct value.

Python 3.9 and later introduce a sys.platlibdir property, which returns
the correct value on RPM-based systems.

The change to a distutils package not provided by Fedora on Python 3.7
and 3.8 causes a regression in distutils.sysconfig.get_python_lib() that
ultimately causes false positives to be emitted by pylint, because it
can no longer find the system source libraries.

Many Python tools are fairly aggressive about updating setuptools
packages, and so even though this package is a fair bit newer than
Python 3.7/3.8, it's not entirely unreasonable for a given user to have
such a modern package with a fairly old Python interpreter.

Updates to Python 3.7 and Python 3.8 are being produced for Fedora which
will fix the problem on up-to-date systems. Until then, we can force the
loading of platform-provided distutils when running the pylint
test. This is the least-invasive yet most comprehensive fix.

References:
 https://github.com/pypa/setuptools/pull/2896
 https://github.com/PyCQA/pylint/issues/5704
 https://github.com/pypa/distutils/issues/110

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20220204221804.2047468-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agoPython: discourage direct setup.py install
John Snow [Mon, 7 Feb 2022 21:30:39 +0000 (16:30 -0500)]
Python: discourage direct setup.py install

When invoking setup.py directly, the default behavior for 'install' is
to run the bdist_egg installation hook, which is ... actually deprecated
by setuptools. It doesn't seem to work quite right anymore.

By contrast, 'pip install' will invoke the bdist_wheel hook
instead. This leads to differences in behavior for the two approaches. I
advocate using pip in the documentation in this directory, but the
'setup.py' which has been used for quite a long time in the Python world
may deceptively appear to work at first glance.

Add an error message that will save a bit of time and frustration
that points the user towards using the supported installation
invocation.

Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Beraldo Leal <bleal@redhat.com>
Message-id: 20220207213039.2278569-1-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agopython: support recording QMP session to a file
Daniel P. Berrangé [Fri, 28 Jan 2022 16:11:57 +0000 (16:11 +0000)]
python: support recording QMP session to a file

When running QMP commands with very large response payloads, it is often
not easy to spot the info you want. If we can save the response to a
file then tools like 'grep' or 'jq' can be used to extract information.

For convenience of processing, we merge the QMP command and response
dictionaries together:

  {
      "arguments": {},
      "execute": "query-kvm",
      "return": {
          "enabled": false,
          "present": true
      }
  }

Example usage

  $ ./scripts/qmp/qmp-shell-wrap -l q.log -p -- ./build/qemu-system-x86_64 -display none
  Welcome to the QMP low-level shell!
  Connected
  (QEMU) query-kvm
  {
      "return": {
          "enabled": false,
          "present": true
      }
  }
  (QEMU) query-mice
  {
      "return": [
          {
              "absolute": false,
              "current": true,
              "index": 2,
              "name": "QEMU PS/2 Mouse"
          }
      ]
  }

 $ jq --slurp '. | to_entries[] | select(.value.execute == "query-kvm") |
               .value.return.enabled' < q.log
   false

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20220128161157.36261-3-berrange@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agopython: introduce qmp-shell-wrap convenience tool
Daniel P. Berrangé [Fri, 28 Jan 2022 16:11:56 +0000 (16:11 +0000)]
python: introduce qmp-shell-wrap convenience tool

With the current 'qmp-shell' tool developers must first spawn QEMU with
a suitable -qmp arg and then spawn qmp-shell in a separate terminal
pointing to the right socket.

With 'qmp-shell-wrap' developers can ignore QMP sockets entirely and
just pass the QEMU command and arguments they want. The program will
listen on a UNIX socket and tell QEMU to connect QMP to that.

For example, this:

 # qmp-shell-wrap -- qemu-system-x86_64 -display none

Is roughly equivalent of running:

 # qemu-system-x86_64 -display none -qmp qmp-shell-1234 &
 # qmp-shell qmp-shell-1234

Except that 'qmp-shell-wrap' switches the socket peers around so that
it is the UNIX socket server and QEMU is the socket client. This makes
QEMU reliably go away when qmp-shell-wrap exits, closing the server
socket.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20220128161157.36261-2-berrange@redhat.com
[Edited for rebase. --js]
Signed-off-by: John Snow <jsnow@redhat.com>
2 years agoMerge remote-tracking branch 'remotes/berrange-gitlab/tags/misc-next-pull-request...
Peter Maydell [Wed, 23 Feb 2022 09:25:05 +0000 (09:25 +0000)]
Merge remote-tracking branch 'remotes/berrange-gitlab/tags/misc-next-pull-request' into staging

This misc series of changes:

 - Improves documentation of SSH fingerprint checking
 - Fixes SHA256 fingerprints with non-blockdev usage
 - Blocks the clone3, setns, unshare & execveat syscalls
   with seccomp
 - Blocks process spawning via clone syscall, but allows
   threads, with seccomp
 - Takes over seccomp maintainer role
 - Expands firmware descriptor spec to allow flash
   without NVRAM

# gpg: Signature made Thu 17 Feb 2022 11:57:13 GMT
# gpg:                using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full]
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>" [full]
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* remotes/berrange-gitlab/tags/misc-next-pull-request:
  docs: expand firmware descriptor to allow flash without NVRAM
  MAINTAINERS: take over seccomp from Eduardo Otubo
  seccomp: block setns, unshare and execveat syscalls
  seccomp: block use of clone3 syscall
  seccomp: fix blocking of process spawning
  seccomp: add unit test for seccomp filtering
  seccomp: allow action to be customized per syscall
  block: print the server key type and fingerprint on failure
  block: support sha256 fingerprint with pre-blockdev options
  block: better document SSH host key fingerprint checking

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agoMerge remote-tracking branch 'remotes/lvivier-gitlab/tags/trivial-branch-for-7.0...
Peter Maydell [Tue, 22 Feb 2022 20:17:09 +0000 (20:17 +0000)]
Merge remote-tracking branch 'remotes/lvivier-gitlab/tags/trivial-branch-for-7.0-pull-request' into staging

Trivial branch pull request 20220222

# gpg: Signature made Tue 22 Feb 2022 16:16:01 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/lvivier-gitlab/tags/trivial-branch-for-7.0-pull-request:
  hid: Implement support for side and extra buttons
  vdpa: Make ncs autofree
  qemu-options: fix incorrect description for '-drive index='
  hw/nvram: use at24 macro
  target/rx: Remove unused ENV_OFFSET definition
  target/avr: Correct AVRCPUClass docstring
  configure: Disable capstone and slirp in the --without-default-features mode

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 years agohid: Implement support for side and extra buttons
Noah Bergbauer [Fri, 26 Nov 2021 14:04:37 +0000 (15:04 +0100)]
hid: Implement support for side and extra buttons

Simply set the respective bits and update the descriptor accordingly.

Signed-off-by: Noah Bergbauer <noah@statshelix.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20211126140437.79745-1-noah@statshelix.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2 years agovdpa: Make ncs autofree
Eugenio Pérez [Mon, 14 Feb 2022 19:34:15 +0000 (20:34 +0100)]
vdpa: Make ncs autofree

Simplifying memory management.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214193415.1606752-2-eperezma@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2 years agoqemu-options: fix incorrect description for '-drive index='
Laurent Vivier [Wed, 2 Feb 2022 14:34:22 +0000 (15:34 +0100)]
qemu-options: fix incorrect description for '-drive index='

qemu-options.hx contains grammar that a native English-speaking
person would never use.

Replace "This option defines where is connected the drive" by
"This option defines where the drive is connected".

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/853
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220202143422.912070-1-lvivier@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>