Re: [PATCH v3 3/3] migration/doc: We broke backwards compatibility

2023-05-17 Thread Fiona Ebner
Am 15.05.23 um 10:32 schrieb Juan Quintela: > When we detect that we have broken backwards compantibility in a compatibility (...) > + > +In qemu-8.0 we got this commit: :: > + > +commit 9a6ef182c03eaa138bae553f0fbb5a123bef9a53 > +Author: Jonathan Cameron > +Date: Thu Mar 2

Re: [PATCH v3 1/1] block/blkio: use qemu_open() to support fd passing for virtio-blk

2023-05-17 Thread Stefano Garzarella
CCing Markus for some advice. On Tue, May 16, 2023 at 11:04:21AM -0500, Jonathon Jongsma wrote: On 5/15/23 5:10 AM, Stefano Garzarella wrote: On Thu, May 11, 2023 at 11:03:22AM -0500, Jonathon Jongsma wrote: On 5/11/23 4:15 AM, Stefano Garzarella wrote: The virtio-blk-vhost-vdpa driver in

Re: [PATCH v4 05/10] hw/arm/smmuv3: Parse STE config for stage-2

2023-05-17 Thread Eric Auger
Hi Mostafa, On 5/16/23 22:33, Mostafa Saleh wrote: > Parse stage-2 configuration from STE and populate it in SMMUS2Cfg. > Validity of field values are checked when possible. > > Only AA64 tables are supported and Small Translation Tables (STT) are > not supported. > > According to SMMUv3

[PATCH 2/2] softmmu: Move ioport.c into the target-independent source set

2023-05-17 Thread Thomas Huth
Now that the st*_p and ld*_p functions can be used from common code, too, we can move ioport.c from specific_ss into softmmu_ss to avoid that we have to compile it multiple times. Signed-off-by: Thomas Huth --- softmmu/ioport.c| 2 +- softmmu/meson.build | 2 +- 2 files changed, 2

[PATCH 0/2] Make ioport.c target-independent

2023-05-17 Thread Thomas Huth
Assuming that the code in ioport.c is not too performance critical, we can move this to the target-independent source set after reworking the ld*_p and st*_p helper functions a little bit. This way, ioport.c has only to be compiled once and not multiple times anymore (one time for each target),

[PATCH 1/2] include/exec: Make ld*_p and st*_p functions available for generic code, too

2023-05-17 Thread Thomas Huth
This will allow to move more code into the target independent source set. Signed-off-by: Thomas Huth --- include/exec/cpu-all.h | 25 include/exec/tswap.h | 66 ++ 2 files changed, 66 insertions(+), 25 deletions(-) diff --git

Re: [PATCH] hw/riscv/virt: Fix the boot logic if pflash0 is specified

2023-05-17 Thread Li, Yong
On 2023/5/17 10:27, Alistair Francis wrote: On Sun, Apr 23, 2023 at 11:39 PM Yong Li wrote: The firmware may be specified with -bios and the plfash0 device with option -drive if=pflash. If both options are applied, it is intented that the pflash0 will store the secure variable and the firmware

[PATCH v8.0.1 19/36] softfloat: Fix the incorrect computation in float32_exp2

2023-05-17 Thread Michael Tokarev
From: Shivaprasad G Bhat The float32_exp2 function is computing wrong exponent of 2. For example, with the following set of values {0.1, 2.0, 2.0, -1.0}, the expected output would be {1.071773, 4.00, 4.00, 0.50}. Instead, the function is computing {1.119102, 3.382044, 3.382044,

[PATCH v8.0.1 02/36] target/i386: Change wrong XFRM value in SGX CPUID leaf

2023-05-17 Thread Michael Tokarev
From: Yang Zhong The previous patch wrongly replaced FEAT_XSAVE_XCR0_{LO|HI} with FEAT_XSAVE_XSS_{LO|HI} in CPUID(EAX=12,ECX=1):{ECX,EDX}. As a result, SGX enclaves only supported SSE and x87 feature (xfrm=0x3). Fixes: 301e90675c3f ("target/i386: Enable support for XSAVES based features")

[PATCH v8.0.1 01/36] vnc: avoid underflow when accessing user-provided address

2023-05-17 Thread Michael Tokarev
From: Paolo Bonzini If hostlen is zero, there is a possibility that addrstr[hostlen - 1] underflows and, if a closing bracked is there, hostlen - 2 is passed to g_strndup() on the next line. If websocket==false then addrstr[0] would be a colon, but if websocket==true this could in principle

[PATCH v8.0.1 06/36] block/monitor: Fix crash when executing HMP commit

2023-05-17 Thread Michael Tokarev
From: Wang Liang hmp_commit() calls blk_is_available() from a non-coroutine context (and in the main loop). blk_is_available() is a co_wrapper_mixed_bdrv_rdlock function, and in the non-coroutine context it calls AIO_WAIT_WHILE(), which crashes if the aio_context lock is not taken before.

[PATCH v8.0.1 10/36] hw/net/msf2-emac: Don't modify descriptor in-place in emac_store_desc()

2023-05-17 Thread Michael Tokarev
From: Peter Maydell The msf2-emac ethernet controller has functions emac_load_desc() and emac_store_desc() which read and write the in-memory descriptor blocks and handle conversion between guest and host endianness. As currently written, emac_store_desc() does the endianness conversion

[PATCH v8.0.1 29/36] target/arm: Fix handling of SW and NSW bits for stage 2 walks

2023-05-17 Thread Michael Tokarev
From: Peter Maydell We currently don't correctly handle the VSTCR_EL2.SW and VTCR_EL2.NSW configuration bits. These allow configuration of whether the stage 2 page table walks for Secure IPA and NonSecure IPA should do their descriptor reads from Secure or NonSecure physical addresses. (This is

[PATCH v8.0.1 23/36] block: bdrv/blk_co_unref() for calls in coroutine context

2023-05-17 Thread Michael Tokarev
From: Kevin Wolf These functions must not be called in coroutine context, because they need write access to the graph. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-Id: <20230504115750.54437-4-kw...@redhat.com>

[PATCH v8.0.1 07/36] qemu-options: finesse the recommendations around -blockdev

2023-05-17 Thread Michael Tokarev
From: Alex Bennée We are a bit premature in recommending -blockdev/-device as the best way to configure block devices. It seems there are times the more human friendly -drive still makes sense especially when -snapshot is involved. Improve the language to hopefully make things clearer.

[PATCH v8.0.1 12/36] hw/arm/aspeed: Use arm_write_bootloader() to write the bootloader

2023-05-17 Thread Michael Tokarev
From: Cédric Le Goater When writing the secondary-CPU stub boot loader code to the guest, use arm_write_bootloader() instead of directly calling rom_add_blob_fixed(). This fixes a bug on big-endian hosts, because arm_write_bootloader() will correctly byte-swap the host-byte-order array values

[PATCH v8.0.1 34/36] target/s390x: Fix EXECUTE of relative branches

2023-05-17 Thread Michael Tokarev
From: Ilya Leoshkevich Fix a problem similar to the one fixed by commit 703d03a4aaf3 ("target/s390x: Fix EXECUTE of relative long instructions"), but now for relative branches. Reported-by: Nina Schoetterl-Glausch Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id:

[PATCH v8.0.1 26/36] target/riscv: Restore the predicate() NULL check behavior

2023-05-17 Thread Michael Tokarev
From: Bin Meng When reading a non-existent CSR QEMU should raise illegal instruction exception, but currently it just exits due to the g_assert() check. This actually reverts commit 0ee342256af9205e7388efdf193a6d8f1ba1a617. Some comments are also added to indicate that predicate() must be

[PULL 6/9] linux-user: Add new flag VERIFY_NONE

2023-05-17 Thread Laurent Vivier
From: Thomas Weißschuh This can be used to validate that an address range is mapped but without being readable or writable. It will be used by an updated implementation of mincore(). Signed-off-by: Thomas Weißschuh Reviewed-by: Laurent Vivier Message-Id:

[PULL 3/9] linux-user: Add move_mount() syscall

2023-05-17 Thread Laurent Vivier
From: Thomas Weißschuh Signed-off-by: Thomas Weißschuh Reviewed-by: Laurent Vivier [lv: define syscall] Message-Id: <20230424153429.276788-1-tho...@t-8ch.de> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 33 + 1 file changed, 33 insertions(+) diff

[PULL 5/9] linux-user/main: Use list_cpus() instead of cpu_list()

2023-05-17 Thread Laurent Vivier
From: Thomas Huth This way we can get rid of the if'deffery and the XXX comment here (it's repeated in the list_cpus() function anyway). Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230424122126.236586-1-th...@redhat.com>

[PULL 1/9] linux-user: Emulate /proc/cpuinfo output for riscv

2023-05-17 Thread Laurent Vivier
From: Afonso Bordado RISC-V does not expose all extensions via hwcaps, thus some userspace applications may want to query these via /proc/cpuinfo. Currently when querying this file the host's file is shown instead which is slightly confusing. Emulate a basic /proc/cpuinfo file with mmu info and

[PULL 7/9] linux-user: Don't require PROT_READ for mincore

2023-05-17 Thread Laurent Vivier
From: Thomas Weißschuh The kernel does not require PROT_READ for addresses passed to mincore. For example the fincore(1) tool from util-linux uses PROT_NONE and currently does not work under qemu-user. Example (with fincore(1) from util-linux 2.38): $ fincore /proc/self/exe RES PAGES SIZE

[PATCH v8.0.1 31/36] target/arm: Correct AArch64.S2MinTxSZ 32-bit EL1 input size check

2023-05-17 Thread Michael Tokarev
From: Peter Maydell In check_s2_mmu_setup() we have a check that is attempting to implement the part of AArch64.S2MinTxSZ that is specific to when EL1 is AArch32: if !s1aarch64 then // EL1 is AArch32 min_txsz = Min(min_txsz, 24); Unfortunately we got this wrong in two ways:

[PATCH v8.0.1 22/36] block: Consistently call bdrv_activate() outside coroutine

2023-05-17 Thread Michael Tokarev
From: Kevin Wolf Migration code can call bdrv_activate() in coroutine context, whereas other callers call it outside of coroutines. As it calls other code that is not supposed to run in coroutines, standardise on running outside of coroutines. This adds a no_co_wrapper to switch to the main

[PATCH v8.0.1 13/36] hw/arm/raspi: Use arm_write_bootloader() to write boot code

2023-05-17 Thread Michael Tokarev
From: Peter Maydell When writing the secondary-CPU stub boot loader code to the guest, use arm_write_bootloader() instead of directly calling rom_add_blob_fixed(). This fixes a bug on big-endian hosts, because arm_write_bootloader() will correctly byte-swap the host-byte-order array values into

[PATCH v8.0.1 16/36] hw/sd/allwinner-sdhost: Correctly byteswap descriptor fields

2023-05-17 Thread Michael Tokarev
From: Peter Maydell In allwinner_sdhost_process_desc() we just read directly from guest memory into a host TransferDescriptor struct and back. This only works on little-endian hosts. Abstract the reading and writing of descriptors into functions that handle the byte-swapping so that

[PATCH v8.0.1 32/36] async: Suppress GCC13 false positive in aio_bh_poll()

2023-05-17 Thread Michael Tokarev
From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 | (head)->sqh_last = &(elm)->field.sqe_next;

[PATCH v8.0.1 24/36] block: Don't call no_coroutine_fns in qmp_block_resize()

2023-05-17 Thread Michael Tokarev
From: Kevin Wolf This QMP handler runs in a coroutine, so it must use the corresponding no_co_wrappers instead. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2185688 Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-Id:

[PATCH v8.0.1 14/36] hw/intc/allwinner-a10-pic: Don't use set_bit()/clear_bit()

2023-05-17 Thread Michael Tokarev
From: Peter Maydell The Allwinner PIC model uses set_bit() and clear_bit() to update the values in its irq_pending[] array when an interrupt arrives. However it is using these functions wrongly: they work on an array of type 'long', and it is passing an array of type 'uint32_t'. Because the

[PATCH v8.0.1 28/36] accel/tcg: Fix atomic_mmu_lookup for reads

2023-05-17 Thread Michael Tokarev
From: Richard Henderson A copy-paste bug had us looking at the victim cache for writes. Cc: qemu-sta...@nongnu.org Reported-by: Peter Maydell Signed-off-by: Richard Henderson Fixes: 08dff435e2 ("tcg: Probe the proper permissions for atomic ops") Reviewed-by: Philippe Mathieu-Daudé

[PATCH v8.0.1 25/36] target/riscv: Fix itrigger when icount is used

2023-05-17 Thread Michael Tokarev
From: LIU Zhiwei When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. The reason is that when execute helper_mret or helper_sret, it will cause a call to icount_get_raw_locked (), which needs set can_do_io flag on cpustate. Thus we setting this flag when execute these

[PATCH v8.0.1 20/36] meson: leave unnecessary modules out of the build

2023-05-17 Thread Michael Tokarev
From: Paolo Bonzini meson.build files choose whether to build modules based on foo.found() expressions. If a feature is enabled (e.g. --enable-gtk), these expressions are true even if the code is not used by any emulator, and this results in an unexpected difference between modular and

Re: [PATCH v4 00/10] Add stage-2 translation for SMMUv3

2023-05-17 Thread Eric Auger
Hi Mostafa, On 5/16/23 22:33, Mostafa Saleh wrote: > This patch series adds stage-2 translation support for SMMUv3. It is > controlled by a new system property “arm-smmuv3.stage”. > - When set to “1”: Stage-1 only would be advertised and supported (default > behaviour) > - When set to “2”:

[PATCH v8.0.1 18/36] block/export: call blk_set_dev_ops(blk, NULL, NULL)

2023-05-17 Thread Michael Tokarev
From: Stefan Hajnoczi Most export types install BlockDeviceOps pointers. It is easy to forget to remove them because that happens automatically via the "drive" qdev property in hw/ but not block/export/. Put blk_set_dev_ops(blk, NULL, NULL) calls in the core export.c code so the export types

[PULL 2/9] linux-user: report ENOTTY for unknown ioctls

2023-05-17 Thread Laurent Vivier
From: Thomas Weißschuh The correct error number for unknown ioctls is ENOTTY. ENOSYS would mean that the ioctl() syscall itself is not implemented, which is very improbable and unexpected for userspace. ENOTTY means "Inappropriate ioctl for device". This is what the kernel returns on unknown

[PATCH v8.0.1 17/36] hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields

2023-05-17 Thread Michael Tokarev
From: Peter Maydell In allwinner-sun8i-emac we just read directly from guest memory into a host FrameDescriptor struct and back. This only works on little-endian hosts. Reading and writing of descriptors is already abstracted into functions; make those functions also handle the byte-swapping

[PATCH v8.0.1 03/36] hw/timer/imx_epit: don't shadow variable

2023-05-17 Thread Michael Tokarev
From: Axel Heider Fix issue reported by Coverity. Signed-off-by: Axel Heider Message-id: 168070611775.20412.288324207730284147...@git.sr.ht Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell (cherry picked from commit 542fd43d79327dabe62e49ff584ca60b6184923a) Signed-off-by: Michael

[PULL 0/9] Linux user for 8.1 patches

2023-05-17 Thread Laurent Vivier
The following changes since commit 7c18f2d663521f1b31b821a13358ce38075eaf7d: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-04-29 23:07:17 +0100) are available in the Git repository at: https://github.com/vivier/qemu.git tags/linux-user-for-8.1-pull-request

[PATCH v8.0.1 08/36] docs/about/deprecated.rst: Add "since 7.1" tag to dtb-kaslr-seed deprecation

2023-05-17 Thread Michael Tokarev
From: Peter Maydell In commit 5242876f37ca we deprecated the dtb-kaslr-seed property of the virt board, but forgot the "since n.n" tag in the documentation of this in deprecated.rst. This deprecation note first appeared in the 7.1 release, so retrospectively add the correct "since 7.1"

[PATCH v8.0.1 11/36] hw/arm/boot: Make write_bootloader() public as arm_write_bootloader()

2023-05-17 Thread Michael Tokarev
From: Cédric Le Goater The arm boot.c code includes a utility function write_bootloader() which assists in writing a boot-code fragment into guest memory, including handling endianness and fixing it up with entry point addresses and similar things. This is useful not just for the boot.c code

[PATCH v8.0.1 15/36] target/arm: Define and use new load_cpu_field_low32()

2023-05-17 Thread Michael Tokarev
From: Peter Maydell In several places in the 32-bit Arm translate.c, we try to use load_cpu_field() to load from a CPUARMState field into a TCGv_i32 where the field is actually 64-bit. This works on little-endian hosts, but gives the wrong half of the register on big-endian. Add a new

[PATCH v8.0.1 21/36] block: Fix use after free in blockdev_mark_auto_del()

2023-05-17 Thread Michael Tokarev
From: Kevin Wolf job_cancel_locked() drops the job list lock temporarily and it may call aio_poll(). We must assume that the list has changed after this call. Also, with unlucky timing, it can end up freeing the job during job_completed_txn_abort_locked(), making the job pointer invalid, too.

[PULL 4/9] linux-user: Add open_tree() syscall

2023-05-17 Thread Laurent Vivier
From: Thomas Weißschuh Signed-off-by: Thomas Weißschuh Reviewed-by: Laurent Vivier Message-Id: <20230424153429.276788-2-tho...@t-8ch.de> [lv: move declaration at the beginning of the block, define syscall] Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 33

[PATCH v8.0.1 00/36] Patch Round-up for stable 8.0.1, freeze on 2023-05-27

2023-05-17 Thread Michael Tokarev
Hi everyone, The following new 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-06-29: https://wiki.qemu.org/Planning/8.0 Please respond here or CC qemu-sta...@nongnu.org

[PATCH v8.0.1 33/36] tcg: ppc64: Fix mask generation for vextractdm

2023-05-17 Thread Michael Tokarev
From: Shivaprasad G Bhat In function do_extractm() the mask is calculated as dup_const(1 << (element_width - 1)). '1' being signed int works fine for MO_8,16,32. For MO_64, on PPC64 host this ends up becoming 0 on compilation. The vextractdm uses MO_64, and it ends up having mask as 0.

[PATCH v8.0.1 09/36] target/arm: Initialize debug capabilities only once

2023-05-17 Thread Michael Tokarev
From: Akihiko Odaki kvm_arm_init_debug() used to be called several times on a SMP system as kvm_arch_init_vcpu() calls it. Move the call to kvm_arch_init() to make sure it will be called only once; otherwise it will overwrite pointers to memory allocated with the previous call and leak it.

[PATCH v8.0.1 05/36] acpi: pcihp: allow repeating hot-unplug requests

2023-05-17 Thread Michael Tokarev
From: Igor Mammedov with Q35 using ACPI PCI hotplug by default, user's request to unplug device is ignored when it's issued before guest OS has been booted. And any additional attempt to request device hot-unplug afterwards results in following error: "Device XYZ is already in the process of

[PULL 8/9] linux-user: Fix mips fp64 executables loading

2023-05-17 Thread Laurent Vivier
From: Daniil Kovalev If a program requires fr1, we should set the FR bit of CP0 control status register and add F64 hardware flag. The corresponding `else if` branch statement is copied from the linux kernel sources (see `arch_check_elf` function in linux/arch/mips/kernel/elf.c). Signed-off-by:

[PULL 9/9] linux-user: fix getgroups/setgroups allocations

2023-05-17 Thread Laurent Vivier
From: Michael Tokarev linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest". With NGROUPS_MAX being 65536 (linux, and it is common for an application to allocate NGROUPS_MAX for

[PATCH v8.0.1 27/36] hw/pci-bridge: pci_expander_bridge fix type in pxb_cxl_dev_reset()

2023-05-17 Thread Michael Tokarev
From: Jonathan Cameron Reproduce issue with configure --enable-qom-cast-debug ... qemu-system-x86_64 -display none -machine q35,cxl=on -device pxb-cxl,bus=pcie.0 hw/pci-bridge/pci_expander_bridge.c:54:PXB_DEV: Object 0x5570e0b1ada0 is not an instance of type pxb Aborted The type

[PATCH v8.0.1 36/36] tcg/i386: Set P_REXW in tcg_out_addi_ptr

2023-05-17 Thread Michael Tokarev
From: Richard Henderson The REXW bit must be set to produce a 64-bit pointer result; the bit is disabled in 32-bit mode, so we can do this unconditionally. Fixes: 7d9e1ee424b0 ("tcg/i386: Adjust assert in tcg_out_addi_ptr") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1592 Resolves:

[PATCH v8.0.1 35/36] 9pfs/xen: Fix segfault on shutdown

2023-05-17 Thread Michael Tokarev
From: Jason Andryuk xen_9pfs_free can't use gnttabdev since it is already closed and NULL-ed out when free is called. Do the teardown in _disconnect(). This matches the setup done in _connect(). trace-events are also added for the XenDevOps functions. Signed-off-by: Jason Andryuk

[PATCH v8.0.1 30/36] ui: Fix pixel colour channel order for PNG screenshots

2023-05-17 Thread Michael Tokarev
From: Peter Maydell When we take a PNG screenshot the ordering of the colour channels in the data is not correct, resulting in the image having weird colouring compared to the actual display. (Specifically, on a little-endian host the blue and red channels are swapped; on big-endian everything

[PATCH 5/8] tiva c watchdog timers implementation

2023-05-17 Thread Mohamed ElSayed
Signed-off-by: Mohamed ElSayed --- hw/watchdog/tm4c123_watchdog.c | 297 + hw/watchdog/trace-events | 3 + include/hw/watchdog/tm4c123_watchdog.h | 97 3 files changed, 397 insertions(+) create mode 100644 hw/watchdog/tm4c123_watchdog.c

[PATCH v8.0.1 04/36] hw/timer/imx_epit: fix limit check

2023-05-17 Thread Michael Tokarev
From: Axel Heider Fix the limit check. If the limit is less than the compare value, the timer can never reach this value, thus it will never fire. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1491 Signed-off-by: Axel Heider Message-id:

[PATCH 0/8] Tiva C Implementation

2023-05-17 Thread Mohamed ElSayed
This contribution aims to add the Tiva C support into QEMU. The code could be found at https://github.com/moesay/qemu_TivaC Mohamed ElSayed (8): The tivac board initial machine definition tiva c usart module implementation tiva c gpio implementation tiva c sysctl implementation tiva c

[PATCH 1/8] The tivac board initial machine definition

2023-05-17 Thread Mohamed ElSayed
Signed-off-by: Mohamed ElSayed --- hw/arm/tivac.c| 56 ++ hw/arm/tm4c123gh6pm_soc.c | 275 ++ include/hw/arm/tm4c123gh6pm_soc.h | 71 3 files changed, 402 insertions(+) create mode 100644 hw/arm/tivac.c create mode 100644

Re: [PATCH v2] vfio/pci: Fix a use-after-free issue

2023-05-17 Thread Cédric Le Goater
On 5/17/23 04:46, Zhenzhong Duan wrote: vbasedev->name is freed wrongly which leads to garbage VFIO trace log. Fix it by allocating a dup of vbasedev->name and then free the dup. Fixes: 2dca1b37a7 ("vfio/pci: add support for VF token") Suggested-by: Alex Williamson Signed-off-by: Zhenzhong

[PATCH] qapi/parser: Drop two bad type hints for now

2023-05-17 Thread Markus Armbruster
Two type hints fail centos-stream-8-x86_64 CI. They are actually broken. Changing them to Optional[re.Match[str]] fixes them locally for me, but then CI fails differently. Drop them for now. Fixes: 3e32dca3f0d1 (qapi: Rewrite parsing of doc comment section symbols and tags) Signed-off-by:

Re: [PATCH v3 0/5] Move ASID test to vhost-vdpa net initialization

2023-05-17 Thread Lei Yang
QE tested this series with sanity testing on the vdpa_sim device, everything are works fine and there is no any new regression problems. Tested-by: Lei Yang On Tue, May 9, 2023 at 11:44 PM Eugenio Pérez wrote: > > QEMU v8.0 is able to switch dynamically between vhost-vdpa passthrough > and

Re: [PATCH] qapi/parser: Fix type hints

2023-05-17 Thread Markus Armbruster
Richard Henderson writes: > On 5/15/23 22:22, Markus Armbruster wrote: >>> https://gitlab.com/qemu-project/qemu/-/jobs/4289613692#L574 >>> >>>File "/builds/qemu-project/qemu/scripts/qapi/parser.py", line 566, in >>> QAPIDoc >>> def _match_at_name_colon(string: str) ->

Re: [PATCH v3 5/5] vdpa: move CVQ isolation check to net_init_vhost_vdpa

2023-05-17 Thread Eugenio Perez Martin
On Wed, May 17, 2023 at 5:59 AM Jason Wang wrote: > > On Tue, May 9, 2023 at 11:44 PM Eugenio Pérez wrote: > > > > Evaluating it at start time instead of initialization time may make the > > guest capable of dynamically adding or removing migration blockers. > > > > Also, moving to

Re: [PATCH] xen/pt: fix igd passthrough for pc machine with xen accelerator

2023-05-17 Thread Michael Tokarev
08.02.2023 05:03, Chuck Zmudzinski wrote: Commit 998250e97661 ("xen, gfx passthrough: register host bridge specific to passthrough") uses the igd-passthrough-i440FX pci host device with the xenfv machine type and igd-passthru=on, but using it for the pc machine type, xen accelerator, and

Re: [PULL 0/9] Linux user for 8.1 patches

2023-05-17 Thread Laurent Vivier
Le 16/05/2023 à 19:08, Richard Henderson a écrit : On 5/16/23 05:48, Laurent Vivier wrote: The following changes since commit 7c18f2d663521f1b31b821a13358ce38075eaf7d:    Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-04-29 23:07:17 +0100) are available in

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-05-17 Thread Thomas Huth
On 20/04/2023 22.29, Cédric Le Goater wrote: From: Cédric Le Goater GCC13 reports an error : ../util/async.c: In function ‘aio_bh_poll’: include/qemu/queue.h:303:22: error: storing the address of local variable ‘slice’ in ‘*ctx.bh_slice_list.sqh_last’ [-Werror=dangling-pointer=] 303 |

Re: [PATCH] async: Suppress GCC13 false positive in aio_bh_poll()

2023-05-17 Thread Michael Tokarev
17.05.2023 09:35, Thomas Huth wrote: .. I think this should also go into the next stable release (now on CC:), we're already getting bug reports about this:  https://gitlab.com/qemu-project/qemu/-/issues/1655 Yes, I already picked that one up after noticing win32/win64 CI build failures.

[PATCH] acpi/tests/avocado/bits: enable bios bits avocado tests on gitlab CI pipeline

2023-05-17 Thread Ani Sinha
Biosbits avocado tests on gitlab has thus far been disabled because some packages needed by this test was missing in the container images used by gitlab CI. These packages have now been added with the commit: da9000784c90d ("tests/lcitool: Add mtools and xorriso and remove genisoimage as

Re: [PATCH] acpi/tests/bios-tables-test: add an environment variable for iasl location

2023-05-17 Thread Michael S. Tsirkin
On Wed, May 17, 2023 at 04:16:47PM +0100, Alex Bennée wrote: > > Ani Sinha writes: > > >> On 17-May-2023, at 8:06 PM, Michael S. Tsirkin wrote: > >> > >> On Wed, May 17, 2023 at 07:57:53PM +0530, Ani Sinha wrote: > >>> > >>> > On 17-May-2023, at 7:47 PM, Michael S. Tsirkin wrote: >

[PATCH] qapi/parser: Drop two bad type hints for now

2023-05-17 Thread Markus Armbruster
Two type hints fail centos-stream-8-x86_64 CI. They are actually broken. Changing them to Optional[re.Match[str]] fixes them locally for me, but then CI fails differently. Drop them for now. Fixes: 3e32dca3f0d1 (qapi: Rewrite parsing of doc comment section symbols and tags) Signed-off-by:

[PULL 0/5] QAPI patches patches for 2023-05-17

2023-05-17 Thread Markus Armbruster
The following changes since commit f9d58e0ca53b3f470b84725a7b5e47fcf446a2ea: Merge tag 'pull-9p-20230516' of https://github.com/cschoenebeck/qemu into staging (2023-05-16 10:21:44 -0700) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2023-05-17

[PULL 1/5] qapi: Improve error message for description following section

2023-05-17 Thread Markus Armbruster
The error message is bad when the section is untagged. For instance, test case doc-interleaved-section produces "'@foobar:' can't follow 'Note' section", which is okay, but if we drop the "Note:" tag, we get "'@foobar:' can't follow 'None' section, which is bad. Change the error message to

Re: [PULL 0/9] Linux user for 8.1 patches

2023-05-17 Thread Richard Henderson
On 5/17/23 01:01, Laurent Vivier wrote: The following changes since commit 7c18f2d663521f1b31b821a13358ce38075eaf7d: Merge tag 'for-upstream' ofhttps://gitlab.com/bonzini/qemu into staging (2023-04-29 23:07:17 +0100) are available in the Git repository at:

Re: [PATCH] acpi/tests/bios-tables-test: add an environment variable for iasl location

2023-05-17 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Wed, May 17, 2023 at 04:58:06PM +0100, Alex Bennée wrote: >> >> "Michael S. Tsirkin" writes: >> >> > On Wed, May 17, 2023 at 04:16:47PM +0100, Alex Bennée wrote: >> >> >> >> Ani Sinha writes: >> >> >> >> >> On 17-May-2023, at 8:06 PM, Michael S. Tsirkin

Re: [PATCH v2 2/7] migration: Implement precopy initial data logic

2023-05-17 Thread Peter Xu
On Wed, May 17, 2023 at 06:52:14PM +0300, Avihai Horon wrote: > Implement precopy initial data logic. This allows migration users in the > source to send precopy initial data and the destination to ACK when this > data is loaded. Migration will not attempt to stop the source VM and > complete the

[PULL 08/18] block: Call .bdrv_co_create(_opts) unlocked

2023-05-17 Thread Kevin Wolf
These are functions that modify the graph, so they must be able to take a writer lock. This is impossible if they already hold the reader lock. If they need a reader lock for some of their operations, they should take it internally. Many of them go through blk_*(), which will always take the lock

[PULL 07/18] docs/interop/qcow2.txt: fix description about "zlib" clusters

2023-05-17 Thread Kevin Wolf
From: Akihiro Suda "zlib" clusters are actually raw deflate (RFC1951) clusters without zlib headers. Signed-off-by: Akihiro Suda Message-Id: <168424874322.11954.134094204635185952...@git.sr.ht> Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf ---

[PULL 10/18] qcow2: Unlock the graph in qcow2_do_open() where necessary

2023-05-17 Thread Kevin Wolf
qcow2_do_open() calls a few no_co_wrappers that wrap functions taking the graph lock internally as a writer. Therefore, it can't hold the reader lock across these calls, it causes deadlocks. Drop the lock temporarily around the calls. Signed-off-by: Kevin Wolf Message-Id:

Re: [PULL 5/5] qapi/parser: Drop two bad type hints for now

2023-05-17 Thread Richard Henderson
On 5/17/23 08:25, Markus Armbruster wrote: Two type hints fail centos-stream-8-x86_64 CI. They are actually broken. Changing them to Optional[re.Match[str]] fixes them locally for me, but then CI fails differently. Drop them for now. Fixes: 3e32dca3f0d1 (qapi: Rewrite parsing of doc comment

[PULL 45/68] meson: regenerate meson-buildoptions.sh

2023-05-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- scripts/meson-buildoptions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index fedb93ada69e..10c4969a013e 100644 --- a/scripts/meson-buildoptions.sh +++

[PULL 67/68] configure: remove unnecessary check

2023-05-17 Thread Paolo Bonzini
All calls to probe_target_compiler are conditioned on some "have_target" invocation, or inside a loop on target_list. Therefore there is no issue with building unnecessary firmware images and tests. Signed-off-by: Paolo Bonzini --- configure | 7 --- 1 file changed, 7 deletions(-) diff

[PULL 56/68] build: move SafeStack tests to meson

2023-05-17 Thread Paolo Bonzini
This disables the old behavior of detecting SafeStack from environment CFLAGS. SafeStack is now enabled purely based on the configure arguments. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configure | 73 ---

Re: [PATCH v2] target/arm: allow DC CVA[D]P in user mode emulation

2023-05-17 Thread Richard Henderson
On 5/17/23 10:31, Zhuojia Shen wrote: DC CVAP and DC CVADP instructions can be executed in EL0 on Linux, either directly when SCTLR_EL1.UCI == 1 or emulated by the kernel (see user_cache_maint_handler() in arch/arm64/kernel/traps.c). This patch enables execution of the two instructions in user

Re: [PATCH 1/5] gitlab: centralize the container tag name

2023-05-17 Thread Richard Henderson
On 5/17/23 06:54, Daniel P. Berrangé wrote: We use a fixed container tag of 'latest' so that contributors' forks don't end up with an ever growing number of containers as they work on throwaway feature branches. This fixed tag causes problems running CI upstream in stable staging branches,

[PATCH 0/3] block/graph-lock: Disable locking for now

2023-05-17 Thread Kevin Wolf
tl;dr is that graph locking introduced deadlocks in 8.0, and disabling it for now fixes them again. See patch 1 for the details. I still intend the fix this properly before we remove the AioContext lock (which is when the deadlock would be automatically solved), but it's not trivial enough for

[PATCH 1/3] graph-lock: Disable locking for now

2023-05-17 Thread Kevin Wolf
In QEMU 8.0, we've been seeing deadlocks in bdrv_graph_wrlock(). They come from callers that hold an AioContext lock, which is not allowed during polling. In theory, we could temporarily release the lock, but callers are inconsistent about whether they hold a lock, and if they do, some are also

[PATCH 2/3] nbd/server: Fix drained_poll to wake coroutine in right AioContext

2023-05-17 Thread Kevin Wolf
nbd_drained_poll() generally runs in the main thread, not whatever iothread the NBD server coroutine is meant to run in, so it can't directly reenter the coroutines to wake them up. The code seems to have the right intention, it specifies the correct AioContext when it calls

Re: [PATCH 3/5] gitlab: stable staging branches publish containers in a separate tag

2023-05-17 Thread Daniel P . Berrangé
On Wed, May 17, 2023 at 06:26:56PM +0300, Michael Tokarev wrote: > 17.05.2023 16:54, Daniel P. Berrangé wrote: > > If the stable staging branches publish containers under the 'latest' tag > > they will clash with containers published on the primary staging branch, > > as well as with each other.

[PATCH v7 3/7] igb: RX descriptors guest writting refactoring

2023-05-17 Thread Tomasz Dzieciol
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes. Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 176 ++-- hw/net/igb_regs.h | 10 +-- hw/net/trace-events | 6 +- 3

Re: [PATCH 0/2] vhost-user-gpu get_edid feature

2023-05-17 Thread Erico Nunes
On 15/05/2023 13:38, Marc-André Lureau wrote: > However, I worry about using the new backend (calling GET_EDID) with an > older front-end/QEMU. It may just hang, since > vhost_user_gpu_handle_display() won't reply to unknown messages. That's > what PROTOCOL_FEATURES were meant for, iirc. Can you

Re: [PATCH] acpi/tests/bios-tables-test: add an environment variable for iasl location

2023-05-17 Thread Alex Bennée
Ani Sinha writes: >> On 17-May-2023, at 8:46 PM, Alex Bennée wrote: >> >> >> Ani Sinha writes: >> On 17-May-2023, at 8:06 PM, Michael S. Tsirkin wrote: On Wed, May 17, 2023 at 07:57:53PM +0530, Ani Sinha wrote: > > >> On 17-May-2023, at 7:47 PM, Michael S.

Re: [PATCH 2/3] softmmu/ioport.c: QOMify MemoryRegionPortioList

2023-05-17 Thread Paolo Bonzini
On 5/11/23 16:43, Mark Cave-Ayland wrote: +#define TYPE_MEMORY_REGION_PORTIO_LIST "memory-region-portio-list" Possibly simpler as: TYPE_MEMORY_REGION_PORTIO "memory-region-portio" I'm a little undecided about this one: the ports field contains an array of MemoryRegionPortio entries e.g.

Re: [PATCH] acpi/tests/bios-tables-test: add an environment variable for iasl location

2023-05-17 Thread Bernhard Beschow
Am 17. Mai 2023 12:07:51 UTC schrieb Ani Sinha : >Currently the meson based QEMU build process locates the iasl binary from the >current PATH and other locations [1] and uses that to set CONFIG_IASL which is >then used by the test. > >This has two disadvantages: > - If iasl was not previously

[PATCH v1 1/2] vfio-user: update comments

2023-05-17 Thread Jagannathan Raman
Clarify the behavior of TYPE_VFU_OBJECT when TYPE_REMOTE_MACHINE enables the auto-shutdown property. Also, add notes to VFU_OBJECT_ERROR. Signed-off-by: Jagannathan Raman --- hw/remote/vfio-user-obj.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PATCH v1 2/2] docs: fix multi-process QEMU documentation

2023-05-17 Thread Jagannathan Raman
Fix a typo in the system documentation for multi-process QEMU. Signed-off-by: Jagannathan Raman --- docs/system/multi-process.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/multi-process.rst b/docs/system/multi-process.rst index 16f0352416..2008a67809 100644

Re: [PATCH 0/9] misc AHCI cleanups

2023-05-17 Thread John Snow
On Fri, Apr 28, 2023 at 9:22 AM Niklas Cassel wrote: > > From: Niklas Cassel > > Hello John, > Hi Niklas! I haven't been actively involved with AHCI for a while, so I am not sure I can find the time to give this a deep scrub. I'm going to assume based on '@wdc.com` that you probably know a

[PULL 39/68] configure: bootstrap sphinx with mkvenv

2023-05-17 Thread Paolo Bonzini
From: John Snow When docs are explicitly requested, require Sphinx>=1.6.0. When docs are explicitly disabled, don't bother to check for Sphinx at all. If docs are set to "auto", attempt to locate Sphinx, but continue onward if it wasn't located. Signed-off-by: Paolo Bonzini Signed-off-by: John

[PULL 11/68] kvm: Synchronize the backup bitmap in the last stage

2023-05-17 Thread Paolo Bonzini
From: Gavin Shan In the last stage of live migration or memory slot removal, the backup bitmap needs to be synchronized when it has been enabled. Signed-off-by: Gavin Shan Reviewed-by: Peter Xu Tested-by: Zhenyu Zhang Message-Id: <20230509022122.20888-3-gs...@redhat.com> Signed-off-by: Paolo

[PULL 02/68] target/i386: add support for FB_CLEAR feature

2023-05-17 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito As reported by the Intel's doc: "FB_CLEAR: The processor will overwrite fill buffer values as part of MD_CLEAR operations with the VERW instruction. On these processors, L1D_FLUSH does not overwrite fill buffer values." If this cpu feature is present in host,

[PULL 48/68] meson: remove static_kwargs

2023-05-17 Thread Paolo Bonzini
After static_kwargs has been changed to an empty dictionary, it has no functional effect and can be removed. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 215 +++- tcg/meson.build | 2 +- 2 files changed, 85

  1   2   3   4   5   >