[Stable-8.0.4 19/31] linux-user: Fix qemu brk() to not zero bytes on current page

2023-07-25 Thread Michael Tokarev
From: Helge Deller The qemu brk() implementation is too aggressive and cleans remaining bytes on the current page above the last brk address. But some existing applications are buggy and read/write bytes above their current heap address. On a phyiscal machine this does not trigger a runtime erro

[Stable-8.0.4 13/31] linux-user/syscall: Implement execve without execveat

2023-07-25 Thread Michael Tokarev
From: Pierrick Bouvier Support for execveat syscall was implemented in 55bbe4 and is available since QEMU 8.0.0. It relies on host execveat, which is widely available on most of Linux kernels today. However, this change breaks qemu-user self emulation, if "host" qemu version is less than 8.0.0.

[Stable-8.0.4 26/31] target/s390x: Make CKSM raise an exception if R2 is odd

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich R2 designates an even-odd register pair; the instruction should raise a specification exception when R2 is not even. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-

[Stable-8.0.4 09/31] target/s390x: Fix LRA overwriting the top 32 bits on DAT error

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich When a DAT error occurs, LRA is supposed to write the error information to the bottom 32 bits of R1, and leave the top 32 bits of R1 alone. Fix by passing the original value of R1 into helper and copying the top 32 bits to the return value. Fixes: d8fe4a9c284f ("target-s3

[Stable-8.0.4 14/31] tcg: Fix info_in_idx increment in layout_arg_by_ref

2023-07-25 Thread Michael Tokarev
From: Richard Henderson Off by one error, failing to take into account that layout_arg_1 already incremented info_in_idx for the first piece. We only need care for the n-1 TCG_CALL_ARG_BY_REF_N pieces here. Cc: qemu-sta...@nongnu.org Fixes: 313bdea84d2 ("tcg: Add TCG_CALL_{RET,ARG}_BY_REF") Res

[Stable-8.0.4 11/31] target/mips: enable GINVx support for I6400 and I6500

2023-07-25 Thread Michael Tokarev
From: Marcin Nowakowski GINVI and GINVT operations are supported on MIPS I6400 and I6500 cores, so indicate that properly in CP0.Config5 register bits [16:15]. Cc: qemu-sta...@nongnu.org Signed-off-by: Marcin Nowakowski Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230630072806.3093704-1-

Re: [PATCH] virtio: Fix packed virtqueue used_idx mask

2023-07-25 Thread German Maglione
On Fri, Jul 21, 2023 at 3:51 PM Hanna Czenczek wrote: > virtio_queue_packed_set_last_avail_idx() is used by vhost devices to set > the internal queue indices to what has been reported by the vhost > back-end through GET_VRING_BASE. For packed virtqueues, this > 32-bit value is expected to contai

[Stable-7.2.5 03/14] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-25 Thread Michael Tokarev
From: Helge Deller qemu-user crashes immediately when running static binaries on the armhf architecture. The problem is the memory layout where the executable is loaded before the interpreter library, in which case the reserved brk region clashes with the interpreter code and is released before q

Re: [Stable-8.0.4 00/31] Patch Round-up for stable 8.0.4, freeze on 2023-08-05

2023-07-25 Thread Michael Tokarev
25.07.2023 16:45, Michael Tokarev wrote: ... Also these 4 commits which I forgot to include: 32 c34ad459926f Thomas Huth: target/loongarch: Fix the CSRRD CPUID instruction on big endian hosts 33 206e91d14330 Viktor Prutyanov: virtio-pci: add handling of PCI ATS and Device-TLB enable/disabl

[Stable-7.2.5 09/14] target/s390x: Fix ICM with M3=0

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich When the mask is zero, access exceptions should still be recognized for 1 byte at the second-operand address. CC should be set to 0. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Reviewed-by: David Hildenbrand Reviewed-by: Richar

[Stable-7.2.5 02/14] ui/vnc-clipboard: fix infinite loop in inflate_buffer (CVE-2023-3255)

2023-07-25 Thread Michael Tokarev
From: Mauro Matteo Cascella A wrong exit condition may lead to an infinite loop when inflating a valid zlib buffer containing some extra bytes in the `inflate_buffer` function. The bug only occurs post-authentication. Return the buffer immediately if the end of the compressed data has been reache

[Stable-7.2.5 01/14] hw/ide/piix: properly initialize the BMIBA register

2023-07-25 Thread Michael Tokarev
From: Olaf Hering According to the 82371FB documentation (82371FB.pdf, 2.3.9. BMIBA-BUS MASTER INTERFACE BASE ADDRESS REGISTER, April 1997), the register is 32bit wide. To properly reset it to default values, all 32bit need to be cleared. Bit #0 "Resource Type Indicator (RTE)" needs to be enabled

[Stable-7.2.5 04/14] qemu-nbd: pass structure into nbd_client_thread instead of plain char*

2023-07-25 Thread Michael Tokarev
From: "Denis V. Lunev" We are going to pass additional flag inside next patch. Signed-off-by: Denis V. Lunev CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy CC: Message-ID: <20230717145544.194786-2-...@openvz.org> Reviewed-by: Eric Blake Signed-off-by: Eric Blake (cherry picked from commit

[Stable-7.2.5 07/14] target/s390x: Fix CLM with M3=0

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich When the mask is zero, access exceptions should still be recognized for 1 byte at the second-operand address. CC should be set to 0. Cc: qemu-sta...@nongnu.org Fixes: defb0e3157af ("s390x: Implement opcode helpers") Reviewed-by: David Hildenbrand Reviewed-by: Richard Hend

[Stable-7.2.5 05/14] qemu-nbd: fix regression with qemu-nbd --fork run over ssh

2023-07-25 Thread Michael Tokarev
From: "Denis V. Lunev" Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d Author: Hanna Reitz Date: Wed May 8 23:18:18 2019 +0200 qemu-nbd: Do not close stderr has introduced an interesting regression. Original behavior of ssh somehost qemu-nbd /home/den/tmp/file -f raw --fork wa

[Stable-7.2.5 10/14] target/s390x: Make MC raise specification exception when class >= 16

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich MC requires bit positions 8-11 (upper 4 bits of class) to be zeros, otherwise it must raise a specification exception. Cc: qemu-sta...@nongnu.org Fixes: 20d143e2cab8 ("s390x/tcg: Implement MONITOR CALL") Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Signe

[Stable-7.2.5 08/14] target/s390x: Fix CONVERT TO LOGICAL/FIXED with out-of-range inputs

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich CONVERT TO LOGICAL/FIXED deviate from IEEE 754 in that they raise an inexact exception on out-of-range inputs. float_flag_invalid_cvti aligns nicely with that behavior, so convert it to S390_IEEE_MASK_INEXACT. Cc: qemu-sta...@nongnu.org Fixes: defb0e3157af ("s390x: Impleme

[Stable-7.2.5 11/14] target/s390x: Fix assertion failure in VFMIN/VFMAX with type 13

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich Type 13 is reserved, so using it should result in specification exception. Due to an off-by-1 error the code triggers an assertion at a later point in time instead. Cc: qemu-sta...@nongnu.org Fixes: da4807527f3b ("s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)") Reviewed

[Stable-7.2.5 06/14] target/s390x: Make CKSM raise an exception if R2 is odd

2023-07-25 Thread Michael Tokarev
From: Ilya Leoshkevich R2 designates an even-odd register pair; the instruction should raise a specification exception when R2 is not even. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Signed-off-by: Ilya Leoshkevich Message-Id: <20230724082032.66864-

[Stable-7.2.5 14/14] virtio-net: pass Device-TLB enable/disable events to vhost

2023-07-25 Thread Michael Tokarev
From: Viktor Prutyanov If vhost is enabled for virtio-net, Device-TLB enable/disable events must be passed to vhost for proper IOMMU unmap flag selection. Signed-off-by: Viktor Prutyanov Acked-by: Jason Wang Message-Id: <20230626091258.24453-3-vik...@daynix.com> Reviewed-by: Michael S. Tsirkin

[Stable-7.2.5 12/14] target/loongarch: Fix the CSRRD CPUID instruction on big endian hosts

2023-07-25 Thread Michael Tokarev
From: Thomas Huth The test in tests/avocado/machine_loongarch.py is currently failing on big endian hosts like s390x. By comparing the traces between running the QEMU_EFI.fd bios on a s390x and on a x86 host, it's quickly obvious that the CSRRD instruction for the CPUID is behaving differently. A

[Stable-7.2.5 00/14] Patch Round-up for stable 7.2.5, freeze on 2023-08-05

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

[Stable-7.2.5 13/14] vhost: register and change IOMMU flag depending on Device-TLB state

2023-07-25 Thread Michael Tokarev
From: Viktor Prutyanov The guest can disable or never enable Device-TLB. In these cases, it can't be used even if enabled in QEMU. So, check Device-TLB state before registering IOMMU notifier and select unmap flag depending on that. Also, implement a way to change IOMMU notifier flag if Device-TL

[PATCH 3/7] iotests: string substitution order in _filter_img_create_filenames

2023-07-25 Thread Stefan Hajnoczi
_filter_img_create_filenames fails to remove $IMGPROTO: when $REMOTE_TEST_DIR matches. echo "$IMGPROTO:$REMOTE_TEST_DIR" | _filter_img_create_filenames results in "$IMGPROTO:TEST_DIR" instead of "TEST_DIR". Substitute "s#$REMOTE_TEST_DIR#TEST_DIR#g" after "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" since t

[PATCH 2/7] block/blkio: add "simple" creation support

2023-07-25 Thread Stefan Hajnoczi
Some block drivers do not support image creation. This is inconvenient for test cases, which usually want to create an image before testing various I/O requests. Use bdrv_co_create_opts_simple(), which initializes a pre-existing image instead of creating a new image, so that tests will be able to

[PATCH 0/7] iotests: add -io_uring support

2023-07-25 Thread Stefan Hajnoczi
Add support for block/blkio.c's "io_uring" block driver to qemu-iotests: $ (cd build && tests/qemu-iotests/check -io_uring) I took a look at supporting ./check -qcow2 -io_uring, but there are many failures related to test assumptions about image creation and QEMU command-line syntax. Only suppo

[PATCH 1/7] block/blkio: add io_uring: filename parsing

2023-07-25 Thread Stefan Hajnoczi
The qemu-iotests test suite requires filename parsing because it does not use image options syntax everywhere. Add it now so that later patches can enable qemu-iotests for the io_uring block driver. The blkio.c code has other libblkio-based drivers that could benefit from filename parsing too. Lea

[PATCH 5/7] iotests: add -io_uring support

2023-07-25 Thread Stefan Hajnoczi
The libblkio-based io_uring block driver currently has no test coverage. Running existing qemu-iotests with io_uring is possible with just a few tweaks. Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/033 | 1 + tests/qemu-iotests/check | 2 +- tests/qemu-iotests/common.rc | 12

[PATCH 7/7] iotests: add io_uring to supported protocols in 052

2023-07-25 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/052 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/052 b/tests/qemu-iotests/052 index 2f23ac9b65..42bf4c4aef 100755 --- a/tests/qemu-iotests/052 +++ b/tests/qemu-iotests/052 @@ -38,7 +38,7 @@ trap "_clea

[PATCH 6/7] iotests: add io_uring to supported protocols in 012

2023-07-25 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/012 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/012 b/tests/qemu-iotests/012 index 3a24d2ca8d..25dfc8ae12 100755 --- a/tests/qemu-iotests/012 +++ b/tests/qemu-iotests/012 @@ -40,7 +40,7 @@ trap "_clea

[PATCH 4/7] iotests: filter img create backing_file when IMGPROTO is modified

2023-07-25 Thread Stefan Hajnoczi
197 and 215 modify IMGPROTO, IMGFMT, etc temporarily while creating an additional image file after the main test image. The backing file name still has the old IMGPROTO, IMGFMT, etc. This means _filter_img_create will not filter the backing_file= output from qemu-img. Add a helper that filters bac

Re: [PATCH v4 01/12] Add virtio-sound device stub

2023-07-25 Thread Marc-André Lureau
On Thu, Jul 20, 2023 at 4:58 PM Emmanouil Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > Add a new VIRTIO device for the virtio sound device id. Functionality > will be added in the following commits. > > Signed-off-by: Emmanouil Pitsidianakis > --- > MAINTAINERS|

Re: [PATCH v1] block/stream:add flush l2_table_cache,ensure data integrity

2023-07-25 Thread Vladimir Sementsov-Ogievskiy
On 24.07.23 10:30, Evanzhang wrote: block_stream will not actively flush l2_table_cache,when qemu process exception exit,causing disk data loss Signed-off-by: Evanzhang --- block/stream.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/stream.c b/block/stream.c index e522bbd.

Re: [Stable-7.2.5 03/14] linux-user: Fix qemu-arm to run static armhf binaries

2023-07-25 Thread Michael Tokarev
25.07.2023 17:09, Michael Tokarev пишет: From: Helge Deller qemu-user crashes immediately when running static binaries on the armhf architecture. The problem is the memory layout where the executable is loaded before the interpreter library, in which case the reserved brk region clashes with th

Re: [PATCH v4 06/12] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request

2023-07-25 Thread Marc-André Lureau
On Thu, Jul 20, 2023 at 4:59 PM Emmanouil Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > Respond to the VIRTIO_SND_R_PCM_INFO control request with the parameters > of each requested PCM stream. > > Signed-off-by: Emmanouil Pitsidianakis > --- > hw/virtio/trace-events | 1 + > hw/virti

Re: [PATCH v4 06/12] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request

2023-07-25 Thread Marc-André Lureau
On Thu, Jul 20, 2023 at 4:59 PM Emmanouil Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > Respond to the VIRTIO_SND_R_PCM_INFO control request with the parameters > of each requested PCM stream. > > Signed-off-by: Emmanouil Pitsidianakis > --- > hw/virtio/trace-events | 1 + > hw/virti

Re: [PATCH v4 01/12] Add virtio-sound device stub

2023-07-25 Thread Marc-André Lureau
Hi On Thu, Jul 20, 2023 at 4:58 PM Emmanouil Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > Add a new VIRTIO device for the virtio sound device id. Functionality > will be added in the following commits. > > Signed-off-by: Emmanouil Pitsidianakis > --- > MAINTAINERS

Re: [PATCH v4 06/12] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 06:29:58PM +0400, Marc-André Lureau wrote: > > > On Thu, Jul 20, 2023 at 4:59 PM Emmanouil Pitsidianakis < > manos.pitsidiana...@linaro.org> wrote: > > Respond to the VIRTIO_SND_R_PCM_INFO control request with the parameters > of each requested PCM stream. > >

Re: [PULL 0/5] target-arm queue

2023-07-25 Thread Peter Maydell
https://github.com/alistair23/qemu into staging (2023-07-24 11:34:35 +0100) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20230725 > > for you to fetch changes up to 78cc90346ec680a7f1bb9f138bf7c9

Re: [PATCH v4 01/12] Add virtio-sound device stub

2023-07-25 Thread Michael S. Tsirkin
> +static uint64_t get_features(VirtIODevice *vdev, uint64_t features, > +                             Error **errp) > +{ > +    /* > +     * virtio-v1.2-csd01, 5.14.3, > +     * Feature Bits > +     * None currently defined. > +     */ > +    trace_virtio_snd_ge

Re: [PATCH] virtio: Fix packed virtqueue used_idx mask

2023-07-25 Thread German Maglione
On Fri, Jul 21, 2023 at 3:51 PM Hanna Czenczek wrote: > > virtio_queue_packed_set_last_avail_idx() is used by vhost devices to set > the internal queue indices to what has been reported by the vhost > back-end through GET_VRING_BASE. For packed virtqueues, this > 32-bit value is expected to conta

Re: [PATCH v4 06/12] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request

2023-07-25 Thread Marc-André Lureau
Hi On Tue, Jul 25, 2023 at 6:47 PM Michael S. Tsirkin wrote: > On Tue, Jul 25, 2023 at 06:29:58PM +0400, Marc-André Lureau wrote: > > > > > > On Thu, Jul 20, 2023 at 4:59 PM Emmanouil Pitsidianakis < > > manos.pitsidiana...@linaro.org> wrote: > > > > Respond to the VIRTIO_SND_R_PCM_INFO cont

[PULL 1/8] migration: spelling fixes

2023-07-25 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Fabiano Rosas --- migration/migration-stats.c | 2 +- migration/migration.h | 4 ++-- migration/multifd-zlib.c| 2 +- migration/multifd-zstd.c| 2 +- migration/multifd.c | 2 +- migration/savevm.c | 2 +- migration/trace-

[PULL 7/8] hw/pci: add comment to explain checking for available function 0 in pci hotplug

2023-07-25 Thread Michael Tokarev
From: Ani Sinha This change is cosmetic. A comment is added explaining why we need to check for the availability of function 0 when we hotplug a device. CC: m...@redhat.com CC: m...@tls.msk.ru Signed-off-by: Ani Sinha Signed-off-by: Michael Tokarev --- hw/pci/pci.c | 11 --- 1 file ch

[PULL 6/8] target/tricore: Rename tricore_feature

2023-07-25 Thread Michael Tokarev
From: Bastian Koppelmann this name is used by capstone and will lead to a build failure of QEMU, when capstone is enabled. So we rename it to tricore_has_feature(), to match has_feature() in translate.c. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1774 Signed-off-by: Bastian Koppelma

[PULL 2/8] s390x: spelling fixes

2023-07-25 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Thomas Huth --- hw/intc/s390_flic_kvm.c | 2 +- include/hw/s390x/s390-pci-bus.h | 2 +- include/hw/s390x/sclp.h | 2 +- target/s390x/cpu_features.c | 2 +- target/s390x/cpu_models.c| 2 +- target/s390x/tcg/fpu_helper.c

[PULL 3/8] arm: spelling fixes

2023-07-25 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Peter Maydell --- host/include/aarch64/host/cpuinfo.h | 2 +- hw/arm/aspeed.c | 2 +- hw/arm/mps2-tz.c | 2 +- hw/intc/arm_gic.c | 4 ++-- hw/intc/arm_gicv3_redist.c| 2 +- hw

[PULL 0/8] trivial-patches 25-07-2023

2023-07-25 Thread Michael Tokarev
The following changes since commit 3ee44ec72753ec0ff05ad1569dfa609203d722b2: Merge tag 'pull-request-2023-07-24' of https://gitlab.com/thuth/qemu into staging (2023-07-24 18:06:36 +0100) are available in the Git repository at: https://gitlab.com/mjt0k/qemu.git/ tags/pull-trivial-patches fo

[PULL 8/8] qapi: Correct "eg." to "e.g." in documentation

2023-07-25 Thread Michael Tokarev
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Michael Tokarev --- qapi/char.json | 2 +- qapi/misc.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qapi/char.json b/qapi/char.json index e413ac2b70..52aaff25eb 100644 --- a/qapi/char.json +++

[PULL 4/8] other architectures: spelling fixes

2023-07-25 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Peter Maydell --- host/include/generic/host/cpuinfo.h | 2 +- hw/m68k/next-cube.c | 2 +- hw/m68k/next-kbd.c | 2 +- hw/m68k/virt.c | 2 +- hw

[PULL 5/8] hw/9pfs: spelling fixes

2023-07-25 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Christian Schoenebeck --- hw/9pfs/9p-local.c | 8 hw/9pfs/9p-proxy.c | 2 +- hw/9pfs/9p-synth.c | 2 +- hw/9pfs/9p-util.h | 2 +- hw/9pfs/9p.c | 4 ++-- hw/9pfs/9p.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff

Re: [PATCH] hw/char/escc: Implement loopback mode

2023-07-25 Thread Philippe Mathieu-Daudé
On 16/7/23 17:35, Thomas Huth wrote: The firmware of the m68k next-cube machine uses the loopback mode for self-testing the hardware and currently fails during this step. By implementing the loopback mode, we can make the firmware pass to the next step. Signed-off-by: Thomas Huth --- hw/char/

[PULL 00/10] Misc fixes for 2023-07-25

2023-07-25 Thread Philippe Mathieu-Daudé
The following changes since commit 3ee44ec72753ec0ff05ad1569dfa609203d722b2: Merge tag 'pull-request-2023-07-24' of https://gitlab.com/thuth/qemu into staging (2023-07-24 18:06:36 +0100) are available in the Git repository at: https://github.com/philmd/qemu.git tags/misc-fixe

[PULL 05/10] target/mips/mxu: Avoid overrun in gen_mxu_S32SLT()

2023-07-25 Thread Philippe Mathieu-Daudé
Coverity reports a potential overrun (CID 1517769): Overrunning array "mxu_gpr" of 15 8-byte elements at element index 4294967295 (byte offset 34359738367) using index "XRb - 1U" (which evaluates to 4294967295). Use gen_load_mxu_gpr() to safely load MXU registers. Fixes: ff7936f009 ("targe

[PULL 01/10] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-25 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Since commit c0a55a0c9da2 "hw/sd/sdhci: Support big endian SD host controller interfaces" sdhci_common_realize() forces all SD card controllers to use either sdhci_mmio_le_ops or sdhci_mmio_be_ops, depending on the "endianness" property. However, there are device models whi

[PULL 02/10] hw/mips: Improve the default USB settings in the loongson3-virt machine

2023-07-25 Thread Philippe Mathieu-Daudé
From: Thomas Huth It's possible to compile QEMU without the USB devices (e.g. when using "--without-default-devices" as option for the "configure" script). To be still able to run the loongson3-virt machine in default mode with such a QEMU binary, we have to check here for the availability of the

[PULL 04/10] target/mips/mxu: Replace magic array size by its definition

2023-07-25 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230712060806.82323-2-phi...@linaro.org> --- target/mips/tcg/mxu_translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/tcg/mxu_translate.c b/target/mips/tcg/mxu_translate.c in

[PULL 03/10] hw/char/escc: Implement loopback mode

2023-07-25 Thread Philippe Mathieu-Daudé
From: Thomas Huth The firmware of the m68k next-cube machine uses the loopback mode for self-testing the hardware and currently fails during this step. By implementing the loopback mode, we can make the firmware pass to the next step. Signed-off-by: Thomas Huth Reviewed-by: Mark Cave-Ayland Re

[PULL 07/10] target/mips: Pass directory/leaf shift values to walk_directory()

2023-07-25 Thread Philippe Mathieu-Daudé
We already evaluated directory_shift and leaf_shift in page_table_walk_refill(), no need to do that again: pass as argument. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20230717213504.24777-2-phi...@linaro.org> --- target/mips/tcg/sysemu/tlb_helper.c | 18 +

[PULL 06/10] target/mips/mxu: Avoid overrun in gen_mxu_q8adde()

2023-07-25 Thread Philippe Mathieu-Daudé
Coverity reports a potential overruns (CID 1517770): Overrunning array "mxu_gpr" of 15 8-byte elements at element index 4294967295 (byte offset 34359738367) using index "XRb - 1U" (which evaluates to 4294967295). Add a gen_extract_mxu_gpr() helper similar to gen_load_mxu_gpr() to safely ext

[PULL 09/10] target/sparc: Handle FPRS correctly on big-endian hosts

2023-07-25 Thread Philippe Mathieu-Daudé
From: Peter Maydell In CPUSparcState we define the fprs field as uint64_t. However we then refer to it in translate.c via a TCGv_i32 which we set up with tcg_global_mem_new_ptr(). This means that on a big-endian host when the guest does something to writo te the FPRS register this value ends up

[PULL 08/10] target/mips: Avoid shift by negative number in page_table_walk_refill()

2023-07-25 Thread Philippe Mathieu-Daudé
From: Peter Maydell Coverity points out that in page_table_walk_refill() we can shift by a negative number, which is undefined behaviour (CID 1452918, 1452920, 1452922). We already catch the negative directory_shift and leaf_shift as being a "bail out early" case, but not until we've already use

[PULL 10/10] target/tricore: Rename tricore_feature

2023-07-25 Thread Philippe Mathieu-Daudé
From: Bastian Koppelmann this name is used by capstone and will lead to a build failure of QEMU, when capstone is enabled. So we rename it to tricore_has_feature(), to match has_feature() in translate.c. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1774 Signed-off-by: Bastian Koppelma

[RFC PATCH] arm/kvm: Enable support for KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE

2023-07-25 Thread Shameer Kolothum via
Now that we have Eager Page Split support added for ARM in the kernel[0], enable it in Qemu. This adds, -eager-split-size to Qemu options to set the eager page split chunk size. -enable KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE. The chunk size specifies how many pages to break at a time, using a single

Re: [PATCH v1] block/stream:add flush l2_table_cache,ensure data integrity

2023-07-25 Thread Denis V. Lunev
On 7/25/23 16:25, Vladimir Sementsov-Ogievskiy wrote: On 24.07.23 10:30, Evanzhang wrote: block_stream will not actively flush l2_table_cache,when qemu process exception exit,causing disk data loss Signed-off-by: Evanzhang ---   block/stream.c | 6 ++   1 file changed, 6 insertions(+) diff

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-07-25 Thread Ira Weiny
Fan Ni wrote: > On Thu, May 11, 2023 at 05:56:40PM +, Fan Ni wrote: > > FYI. > > I have updated the patch series and sent out again. > > I suggested anyone who are interested in DCD and using this patch series to > use the new series. Quite a few things has been fixed. > > https://lore.kern

Re: [PATCH] virtio: Fix packed virtqueue used_idx mask

2023-07-25 Thread Hanna Czenczek
On 25.07.23 16:04, German Maglione wrote: On Fri, Jul 21, 2023 at 3:51 PM Hanna Czenczek wrote: virtio_queue_packed_set_last_avail_idx() is used by vhost devices to set the internal queue indices to what has been reported by the vhost back-end through GET_VRING_BASE.  For pack

Re: [PATCH v21 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-07-25 Thread Nina Schoetterl-Glausch
On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: > On interception of STSI(15.1.x) the System Information Block > (SYSIB) is built from the list of pre-ordered topology entries. > > Signed-off-by: Pierre Morel > --- > MAINTAINERS | 1 + > qapi/machine-target.json

Re: [PATCH for-8.2 0/3] arm: Use correct number of MPU regions on mps2-tz boards

2023-07-25 Thread Peter Maydell
On Mon, 24 Jul 2023 at 18:43, Peter Maydell wrote: > > This patchseries resolves issue > https://gitlab.com/qemu-project/qemu/-/issues/1772 > which is a report that we don't implement the correct number of MPU > regions on our MPS2/MPS3 boards. Ideally guest software ought not to > care since (a)

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-25 Thread Peter Xu
On Tue, Jul 25, 2023 at 10:16:52AM +0100, Daniel P. Berrangé wrote: > On Mon, Jul 24, 2023 at 03:47:50PM -0400, Peter Xu wrote: > > On Mon, Jul 24, 2023 at 07:04:29PM +0100, Daniel P. Berrangé wrote: > > > On Mon, Jul 24, 2023 at 01:07:55PM -0400, Peter Xu wrote: > > > > Migration bandwidth is a ve

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 11:54:52AM -0400, Peter Xu wrote: > We can make the semantics specific, no strong opinion here. I wished it > can be as generic / easy as possible but maybe I went too far. > > Though, is there anything else we can choose from besides > "max-convergence-bandwidth"? Or am I

Re: [PATCH v4 06/12] virtio-sound: handle VIRTIO_SND_R_PCM_INFO request

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 06:54:56PM +0400, Marc-André Lureau wrote: > > Marc-André can you please stop with trying to use gmail web client? > > > Trying? I think I have almost exclusively used it over the past 15y or so :) >   Then find a way make it not wrap lines. The result of corrupted

Re:Re: [PATCH] Open file as read only on private mapping in qemu_ram_alloc_from_file

2023-07-25 Thread ThinerLogoer
At 2023-07-25 19:42:30, "David Hildenbrand" wrote: >Hi, > >patch subject should start with "softmmu/physmem: Open ..." Sorry I am newbie to the patch submission part. I will resubmit a version of patch if the final acceptable patch after discussion is mostly the same. (For example, if this pat

[PULL 1/2] crypto: Always initialize splitkeylen

2023-07-25 Thread Daniel P . Berrangé
From: Akihiko Odaki When _FORTIFY_SOURCE=2, glibc version is 2.35, and GCC version is 12.1.0, the compiler complains as follows: In file included from /usr/include/string.h:535, from /home/alarm/q/var/qemu/include/qemu/osdep.h:99, from ../crypto/block-luks.c:21:

[PULL 0/2] Misc next patches

2023-07-25 Thread Daniel P . Berrangé
The following changes since commit a279ca4ea07383314b2d2b2f1d550be9482f148e: Merge tag 'pull-target-arm-20230725' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-07-25 12:44:39 +0100) are available in the Git repository at: https://gitlab.com/berrange/qemu

[PULL 0/2] Misc next patches

2023-07-25 Thread Daniel P . Berrangé
The following changes since commit a279ca4ea07383314b2d2b2f1d550be9482f148e: Merge tag 'pull-target-arm-20230725' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-07-25 12:44:39 +0100) are available in the Git repository at: https://gitlab.com/berrange/qemu

[PULL 1/2] crypto: Always initialize splitkeylen

2023-07-25 Thread Daniel P . Berrangé
From: Akihiko Odaki When _FORTIFY_SOURCE=2, glibc version is 2.35, and GCC version is 12.1.0, the compiler complains as follows: In file included from /usr/include/string.h:535, from /home/alarm/q/var/qemu/include/qemu/osdep.h:99, from ../crypto/block-luks.c:21:

Re: [PATCH v2] kvm: Remove KVM_CREATE_IRQCHIP support assumption

2023-07-25 Thread Daniel Henrique Barboza
On 7/25/23 09:26, Andrew Jones wrote: Since Linux commit 00f918f61c56 ("RISC-V: KVM: Skeletal in-kernel AIA irqchip support") checking KVM_CAP_IRQCHIP returns non-zero when the RISC-V platform has AIA. The cap indicates KVM supports at least one of the following ioctls: KVM_CREATE_IRQCHIP

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-25 Thread Peter Xu
On Tue, Jul 25, 2023 at 05:09:57PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 25, 2023 at 11:54:52AM -0400, Peter Xu wrote: > > We can make the semantics specific, no strong opinion here. I wished it > > can be as generic / easy as possible but maybe I went too far. > > > > Though, is there a

Re: [PATCH v1] block/stream:add flush l2_table_cache,ensure data integrity

2023-07-25 Thread Vladimir Sementsov-Ogievskiy
On 25.07.23 18:13, Denis V. Lunev wrote: On 7/25/23 16:25, Vladimir Sementsov-Ogievskiy wrote: On 24.07.23 10:30, Evanzhang wrote: block_stream will not actively flush l2_table_cache,when qemu process exception exit,causing disk data loss Signed-off-by: Evanzhang ---   block/stream.c | 6

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-25 Thread Peter Xu
Hi, Markus, On Tue, Jul 25, 2023 at 01:10:01PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > Migration bandwidth is a very important value to live migration. It's > > because it's one of the major factors that we'll make decision on when to > > switchover to destination in a precopy

s390 intermittent test failure in qemu:block / io-qcow2-copy-before-write

2023-07-25 Thread Peter Maydell
There seems to be an intermittent failure on the s390 host in the qemu:block / io-qcow2-copy-before-write test: https://gitlab.com/qemu-project/qemu/-/jobs/4737819873 The log says the test was expecting to do some reading and writing but got an unexpected 'permission denied' error on the read. Any

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-07-25 Thread Fan Ni
On Tue, Jul 25, 2023 at 08:18:08AM -0700, Ira Weiny wrote: > Fan Ni wrote: > > On Thu, May 11, 2023 at 05:56:40PM +, Fan Ni wrote: > > > > FYI. > > > > I have updated the patch series and sent out again. > > > > I suggested anyone who are interested in DCD and using this patch series to > >

Re: [PATCH 01/10] hw/arm/virt-acpi-build.c: Move fw_cfg and virtio to common location

2023-07-25 Thread Sunil V L
On Mon, Jul 24, 2023 at 05:18:59PM +0200, Igor Mammedov wrote: > On Wed, 12 Jul 2023 22:09:34 +0530 > Sunil V L wrote: > > > The functions which add fw_cfg and virtio to DSDT are same for ARM > > and RISC-V. So, instead of duplicating in RISC-V, move them from > > hw/arm/virt-acpi-build.c to comm

Re: [PATCH] migrate/multifd: fix coredump when the multifd thread cleanup

2023-07-25 Thread Peter Xu
On Tue, Jul 25, 2023 at 04:43:28PM +0800, chenyuhui (A) wrote: > @Peter Xu @Fabiano Rosas > Kindly ping on this. Ah I see what's missing - please copy maintainer (Juan) for any migration patches, especially multifd ones.. I'm doing that for this one, but I'd suggest you repost with a whole patch

Re: [PATCH] migration: Allow user to specify migration available bandwidth

2023-07-25 Thread Daniel P . Berrangé
On Tue, Jul 25, 2023 at 12:38:23PM -0400, Peter Xu wrote: > I see you used "convergance" explicitly even after PeterM's reply, is that > what you prefer over "convergence"? I do see more occurances of > "convergence" as a word in migration context, though. Ignore my speling erors :-) >

avocado test failing INTERRUPTED for "Missing asset"

2023-07-25 Thread Peter Maydell
Currently this CI job is failing: https://gitlab.com/qemu-project/qemu/-/jobs/4737819946 because: (05/59) tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_exynos4210_initrd: INTERRUPTED: Missing asset https://snapshot.debian.org/archive/debian/20190928T224601Z/pool/main/l/linux/lin

[PATCH v4] block-jobs: flush target at the end of .run()

2023-07-25 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Actually block job is not completed without this final flush. It's rather unexpected to have broken target when job was successfully completed long ago and now we fail to flush or process just crashed/killed. Signed-off-by: Vladimir Sementsov-Ogievskiy --- bl

[PATCH] softmmu/vl: improve select_machine() function

2023-07-25 Thread Vladimir Sementsov-Ogievskiy
- put machine name into error message (helps debugging CI) - fix style (over-80 lines) - use g_autoptr - drop extra error propagation Signed-off-by: Vladimir Sementsov-Ogievskiy --- softmmu/vl.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/softmmu/vl.c

[PATCH v2 3/6] python/console_socket: accept existing FD in initializer

2023-07-25 Thread John Snow
Useful if we want to use ConsoleSocket() for a socket created by socketpair(). Signed-off-by: John Snow --- python/qemu/machine/console_socket.py | 29 +++ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/python/qemu/machine/console_socket.py b/python/qemu/

[PATCH v2 1/6] python/machine: move socket setup out of _base_args property

2023-07-25 Thread John Snow
This property isn't meant to do much else besides return a list of strings, so move this setup back out into _pre_launch(). Signed-off-by: John Snow --- python/qemu/machine/machine.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/qemu/machine/machine.py b/python

[PATCH v2 5/6] python/machine: use socketpair() for qtest connection

2023-07-25 Thread John Snow
Like the QMP and console sockets, begin using socketpairs for the qtest connection, too. After this patch, we'll be able to remove the vestigial sock_dir argument, but that cleanup is best done in its own patch. Signed-off-by: John Snow --- python/qemu/machine/qtest.py | 49 +

[PATCH v2 2/6] python/machine: close sock_pair in cleanup path

2023-07-25 Thread John Snow
If everything has gone smoothly, we'll already have closed the socket we gave to the child during post_launch. The other half of the pair that we gave to the QMP connection should, likewise, be definitively closed by now. However, in the cleanup path, it's possible we've created the socketpair but

[PATCH v2 4/6] python/machine: use socketpair() for console connections

2023-07-25 Thread John Snow
Create a socketpair for the console output. This should help eliminate race conditions around console text early in the boot process that might otherwise have been dropped on the floor before being able to connect to QEMU under "server,nowait". Signed-off-by: John Snow --- python/qemu/machine/ma

[PATCH v2 6/6] python/machine: remove unused sock_dir argument

2023-07-25 Thread John Snow
By using a socketpair for all of the sockets managed by the VM class and its extensions, we don't need the sock_dir argument anymore, so remove it. We only added this argument so that we could specify a second, shorter temporary directory for cases where the temp/log dirs were "too long" as a sock

[PATCH v2 0/6] python/machine: use socketpair() for console socket

2023-07-25 Thread John Snow
Like we did for the QMP socket, use socketpair() for the console socket so that hopefully there isn't a race condition during early boot where data might get dropped on the floor. May or may not help with various race conditions where early console output is not showing up in the logs and/or poten

Re: [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️)

2023-07-25 Thread Maciej S. Szmigiero
On 24.07.2023 16:42, David Hildenbrand wrote: On 20.07.23 12:12, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" This is a continuation of the v5 of the patch series located here: https://lore.kernel.org/qemu-devel/cover.1686577753.git.maciej.szmigi...@oracle.com/ We're now in QEMU s

Re: [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon 🎈️)

2023-07-25 Thread David Hildenbrand
That commit would be called something like "pc: Support hv-balloon". If I remove the driver from Kconfig in the initial patch then AFAIK this initial patch will add a dead driver file that it is not possible to build yet, right? Yes, that's also what we did for virtio-mem: (bottom to top) 0e

Re: [PATCH v6 5/6] qapi: Add HV_BALLOON_STATUS_REPORT event

2023-07-25 Thread Maciej S. Szmigiero
On 25.07.2023 10:04, Markus Armbruster wrote: "Maciej S. Szmigiero" writes: From: "Maciej S. Szmigiero" Used by the hv-balloon driver for (optional) guest memory status reports. Inhowfar optional? What enables / triggers it? They are enabled by "status-report=on" device property, hence t

Re: [PATCH v6 4/6] qapi: Add HvBalloonDeviceInfo sub-type to MemoryDeviceInfo

2023-07-25 Thread Maciej S. Szmigiero
On 25.07.2023 10:25, Markus Armbruster wrote: "Maciej S. Szmigiero" writes: From: "Maciej S. Szmigiero" Used by the hv-balloon driver to report its provided memory state information. Co-developed-by: David Hildenbrand Signed-off-by: Maciej S. Szmigiero --- hw/core/machine-hmp-cmds.c | 1

<    1   2   3   >