QEMU developers fortnightly conference call for 2023-06-13

2023-06-07 Thread juan . quintela
Hi Here is the wiki for whover that wants to add topics to the agenda. https://wiki.qemu.org/QEMUCall#Call_for_agenda_for_2023-06-13 We already have a topic that is "Live Update", so please join. Later, Juan. QEMU developers fortnightly conference call Tuesday 2023-06-13 ⋅ 15:00 – 16:00 Centr

Re: [PATCH V2] memory: RAM_NAMED_FILE flag

2023-06-07 Thread Steven Sistare
On 2/8/2023 2:22 PM, Peter Xu wrote: > On Wed, Feb 08, 2023 at 01:34:18PM -0500, Steven Sistare wrote: >> On 2/7/2023 3:23 PM, Peter Xu wrote: >>> On Tue, Feb 07, 2023 at 11:03:33AM -0800, Steve Sistare wrote: migrate_ignore_shared() is an optimization that avoids copying memory that is v

Re: [PATCH] tests/avocado/tuxrun_baselines: Fix ppc64 tests for binaries without slirp

2023-06-07 Thread Alex Bennée
Thomas Huth writes: > The ppc64 tuxrun tests are currently failing if "slirp" has been > disabled in the binary since they are using "-netdev user" now. > We have to skip the test if this network backend is missing. > > Fixes: 6ee3624236 ("improve code coverage for ppc64") > Signed-off-by: Thom

Re: [PATCH v5 3/3] pc: q35: Bump max_cpus to 1024

2023-06-07 Thread Igor Mammedov
On Wed, 7 Jun 2023 10:26:59 +0200 Philippe Mathieu-Daudé wrote: > On 7/6/23 04:49, Suravee Suthikulpanit wrote: > > Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in > > arch/x86/include/asm/kvm_host.h, update QEMU limits to the same number. > > > > In case KVM could not suppo

Re: [PATCH V2] migration: simplify blockers

2023-06-07 Thread Steven Sistare
On 2/7/2023 4:29 PM, Peter Xu wrote: > On Tue, Feb 07, 2023 at 04:17:34PM -0500, Steven Sistare wrote: + * *@reasonp is freed and set to NULL if failure is returned. + * On success, the caller no longer owns *@reasonp and must not free it. >>> >>> This statement reads weird. IMHO the cal

Re: [PATCH v2 04/12] hw/ssi: Add an "addr" property to SSIPeripheral

2023-06-07 Thread Cédric Le Goater
On 6/7/23 10:28, Philippe Mathieu-Daudé wrote: On 7/6/23 10:06, Joel Stanley wrote: On Wed, 7 Jun 2023 at 04:40, Cédric Le Goater wrote: Boards will use this new property to identify the device CS line and wire the SPI controllers accordingly. "addr" and not "cs" or even "chip-select"? "c

[PULL 09/12] hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow Subscribe to pci_bus_fire_intx_routing_notifier() instead which allows for having a common piix3_write_config() for the PIIX3 device models. While at it, move the subscription into machine code to facilitate resolving TYPE_PIIX3_XEN_DEVICE. In a possible future followup,

[PULL 03/12] xen: Drop support for Xen versions below 4.7.1

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse In restructuring to allow for internal emulation of Xen functionality, I broke compatibility for Xen 4.6 and earlier. Fix this by explicitly removing support for anything older than 4.7.1, which is also ancient but it does still build, and the compatibility support for it is

Re: [PATCH v2 12/12] target/arm: Allow users to set the number of VFP registers

2023-06-07 Thread Cédric Le Goater
On 6/7/23 13:06, Joel Stanley wrote: On Wed, 7 Jun 2023 at 04:40, Cédric Le Goater wrote: Cortex A7 CPUs with an FPU implementing VFPv4 without NEON support have 16 64-bit FPU registers and not 32 registers. Let users set the number of VFP registers with a CPU property. The primary use case o

[PULL 04/12] hw/xen: Fix broken check for invalid state in xs_be_open()

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse Coverity points out that if (!s && !s->impl) isn't really what we intended to do here. CID 1508131. Fixes: 032475127225 ("hw/xen: Add emulated implementation of XenStore operations") Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Reviewed-by: Peter Maydell Mes

[PULL 12/12] xen-block: fix segv on unrealize

2023-06-07 Thread Anthony PERARD via
From: Anthony PERARD Backtrace: qemu_lockcnt_lock (lockcnt=0xb4) at ../util/lockcnt.c:238 aio_set_fd_handler (ctx=0x0, fd=51, is_external=true, io_read=0x0, io_write=0x0, io_poll=0x0, io_poll_ready=0x0, opaque=0x0) at ../util/aio-posix.c:119 xen_device_unbind_event_channel (xendev=0x55c6d

[PULL 05/12] include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow xen_piix3_set_irq() isn't PIIX specific: PIIX is a single PCI device while xen_piix3_set_irq() maps multiple PCI devices to their respective IRQs, which is board-specific. Rename xen_piix3_set_irq() to communicate this. Also rename XEN_PIIX_NUM_PIRQS to XEN_IOAPIC_NUM_PIRQ

[PULL 01/12] hw/xen: Simplify emulated Xen platform init

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse I initially put the basic platform init (overlay pages, grant tables, event channels) into mc->kvm_type because that was the earliest place that could sensibly test for xen_mode==XEN_EMULATE. The intent was to do this early enough that we could then initialise the XenBus an

[PULL 08/12] hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow xen_intx_set_irq() doesn't depend on PIIX3State. In order to resolve TYPE_PIIX3_XEN_DEVICE and in order to make Xen agnostic about the precise south bridge being used, set up Xen's PCI IRQ handling of PIIX3 in the board. Signed-off-by: Bernhard Beschow Reviewed-by: Michae

[PULL 06/12] hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow When calling pci_bus_irqs() multiple times on the same object without calling pci_bus_irqs_cleanup() in between PCIBus::irq_count[] is currently leaked. Let's fix this because Xen will do just that in a few commits, and because calling pci_bus_irqs_cleanup() in between seem

[PULL 10/12] hw/isa/piix3: Resolve redundant k->config_write assignments

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow The previous patch unified handling of piix3_write_config() accross the PIIX3 device models which allows for assigning k->config_write once in the base class. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Chuck Zm

[PULL 00/12] xen queue

2023-06-07 Thread Anthony PERARD via
: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20230607 for you to fetch changes up to 9000666052f99ed4217e75b73636acae61e6fc2c: xen-block: fix segv on unrealize (2023-06-07 15:07:10 +0100) Xen queue - fix for

[PULL 11/12] hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow During the last patches, TYPE_PIIX3_XEN_DEVICE turned into a clone of TYPE_PIIX3_DEVICE. Remove this redundancy. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Chuck Zmudzinski Message-Id: <20230312120221.99183-7-

[PULL 02/12] hw/xen: Fix memory leak in libxenstore_open() for Xen

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse There was a superfluous allocation of the XS handle, leading to it being leaked on both the error path and the success path (where it gets allocated again). Spotted by Coverity (CID 1508098). Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to in

[PULL 07/12] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow This is a preparational patch for the next one to make the following more obvious: First, pci_bus_irqs() is now called twice in case of Xen where the second call overrides the pci_set_irq_fn with the Xen variant. Second, pci_bus_set_route_irq_fn() is now also called in Xe

Re: [PATCH] hw/acpi: Fix PM control register access

2023-06-07 Thread Igor Mammedov
On Tue, 6 Jun 2023 18:59:48 +0200 (CEST) BALATON Zoltan wrote: > On Tue, 6 Jun 2023, Igor Mammedov wrote: > > On Sun, 28 May 2023 15:57:50 +0200 (CEST) > > BALATON Zoltan wrote: > > > >> On pegasos2 which has ACPI as part of VT8231 south bridge the board > >> firmware writes PM control registe

Re: [PATCH] gitlab: Disable io-raw-194 for build-tcg-disabled

2023-06-07 Thread Vladimir Sementsov-Ogievskiy
On 07.06.23 15:44, Stefan Hajnoczi wrote: The line of output that has changed was originally added by the following commit: commit ae00aa2398476824f0eca80461da215e7cdc1c3b Author: Vladimir Sementsov-Ogievskiy Date: Fri May 22 01:06:46 2020 +0300 iotests: 194: test also migration of dirt

[PATCH v3] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-07 Thread Christian Schoenebeck
The 9p protocol does not specifically define how server shall behave when client tries to open a special file, however from security POV it does make sense for 9p server to prohibit opening any special file on host side in general. A sane Linux 9p client for instance would never attempt to open a s

Re: [PATCH] vdpa: mask _F_CTRL_GUEST_OFFLOADS for vhost vdpa devices

2023-06-07 Thread Eugenio Perez Martin
On Wed, Jun 7, 2023 at 12:08 PM Michael Tokarev wrote: > > 02.06.2023 20:33, Eugenio Pérez wrote: > > QEMU does not emulate it so it must be disabled as long as the backend > > does not support it. > > > > Signed-off-by: Eugenio Pérez > > --- > > net/vhost-vdpa.c | 1 + > > 1 file changed, 1 i

Re: [PATCH v2 2/4] intel_iommu: Fix a potential issue in VFIO dirty page sync

2023-06-07 Thread Peter Xu
On Wed, Jun 07, 2023 at 03:14:07AM +, Duan, Zhenzhong wrote: > > > >-Original Message- > >From: Peter Xu > >Sent: Tuesday, June 6, 2023 11:42 PM > >Subject: Re: [PATCH v2 2/4] intel_iommu: Fix a potential issue in VFIO dirty > >page sync > > > ... > >> >> a/include/exec/memory.h b/in

Re: [PATCH 1/1] tests/avocado: update firmware to enable sbsa-ref/max

2023-06-07 Thread Philippe Mathieu-Daudé
On 30/5/23 17:22, Marcin Juszkiewicz wrote: Update prebuilt firmware images to have TF-A with FEAT_FGT support enabled. This allowed us to enable test for "max" cpu in sbsa-ref machine. Signed-off-by: Marcin Juszkiewicz --- tests/avocado/machine_aarch64_sbsaref.py | 22 +++---

Re: [PATCH v2 1/3] hw/smbios: Fix smbios_smp_sockets caculation

2023-06-07 Thread Igor Mammedov
On Thu, 1 Jun 2023 17:29:50 +0800 Zhao Liu wrote: > From: Zhao Liu > > Here're 2 mistakes: > 1. 003f230e37d7 ("machine: Tweak the order of topology members in struct >CpuTopology") changes the meaning of smp.cores but doesn't fix >original smp.cores uses. And because of the introductio

[PATCH V3] migration: simplify blockers

2023-06-07 Thread Steve Sistare
Modify migrate_add_blocker and migrate_del_blocker to take an Error ** reason. This allows migration to own the Error object, so that if an error occurs, migration code can free the Error and clear the client handle, simplifying client code. This is also a pre-requisite for future patches that wi

[PATCH] iotests: fix 194: filter out racy postcopy-active event

2023-06-07 Thread Vladimir Sementsov-Ogievskiy
The event is racy: it will not appear in the output if bitmap is migrated during downtime period of migration and postcopy phase is not started. Fixes: ae00aa239847 "iotests: 194: test also migration of dirty bitmap" Reported-by: Richard Henderson Signed-off-by: Vladimir Sementsov-Ogievskiy ---

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

2023-06-07 Thread Jagannathan Raman
Fix a typo in the system documentation for multi-process QEMU. Signed-off-by: Jagannathan Raman Reviewed-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi --- docs/system/multi-process.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/multi-process.rst b/docs

[PULL 0/2] vfio-user queue

2023-06-07 Thread Jagannathan Raman
u.git tags/pull-vfio-user-20230607 for you to fetch changes up to 7771e8b86335968ee46538d1afd44246e7a062bc: docs: fix multi-process QEMU documentation (2023-06-07 10:21:53 -0400) vfio-user: Fix the documentation for vfio-user and mul

Re: [PATCH] gitlab: Disable io-raw-194 for build-tcg-disabled

2023-06-07 Thread Vladimir Sementsov-Ogievskiy
On 06.06.23 19:25, Richard Henderson wrote: This test consistently fails on Azure cloud build hosts in a way that suggests a timing problem in the test itself: --- .../194.out +++ .../194.out.bad @@ -14,7 +14,6 @@ {"return": {}} {"data": {"status": "setup"}, "event": "MIGRATION", "timestamp"

[PULL 1/2] vfio-user: update comments

2023-06-07 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 Reviewed-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi --- hw/remote/vfio-user-obj.c | 14 +++--- 1 file chang

[PATCH V3] migration: simplify notifiers

2023-06-07 Thread Steve Sistare
Pass the callback function to add_migration_state_change_notifier so that migration can initialize the notifier on add and clear it on delete, which simplifies the call sites. Shorten the function names so the extra arg can be added more legibly. Hide the global notifier list in a new function mi

Re: [PATCH V2] memory: RAM_NAMED_FILE flag

2023-06-07 Thread Peter Xu
On Wed, Jun 07, 2023 at 10:05:11AM -0400, Steven Sistare wrote: > On 2/8/2023 2:22 PM, Peter Xu wrote: > > On Wed, Feb 08, 2023 at 01:34:18PM -0500, Steven Sistare wrote: > >> On 2/7/2023 3:23 PM, Peter Xu wrote: > >>> On Tue, Feb 07, 2023 at 11:03:33AM -0800, Steve Sistare wrote: > migrate_ig

Re: [PULL 00/12] xen queue

2023-06-07 Thread Michael Tokarev
07.06.2023 17:18, Anthony PERARD via wrote: .. Anthony PERARD (1): xen-block: fix segv on unrealize Bernhard Beschow (7): include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq() hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs() hw/isa/piix3:

Re: [PATCH v2 2/3] hw/smbios: Fix thread count in type4

2023-06-07 Thread Igor Mammedov
On Thu, 1 Jun 2023 17:29:51 +0800 Zhao Liu wrote: > From: Zhao Liu > > From SMBIOS 3.0 specification, thread count field means: > > Thread Count is the total number of threads detected by the BIOS for > this processor socket. It is a processor-wide count, not a > thread-per-core count. [1] >

Re: [PATCH v2 3/3] hw/smbios: Fix core count in type4

2023-06-07 Thread Igor Mammedov
On Thu, 1 Jun 2023 17:29:52 +0800 Zhao Liu wrote: > From: Zhao Liu > > From SMBIOS 3.0 specification, core count field means: > > Core Count is the number of cores detected by the BIOS for this > processor socket. [1] > > Before 003f230e37d7 ("machine: Tweak the order of topology members in

[PATCH v3 0/4] vhost-user-gpu get_edid feature

2023-06-07 Thread Erico Nunes
This adds support to the virtio-gpu get_edid command in qemu as the frontend as well as the vhost-user-gpu implementation in contrib/. So far, qemu has been outputting the following message: EDID requested but the backend doesn't support it. when using that implementation. This is tested with vh

[PATCH v3 2/4] docs: vhost-user-gpu: add protocol changes for EDID

2023-06-07 Thread Erico Nunes
VHOST_USER_GPU_GET_EDID is defined as a message from the backend to the frontend to retrieve the EDID data for a given scanout. The VHOST_USER_GPU_PROTOCOL_F_EDID protocol feature is defined as a way to check whether this new message is supported or not. Signed-off-by: Erico Nunes --- docs/inte

[PATCH v3 4/4] vhost-user-gpu: implement get_edid frontend feature

2023-06-07 Thread Erico Nunes
Implement the frontend side of the get_edid feature in the qemu vhost-user-gpu frontend device. Signed-off-by: Erico Nunes --- hw/display/vhost-user-gpu.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user

[PATCH v3 3/4] contrib/vhost-user-gpu: implement get_edid feature

2023-06-07 Thread Erico Nunes
Implement the virtio-gpu feature in contrib/vhost-user-gpu, which was unsupported until now. In this implementation, the feature is enabled inconditionally to avoid creating another optional config argument. Similarly to get_display_info, vhost-user-gpu sends a message back to the frontend to have

[PATCH v3 1/4] virtio-gpu: refactor generate_edid function to virtio_gpu_base

2023-06-07 Thread Erico Nunes
This functionality can be shared with upcoming use in vhost-user-gpu, so move it to the shared file to avoid duplicating it. Signed-off-by: Erico Nunes --- hw/display/virtio-gpu-base.c | 17 + hw/display/virtio-gpu.c| 20 +--- include/hw/virtio/virtio-gp

Release of RSD (Rust QSD) 0.1

2023-06-07 Thread Hanna Czenczek
Hi everyone! I’ve just released the first version (0.1) of RSD, which is a proof-of-concept to rewrite the qemu-storage-daemon (QSD) and thus the qemu block layer in Rust: https://gitlab.com/hreitz/rsd https://gitlab.com/hreitz/rsd/-/releases/v0.1 We’ve been talking for quite a long time abo

Re: [PATCH] gitlab: Disable io-raw-194 for build-tcg-disabled

2023-06-07 Thread Stefan Hajnoczi
On Wed, 7 Jun 2023 at 10:39, Vladimir Sementsov-Ogievskiy wrote: > > On 06.06.23 19:25, Richard Henderson wrote: > > This test consistently fails on Azure cloud build hosts in > > a way that suggests a timing problem in the test itself: > > > > --- .../194.out > > +++ .../194.out.bad > > @@ -14,7

Re: [PATCH V3] migration: simplify notifiers

2023-06-07 Thread Peter Xu
On Wed, Jun 07, 2023 at 07:42:34AM -0700, Steve Sistare wrote: > Pass the callback function to add_migration_state_change_notifier so > that migration can initialize the notifier on add and clear it on > delete, which simplifies the call sites. Shorten the function names > so the extra arg can be

Re: [PATCH v3] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-07 Thread Greg Kurz
On Wed, 7 Jun 2023 15:50:01 +0200 Christian Schoenebeck wrote: > The 9p protocol does not specifically define how server shall behave when > client tries to open a special file, however from security POV it does > make sense for 9p server to prohibit opening any special file on host side > in gen

Re: [PULL 05/17] parallels: Out of image offset in BAT leads to image inflation

2023-06-07 Thread Hanna Czenczek
On 07.06.23 08:51, Michael Tokarev wrote: 05.06.2023 18:45, Hanna Czenczek wrote: From: Alexander Ivanov data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or t

Re: [PATCH v5 2/3] hw/i386/pc: Default to use SMBIOS 3.0 for newer machine models

2023-06-07 Thread Igor Mammedov
On Tue, 6 Jun 2023 21:49:38 -0500 Suravee Suthikulpanit wrote: > Currently, pc-q35 and pc-i44fx machine models are default to use SMBIOS 2.8 > (32-bit entry point). Since SMBIOS 3.0 (64-bit entry point) is now fully > supported since QEMU 7.0, default to use SMBIOS 3.0 for newer machine > models.

Re: QEMU developers fortnightly conference call for 2023-06-13

2023-06-07 Thread Philippe Mathieu-Daudé
Hi Juan, On 7/6/23 15:55, juan.quint...@gmail.com wrote: QEMU developers fortnightly conference call Hi Here is the wiki for whover that wants to add topics to the agenda. https://wiki.qemu.org/QEMUCall#Call_for_agenda_for_2023-06-13

[PATCH V3] memory: RAM_NAMED_FILE flag

2023-06-07 Thread Steve Sistare
migrate_ignore_shared() is an optimization that avoids copying memory that is visible and can be mapped on the target. However, a memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED flag set is not migrated when migrate_ignore_shared() is true. This is wrong, because the block

[PATCH 2/3] qemu-img: map: report compressed data blocks

2023-06-07 Thread Andrey Drobyshev via
Right now "qemu-img map" reports compressed blocks as containing data but having no host offset. This is not very informative. Instead, let's add another boolean field named "compressed" in case JSON output mode is specified. This is achieved by utilizing new allocation status flag BDRV_BLOCK_CO

[PATCH 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-06-07 Thread Andrey Drobyshev via
Functions qcow2_get_host_offset(), get_cluster_offset() explicitly report compressed cluster types when data is compressed. However, this information is never passed further. Let's make use of it by adding new BDRV_BLOCK_COMPRESSED flag for bdrv_block_status(), so that caller may know that the da

[PATCH 0/3] qemu-img: map: implement support for compressed clusters

2023-06-07 Thread Andrey Drobyshev via
This series adds "compressed" field to the output of "qemu-img map" command, specifying whether or not data block is compressed. Only JSON output mode is affected. With this applied, output looks like so: # qemu-img create -f qcow2 img.qcow2 192K # qemu-io -c "write -c -P 0xaa 0 64K" img.qcow2 #

[PATCH 3/3] qemu-iotests: update expected tests output to contain "compressed" field

2023-06-07 Thread Andrey Drobyshev via
The previous commit adds "compressed" boolean field to JSON output of "qemu-img map" command. Let's tweak expected tests output accordingly. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/122.out| 84 tests/qemu-iotests/154.out| 194

Re: [PATCH 1/1] tests/avocado: update firmware to enable sbsa-ref/max

2023-06-07 Thread Marcin Juszkiewicz
W dniu 7.06.2023 o 16:33, Philippe Mathieu-Daudé pisze: On 30/5/23 17:22, Marcin Juszkiewicz wrote: Update prebuilt firmware images to have TF-A with FEAT_FGT support enabled. This allowed us to enable test for "max" cpu in sbsa-ref machine. Signed-off-by: Marcin Juszkiewicz ---   tests/avocad

Re: [PATCH v3] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-07 Thread Michael Tokarev
07.06.2023 17:50, Greg Kurz wrote: On Wed, 7 Jun 2023 15:50:01 +0200 .. +static inline int check_is_regular_file_or_dir(int fd) +{ +struct stat stbuf; + +if (qemu_fstat(fd, &stbuf) < 0) { +close_preserve_errno(fd); Maybe worth to mention somewhere that this function not only c

Re: [PATCH] vdpa: dont check vhost_vdpa->suspended when unsupported

2023-06-07 Thread Eugenio Perez Martin
On Wed, Jun 7, 2023 at 11:09 AM Zhu Lingshan wrote: > > When read the state of a virtqueue, vhost_vdpa need > to check whether the device is suspended. > > This commit verifies whether VHOST_BACKEND_F_SUSPEND is > negotiated when checking vhost_vdpa->suspended. > I'll add: Otherwise, qemu prints

Re: [PATCH v5 3/3] pc: q35: Bump max_cpus to 1024

2023-06-07 Thread Igor Mammedov
On Tue, 6 Jun 2023 21:49:39 -0500 Suravee Suthikulpanit wrote: > Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in > arch/x86/include/asm/kvm_host.h, update QEMU limits to the same number. > > In case KVM could not support the specified number of vcpus, QEMU would > return the

[PULL 1/5] tcg/tci: Adjust passing of MemOpIdx

2023-06-07 Thread Richard Henderson
Since adding MO_ATOM_MASK, the maximum MemOpIdx requires 15 bits, which overflows the 12 bit field allocated for TCI memory ops. Expand the field to 16 bits for 2-operand memory ops, and place the value in TCG_REG_TMP for 3-operand memory ops (same as we already do for 4-operand memory ops). Cures

[PULL 0/5] misc ci fixes

2023-06-07 Thread Richard Henderson
u.git tags/pull-ci-20230607 for you to fetch changes up to dcc28ab603f30df5cc8be1f759b423e94ae7d10f: iotests: fix 194: filter out racy postcopy-active event (2023-06-07 08:36:55 -0700) Fix TCI regressions vs Int128 Fix Arm build vs

[PULL 2/5] tcg/tci: Adjust call-clobbered regs for int128_t

2023-06-07 Thread Richard Henderson
We require either 2 or 4 registers to hold int128_t. Failure to do so results in a register allocation assert. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tcg/tci/t

[PULL 4/5] gitlab: Add cross-arm64-kvm-only

2023-06-07 Thread Richard Henderson
We are not currently running a --disable-tcg test for arm64, like we are for mips, ppc and s390x. We have a job for the native aarch64 runner, but it is not run by default and it is not helpful for normal developer testing without access to qemu's private runner. Use --without-default-features to

[PULL 0/3] SNAFU build system fixes for 2023-06-07

2023-06-07 Thread Paolo Bonzini
The following changes since commit f5e6786de4815751b0a3d2235c760361f228ea48: Merge tag 'pull-target-arm-20230606' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-06-06 12:11:34 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for

Re: [PATCH] vdpa: fix not using CVQ buffer in case of error

2023-06-07 Thread Eugenio Perez Martin
On Wed, Jun 7, 2023 at 12:11 PM Michael Tokarev wrote: > > 02.06.2023 20:34, Eugenio Pérez wrote: > > Bug introducing when refactoring. Otherway, the guest never received > > the used buffer. > > > > Fixes: be4278b65fc1 ("vdpa: extract vhost_vdpa_net_cvq_add from > > vhost_vdpa_net_handle_ctrl_a

Re: [PATCH V9 00/46] Live Update

2023-06-07 Thread Michael Galaxy
Another option could be to expose "-migrate-mode-disable" (instead of enable) and just enable all 3 modes by default, since we are already required to switch from "normal" mode to a CPR-specific mode when it is time to do a live update, if the intention is to preserve the capability to completely

Re: [PATCH V3] migration: simplify blockers

2023-06-07 Thread Peter Xu
On Wed, Jun 07, 2023 at 07:35:32AM -0700, Steve Sistare wrote: > Modify migrate_add_blocker and migrate_del_blocker to take an Error ** > reason. This allows migration to own the Error object, so that if > an error occurs, migration code can free the Error and clear the client > handle, simplifyin

[PATCH 0/1] update maintainers list for vfio-user & multi-process QEMU

2023-06-07 Thread Jagannathan Raman
John Johnson doesn't work at Oracle anymore. I tried to contact him to get his updated email address, but I haven't heard anything from him. Jagannathan Raman (1): maintainers: update maintainers list for vfio-user & multi-process QEMU MAINTAINERS | 1 - 1 file changed, 1 deletion(-) --

[PATCH 1/1] maintainers: update maintainers list for vfio-user & multi-process QEMU

2023-06-07 Thread Jagannathan Raman
Signed-off-by: Jagannathan Raman --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 436b3f0afefd..4a80a385118d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3786,7 +3786,6 @@ F: tests/tcg/aarch64/system/semiheap.c Multi-process QEMU M: Elena Ufim

Re: [PATCH v2 5/8] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set

2023-06-07 Thread Niklas Cassel
On Mon, Jun 05, 2023 at 08:19:43PM -0400, John Snow wrote: > On Thu, Jun 1, 2023 at 9:46 AM Niklas Cassel wrote: > > > > From: Niklas Cassel > > > > For NCQ, PxCI is cleared on command queued successfully. > > For non-NCQ, PxCI is cleared on command completed successfully. > > Successfully means

Re: [PATCH] vdpa: fix not using CVQ buffer in case of error

2023-06-07 Thread Michael Tokarev
07.06.2023 16:52, Eugenio Perez Martin wrote: On Wed, Jun 7, 2023 at 12:11 PM Michael Tokarev wrote: .. Again, smells like a stable material, is it not? Please Cc: qemu-sta...@nongnu.org for other changes you think should be applied to stable qemu series. Sorry, I totally forgot. This one s

[PATCH v2 1/3] migration/multifd: Rename threadinfo.c functions

2023-06-07 Thread Fabiano Rosas
We're about to add more functions to this file so make it use the same coding style as the rest of the code. Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé --- migration/migration.c | 4 ++-- migration/multifd.c| 4 ++-- migration/threadinfo.c

[PATCH v2 3/3] tests/qtest: Re-enable multifd cancel test

2023-06-07 Thread Fabiano Rosas
We've found the source of flakiness in this test, so re-enable it. Reviewed-by: Juan Quintela Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c

[PATCH v2 2/3] migration/multifd: Protect accesses to migration_threads

2023-06-07 Thread Fabiano Rosas
This doubly linked list is common for all the multifd and migration threads so we need to avoid concurrent access. Add a mutex to protect the data from concurrent access. This fixes a crash when removing two MigrationThread objects from the list at the same time during cleanup of multifd threads.

[PATCH v2 0/3] migration: Fix multifd cancel test

2023-06-07 Thread Fabiano Rosas
v2: - patch 1: dropped the qmp_ prefix; - patch 2: dropped the qemu_mutex_destroy; stopped moving the _remove functions (don't strictly need it anymore since not destroying the mutex explicitly); added the lock to protect the loop in qmp_query_migratio

Re: [PATCH v2 0/3] migration: Fix multifd cancel test

2023-06-07 Thread Peter Xu
On Wed, Jun 07, 2023 at 01:13:03PM -0300, Fabiano Rosas wrote: > Fabiano Rosas (3): > migration/multifd: Rename threadinfo.c functions > migration/multifd: Protect accesses to migration_threads > tests/qtest: Re-enable multifd cancel test Reviewed-by: Peter Xu -- Peter Xu

[PULL 0/6] tricore queue

2023-06-07 Thread Bastian Koppelmann
n/qemu.git tags/pull-tricore-20230607 for you to fetch changes up to e926c94171ae37397c8c4b54cef60e5c7ebbf243: tests/tcg/tricore: Add recursion test for CSAs (2023-06-07 18:20:51 +0200) - Refactor PCXI/ICR field handling in newer IS

[PULL 2/6] tests/tcg/tricore: Uses label for memory addresses

2023-06-07 Thread Bastian Koppelmann
the linker might rearrange sections, so lets reference memory by label name instead of addr + off. Signed-off-by: Bastian Koppelmann Message-Id: <20230526061946.54514-3-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/asm/macros.h | 1 - tests/tcg/tricore/asm/test_ld_bu.S | 4 ++-- test

[PULL 1/6] tests/tcg/tricore: Move asm tests into 'asm' directory

2023-06-07 Thread Bastian Koppelmann
this seperates these tests from the upcoming tests written in C. Also rename the compiled test to 'test_.asm.tst'. Signed-off-by: Bastian Koppelmann Message-Id: <20230526061946.54514-2-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 35 --- tes

[PULL 4/6] target/tricore: Refactor PCXI/ICR register fields

2023-06-07 Thread Bastian Koppelmann
starting from ISA version 1.6.1 (previously known as 1.6P/E), some bitfields in PCXI and ICR have changed. We also refactor these registers using the register fields API. Signed-off-by: Bastian Koppelmann Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1453 Message-Id: <20230526061946.545

[PULL 3/6] tests/tcg/tricore: Add first C program

2023-06-07 Thread Bastian Koppelmann
this allows us to exercise the startup code used by GCC to call main(). Signed-off-by: Bastian Koppelmann Message-Id: <20230526061946.54514-4-kbast...@mail.uni-paderborn.de> --- configure | 1 + tests/tcg/tricore/Makefile.softmmu-target | 13 + tests/tcg/tricor

[PULL 5/6] target/tricore: Fix wrong PSW for call insns

2023-06-07 Thread Bastian Koppelmann
we were copying PSW into a local variable, updated PSW.CDE in the local and never wrote it back. So when we called save_context_upper() we were using the non-local version of PSW which did not contain the updated PSW.CDE. Signed-off-by: Bastian Koppelmann Message-Id: <20230526061946.54514-6-kbast

[PULL 6/6] tests/tcg/tricore: Add recursion test for CSAs

2023-06-07 Thread Bastian Koppelmann
Signed-off-by: Bastian Koppelmann Message-Id: <20230526061946.54514-7-kbast...@mail.uni-paderborn.de> --- tests/tcg/tricore/Makefile.softmmu-target | 3 ++- tests/tcg/tricore/c/test_context_save_areas.c | 15 +++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 10064

[PULL 3/5] target/arm: Only include tcg/oversized-guest.h if CONFIG_TCG

2023-06-07 Thread Richard Henderson
Fixes the build for --disable-tcg. This header is only needed for cross-hosting. Without CONFIG_TCG, we know this is an AArch64 host, CONFIG_ATOMIC64 will be set, and the TCG_OVERSIZED_GUEST block will never be compiled. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[PULL 3/3] tests: fp: remove unused submodules

2023-06-07 Thread Paolo Bonzini
tests/fp/berkeley-softfloat-3 and tests/fp/berkeley-testfloat-3 have been replaced by subprojects, so remove the now-unnecessary submodules. Reported-by: Michal Privoznik Signed-off-by: Paolo Bonzini --- tests/fp/berkeley-softfloat-3 | 1 - tests/fp/berkeley-testfloat-3 | 1 - 2 files changed,

[PULL 2/3] configure: check for $download value properly

2023-06-07 Thread Paolo Bonzini
From: Michal Privoznik If configure was invoked with --disable-download and git submodules were not checked out a warning is produced and the configure script fails. But the $download variable (which reflects the enable/disable download argument) is checked for in a weird fashion: test -f "$do

[PULL 1/3] meson: fix "static build" entry in summary

2023-06-07 Thread Paolo Bonzini
Fixes: a0cbd2e8496 ("meson: use prefer_static option", 2023-05-18) Signed-off-by: Paolo Bonzini --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 553c8e0b9c5..c03326c922e 100644 --- a/meson.build +++ b/meson.build @@ -4088,7 +4088,

Re: [PATCH v2 5/8] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set

2023-06-07 Thread Niklas Cassel
On Wed, Jun 07, 2023 at 06:01:17PM +0200, Niklas Cassel wrote: > On Mon, Jun 05, 2023 at 08:19:43PM -0400, John Snow wrote: > > On Thu, Jun 1, 2023 at 9:46 AM Niklas Cassel wrote: > > > > > > From: Niklas Cassel > > > > > > For NCQ, PxCI is cleared on command queued successfully. > > > For non-NC

[PULL 5/5] iotests: fix 194: filter out racy postcopy-active event

2023-06-07 Thread Richard Henderson
From: Vladimir Sementsov-Ogievskiy The event is racy: it will not appear in the output if bitmap is migrated during downtime period of migration and postcopy phase is not started. Fixes: ae00aa239847 "iotests: 194: test also migration of dirty bitmap" Reported-by: Richard Henderson Signed-off-b

Re: [PATCH v5 1/3] hw/i386/pc: Refactor logic to set SMBIOS defaults

2023-06-07 Thread Igor Mammedov
On Tue, 6 Jun 2023 21:49:37 -0500 Suravee Suthikulpanit wrote: > Into a helper function pc_machine_init_smbios() in preparation for > subsequent code to upgrade default SMBIOS entry point type. > > Then, call the helper function from the pc_machine_initfn() to eliminate > duplicate code in pc_q3

Re: [PATCH v2] target/riscv/vector_helper.c: Remove the check for extra tail elements

2023-06-07 Thread Weiwei Li
On 2023/6/7 17:16, Xiao Wang wrote: Commit 752614cab8e6 ("target/riscv: rvv: Add tail agnostic for vector load / store instructions") added an extra check for LMUL fragmentation, intended for setting the "rest tail elements" in the last register for a segment load insn. Actually, the max_eleme

Re: [PATCH V2] oslib: qemu_clear_cloexec

2023-06-07 Thread Steven Sistare
Hi Paolo, Can I get an RB from you on this patch, since you maintain posix? This is needed for live update, to preserve vfio device descriptors and character device descriptors across the exec of the new qemu binary. If yes, I will rebase to the tip and repost a V3. - Steve On 2/7/2023 2:03 PM,

Re: [PATCH 0/1] update maintainers list for vfio-user & multi-process QEMU

2023-06-07 Thread Stefan Hajnoczi
On Wed, 7 Jun 2023 at 11:58, Jagannathan Raman wrote: > > John Johnson doesn't work at Oracle anymore. I tried to contact him to > get his updated email address, but I haven't heard anything from him. > > Jagannathan Raman (1): > maintainers: update maintainers list for vfio-user & multi-process

[RFC v2 3/6] target/i386: Add native library calls

2023-06-07 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- target/i386/helper.h | 6 +++ target/i386/tcg/translate.c | 20 + target/i386/tcg/user/meson.build | 1 + target/i386/tcg/user/native_helper.c | 65 4 files changed, 92 insertions(+) create mode 100644

[RFC v2 0/6] Native Library Calls

2023-06-07 Thread Yeqi Fu
This patch introduces a set of feature instructions for native calls and provides helpers to translate these instructions to corresponding native functions. A shared library is also implemented, where native functions are rewritten as feature instructions. At runtime, user programs load the shared

[RFC v2 1/6] build: Add configure options for native calls

2023-06-07 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- Makefile| 4 +++ common-user/native/Makefile.include | 9 ++ common-user/native/Makefile.target | 22 + configure | 50 + docs/devel/build-system.rst | 4 +++ m

[RFC v2 5/6] target/arm: Add native library calls

2023-06-07 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- target/arm/helper.c| 47 ++ target/arm/helper.h| 6 + target/arm/tcg/translate-a64.c | 22 target/arm/tcg/translate.c | 25 +- target/arm/tcg/translate.h | 19 +

Re: [PATCH 0/1] update maintainers list for vfio-user & multi-process QEMU

2023-06-07 Thread Jag Raman
> On Jun 7, 2023, at 12:44 PM, Stefan Hajnoczi wrote: > > On Wed, 7 Jun 2023 at 11:58, Jagannathan Raman wrote: >> >> John Johnson doesn't work at Oracle anymore. I tried to contact him to >> get his updated email address, but I haven't heard anything from him. >> >> Jagannathan Raman (1):

[RFC v2 2/6] Add the libnative library

2023-06-07 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- common-user/native/libnative.c | 65 ++ include/native/libnative.h | 11 ++ include/native/native-func.h | 11 ++ 3 files changed, 87 insertions(+) create mode 100644 common-user/native/libnative.c create mode 100644 inclu

[RFC v2 6/6] linux-user: Add '-native-bypass' option

2023-06-07 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- include/qemu/envlist.h | 1 + linux-user/main.c | 23 + util/envlist.c | 56 ++ 3 files changed, 80 insertions(+) diff --git a/include/qemu/envlist.h b/include/qemu/envlist.h index 6006dfae44..865eb1

<    1   2   3   >