Re: [Bug 1863025] Re: Use-after-free after flush in TCG accelerator

2023-08-31 Thread Philippe Mathieu-Daudé
Hi Samuel, On 31/8/23 14:48, Samuel Henrique wrote: CVE-2020-24165 was assigned to this: https://nvd.nist.gov/vuln/detail/CVE-2020-24165 I had no involvement in the assignment, posting here for reference only. ** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-24165 QEMU 4.2.0

Re: [PATCH v3 5/7] aspeed: Create flash devices only when defaults are enabled

2023-08-31 Thread Joel Stanley
On Thu, 31 Aug 2023 at 13:22, Cédric Le Goater wrote: > > On 8/31/23 15:00, Joel Stanley wrote: > > On Thu, 31 Aug 2023 at 12:39, Cédric Le Goater wrote: > >> > >> When the -nodefaults option is set, flash devices should be created > >> with : > >> > >> -blockdev node-name=fmc0,driver=file,f

Re: [PATCH] hw/intc/arm_gicv3_its: Avoid maybe-uninitialized error in get_vte()

2023-08-31 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Fix when using GCC v11.4 (Ubuntu 11.4.0-1ubuntu1~22.04) with CFLAGS=-Og: > > [4/6] Compiling C object libcommon.fa.p/hw_intc_arm_gicv3_its.c.o > FAILED: libcommon.fa.p/hw_intc_arm_gicv3_its.c.o > inlined from ‘lookup_vte’ at hw/intc/arm_gicv3_its.c:453

Re: [PATCH RESEND v8 17/20] target/riscv/cpu.c: introduce RISCVCPUMultiExtConfig

2023-08-31 Thread Andrew Jones
On Thu, Aug 24, 2023 at 07:14:37PM -0300, Daniel Henrique Barboza wrote: > If we want to make better decisions when auto-enabling extensions during > realize() we need a way to tell if an user set an extension manually. > The RISC-V KVM driver has its own solution via a KVMCPUConfig struct > that h

Re: [PULL 39/41] meson: Fix MESONINTROSPECT parsing

2023-08-31 Thread Philippe Mathieu-Daudé
On 31/8/23 15:06, Michael Tokarev wrote: 31.08.2023 15:56, Philippe Mathieu-Daudé wrote: From: Akihiko Odaki The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael To

Re: [PATCH RESEND v8 18/20] target/riscv: use isa_ext_update_enabled() in init_max_cpu_extensions()

2023-08-31 Thread Andrew Jones
On Thu, Aug 24, 2023 at 07:14:38PM -0300, Daniel Henrique Barboza wrote: > Before adding support to detect if an extension was user set we need to > handle how we're enabling extensions in riscv_init_max_cpu_extensions(). > object_property_set_bool() calls the set() callback for the property, > and

Re: [Bug 1863025] Re: Use-after-free after flush in TCG accelerator

2023-08-31 Thread Daniel P . Berrangé
On Thu, Aug 31, 2023 at 03:40:25PM +0200, Philippe Mathieu-Daudé wrote: > Hi Samuel, > > On 31/8/23 14:48, Samuel Henrique wrote: > > CVE-2020-24165 was assigned to this: > > https://nvd.nist.gov/vuln/detail/CVE-2020-24165 > > > > I had no involvement in the assignment, posting here for reference

[PULL v2 00/40] Misc patches for 2023-08-31

2023-08-31 Thread Philippe Mathieu-Daudé
ository at: https://github.com/philmd/qemu.git tags/misc-20230831 for you to fetch changes up to e1298bc7dc4ea05fb84f017eabec967816f7de6e: build: Only define OS_OBJECT_USE_OBJC with gcc (2023-08-31 15:51:41 +0200) Misc patches queue Ov

Re: [PATCH RESEND v8 19/20] target/riscv/cpu.c: honor user choice in cpu_cfg_ext_auto_update()

2023-08-31 Thread Andrew Jones
On Thu, Aug 24, 2023 at 07:14:39PM -0300, Daniel Henrique Barboza wrote: > Add a new cpu_cfg_ext_is_user_set() helper to check if an extension was > set by the user in the command line. Use it inside > cpu_cfg_ext_auto_update() to verify if the user set a certain extension > and, if that's the case

Re: [PATCH RESEND v8 20/20] target/riscv/cpu.c: consider user option with RVG

2023-08-31 Thread Andrew Jones
On Thu, Aug 24, 2023 at 07:14:40PM -0300, Daniel Henrique Barboza wrote: > Enabling RVG will enable a set of extensions that we're not checking if > the user was okay enabling or not. And in this case we want to error > out, instead of ignoring, otherwise we will be inconsistent enabling RVG > with

Re: [PATCH RESEND v8 00/20] riscv: 'max' CPU, detect user choice in TCG

2023-08-31 Thread Andrew Jones
On Thu, Aug 24, 2023 at 07:14:20PM -0300, Daniel Henrique Barboza wrote: > Hi, > > This is a resend of these two patch sets because they no longer apply > into Alistair's riscv-to-apply.next: > > [PATCH v8 00/12] riscv: add 'max' CPU, deprecate 'any' > https://lore.kernel.org/qemu-riscv/202308152

Re: [Bug 1863025] Re: Use-after-free after flush in TCG accelerator

2023-08-31 Thread Mauro Matteo Cascella
On Thu, Aug 31, 2023 at 3:57 PM Daniel P. Berrangé wrote: > > On Thu, Aug 31, 2023 at 03:40:25PM +0200, Philippe Mathieu-Daudé wrote: > > Hi Samuel, > > > > On 31/8/23 14:48, Samuel Henrique wrote: > > > CVE-2020-24165 was assigned to this: > > > https://nvd.nist.gov/vuln/detail/CVE-2020-24165 > >

Re: [PATCH RESEND v8 15/20] target/riscv/cpu.c: introduce cpu_cfg_ext_auto_update()

2023-08-31 Thread Daniel Henrique Barboza
On 8/31/23 10:33, Andrew Jones wrote: On Thu, Aug 24, 2023 at 07:14:35PM -0300, Daniel Henrique Barboza wrote: During realize() time we're activating a lot of extensions based on some criteria, e.g.: if (cpu->cfg.ext_zk) { cpu->cfg.ext_zkn = true; cpu->cfg.ext_zkr = tr

[RESEND PATCH] firmware: qemu_fw_cfg: Do not hard depend on CONFIG_HAS_IOPORT_MAP

2023-08-31 Thread Fabian Vogt
Some platforms require CONFIG_NO_IOPORT_MAP=y but would also support qemu_fw_cfg over MMIO. Currently the qemu_fw_cfg module can't be built for those as it needs HAS_IOPORT_MAP=y for ioport remapping. This patch allows to build the qemu_fw_cfg in those cases. If CONFIG_HAS_IOPORT_MAP=n, qemu_fw_cf

firmware: qemu_fw_cfg: Do not hard depend on CONFIG_HAS_IOPORT_MAP

2023-08-31 Thread Fabian Vogt
Some platforms require CONFIG_NO_IOPORT_MAP=y but would also support qemu_fw_cfg over MMIO. Currently the qemu_fw_cfg module can't be built for those as it needs HAS_IOPORT_MAP=y for ioport remapping. This patch allows to build the qemu_fw_cfg in those cases. If CONFIG_HAS_IOPORT_MAP=n, qemu_fw_cf

Re: [PATCH RESEND v8 11/20] avocado, risc-v: add opensbi tests for 'max' CPU

2023-08-31 Thread Daniel Henrique Barboza
On 8/31/23 10:16, Andrew Jones wrote: On Thu, Aug 24, 2023 at 07:14:31PM -0300, Daniel Henrique Barboza wrote: Add smoke tests to ensure that we'll not break the 'max' CPU type when adding new ratified extensions to be enabled. I'm not really sure what this test proves other than we didn't

[Bug 1863025] Re: Use-after-free after flush in TCG accelerator

2023-08-31 Thread Mauro Matteo Cascella
** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2022-36648 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863025 Title: Use-after-free after flush in TCG accelerator Status in QEMU:

Re: [PATCH v2 1/2] hw/riscv/virt.c: fix non-KVM --enable-debug build

2023-08-31 Thread Andrew Jones
On Thu, Aug 31, 2023 at 02:47:54PM +0200, Philippe Mathieu-Daudé wrote: > On 31/8/23 10:42, Andrew Jones wrote: > > On Wed, Aug 30, 2023 at 10:35:02AM -0300, Daniel Henrique Barboza wrote: > > > A build with --enable-debug and without KVM will fail as follows: > > > > > > /usr/bin/ld: libqemu-risc

Re: [PATCH v3 10/20] hw/virtio: add config support to vhost-user-device

2023-08-31 Thread Albert Esteve
Sorry to bring up this post, it's been a while since you posted. But I have been testing the patch the last couple of days. On Mon, Jul 10, 2023 at 9:58 PM Michael S. Tsirkin wrote: > On Mon, Jul 10, 2023 at 04:35:12PM +0100, Alex Bennée wrote: > > To use the generic device the user will need to

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 03:25:46PM +0200, Markus Armbruster wrote: [This paragraph written last: Bear with my stream of consciousness review below, where I end up duplicating some of the conslusions you reached before the point where I saw where the patch was headed] > Variables declared in macro

Re: [PATCH 3/7] ui: Clean up local variable shadowing

2023-08-31 Thread Peter Maydell
On Thu, 31 Aug 2023 at 14:25, Markus Armbruster wrote: > > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename variables

Re: [PATCH v3 5/8] hw/misc: Introduce a model of Xilinx Versal's CFRAME_REG

2023-08-31 Thread Peter Maydell
On Thu, 31 Aug 2023 at 16:00, Francisco Iglesias wrote: > > Hi Peter, > > On 2023-08-29 18:44, Peter Maydell wrote: > > You don't need to g_tree_lookup() for every address. If > > you use g_tree_lookup_node() you get a GTreeNode* back, > > and you can then iterate through the tree from that point

Re: [PATCH v3 5/8] hw/misc: Introduce a model of Xilinx Versal's CFRAME_REG

2023-08-31 Thread Francisco Iglesias
Hi Peter, On 2023-08-29 18:44, Peter Maydell wrote: On Thu, 24 Aug 2023 at 19:35, Francisco Iglesias wrote: Introduce a model of Xilinx Versal's Configuration Frame controller (CFRAME_REG). Signed-off-by: Francisco Iglesias +static void cfrm_fdri_post_write(RegisterInfo *reg, uint64_t va

Re: [PATCH v4 11/48] target/loongarch: Implement xvhaddw/xvhsubw

2023-08-31 Thread Richard Henderson
On 8/31/23 00:17, gaosong wrote: 在 2023/8/31 上午2:12, Richard Henderson 写道: On 8/30/23 01:48, Song Gao wrote: --- a/target/loongarch/vec.h +++ b/target/loongarch/vec.h @@ -47,4 +47,7 @@   #define Q(x)  Q[x]   #endif /* HOST_BIG_ENDIAN */ +#define DO_ADD(a, b)  (a + b) +#define DO_SUB(a, b)  (a -

Re: [PATCH v2] accel: Remove HAX accelerator

2023-08-31 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > HAX is deprecated since commits 73741fda6c ("MAINTAINERS: Abort > HAXM maintenance") and 90c167a1da ("docs/about/deprecated: Mark > HAXM in QEMU as deprecated"), released in v8.0.0. > > Per the latest HAXM release (v7.8 [*]), the latest QEMU supported > is v7.2:

[PATCH v2] target/riscv: Use accelerated helper for AES64KS1I

2023-08-31 Thread Ard Biesheuvel
Use the accelerated SubBytes/ShiftRows/AddRoundKey AES helper to implement the first half of the key schedule derivation. This does not actually involve shifting rows, so clone the same value into all four columns of the AES vector to counter that operation. Cc: Richard Henderson Cc: Philippe Mat

Re: [PATCH RESEND v8 20/20] target/riscv/cpu.c: consider user option with RVG

2023-08-31 Thread Daniel Henrique Barboza
On 8/31/23 11:02, Andrew Jones wrote: On Thu, Aug 24, 2023 at 07:14:40PM -0300, Daniel Henrique Barboza wrote: Enabling RVG will enable a set of extensions that we're not checking if the user was okay enabling or not. And in this case we want to error out, instead of ignoring, otherwise we wi

Re: [QEMU PATCH v4 12/13] virtio-gpu: Initialize Venus

2023-08-31 Thread Dmitry Osipenko
On 8/31/23 13:40, Antonio Caggiano wrote: > Hi Huang, > > Thank you for pushing this forward! > > On 31/08/2023 11:32, Huang Rui wrote: >> From: Antonio Caggiano >> >> Request Venus when initializing VirGL. >> >> Signed-off-by: Antonio Caggiano >> Signed-off-by: Huang Rui >> --- >> >> v1->v2:

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Richard Henderson
On 8/31/23 06:25, Markus Armbruster wrote: +#define PASTE(a, b) a##b We already have glue() in qemu/compiler.h. The rest of it looks quite sensible. r~

Re: [PATCH v3 10/20] hw/virtio: add config support to vhost-user-device

2023-08-31 Thread Alex Bennée
Albert Esteve writes: > Sorry to bring up this post, it's been a while since you posted. > But I have been testing the patch the last couple of days. > > On Mon, Jul 10, 2023 at 9:58 PM Michael S. Tsirkin wrote: > > On Mon, Jul 10, 2023 at 04:35:12PM +0100, Alex Bennée wrote: > > To use the

Re: [PULL 00/12] testing and gdbstub updates

2023-08-31 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL v2 0/2] xen-virtio-2-tag

2023-08-31 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/24] target-arm queue

2023-08-31 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/1] Quick fix patches

2023-08-31 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v4 2/5] s390x: switch pv and subsystem reset ordering on reboot

2023-08-31 Thread Marc Hartmayer
On Wed, Aug 23, 2023 at 04:22 PM +0200, Steffen Eiden wrote: > From: Janosch Frank > > Bound APQNs have to be reset before tearing down the secure config via > s390_machine_unprotect(). Otherwise the Ultravisor will return a error > code. > > So let's switch the ordering around to make that happ

Re: [PATCH v2] target/riscv: Use accelerated helper for AES64KS1I

2023-08-31 Thread Richard Henderson
On 8/31/23 08:41, Ard Biesheuvel wrote: Use the accelerated SubBytes/ShiftRows/AddRoundKey AES helper to implement the first half of the key schedule derivation. This does not actually involve shifting rows, so clone the same value into all four columns of the AES vector to counter that operation

[PATCH v4 0/8] Xilinx Versal CFI support

2023-08-31 Thread Francisco Iglesias
Hi, This series adds support for the Configuration Frame Unit (CFU) and the Configuration Frame controllers (CFRAME) to the Xilinx Versal machine ([1], chapter 21) for emulaing bitstream loading and readback. The series starts by introducing the Xilinx CFI interface that is thereafter used by the

[PATCH v4 4/8] hw/misc/xlnx-versal-cfu: Introduce a model of Xilinx Versal's CFU_SFR

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame Unit's Single Frame Read port (CFU_SFR). Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/misc/xlnx-versal-cfu.c | 87 +++ include/hw/misc/xlnx-versal-cfu.h | 15 ++ 2 files chang

[PATCH v4 3/8] hw/misc/xlnx-versal-cfu: Introduce a model of Xilinx Versal CFU_FDRO

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame Unit's data out port (CFU_FDRO). Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/misc/xlnx-versal-cfu.c | 96 +++ include/hw/misc/xlnx-versal-cfu.h | 12 2 files changed, 108 in

[PATCH v4 2/8] hw/misc: Introduce a model of Xilinx Versal's CFU_APB

2023-08-31 Thread Francisco Iglesias
Introduce a model of the software programming interface (CFU_APB) of Xilinx Versal's Configuration Frame Unit. Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- MAINTAINERS | 2 + hw/misc/meson.build | 1 + hw/misc/xlnx-versal-cfu.c

[PATCH v4 1/8] hw/misc: Introduce the Xilinx CFI interface

2023-08-31 Thread Francisco Iglesias
Introduce the Xilinx Configuration Frame Interface (CFI) for transmitting CFI data packets between the Xilinx Configuration Frame Unit models (CFU_APB, CFU_FDRO and CFU_SFR), the Xilinx CFRAME controller (CFRAME_REG) and the Xilinx CFRAME broadcast controller (CFRAME_BCAST_REG) models (when emulati

[PATCH v4 7/8] hw/arm/xlnx-versal: Connect the CFU_APB, CFU_FDRO and CFU_SFR

2023-08-31 Thread Francisco Iglesias
Connect the Configuration Frame Unit (CFU_APB, CFU_FDRO and CFU_SFR) to the Versal machine. Signed-off-by: Francisco Iglesias Acked-by: Edgar E. Iglesias Reviewed-by: Peter Maydell --- hw/arm/xlnx-versal.c | 42 include/hw/arm/xlnx-versal.h | 16 +++

[PATCH v4 5/8] hw/misc: Introduce a model of Xilinx Versal's CFRAME_REG

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame controller (CFRAME_REG). Signed-off-by: Francisco Iglesias --- MAINTAINERS | 2 + hw/misc/meson.build | 1 + hw/misc/xlnx-versal-cframe-reg.c | 697 +++ incl

[PATCH v4 8/8] hw/arm/versal: Connect the CFRAME_REG and CFRAME_BCAST_REG

2023-08-31 Thread Francisco Iglesias
Connect the Configuration Frame controller (CFRAME_REG) and the Configuration Frame broadcast controller (CFRAME_BCAST_REG) to the Versal machine. Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/arm/xlnx-versal.c | 113 ++- include/hw/

[PATCH v4 6/8] hw/misc: Introduce a model of Xilinx Versal's CFRAME_BCAST_REG

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame broadcast controller (CFRAME_BCAST_REG). Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/misc/xlnx-versal-cframe-reg.c | 161 +++ include/hw/misc/xlnx-versal-cframe-reg.h | 17 +++ 2 files

Re: [PATCH v3 5/7] aspeed: Create flash devices only when defaults are enabled

2023-08-31 Thread Cédric Le Goater
On 8/31/23 15:42, Joel Stanley wrote: On Thu, 31 Aug 2023 at 13:22, Cédric Le Goater wrote: On 8/31/23 15:00, Joel Stanley wrote: On Thu, 31 Aug 2023 at 12:39, Cédric Le Goater wrote: When the -nodefaults option is set, flash devices should be created with : -blockdev node-name=fmc0

[PATCH v5 0/8] Xilinx Versal CFI support

2023-08-31 Thread Francisco Iglesias
Hi, This series adds support for the Configuration Frame Unit (CFU) and the Configuration Frame controllers (CFRAME) to the Xilinx Versal machine ([1], chapter 21) for emulaing bitstream loading and readback. The series starts by introducing the Xilinx CFI interface that is thereafter used by the

[PATCH v5 1/8] hw/misc: Introduce the Xilinx CFI interface

2023-08-31 Thread Francisco Iglesias
Introduce the Xilinx Configuration Frame Interface (CFI) for transmitting CFI data packets between the Xilinx Configuration Frame Unit models (CFU_APB, CFU_FDRO and CFU_SFR), the Xilinx CFRAME controller (CFRAME_REG) and the Xilinx CFRAME broadcast controller (CFRAME_BCAST_REG) models (when emulati

[PATCH v5 3/8] hw/misc/xlnx-versal-cfu: Introduce a model of Xilinx Versal CFU_FDRO

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame Unit's data out port (CFU_FDRO). Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/misc/xlnx-versal-cfu.c | 96 +++ include/hw/misc/xlnx-versal-cfu.h | 12 2 files changed, 108 in

[PATCH v5 8/8] hw/arm/versal: Connect the CFRAME_REG and CFRAME_BCAST_REG

2023-08-31 Thread Francisco Iglesias
Connect the Configuration Frame controller (CFRAME_REG) and the Configuration Frame broadcast controller (CFRAME_BCAST_REG) to the Versal machine. Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/arm/xlnx-versal.c | 113 ++- include/hw/

[PATCH v5 5/8] hw/misc: Introduce a model of Xilinx Versal's CFRAME_REG

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame controller (CFRAME_REG). Signed-off-by: Francisco Iglesias --- MAINTAINERS | 2 + hw/misc/meson.build | 1 + hw/misc/xlnx-versal-cframe-reg.c | 697 +++ incl

[PATCH v5 6/8] hw/misc: Introduce a model of Xilinx Versal's CFRAME_BCAST_REG

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame broadcast controller (CFRAME_BCAST_REG). Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/misc/xlnx-versal-cframe-reg.c | 161 +++ include/hw/misc/xlnx-versal-cframe-reg.h | 17 +++ 2 files

[PATCH v5 2/8] hw/misc: Introduce a model of Xilinx Versal's CFU_APB

2023-08-31 Thread Francisco Iglesias
Introduce a model of the software programming interface (CFU_APB) of Xilinx Versal's Configuration Frame Unit. Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- MAINTAINERS | 2 + hw/misc/meson.build | 1 + hw/misc/xlnx-versal-cfu.c

[PATCH v5 4/8] hw/misc/xlnx-versal-cfu: Introduce a model of Xilinx Versal's CFU_SFR

2023-08-31 Thread Francisco Iglesias
Introduce a model of Xilinx Versal's Configuration Frame Unit's Single Frame Read port (CFU_SFR). Signed-off-by: Francisco Iglesias Reviewed-by: Peter Maydell --- hw/misc/xlnx-versal-cfu.c | 87 +++ include/hw/misc/xlnx-versal-cfu.h | 15 ++ 2 files chang

[PATCH v5 7/8] hw/arm/xlnx-versal: Connect the CFU_APB, CFU_FDRO and CFU_SFR

2023-08-31 Thread Francisco Iglesias
Connect the Configuration Frame Unit (CFU_APB, CFU_FDRO and CFU_SFR) to the Versal machine. Signed-off-by: Francisco Iglesias Acked-by: Edgar E. Iglesias Reviewed-by: Peter Maydell --- hw/arm/xlnx-versal.c | 42 include/hw/arm/xlnx-versal.h | 16 +++

Re: [PATCH 3/4] cxl/type3: minimum MHD cci support

2023-08-31 Thread Gregory Price
On Mon, Aug 07, 2023 at 03:56:09PM +0100, Jonathan Cameron wrote: > On Fri, 21 Jul 2023 12:35:08 -0400 > Gregory Price wrote: > > > Implement the MHD GET_INFO cci command and add a shared memory > > region to the type3 device to host the information. > > > > Add a helper program to initialize th

[PATCH 2/3] hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

2023-08-31 Thread Tong Ho
Connect the support for Versal True Random Number Generator (TRNG) device. Warning: unlike the TRNG component in a real device from the Versal device familiy, the connected TRNG model is not of cryptographic grade and is not intended for use cases when cryptograpically strong TRNG is needed. Sign

[PATCH 0/3] AMD/Xilinx Versal TRNG support

2023-08-31 Thread Tong Ho
This series adds support for the True Random Number Generator (TRNG) in the AMD/Xilinx Versal family of devices. The series starts by introducing a non-cryptographic grade model of the TRNG controller in the Versal family of devices, followed by instantiating the model in Xilinx Versal machine. T

[PATCH 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-08-31 Thread Tong Ho
Signed-off-by: Tong Ho --- tests/qtest/meson.build | 2 +- tests/qtest/xlnx-versal-trng-test.c | 490 2 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 tests/qtest/xlnx-versal-trng-test.c diff --git a/tests/qtest/meson.build b/tests/

[PATCH 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-08-31 Thread Tong Ho
This adds a non-cryptographic grade implementation of the model for the True Random Number Generator (TRNG) component in AMD/Xilinx Versal device family. This model is only intended for non-real world testing of guest software, where cryptographically strong TRNG is not needed. This model support

MTTCG vCPU time

2023-08-31 Thread Igor Lesik
Hi. I am looking for some advice. I model custom HW with 100+ CPUs. The CPUs are working on different parts of one big workload and sometimes have common SW synchronizations points, however, in between those synch points vCPUs seem to run with very different pace depending on how underlying OS s

Re: [PATCH for-8.2 v2 2/2] migration: Allow user to specify migration switchover bandwidth

2023-08-31 Thread Joao Martins
On 03/08/2023 16:53, Peter Xu wrote: > @@ -2719,7 +2729,8 @@ static void migration_update_counters(MigrationState *s, > update_iteration_initial_status(s); > > trace_migrate_transferred(transferred, time_spent, > - bandwidth, s->threshold_size); > +

Re: [PATCH for-8.2 v2 2/2] migration: Allow user to specify migration switchover bandwidth

2023-08-31 Thread Peter Xu
On Thu, Aug 31, 2023 at 07:14:47PM +0100, Joao Martins wrote: > On 03/08/2023 16:53, Peter Xu wrote: > > @@ -2719,7 +2729,8 @@ static void migration_update_counters(MigrationState > > *s, > > update_iteration_initial_status(s); > > > > trace_migrate_transferred(transferred, time_spent,

[PATCH v5 0/8] Fix segfault on migration return path

2023-08-31 Thread Fabiano Rosas
What was left from v4 was to figure out how to pair the yank register/unregister for the QEMUFiles. I noticed that we don't really need to call unregister_yank under the lock. We just need to make sure the pointer is still valid. So I went with Peter's first suggestion which was to call the functi

[PATCH v5 4/8] migration: Remove redundant cleanup of postcopy_qemufile_src

2023-08-31 Thread Fabiano Rosas
This file is owned by the return path thread which is already doing cleanup. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 5e6a766235..195726eb4a 100644 --

[PATCH v5 8/8] migration: Add a wrapper to cleanup migration files

2023-08-31 Thread Fabiano Rosas
We currently have a pattern for cleaning up a migration QEMUFile: qemu_mutex_lock(&s->qemu_file_lock); file = s->file_name; s->file_name = NULL; qemu_mutex_unlock(&s->qemu_file_lock); migration_ioc_unregister_yank_from_file(file); qemu_file_shutdown(file); qemu_fclose(file); This s

[PATCH v5 7/8] migration: Move return path cleanup to main migration thread

2023-08-31 Thread Fabiano Rosas
Now that the return path thread is allowed to finish during a paused migration, we can move the cleanup of the QEMUFiles to the main migration thread. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-)

[PATCH v5 5/8] migration: Consolidate return path closing code

2023-08-31 Thread Fabiano Rosas
We'll start calling the await_return_path_close_on_source() function from other parts of the code, so move all of the related checks and tracepoints into it. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 29 ++--- 1 file changed, 14 inser

[PATCH v5 6/8] migration: Replace the return path retry logic

2023-08-31 Thread Fabiano Rosas
Replace the return path retry logic with finishing and restarting the thread. This fixes a race when resuming the migration that leads to a segfault. Currently when doing postcopy we consider that an IO error on the return path file could be due to a network intermittency. We then keep the thread

[PATCH v5 2/8] migration: Fix possible races when shutting down the return path

2023-08-31 Thread Fabiano Rosas
We cannot call qemu_file_shutdown() on the return path file without taking the file lock. The return path thread could be running it's cleanup code and have just cleared the from_dst_file pointer. Checking ms->to_dst_file for errors could also race with migrate_fd_cleanup() which clears the to_dst

[PATCH v5 1/8] migration: Fix possible race when setting rp_state.error

2023-08-31 Thread Fabiano Rosas
We don't need to set the rp_state.error right after a shutdown because qemu_file_shutdown() always sets the QEMUFile error, so the return path thread would have seen it and set the rp error itself. Setting the error outside of the thread is also racy because the thread could clear it after we set

[PATCH v5 3/8] migration: Fix possible race when shutting down to_dst_file

2023-08-31 Thread Fabiano Rosas
It's not safe to call qemu_file_shutdown() on the to_dst_file without first checking for the file's presence under the lock. The cleanup of this file happens at postcopy_pause() and migrate_fd_cleanup() which are not necessarily running in the same thread as migrate_fd_cancel(). Reviewed-by: Peter

Re: [PATCH 6/6] target/mips: Convert Loongson [D]MULT[U].G opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
On 21/1/21 21:06, Richard Henderson wrote: On 1/12/21 11:55 AM, Philippe Mathieu-Daudé wrote: Convert the following opcodes to decodetree: - MULT.G - multiply 32-bit signed integers - MULTU.G - multiply 32-bit unsigned integers - DMULT.G - multiply 64-bit signed integers - DMULTU.G - multiply 6

[PULL 0/7] s390x and qtest patches

2023-08-31 Thread Thomas Huth
The following changes since commit 17780edd81d27fcfdb7a802efc870a99788bd2fc: Merge tag 'quick-fix-pull-request' of https://gitlab.com/bsdimp/qemu into staging (2023-08-31 10:06:29 -0400) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2023-08-31

[PULL 2/7] tests/tcg/s390x: Test precise self-modifying code handling

2023-08-31 Thread Thomas Huth
From: Ilya Leoshkevich Add small softmmu and user tests to prevent regressions. Signed-off-by: Ilya Leoshkevich Message-Id: <20230807114921.438881-2-...@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/precise-smc-user.c | 39 +++ tests/tcg/s390x/Makefile.softmmu

[PULL 6/7] subprojects/berkeley-testfloat-3: Update to fix a problem with compiler warnings

2023-08-31 Thread Thomas Huth
Update the berkeley-testfloat-3 wrap to include a patch provided by Olaf Hering. This fixes a problem with "control reaches end of non-void function [-Werror=return-type]" compiler warning/errors that are now enabled by default in certain versions of GCC. Reported-by: Olaf Hering Message-Id: <202

[PULL 1/7] target/s390x: Define TARGET_HAS_PRECISE_SMC

2023-08-31 Thread Thomas Huth
From: Ilya Leoshkevich PoP (Sequence of Storage References -> Instruction Fetching) says: ... if a store that is conceptually earlier is made by the same CPU using the same effective address as that by which the instruction is subse- quently fetched, the updated information is ob

[PULL 4/7] tests/qtest/netdev-socket: Avoid variable-length array in inet_get_free_port_multiple()

2023-08-31 Thread Thomas Huth
From: Peter Maydell We use a variable-length array in inet_get_free_port_multiple(). This is only test code called at the start of a test, so switch to a heap allocation instead. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler error on new additions. T

[PULL 3/7] tests/qtest/usb-hcd-xhci-test: Check availability of devices before using them

2023-08-31 Thread Thomas Huth
The "usb-uas" and "usb-ccid" might not be compiled into the QEMU binary, so let's better check first whether they are available. Message-Id: <20230822163024.61529-1-th...@redhat.com> Reviewed-by: Fabiano Rosas Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-xhci-test.c | 8 ++-- 1 file c

[PULL 5/7] tests/qtest/bios-tables-test: Check for virtio-iommu device before using it

2023-08-31 Thread Thomas Huth
The virtio-iommu device might be missing in the QEMU binary (e.g. in downstream RHEL builds), so let's better check for its availability first before using it. Message-Id: <20230822164948.65187-1-th...@redhat.com> Acked-by: Igor Mammedov Signed-off-by: Thomas Huth --- tests/qtest/bios-tables-te

[PULL 7/7] meson: test for CONFIG_TCG in config_all

2023-08-31 Thread Thomas Huth
From: Paolo Bonzini CONFIG_TCG is not included in *-config-devices.h, so the test is always failing. Fixes: 74884cb1a6d ("qtest/meson.build: check CONFIG_TCG for boot-serial-test in qtests_ppc", 2022-03-14) Fixes: 44d827ea69e ("qtest/meson.build: check CONFIG_TCG for prom-env-test in qtests_pp

Re: [PATCH 6/7] block: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:45PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 5/7] block/vdi: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:44PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:43PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH v2 08/12] hw/vmapple/bdif: Introduce vmapple backdoor interface

2023-08-31 Thread Stefan Hajnoczi
On Wed, Aug 30, 2023 at 04:14:21PM +, Alexander Graf wrote: > The VMApple machine exposes AUX and ROOT block devices (as well as USB OTG > emulation) via virtio-pci as well as a special, simple backdoor platform > device. > > This patch implements this backdoor platform device to the best of m

Re: [PATCH v2] target/riscv: Use accelerated helper for AES64KS1I

2023-08-31 Thread Philippe Mathieu-Daudé
On 31/8/23 17:41, Ard Biesheuvel wrote: Use the accelerated SubBytes/ShiftRows/AddRoundKey AES helper to implement the first half of the key schedule derivation. This does not actually involve shifting rows, so clone the same value into all four columns of the AES vector to counter that operation

Re: [PATCH v2 11/12] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2023-08-31 Thread Stefan Hajnoczi
On Wed, Aug 30, 2023 at 04:14:24PM +, Alexander Graf wrote: > Apple has its own virtio-blk PCI device ID where it deviates from the > official virtio-pci spec slightly: It puts a new "apple type" > field at a static offset in config space and introduces a new barrier > command. > > This patch

[PATCH] target/mips: Simplify Loongson MULTU.G opcode

2023-08-31 Thread Philippe Mathieu-Daudé
Since MULTU opcodes don't record the most significant bits of the infinite result, sign-extending the sources make no difference in the result. Once we remove the sign extension of source registers, MULT and MULTU are identical (as are DMULT and DMULTU). Suggested-by: Richard Henderson Signed-of

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-08-31 Thread Peter Xu
On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: > qemu_rdma_save_page() reports polling error with error_report(), then > succeeds anyway. This is because the variable holding the polling > status *shadows* the variable the function returns. The latter > remains zero. > > Brok

Re: [PATCH 2/7] migration: Clean up local variable shadowing

2023-08-31 Thread Peter Xu
On Thu, Aug 31, 2023 at 03:25:41PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

[PATCH v2 2/7] target/mips: Re-introduce OPC_ADDUH_QB_DSP and OPC_MUL_PH_DSP

2023-08-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé There is no issue having multiple enum declarations with the same value. As we are going to remove the OPC_MULT_G_2E definition in few commits, restore the OPC_ADDUH_QB_DSP and OPC_MUL_PH_DSP definitions and use them where they belong. Signed-off-by: Philippe Mathieu

[PATCH v2 5/7] target/mips: Convert Loongson [D]DIVU.G opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Convert DIVU.G (divide 32-bit unsigned integers) and DDIVU.G (divide 64-bit unsigned integers) opcodes to decodetree. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/godson2.decode| 2 ++ target/mips/tcg/loong-ext.deco

Re: [PATCH 6/6] target/mips: Convert Loongson [D]MULT[U].G opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
On 31/8/23 21:12, Philippe Mathieu-Daudé wrote: On 21/1/21 21:06, Richard Henderson wrote: On 1/12/21 11:55 AM, Philippe Mathieu-Daudé wrote: Convert the following opcodes to decodetree: - MULT.G - multiply 32-bit signed integers - MULTU.G - multiply 32-bit unsigned integers - DMULT.G - multip

[PATCH v2 6/7] target/mips: Convert Loongson [D]MOD[U].G opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Convert the following opcodes to decodetree: - MOD.G - mod 32-bit signed integers - MODU.G - mod 32-bit unsigned integers - DMOD.G - mod 64-bit signed integers - DMODU.G - mod 64-bit unsigned integers Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-D

[PATCH v2 0/7] target/mips: Convert Loongson LEXT opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
Respin of old series... Since v1 [*]: - Fixed '!is_double' check (rth) - Rebased (removing tcg_temp_free calls) - Simplified MULT[U].G (rth) - Added R-b Cover from v1: Loongson is next step in the "MIPS decodetree conversion" epic. Start with the simplest extension. The diffstat addition

[PATCH v2 4/7] target/mips: Convert Loongson DIV.G opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé DIV.G and DDIV.G are very similar. Provide gen_lext_DIV_G() a 'is_double' argument so it can generate DIV.G (divide 32-bit signed integers). With this commit we explicit the template used to generate opcode for 32/64-bit word variants. Next commits will be less verbo

[PATCH v2 1/7] target/mips: Simplify Loongson MULTU.G opcode

2023-08-31 Thread Philippe Mathieu-Daudé
Since MULTU opcodes don't record the most significant bits of the infinite result, sign-extending the sources make no difference in the result. Once we remove the sign extension of source registers, MULT and MULTU are identical (as are DMULT and DMULTU). Suggested-by: Richard Henderson Signed-of

[PATCH v2 7/7] target/mips: Convert Loongson [D]MULT[U].G opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Convert the following opcodes to decodetree: - MULT.G - multiply 32-bit signed integers - MULTU.G - multiply 32-bit unsigned integers - DMULT.G - multiply 64-bit signed integers - DMULTU.G - multiply 64-bit unsigned integers Now that all opcodes from the extension h

[PATCH v2 3/7] target/mips: Convert Loongson DDIV.G opcodes to decodetree

2023-08-31 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Introduce decode_loongson() to decode all Loongson vendor specific opcodes. Start converting a single opcode: DDIV.G (divide 64-bit signed integers). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/translate.h | 1 +

Re: [PATCH v2 11/12] hw/vmapple/virtio-blk: Add support for apple virtio-blk

2023-08-31 Thread Philippe Mathieu-Daudé
On 31/8/23 22:03, Stefan Hajnoczi wrote: On Wed, Aug 30, 2023 at 04:14:24PM +, Alexander Graf wrote: Apple has its own virtio-blk PCI device ID where it deviates from the official virtio-pci spec slightly: It puts a new "apple type" field at a static offset in config space and introduces a n

<    1   2   3   4   >