[Stable-8.0.1 v3 00/59] Patch Round-up for stable 8.0.1, frozen on 2023-05-27

2023-05-27 Thread Michael Tokarev
The following patches are queued for QEMU stable v8.0.1: https://gitlab.com/qemu-project/qemu/-/commits/staging-8.0 Patch freeze is 2023-05-27, and the release is planned for 2023-05-29: https://wiki.qemu.org/Planning/8.0 Please respond here or CC qemu-sta...@nongnu.org on any additional pa

[Stable-8.0.1 70/73] usb/ohci: Set pad to 0 after frame update

2023-05-27 Thread Michael Tokarev
From: Paolo Bonzini When the OHCI controller's framenumber is incremented, HccaPad1 register should be set to zero (Ref OHCI Spec 4.4) ReactOS uses hccaPad1 to determine if the OHCI hardware is running, consequently it fails this check in current qemu master. Signed-off-by: Ryan Wendland Resol

[Stable-8.0.1 60/73] e1000e: Fix tx/rx counters

2023-05-27 Thread Michael Tokarev
From: "timothee.coca...@gmail.com" The bytes and packets counter registers are cleared on read. Copying the "total counter" registers to the "good counter" registers has side effects. If the "total" register is never read by the OS, it only gets incremented. This leads to exponential growth of t

[Stable-8.0.1 73/73] virtio: qmp: fix memory leak

2023-05-27 Thread Michael Tokarev
From: Paolo Bonzini The VirtioInfoList is already allocated by QAPI_LIST_PREPEND and need not be allocated by the caller. Fixes Coverity CID 1508724. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini (cherry picked from commit 0bfd14149b248e8097ea4da1f9d53beb5c5b0cca) Signed-off-by

[Stable-8.0.1 63/73] igb: Do not require CTRL.VME for tx VLAN tagging

2023-05-27 Thread Michael Tokarev
From: Akihiko Odaki While the datasheet of e1000e says it checks CTRL.VME for tx VLAN tagging, igb's datasheet has no such statements. It also says for "CTRL.VLE": > This register only affects the VLAN Strip in Rx it does not have any > influence in the Tx path in the 82576. (Appendix A. Changes

[Stable-8.0.1 72/73] machine: do not crash if default RAM backend name has been stolen

2023-05-27 Thread Michael Tokarev
From: Igor Mammedov QEMU aborts when default RAM backend should be used (i.e. no explicit '-machine memory-backend=' specified) but user has created an object which 'id' equals to default RAM backend name used by board. $QEMU -machine pc \ -object memory-backend-ram,id=pc.ram,size=429496

[Stable-8.0.1 64/73] igb: Clear IMS bits when committing ICR access

2023-05-27 Thread Michael Tokarev
From: Akihiko Odaki The datasheet says contradicting statements regarding ICR accesses so it is not reliable to determine the behavior of ICR accesses. However, e1000e does clear IMS bits when reading ICR accesses and Linux also expects ICR accesses will clear IMS bits according to: https://git.k

[Stable-8.0.1 66/73] e1000e: Always copy ethernet header

2023-05-27 Thread Michael Tokarev
From: Akihiko Odaki e1000e_receive_internal() used to check the iov length to determine copy the iovs to a contiguous buffer, but the check is flawed in two ways: - It does not ensure that iovcnt > 0. - It does not take virtio-net header into consideration. The size of this copy is just 18 octet

[Stable-8.0.1 61/73] e1000x: Fix BPRC and MPRC

2023-05-27 Thread Michael Tokarev
From: Akihiko Odaki Before this change, e1000 and the common code updated BPRC and MPRC depending on the matched filter, but e1000e and igb decided to update those counters by deriving the packet type independently. This inconsistency caused a multicast packet to be counted twice. Updating BPRC

Re: [PATCH v1 1/1] hw/pci: Disable PCI_ERR_UNCOR_MASK register for machine type < 8.0

2023-05-27 Thread Michael S. Tsirkin
On Fri, May 26, 2023 at 09:55:22AM +0200, Juan Quintela wrote: > Jiri Denemark wrote: > > On Thu, May 11, 2023 at 13:43:47 +0200, Juan Quintela wrote: > >> "Michael S. Tsirkin" wrote: > >> > >> [Added libvirt people to the party, see the end of the message ] > > > > Sorry, I'm not that much into

Re: [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too

2023-05-27 Thread Paolo Bonzini
Il sab 27 mag 2023, 18:49 BALATON Zoltan ha scritto: > On Sat, 27 May 2023, Paolo Bonzini wrote: > > The behavior of --{enable,disable}-pypi is similar to that of > > -Dwrapmode={default,nodownload} respectively. In particular, > > in both cases a feature needs to be explicitly enabled for the >

Re: [PATCH v3 0/9] target/ppc: Assorted ppc target fixes

2023-05-27 Thread Daniel Henrique Barboza
On 5/15/23 06:26, Nicholas Piggin wrote: Hopefully these are getting close to ready now. There is still the question about doing better with adding test cases for all this, I haven't exactly got a good answer yet but I do have kvm-unit-tests for most at least. Patches 1 and 4 queued to ppc-n

Re: [PATCH] target/ppc: Use SMT4 small core chip type in POWER9/10 PVRs

2023-05-27 Thread Daniel Henrique Barboza
On 5/15/23 13:01, Nicholas Piggin wrote: QEMU's PVR value for POWER9 DD2.0 has chip type 1, which is the SMT4 "small core" type that OpenPOWER processors use. QEMU's PVR for all other POWER9/10 have chip type 0, which "enterprise" systems use. The difference does not really matter to QEMU (be

Re: [PATCH] pnv_lpc: disable reentrancy detection for lpc-hc

2023-05-27 Thread Daniel Henrique Barboza
On 5/26/23 04:38, Cédric Le Goater wrote: From: Alexander Bulekov As lpc-hc is designed for re-entrant calls from xscom, mark it re-entrancy safe. Reported-by: Thomas Huth Signed-off-by: Alexander Bulekov [clg: mark opb_master_regs as re-entrancy safe also ] Signed-off-by: Cédric Le Goate

Re: [PATCH 3/5] hw/ppc/prep: Fix wiring of PIC -> CPU interrupt

2023-05-27 Thread Daniel Henrique Barboza
On 3/4/23 08:40, Bernhard Beschow wrote: Commit cef2e7148e32 ("hw/isa/i82378: Remove intermediate IRQ forwarder") passes s->cpu_intr to i8259_init() in i82378_realize() directly. However, s- cpu_intr isn't initialized yet since that happens after the south bridge's pci_realize_and_unref() in

Re: [PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too

2023-05-27 Thread BALATON Zoltan
On Sat, 27 May 2023, Paolo Bonzini wrote: The behavior of --{enable,disable}-pypi is similar to that of -Dwrapmode={default,nodownload} respectively. In particular, in both cases a feature needs to be explicitly enabled for the dependency to be downloaded. So, use a single option to control bot

Re: [PULL 04/12] configure: unset harmful environment variables

2023-05-27 Thread Michael Tokarev
26.05.2023 19:08, Paolo Bonzini wrote: .. # Unset some variables known to interfere with behavior of common tools, -# just as autoconf does. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS +# just as autoconf does. Unlike autoconf, we assume that unset exists. +unset CLICOLOR

[PATCH 4/4] target/arm: Use float64_to_int32_modulo for FJCVTZS

2023-05-27 Thread Richard Henderson
The standard floating point results are provided by the generic routine. We only need handle the extra Z flag result afterward. Signed-off-by: Richard Henderson --- target/arm/vfp_helper.c | 71 +++-- 1 file changed, 12 insertions(+), 59 deletions(-) diff --g

[PATCH 2/4] tests/tcg/alpha: Add test for cvttq

2023-05-27 Thread Richard Henderson
Test for invalid, integer overflow, and inexact. Test for proper result, modulo 2**64. Signed-off-by: Richard Henderson --- tests/tcg/alpha/test-cvttq.c| 78 + tests/tcg/alpha/Makefile.target | 2 +- 2 files changed, 79 insertions(+), 1 deletion(-) create mo

[PATCH 0/4] fpu: Add float64_to_int{32,64}_modulo

2023-05-27 Thread Richard Henderson
Extract some common code from Alpha and Arm, and which will shortly also be required by the RISC-V Zfa extension. Added a new test for Alpha; I already had a RISU test for Arm. r~ Richard Henderson (4): fpu: Add float64_to_int{32,64}_modulo tests/tcg/alpha: Add test for cvttq target/alpha

[PATCH 1/4] fpu: Add float64_to_int{32,64}_modulo

2023-05-27 Thread Richard Henderson
Add versions of float64_to_int* which do not saturate the result. Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 3 ++ fpu/softfloat.c | 31 fpu/softfloat-parts.c.inc | 78 +++ 3 files changed, 112 insertions(+) d

[PATCH 3/4] target/alpha: Use float64_to_int64_modulo for CVTTQ

2023-05-27 Thread Richard Henderson
For the most part we can use the new generic routine, though exceptions need some post-processing to sort invalid from integer overflow. Signed-off-by: Richard Henderson --- target/alpha/fpu_helper.c | 85 +-- 1 file changed, 18 insertions(+), 67 deletions(-)

Re: [PATCH v4] spapr: Add SPAPR_CAP_AIL_MODE_3 for AIL mode 3 support for H_SET_MODE hcall

2023-05-27 Thread Daniel Henrique Barboza
On 5/15/23 13:02, Nicholas Piggin wrote: The behaviour of the Address Translation Mode on Interrupt resource is not consistently supported by all CPU versions or all KVM versions: KVM HV does not support mode 2, and does not support mode 3 on POWER7 or early POWER9 processesors. KVM PR only su

Re: [PULL 08/12] virtio: qmp: fix memory leak

2023-05-27 Thread Michael Tokarev
26.05.2023 19:08, Paolo Bonzini wrote: The VirtioInfoList is already allocated by QAPI_LIST_PREPEND and need not be allocated by the caller. Fixes Coverity CID 1508724. Not sure it is worth the effort but it seems this is a stable-8.0 material, no? Thanks, /mjt

[PATCH 4/5] configure: check for SLOF submodule before building pc-bios/s390-ccw

2023-05-27 Thread Paolo Bonzini
SLOF is required for building the s390-ccw firmware on s390x, since it is using the libnet code from SLOF for network booting. If SLOF is absent and submodules are not updated, pc-bios/s390-ccw cannot be built. Signed-off-by: Paolo Bonzini --- configure | 3 ++- 1 file changed, 2 insertions(+),

[PATCH 5/5] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps

2023-05-27 Thread Paolo Bonzini
Unlike other subprojects, these require an overlay directory to include meson rules to build the libraries. The rules are basically lifted from tests/fp/meson.build, with a few changes to create platform.h and publish a dependency. The build defines are passed through a subproject option, and pos

[PATCH 3/5] meson: subprojects: replace submodules with wrap files

2023-05-27 Thread Paolo Bonzini
Compared to submodules, .wrap files have several advantages: * option parsing and downloading is delegated to meson * the commit is stored in a text file instead of a magic entry in the git tree object * we could stop shipping external dependencies that are only used as a fallback, but not b

[PATCH 2/5] configure: rename --enable-pypi to --enable-download, control subprojects too

2023-05-27 Thread Paolo Bonzini
The behavior of --{enable,disable}-pypi is similar to that of -Dwrapmode={default,nodownload} respectively. In particular, in both cases a feature needs to be explicitly enabled for the dependency to be downloaded. So, use a single option to control both cases. Now, --enable-slirp will trigger c

[PATCH 1/5] configure: remove --with-git= option

2023-05-27 Thread Paolo Bonzini
There is not really any scenario where one would use any other git binary than "the first git in the PATH" aka $(command -v git). In fact for example "meson subprojects download" or scripts/checkpatch.pl do not obey the GIT environment variable. Remove the unnecessary knob, but test for the prese

[PATCH 0/5] meson: replace submodules with wrap files

2023-05-27 Thread Paolo Bonzini
This series replaces git submodules for bundled libraries with .wrap files that can be used directly by meson for subprojects. These have several advantages, either immediate or potential: * option parsing and downloading is delegated to meson * the commit is stored in a text file instead of a m

Re: [PATCH] hw/sd/sdhci: reset data count in sdhci_buff_access_is_sequential()

2023-05-27 Thread Michael Tokarev
Mon, 7 Nov 2022 11:35:10 +0100, you wrote: > Make sure to reset data_count if it's equal to (or exceeds) block_size. > This prevents an off-by-one read / write when accessing s->fifo_buffer > in sdhci_read_dataport / sdhci_write_dataport, both called right after > sdhci_buff_access_is_sequential.

Re: The madness of ad hoc special IDs

2023-05-27 Thread Markus Armbruster
Markus Armbruster writes: > Thomas Huth writes: > >> On 23/05/2023 14.31, Markus Armbruster wrote: >> ... >>> To stop creating more moles, we need to reserve IDs for the system's >>> use, and let the system pick only reserved IDs going forward. >> >> Just something to add here: We already have a

Re: The madness of ad hoc special IDs

2023-05-27 Thread Markus Armbruster
Igor Mammedov writes: > On Tue, 23 May 2023 14:31:30 +0200 > Markus Armbruster wrote: > >> Igor Mammedov writes: >> >> > QEMU aborts when default RAM backend should be used (i.e. no >> > explicit '-machine memory-backend=' specified) but user >> > has created an object which 'id' equals to def

Re: The madness of ad hoc special IDs

2023-05-27 Thread Markus Armbruster
Thomas Huth writes: > On 23/05/2023 14.31, Markus Armbruster wrote: > ... >> To stop creating more moles, we need to reserve IDs for the system's >> use, and let the system pick only reserved IDs going forward. > > Just something to add here: We already have a function for generating > internal I

Re: [PATCH] [query-memory-size-summary] Report page size

2023-05-27 Thread Markus Armbruster
One more thing: the convention for patch subjects is subsystem: purpose Suggest qmp: Report page size in query-memory-size-summary