Re: [PATCH v3 0/4] qapi/migration: Dedup migration parameter objects and fix tls-authz crash

2023-09-25 Thread Markus Armbruster
Peter, looks like you missed my review of v2.

[PATCH 7/8] target/sparc: Fix VIS fexpand input register.

2023-09-25 Thread Nick Bowler
This instruction is documented to get its input from the second single-precision input operand; the first operand is ignored. This is exactly what a real UltraSparc II does. Meanwhile, the the emulator uses only the irrelevant first operand, treating it as a double-precision register, and ignores

[PATCH 1/8] target/sparc: Fix VIS fmul8x16 input register.

2023-09-25 Thread Nick Bowler
On a real UltraSparc II CPU, the fmul8x16 instruction reads its first input from any of the single-precision floating point registers. But the emulator is reading the input as if the first operand encodes a double-precision register, which in most cases will not contain the right data and

[PATCH 3/8] target/sparc: Fix VIS fmul8x16al instruction.

2023-09-25 Thread Nick Bowler
On a real UltraSparc II, the fmul8x16al instruction takes two single- precision input operands and returns a double-precision result. For the second operand, bits 15:0 are used, and bits 31:16 are ignored. However, the emulation is taking two double-precision input operands, and furthermore it

[PATCH 8/8] target/sparc: Fix VIS subtraction instructions.

2023-09-25 Thread Nick Bowler
All of the VIS subtraction instructions are documented to subtract the second input operand from the first. This is also consistent with how the instructions actually work on a real UltraSparc II. But the emulator is implementing the subtraction in the wrong order, subtracting the first input

[PATCH 6/8] target/sparc: Fix VIS fpmerge input registers.

2023-09-25 Thread Nick Bowler
On a real UltraSparc II CPU, the fpmerge instruction reads two single-precision input registers, but the emulator is reading from double-precision input registers instead. These are unlikely to contain the correct data so in most instances the results of the emulation are just garbage in most

[PATCH 4/8] target/sparc: Fix VIS fmuld8sux16 instruction.

2023-09-25 Thread Nick Bowler
On a real UltraSparc II, the fmuld8sux16 instruction takes two single- precision input operands and returns a double-precision result. However, the emulation is taking two double-precision input operands, which are unlikely to contain the correct values. Even if they did, the emulator is

[PATCH 2/8] target/sparc: Fix VIS fmul8x16au instruction.

2023-09-25 Thread Nick Bowler
On a real UltraSparc II, the fmul8x16au instruction takes two single- precision input operands and returns a double-precision result. For the second operand, bits 31:16 are used, and bits 15:0 are ignored. However, the emulation is taking two double-precision input operands, and furthermore it

[PATCH] target/i386/kvm: Refine VMX controls setting for backward compatibility

2023-09-25 Thread EwanHai
Commit 4a910e1 ("target/i386: do not set unsupported VMX secondary execution controls") implemented a workaround for hosts that have specific CPUID features but do not support the corresponding VMX controls, e.g., hosts support RDSEED but do not support RDSEED-Exiting. In detail, commit 4a910e1

[PATCH 5/8] target/sparc: Fix VIS fmuld8ulx16 instruction.

2023-09-25 Thread Nick Bowler
On a real UltraSparc II, the fmuld8ulx16 instruction takes two single- precision input operands and returns a double-precision result. However, the emulation is taking two double-precision input operands, which are unlikely to contain the correct values, so the results are garbage in most cases.

[PATCH 0/8] SPARC VIS fixes

2023-09-25 Thread Nick Bowler
I noticed that the fmul8x16 instruction did not appear to be emulated correctly[1]. It would seem that emulation was not using a single- precision input register like the real hardware does, but rather a double-precision register, causing it to operate on the wrong data. Every other VIS

Re: [RFC PATCH 0/8] i386/sev: Use C API of Rust SEV library

2023-09-25 Thread Marc-André Lureau
Hi On Fri, Sep 15, 2023 at 9:10 PM Stefan Hajnoczi wrote: > > On Fri, 15 Sept 2023 at 09:50, Peter Maydell wrote: > > > > On Fri, 15 Sept 2023 at 10:54, Daniel P. Berrangé > > wrote: > > > My summary, is that I'd personally be in favour of opening the door > > > to Rust code as a mandatory

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-25 Thread Markus Armbruster
James Bottomley writes: > On Fri, 2023-09-22 at 08:00 +0200, Markus Armbruster wrote: >> Found this cleaning out old mail, sorry for missing it until now! >> >> I think we owe James a quick decision wether we're willing to take >> the >> feature.  Stefan, thoughts? >> >> James Bottomley

Re: [PATCH v6 09/10] migration/yank: Keep track of registered yank instances

2023-09-25 Thread Fabiano Rosas
CC: Daniel for the QIOChannel discussion Lukas Straub writes: > On Thu, 14 Sep 2023 10:57:47 -0400 > Peter Xu wrote: > >> On Thu, Sep 14, 2023 at 10:23:38AM -0300, Fabiano Rosas wrote: >> > Peter Xu writes: >> > >> > > On Wed, Sep 13, 2023 at 06:53:20PM -0300, Fabiano Rosas wrote: >> > >>

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-25 Thread James Bottomley
On Fri, 2023-09-22 at 08:00 +0200, Markus Armbruster wrote: > Found this cleaning out old mail, sorry for missing it until now! > > I think we owe James a quick decision wether we're willing to take > the > feature.  Stefan, thoughts? > > James Bottomley writes: > > > From: James Bottomley >

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-25 Thread James Bottomley
On Fri, 2023-09-22 at 09:27 -0400, Stefan Berger wrote: > > On 9/22/23 09:02, Daniel P. Berrangé wrote: > > On Fri, Sep 22, 2023 at 08:41:19AM -0400, Stefan Berger wrote: > > > On 9/22/23 02:00, Markus Armbruster wrote: > > > > Found this cleaning out old mail, sorry for missing it until > > > >

Re: [PATCH] win32: avoid discarding the exception handler

2023-09-25 Thread Thomas Huth
On 25/09/2023 13.39, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau In all likelihood, the compiler with lto doesn't see the function being used, from assembly macro __try1. Help it by marking the function has being used. Fixes: I'd suggest to use "Resolves:" for bug tickets so

Re: [PATCH v7 6/7] qapi: Add HV_BALLOON_STATUS_REPORT event and its QMP query command

2023-09-25 Thread Markus Armbruster
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > Used by the hv-balloon driver for (optional) guest memory status reports. > > Signed-off-by: Maciej S. Szmigiero [...] > static void hv_balloon_handle_unballoon_response(HvBalloon *balloon, > diff --git a/monitor/monitor.c

Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-09-25 Thread Anton Johansson via
On 23/09/23, Michael Tokarev wrote: > [Trimming Cc list] > > 22.09.2023 13:45, Anton Johansson: > > On 21/09/23, Michael Tokarev wrote: > > > > > Anton Johansson (9): > > > > accel/kvm: Widen pc/saved_insn for kvm_sw_breakpoint > > > > accel/hvf: Widen pc/saved_insn for hvf_sw_breakpoint

Re: [PATCH v2] qcow2: keep reference on zeroize with discard-no-unref enabled

2023-09-25 Thread Jean-Louis Dupond
On 15/09/2023 13:21, Hanna Czenczek wrote: On 05.09.23 15:08, Jean-Louis Dupond wrote: When the discard-no-unref flag is enabled, we keep the reference for normal discard requests. But when a discard is executed on a snapshot/qcow2 image with backing, the discards are saved as zero clusters in

[PATCH] win32: avoid discarding the exception handler

2023-09-25 Thread marcandre . lureau
From: Marc-André Lureau In all likelihood, the compiler with lto doesn't see the function being used, from assembly macro __try1. Help it by marking the function has being used. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1904 Fixes: commit d89f30b4df ("win32: wrap socket close() with

[PATCH] target/arm/common-semi-target.h: Remove unnecessary boot.h include

2023-09-25 Thread Peter Maydell
The hw/arm/boot.h include in common-semi-target.h is not actually needed, and it's a bit odd because it pulls a hw/arm header into a target/arm file. This include was originally needed because the semihosting code used the arm_boot_info struct to get the base address of the RAM in system

Re: [PATCH] virtio: remove unnecessary thread fence while reading next descriptor

2023-09-25 Thread Ilya Maximets
On 8/25/23 19:01, Ilya Maximets wrote: > It was supposed to be a compiler barrier and it was a compiler barrier > initially called 'wmb' (??) when virtio core support was introduced. > Later all the instances of 'wmb' were switched to smp_wmb to fix memory > ordering issues on non-x86 platforms.

Re: [PATCH] virtio: use shadow_avail_idx while checking number of heads

2023-09-25 Thread Ilya Maximets
On 8/25/23 19:04, Ilya Maximets wrote: > We do not need the most up to date number of heads, we only want to > know if there is at least one. > > Use shadow variable as long as it is not equal to the last available > index checked. This avoids expensive qatomic dereference of the > RCU-protected

Re: [PATCH v2] virtio: don't zero out memory region cache for indirect descriptors

2023-09-25 Thread Ilya Maximets
On 8/11/23 16:34, Ilya Maximets wrote: > Lots of virtio functions that are on a hot path in data transmission > are initializing indirect descriptor cache at the point of stack > allocation. It's a 112 byte structure that is getting zeroed out on > each call adding unnecessary overhead. It's

Re: [PATCH v7 5/7] qapi: Add query-memory-devices support to hv-balloon

2023-09-25 Thread Markus Armbruster
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > Used by the driver to report its provided memory state information. > > Co-developed-by: David Hildenbrand > Signed-off-by: Maciej S. Szmigiero [...] > diff --git a/qapi/machine.json b/qapi/machine.json > index

[PATCH v2] target/riscv: pmp: Ignore writes when RW=01

2023-09-25 Thread Mayuresh Chitale
As per the Priv spec: "The R, W, and X fields form a collective WARL field for which the combinations with R=0 and W=1 are reserved." However currently such writes are not ignored as ought to be. The combinations with RW=01 are allowed only when the Smepmp extension is enabled and mseccfg.MML is

[PATCH] target/riscv: pmp: Clear pmp/smepmp bits on reset

2023-09-25 Thread Mayuresh Chitale
As per the Priv and Smepmp specifications, certain bits such as the 'L' bit of pmp entries and mseccfg.MML can only be cleared upon reset and it is necessary to do so to allow 'M' mode firmware to correctly reinitialize the pmp/smpemp state across reboots. Signed-off-by: Mayuresh Chitale ---

[PATCH] Add epmp to extensions list and rename it to smepmp

2023-09-25 Thread Mayuresh Chitale
From: Himanshu Chauhan Smepmp is a ratified extension which qemu refers to as epmp. Rename epmp to smepmp and add it to extension list so that it is added to the isa string. Signed-off-by: Himanshu Chauhan Signed-off-by: Mayuresh Chitale Reviewed-by: Daniel Henrique Barboza ---

Re: [PATCH v2 00/15] hw: Use QOM alias properties and few QOM/QDev cleanups

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 3/2/23 15:55, Philippe Mathieu-Daudé wrote: >> Since v1: >> - Addressed Markus & Zoltan review comments >> - Introduce/use qdev_unrealize_and_unref() >> These patches are extracted from a QOM/QDev refactor series, >> so they are preliminary cleanups noticed

[PATCH] target/arm/kvm64.c: Remove unused include

2023-09-25 Thread Peter Maydell
The include of hw/arm/virt.h in kvm64.c is unnecessary and also a layering violation since the generic KVM code shouldn't need to know anything about board-specifics. The include line is an accidental leftover from commit 15613357ba53a4763, where we cleaned up the code to not depend on virt board

Re: [PATCH v2 13/15] hw/qdev: Remove DEFINE_PROP_DMAADDR() and 'hw/qdev-dma.h'

2023-09-25 Thread Markus Armbruster
+David Markus Armbruster writes: > Philippe Mathieu-Daudé writes: > >> DEFINE_PROP_DMAADDR() is only used once. Since it doesn't >> add much value, simply remove it, along with the header >> defining it. >> >> Signed-off-by: Philippe Mathieu-Daudé > > DEFINE_PROP_DMAADDR() lets you wrap a

Re: [PATCH v2 13/15] hw/qdev: Remove DEFINE_PROP_DMAADDR() and 'hw/qdev-dma.h'

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > DEFINE_PROP_DMAADDR() is only used once. Since it doesn't > add much value, simply remove it, along with the header > defining it. > > Signed-off-by: Philippe Mathieu-Daudé DEFINE_PROP_DMAADDR() lets you wrap a property around a dma_addr_t member without

Re: [PATCH v2 12/15] hw/display/sm501: Unify common QOM properties

2023-09-25 Thread Markus Armbruster
BALATON Zoltan writes: > On Mon, 27 Feb 2023, Philippe Mathieu-Daudé wrote: >> On 3/2/23 15:55, Philippe Mathieu-Daudé wrote: >>> Since now PCI and SysBus properties are identical, unify them. >>> Suggested-by: BALATON Zoltan >>> Signed-off-by: Philippe Mathieu-Daudé >>> --- >>>

Re: [PATCH v2 11/15] hw/display/sm501: Alias 'dma-offset' QOM property in chipset object

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > No need to use an intermediate 'dma-offset' property in the > chipset object. Alias the property, so when the machine (here > r2d-plus) sets the value on the chipset, it is propagated to > the OHCI object. > > Note we can rename the chipset 'base' property as

Re: [PATCH v2 10/15] hw/display/sm501: Embed OHCI QOM child in chipset

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Note this device doesn't implement unrealize(). > > Signed-off-by: Philippe Mathieu-Daudé This has become commit 01c400ae435f911eaf575b016090922c074dc1e4.

Re: [PATCH v2 09/15] hw/usb/hcd-ohci: Include missing 'sysbus.h' header

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Avoid when including "hw/usb/hcd-ohci.h": > > hw/usb/hcd-ohci.h:100:5: error: unknown type name 'SysBusDevice' > SysBusDevice parent_obj; > ^ > > Reviewed-by: Markus Armbruster > Signed-off-by: Philippe Mathieu-Daudé This has become commit

Re: [PATCH v3 02/19] target/riscv: move riscv_cpu_realize_tcg() to TCG::cpu_realizefn()

2023-09-25 Thread Alistair Francis
On Mon, Sep 25, 2023 at 7:17 PM Daniel Henrique Barboza wrote: > > > > On 9/22/23 02:29, Alistair Francis wrote: > > On Wed, Sep 20, 2023 at 9:24 PM Daniel Henrique Barboza > > wrote: > >> > >> riscv_cpu_realize_tcg() was added to allow TCG cpus to have a different > >> realize() path during the

Re: [PATCH v2 04/15] hw/pci/pcie_sriov: Do not open-code qdev_unrealize_and_unref()

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > (See commits dc3edf8d8a "Convert to qdev_unrealize() manually" > and 981c3dcd94 "Convert to qdev_unrealize() with Coccinelle"). > > Reported-by: Markus Armbruster > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci/pcie_sriov.c | 5 ++--- > 1 file changed,

Re: [PATCH v2 03/15] linux-user/syscall: Do not open-code qdev_unrealize_and_unref()

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > (See commits dc3edf8d8a "Convert to qdev_unrealize() manually" > and 981c3dcd94 "Convert to qdev_unrealize() with Coccinelle"). > > Reported-by: Markus Armbruster > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster

Re: [PATCH v2 02/15] hw/qdev: Introduce qdev_unrealize_and_unref()

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Inspired-by: Markus Armbruster > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster

Re: [PATCH v2 01/15] hw/pci/pcie_sriov: Replace fprintf(error_pretty) -> warn_reportf_err()

2023-09-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci/pcie_sriov.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c > index f0bd72e069..93b0624599 100644 > --- a/hw/pci/pcie_sriov.c >

Re: [PATCH v9 00/12] Add VIRTIO sound card

2023-09-25 Thread Matias Ezequiel Vara Larsen
On Thu, Sep 14, 2023 at 12:24:13PM +0200, Stefano Garzarella wrote: > On Thu, Sep 14, 2023 at 01:02:05PM +0300, Manos Pitsidianakis wrote: > > On Thu, 14 Sep 2023 12:54, Stefano Garzarella wrote: > > > We are seeing something strange with the virtio-sound Linux driver. > > > It seems that the

Re: [PATCH] hw/scsi/scsi-disk: Disallow block sizes smaller than 512 [CVE-2023-42467]

2023-09-25 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-25 Thread Cédric Le Goater
On 9/25/23 09:54, Andrew Jeffery wrote: On Fri, 22 Sep 2023, at 22:51, Cédric Le Goater wrote: Joel, Andrew, On 5/25/19 17:12, Cédric Le Goater wrote: From: Joel Stanley The Linux kernel driver was updated in commit 4451d3f59f2a ("clocksource/drivers/fttmr010: Fix set_next_event handler)

[PATCH] hw/scsi/scsi-disk: Disallow block sizes smaller than 512 [CVE-2023-42467]

2023-09-25 Thread Thomas Huth
We are doing things like nb_sectors /= (s->qdev.blocksize / BDRV_SECTOR_SIZE); in the code here (e.g. in scsi_disk_emulate_mode_sense()), so if the blocksize is smaller than BDRV_SECTOR_SIZE (=512), this crashes with a division by 0 exception. Thus disallow block sizes of 256 bytes to avoid

Re: [PATCH v3 02/19] target/riscv: move riscv_cpu_realize_tcg() to TCG::cpu_realizefn()

2023-09-25 Thread Daniel Henrique Barboza
On 9/22/23 02:29, Alistair Francis wrote: On Wed, Sep 20, 2023 at 9:24 PM Daniel Henrique Barboza wrote: riscv_cpu_realize_tcg() was added to allow TCG cpus to have a different realize() path during the common riscv_cpu_realize(), making it a good choice to start moving TCG exclusive code

Re: [PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local

2023-09-25 Thread Daniel Henrique Barboza
CCing Markus since he might want to add these in his shadow-next tree. Daniel On 9/25/23 01:30, Alistair Francis wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7]

Re: [PATCH 4/4] softmmu/device_tree: Fixup local variables shadowing

2023-09-25 Thread Daniel Henrique Barboza
On 9/25/23 01:30, Alistair Francis wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes

Re: [PATCH 3/4] target/riscv: vector_helper: Fixup local variables shadowing

2023-09-25 Thread Daniel Henrique Barboza
On 9/25/23 01:30, Alistair Francis wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes

Re: [PATCH 2/4] target/riscv: cpu: Fixup local variables shadowing

2023-09-25 Thread Daniel Henrique Barboza
On 9/25/23 01:30, Alistair Francis wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes

Re: [PATCH 1/4] hw/riscv: opentitan: Fixup local variables shadowing

2023-09-25 Thread Daniel Henrique Barboza
On 9/25/23 01:30, Alistair Francis wrote: Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail on polling error". This patch removes

Re: [PATCH 01/13] ui/vnc: Require audiodev= to enable audio

2023-09-25 Thread Daniel P . Berrangé
On Sat, Sep 23, 2023 at 10:54:54AM +0200, Paolo Bonzini wrote: > From: Martin Kletzander > > Signed-off-by: Martin Kletzander > Message-ID: > > Signed-off-by: Paolo Bonzini > --- > docs/about/deprecated.rst | 8 +++- > docs/about/removed-features.rst | 6 ++ > ui/vnc.c

[PULL 7/7] tests/avocado: fix waiting for vm shutdown in replay_linux

2023-09-25 Thread Thomas Huth
From: Pavel Dovgalyuk This patch fixes the race condition in waiting for shutdown of the replay linux test. Signed-off-by: Pavel Dovgalyuk Suggested-by: John Snow Message-ID: <20230811070608.3383343-4-pavel.dovgal...@ispras.ru> Signed-off-by: Thomas Huth --- tests/avocado/replay_linux.py |

[PULL 6/7] hw/mips/jazz: Simplify the NIC setup code

2023-09-25 Thread Thomas Huth
The for-loop does not make much sense here - it is always left after the first iteration, so we can also check for nb_nics == 1 instead which is way easier to understand. Also, the checks for nd->model are superfluous since the code in mips_jazz_init_net() calls qemu_check_nic_model() that

[PULL 3/7] tests/qtest/m48t59-test: Silence compiler warning with -Wshadow

2023-09-25 Thread Thomas Huth
When compiling this file with -Wshadow=local , we get: ../tests/qtest/m48t59-test.c: In function ‘bcd_check_time’: ../tests/qtest/m48t59-test.c:195:17: warning: declaration of ‘s’ shadows a previous local [-Wshadow=local] 195 | long t, s; | ^

[PULL 1/7] meson.build: Make keyutils independent from keyring

2023-09-25 Thread Thomas Huth
Commit 0db0fbb5cf ("Add conditional dependency for libkeyutils") tried to provide a possibility for the user to disable keyutils if not required by makeing it depend on the keyring feature. This looked reasonable at a first glance (the unit test in tests/unit/ needs both), but the condition in

[PULL 0/7] qtest and misc patches

2023-09-25 Thread Thomas Huth
Hi Stefan! The following changes since commit b55e4b9c0525560577384adfc6d30eb0daa8d7be: Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu into staging (2023-09-21 09:32:47 -0400) are available in the Git repository at: https://gitlab.com/thuth/qemu.git

[PULL 4/7] tests/qtest/netdev-socket: Do not test multicast on Darwin

2023-09-25 Thread Thomas Huth
From: Philippe Mathieu-Daudé Do not run this test on Darwin, otherwise we get: qemu-system-arm: -netdev dgram,id=st0,remote.type=inet,remote.host=230.0.0.1,remote.port=1234: can't add socket to multicast group 230.0.0.1: Can't assign requested address Broken pipe

[PULL 5/7] hw/mips/jazz: Move the NIC init code into a separate function

2023-09-25 Thread Thomas Huth
The mips_jazz_init() function is already quite big, so moving away some code here can help to make it more understandable. Additionally, by moving this code into a separate function, the next patch (that will refactor the for-loop around the NIC init code) will be much shorter and easier to

[PULL 2/7] tests/qtest/netdev-socket: Raise connection timeout to 120 seconds

2023-09-25 Thread Thomas Huth
From: Stefan Hajnoczi The test still fails intermittently with a 60 second timeout in the GitLab CI environment. Raise the timeout to 120 seconds. 576/839 ERROR:../tests/qtest/netdev-socket.c:293:test_stream_unix: assertion failed (resp == expect): ("st0: index=0,type=stream,connection

Re: [PATCH 1/2] migration: Fix rdma migration failed

2023-09-25 Thread Zhijian Li (Fujitsu)
On 22/09/2023 23:42, Peter Xu wrote: > On Wed, Sep 20, 2023 at 05:04:11PM +0800, Li Zhijian wrote: >> From: Li Zhijian >> >> Destination will fail with: >> qemu-system-x86_64: rdma: Too many requests in this message >> (3638950032).Bailing. >> >> migrate with RDMA is different from tcp. RDMA

Re: [PATCH] hw/i386: changes towards enabling -Wshadow=local

2023-09-25 Thread Daniel P . Berrangé
On Sat, Sep 23, 2023 at 08:03:34AM +0530, Ani Sinha wrote: > Code changes that addresses all compiler complaints coming from enabling > -Wshadow flags. Enabling -Wshadow catches cases of local variables shadowing > other local variables or parameters. These makes the code confusing and/or > adds

Re: [PATCH] qemu-nbd: changes towards enabling -Wshadow=local

2023-09-25 Thread Daniel P . Berrangé
On Fri, Sep 22, 2023 at 03:50:20PM -0500, Eric Blake wrote: > Address all compiler complaints from -Wshadow in qemu-nbd. Several > instances of 'int ret' became shadows when commit 4fbec260 added 'ret' > at a higher scope in main. More interesting was the 'void *ret' > capturing the result of a

[PATCH] disas/m68k: clean up local variable shadowing

2023-09-25 Thread Laurent Vivier
Fix following warnings .../disas/m68k.c: In function ‘print_insn_arg’: .../disas/m68k.c:1635:13: warning: declaration of ‘val’ shadows a previous local [-Wshadow=compatible-local] 1635 | int val = fetch_arg (buffer, place, 5, info); | ^~~ .../disas/m68k.c:1093:7: note:

Re: [PATCH 00/52] migration/rdma: Error handling fixes

2023-09-25 Thread Zhijian Li (Fujitsu)
On 22/09/2023 23:21, Peter Xu wrote: > On Thu, Sep 21, 2023 at 08:27:24AM +, Zhijian Li (Fujitsu) wrote: >> I'm worried that I may not have enough time, ability, or environment to >> review/test >> the RDMA patches. but for this patch set, i will take a look later. > > That'll be helpful,

Re: [PATCH] MAINTAINERS: aspeed: Update Andrew's email address

2023-09-25 Thread Andrew Jeffery
On Mon, 25 Sep 2023, at 17:28, Cédric Le Goater wrote: > On 9/25/23 08:22, Andrew Jeffery wrote: >> I've changed employers, have company email that deals with patch-based >> workflows without too much of a headache, and am trying to steer some >> content out of my personal mail. >> >>

Re: [PATCH] MAINTAINERS: aspeed: Update Andrew's email address

2023-09-25 Thread Cédric Le Goater
On 9/25/23 08:22, Andrew Jeffery wrote: I've changed employers, have company email that deals with patch-based workflows without too much of a headache, and am trying to steer some content out of my personal mail. Signed-off-by: Andrew Jeffery --- Hi Cédric, do you mind including this in your

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-25 Thread Andrew Jeffery
On Fri, 22 Sep 2023, at 22:51, Cédric Le Goater wrote: > Joel, Andrew, > > On 5/25/19 17:12, Cédric Le Goater wrote: >> From: Joel Stanley >> >> The Linux kernel driver was updated in commit 4451d3f59f2a >> ("clocksource/drivers/fttmr010: Fix set_next_event handler) to fix an >> issue

Re: [PATCH] target/riscv: pmp: Ignore writes when RW=01

2023-09-25 Thread Mayuresh Chitale
On Mon, Sep 18, 2023 at 7:02 AM Alistair Francis wrote: > > On Thu, Sep 14, 2023 at 10:35 PM Mayuresh Chitale > wrote: > > > > As per the Priv spec: "The R, W, and X fields form a collective WARL > > field for which the combinations with R=0 and W=1 are reserved." > > However currently such

Re: [PATCH] target/riscv: pmp: Clear pmp/smepmp bits on reset

2023-09-25 Thread Mayuresh Chitale
On Tue, Sep 19, 2023 at 10:10 AM Alistair Francis wrote: > > On Thu, Sep 7, 2023 at 4:25 PM Mayuresh Chitale > wrote: > > > > As per the Priv and Smepmp specifications, certain bits such as the 'L' > > bit of pmp entries and mseccfg.MML can only be cleared upon reset and it > > is necessary to

Re: [PATCH v6 09/10] migration/yank: Keep track of registered yank instances

2023-09-25 Thread Lukas Straub
On Thu, 14 Sep 2023 10:57:47 -0400 Peter Xu wrote: > On Thu, Sep 14, 2023 at 10:23:38AM -0300, Fabiano Rosas wrote: > > Peter Xu writes: > > > > > On Wed, Sep 13, 2023 at 06:53:20PM -0300, Fabiano Rosas wrote: > > >> Peter Xu writes: > > >> > > >> > On Mon, Sep 11, 2023 at 02:13:19PM

Re: [PATCH 33/52] migration/rdma: Drop "@errp is clear" guards around error_setg()

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > These guards are all redundant now. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian > --- > migration/rdma.c | 164 +++ > 1 file changed, 51 insertions(+), 113 deletions(-) > >

Re: [PATCH 31/52] migration/rdma: Retire macro ERROR()

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > ERROR() has become "error_setg() unless an error has been set > already". Hiding the conditional in the macro is in the way of > further work. Replace the macro uses by their expansion, and delete > the macro. > > Signed-off-by: Markus

Re: [PATCH 32/52] migration/rdma: Fix error handling around rdma_getaddrinfo()

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_resolve_host() and qemu_rdma_dest_init() iterate over > addresses to find one that works, holding onto the first Error from > qemu_rdma_broken_ipv6_kernel() for use when no address works. Issues: > > 1. If @errp was _abort or _fatal,

Re: [PATCH 28/52] migration/rdma: Check negative error values the same way everywhere

2023-09-25 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> When a function returns 0 on success, negative value on error, >> checking for non-zero suffices, but checking for negative is clearer. >> So do that. >> > > This patch is no my favor convention. Certainly a

Re: [PATCH 26/52] migration/rdma: Replace int error_state by bool errored

2023-09-25 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> All we do with the value of RDMAContext member @error_state is test >> whether it's zero. Change to bool and rename to @errored. >> > > make sense! > > Reviewed-by: Li Zhijian > > Can we move this patch ahead

Re: [PATCH 21/52] migration/rdma: Fix QEMUFileHooks method return values

2023-09-25 Thread Zhijian Li (Fujitsu)
On 25/09/2023 14:36, Markus Armbruster wrote: > "Zhijian Li (Fujitsu)" writes: > >> On 18/09/2023 22:41, Markus Armbruster wrote: >>> The QEMUFileHooks methods don't come with a written contract. Digging >>> through the code calling them, we find: >>> >>> * save_page(): >> >> I'm fine with

Re: [PATCH 23/52] migration/rdma: Clean up qemu_rdma_wait_comp_channel()'s error value

2023-09-25 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> qemu_rdma_wait_comp_channel() returns 0 on success, and either -1 or >> rdma->error_state on failure. Callers actually expect a negative >> error value. > > I don't see the only one callers expect a negative

Re: [PATCH 21/52] migration/rdma: Fix QEMUFileHooks method return values

2023-09-25 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> The QEMUFileHooks methods don't come with a written contract. Digging >> through the code calling them, we find: >> >> * save_page(): > > I'm fine with this > >> >>Negative values RAM_SAVE_CONTROL_DELAYED

Re: [PATCH 30/52] migration/rdma: Delete inappropriate error_report() in macro ERROR()

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Functions that use an Error **errp parameter to return errors should > not also report them to the user, because reporting is the caller's > job. When the caller does, the error is reported twice. When it > doesn't (because it recovered from the

Re: [PATCH 29/52] migration/rdma: Plug a memory leak and improve a message

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > When migration capability @rdma-pin-all is true, but the server cannot > honor it, qemu_rdma_connect() calls macro ERROR(), then returns > success. > > ERROR() sets an error. Since qemu_rdma_connect() returns success, its > caller

Re: [PATCH 3/4] aspeed/i3c: Rename variable shadowing a local

2023-09-25 Thread Andrew Jeffery
On Sat, 23 Sep 2023, at 03:58, Philippe Mathieu-Daudé wrote: > On 22/9/23 17:59, Cédric Le Goater wrote: >> to fix warning : >> >>../hw/i3c/aspeed_i3c.c: In function ‘aspeed_i3c_realize’: >>../hw/i3c/aspeed_i3c.c:1959:17: warning: declaration of ‘dev’ shadows a >> parameter

Re: [PATCH 28/52] migration/rdma: Check negative error values the same way everywhere

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > When a function returns 0 on success, negative value on error, > checking for non-zero suffices, but checking for negative is clearer. > So do that. > This patch is no my favor convention. @Peter, Juan I'd like to hear your opinions. Thanks

[PATCH] MAINTAINERS: aspeed: Update Andrew's email address

2023-09-25 Thread Andrew Jeffery
I've changed employers, have company email that deals with patch-based workflows without too much of a headache, and am trying to steer some content out of my personal mail. Signed-off-by: Andrew Jeffery --- Hi Cédric, do you mind including this in your Aspeed queue? MAINTAINERS | 2 +- 1

Re: [PATCH 27/52] migration/rdma: Drop superfluous assignments to @ret

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian > --- > migration/rdma.c | 35 ++- > 1 file changed, 10 insertions(+), 25 deletions(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index

Re: [PATCH 26/52] migration/rdma: Replace int error_state by bool errored

2023-09-25 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > All we do with the value of RDMAContext member @error_state is test > whether it's zero. Change to bool and rename to @errored. > make sense! Reviewed-by: Li Zhijian Can we move this patch ahead "[PATCH 23/52] migration/rdma: Clean up

RE: [PATCH v2 0/4] Support dynamic MSI-X allocation

2023-09-25 Thread Liu, Jing2
Hi Alex, > On Sat, 9/23/2023 4:57AM, Alex Williamson wrote: > > On Mon, 18 Sep 2023 05:45:03 -0400 > Jing Liu wrote: > > > Changes since v1: > > - v1: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg982842.html > > - Revise Qemu to QEMU. (Cédric) > > - Add g_free when failure of

RE: [PATCH v2 2/4] vfio/pci: enable vector on dynamic MSI-X allocation

2023-09-25 Thread Liu, Jing2
Hi Alex, > On Sat, 9/23/2023 4:55 AM, Alex Williamson wrote: > On Mon, 18 Sep 2023 05:45:05 -0400 > Jing Liu wrote: > > > The vector_use callback is used to enable vector that is unmasked in > > guest. The kernel used to only support static MSI-X allocation. When > > allocating a new interrupt

[PATCH] hw/nvme: Clean up local variable shadowing in nvme_ns_init()

2023-09-25 Thread Klaus Jensen
NvmeLBAF *lbaf = _ns->lbaf[i]; --- base-commit: b55e4b9c0525560577384adfc6d30eb0daa8d7be change-id: 20230925-fix-local-shadowing-9606793e8ae9 Best regards, -- Klaus Jensen

<    1   2   3   4