Re: [PULL 17/18] aio-posix: do not nest poll handlers

2023-05-18 Thread Michael Tokarev
17.05.2023 19:51, Kevin Wolf wrote: From: Stefan Hajnoczi QEMU's event loop supports nesting, which means that event handler functions may themselves call aio_poll(). The condition that triggered a handler must be reset before the nested aio_poll() call, otherwise the same handler will be calle

Re: [PATCH v2] Add information how to fix common build error on Windows in symlink-install-tree

2023-05-18 Thread Michael Tokarev
05.05.2023 00:11, Mateusz Krawczuk wrote: .. except BaseException as e: if not isinstance(e, OSError) or e.errno != errno.EEXIST: +if os.name == 'nt': +print('Please enable Developer Mode to support soft link ' + 'without Administra

Re: [PATCH v2 3/7] migration: Enable precopy initial data capability

2023-05-18 Thread Avihai Horon
On 17/05/2023 19:07, Peter Xu wrote: External email: Use caution opening links or attachments On Wed, May 17, 2023 at 06:52:15PM +0300, Avihai Horon wrote: Now that precopy initial data logic has been implemented, enable the capability. Signed-off-by: Avihai Horon Reviewed-by: Juan Quintel

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

2023-05-18 Thread Michael Tokarev
11.05.2023 11:40, Juan Quintela wrote: Fiona Ebner wrote: ... Closes: https://gitlab.com/qemu-project/qemu/-/issues/1576 AFAICT, this breaks (forward) migration from 8.0 to 8.0 + this patch when using machine type <= 7.2. That is because after this patch, when using machine type <= 7.2, the w

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

2023-05-18 Thread Avihai Horon
On 17/05/2023 19:39, Peter Xu wrote: External email: Use caution opening links or attachments 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

[PATCH] multifd: Set a higher "backlog" default value for listen()

2023-05-18 Thread Lei Wang
When destination VM is launched, the "backlog" parameter for listen() is set to 1 as default in socket_start_incoming_migration_internal(), which will lead to socket connection error (the queue of pending connections is full) when "multifd" and "multifd-channels" are set later on and a high number

Re: Multiple vIOMMU instance support in QEMU?

2023-05-18 Thread Eric Auger
Hi Nicolin, On 5/18/23 05:22, Nicolin Chen wrote: > Hi Peter, > > Eric previously mentioned that you might not like the idea. > Before we start this big effort, would it possible for you > to comment a word or two on this topic? > > Thanks! > > On Mon, Apr 24, 2023 at 04:42:57PM -0700, Nicolin Che

[PATCH v1] hw/loongarch: Add numa support

2023-05-18 Thread Song Gao
1. Implement some functions for LoongArch numa support; 2. Implement fdt_add_memory_node() for fdt; 3. build_srat() fills node_id and adds build numa memory. Base-on: https://patchew.org/QEMU/20230518014115.117869-1-gaos...@loongson.cn/ Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 42

RE: [PATCH] multifd: Set a higher "backlog" default value for listen()

2023-05-18 Thread Wang, Wei W
On Thursday, May 18, 2023 4:52 PM, Wang, Lei4 wrote: > When destination VM is launched, the "backlog" parameter for listen() is set > to 1 as default in socket_start_incoming_migration_internal(), which will > lead to socket connection error (the queue of pending connections is full) > when "multif

Re: [PATCH] multifd: Set a higher "backlog" default value for listen()

2023-05-18 Thread Juan Quintela
Lei Wang wrote: > When destination VM is launched, the "backlog" parameter for listen() is set > to 1 as default in socket_start_incoming_migration_internal(), which will > lead to socket connection error (the queue of pending connections is full) > when "multifd" and "multifd-channels" are set la

Re: [PATCH 6/9] migration/xbzrle: Shuffle function order

2023-05-18 Thread Juan Quintela
Richard Henderson wrote: > Place the CONFIG_AVX512BW_OPT block at the top, > which will aid function selection in the next patch. > > Signed-off-by: Richard Henderson Reviewed-by: Juan Quintela Queued.

Re: [PATCH 8/9] migration: Build migration_files once

2023-05-18 Thread Juan Quintela
Richard Henderson wrote: > The items in migration_files are built for libmigration and included > info softmmu_ss from there; no need to also include them directly. > > Signed-off-by: Richard Henderson Ouch. Good catch. Reviewed-by: Juan Quintela queued.

Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-18 Thread Peter Maydell
On Wed, 17 May 2023 at 21:32, Richard Henderson wrote: > Failures: > https://gitlab.com/qemu-project/qemu/-/jobs/4304958508#L2551 > > /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): > in function `__libc_init_first': > (.text+0x10): relocation trun

Re: [PATCH 1/9] util: Introduce host-specific cpuinfo.h

2023-05-18 Thread Juan Quintela
Richard Henderson wrote: > The entire contents of the header is host-specific, but the > existence of such a header is not, which could prevent some > host specific ifdefs at the top of the file for the include. > > Add include/host/{arch,generic} to the project arguments. > > Signed-off-by: Richa

Re: [PATCH 2/9] util: Add cpuinfo-i386.c

2023-05-18 Thread Juan Quintela
Richard Henderson wrote: > Add cpuinfo.h for i386 and x86_64, and the initialization > for that in util/. Populate that with a slightly altered > copy of the tcg host probing code. Other uses of cpuid.h > will be adjusted one patch at a time. > > Signed-off-by: Richard Henderson Reviewed-by: J

Re: [PATCH 7/9] migration/xbzrle: Use i386 cacheinfo.h

2023-05-18 Thread Juan Quintela
Richard Henderson wrote: > Perform the function selection once, and only if CONFIG_AVX512_OPT > is enabled. Centralize the selection to xbzrle.c, instead of > spreading the init across 3 files. > > Remove xbzrle-bench.c. The benefit of being able to benchmark > the different implementations is l

Re: [PATCH v9 00/11] target/riscv: rework CPU extension validation

2023-05-18 Thread Alistair Francis
On Wed, May 17, 2023 at 11:59 PM Daniel Henrique Barboza wrote: > > Hi, > > In this version we have a change in patch 11. We're now firing a > GUEST_ERROR if write_misa() fails and we need to rollback (i.e. not > change MISA ext). > > No other changes made. > > Changes from v8: > - patch 11: > -

Re: [PATCH v6 00/12] target/riscv: Fix PMP related problem

2023-05-18 Thread Alistair Francis
On Wed, May 17, 2023 at 7:16 PM Weiwei Li wrote: > > This patchset originally tries to fix the PMP bypass problem issue > https://gitlab.com/qemu-project/qemu/-/issues/1542: > > * TLB will be cached if the matched PMP entry cover the whole page. However > PMP entries with higher priority may co

Re: [PATCH 5/9] util/bufferiszero: Use i386 cpuinfo.h

2023-05-18 Thread Juan Quintela
Richard Henderson wrote: > Use cpuinfo_init() during init_accel(), and the variable cpuinfo > during test_buffer_is_zero_next_accel(). Adjust the logic that > cycles through the set of accelerators for testing. > > Signed-off-by: Richard Henderson Semi related to this. For migration, I check e

Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-18 Thread Paolo Bonzini
On 5/18/23 11:22, Peter Maydell wrote: On Wed, 17 May 2023 at 21:32, Richard Henderson wrote: Failures: https://gitlab.com/qemu-project/qemu/-/jobs/4304958508#L2551 /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): in function `__libc_init_firs

Re: [PATCH RFC 1/5] hw/cxl: Use define for build bug detection

2023-05-18 Thread Jonathan Cameron via
On Wed, 17 May 2023 19:45:54 -0700 Ira Weiny wrote: > Magic numbers can be confusing. > > Use the range size define for CXL.cachemem rather than a magic number. > Update/add spec references. > > Signed-off-by: Ira Weiny I guess we should do a scrub to move all refs to 3.0 soon given it's horr

Re: [PATCH] Maintainers: add myself as reviewer for sbsa-ref

2023-05-18 Thread Peter Maydell
On Mon, 15 May 2023 at 15:37, Marcin Juszkiewicz wrote: > > At Linaro I work on sbsa-ref, know direction it goes. > > May not get code details each time. > > Signed-off-by: Marcin Juszkiewicz > --- Applied to target-arm.next, thanks. -- PMM

Re: [PATCH v7 0/1] arm: enable MTE for QEMU + kvm

2023-05-18 Thread Peter Maydell
On Fri, 28 Apr 2023 at 10:55, Cornelia Huck wrote: > > v7 takes a different approach to wiring up MTE, so I still include a cover > letter where I can explain things better, even though it is now only a > single patch :) Applied to target-arm.next, thanks. -- PMM

Re: [RFC PATCH] target/arm: add RAZ/WI handling for DBGDTR[TX|RX]

2023-05-18 Thread Peter Maydell
On Tue, 16 May 2023 at 11:44, Alex Bennée wrote: > > The commit b3aa2f2128 (target/arm: provide stubs for more external > debug registers) was added to handle HyperV's unconditional usage of > Debug Communications Channel. It turns out that Linux will similarly > break if you enable CONFIG_HVC_DCC

Re: [PATCH] sbsa-ref: use Bochs graphics card instead of VGA

2023-05-18 Thread Peter Maydell
On Wed, 17 May 2023 at 11:55, Leif Lindholm wrote: > > On 2023-05-05 13:09, Marcin Juszkiewicz wrote: > > Bochs card is normal PCI Express card so it fits better in system with > > PCI Express bus. VGA is simple legacy PCI card. > > > > Signed-off-by: Marcin Juszkiewicz > > Reviewed-by: Leif Lind

[PULL v2 00/59] i386, build system, KVM changes for 2023-05-18

2023-05-18 Thread Paolo Bonzini
The following changes since commit d27e7c359330ba7020bdbed7ed2316cb4cf6ffc1: qapi/parser: Drop two bad type hints for now (2023-05-17 10:18:33 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 43663e2f0acc8f56

[PULL v2 39/59] configure: bootstrap sphinx with mkvenv

2023-05-18 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

[PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt

2023-05-18 Thread Paolo Bonzini
monitor_event() is not using monitor_suspend() and monitor_resume() even though that is the desired outcome of moving out of and back into the monitor with Ctrl-a c. While cleaning this up, make the locking of several fields in struct Monitor less esoteric, i.e. protect them just with mon_lock. T

[PATCH 1/4] monitor: use QEMU_LOCK_GUARD a bit more

2023-05-18 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- monitor/monitor.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monitor/monitor.c b/monitor/monitor.c index 602535696c59..4b11bca2a21d 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -161,10 +161,9 @@ static gboolean monitor_u

[PATCH 4/4] monitor: do not use mb_read/mb_set for suspend_cnt

2023-05-18 Thread Paolo Bonzini
Clean up monitor_event to just use monitor_suspend/monitor_resume, using mon->mux_out to protect against incorrect nesting (especially on startup). The only remaining case of reading suspend_cnt is in the can_read callback, which is just advisory and can use qatomic_read. As an extra benefit, mux

[PATCH 2/4] monitor: allow calling monitor_resume under mon_lock

2023-05-18 Thread Paolo Bonzini
Move monitor_resume()'s call to readline_show_prompt() outside the potentially locked section. Reuse the existing monitor_accept_input() bottom half for this purpose. Signed-off-by: Paolo Bonzini --- monitor/monitor.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --gi

[PATCH 2/5] monitor: cleanup fetching of QMP requests

2023-05-18 Thread Paolo Bonzini
Use a continue statement so that "after going to sleep" is treated the same way as "after processing a request". Pull the monitor_lock critical section out of monitor_qmp_requests_pop_any_with_lock() and protect qmp_dispatcher_co_shutdown with the monitor_lock. The two changes are complex to sepa

[PATCH 5/5] monitor: do not use mb_read/mb_set

2023-05-18 Thread Paolo Bonzini
Instead of relying on magic memory barriers, document the pattern that is being used. It is the one based on Dekker's algorithm, and in this case it is embodied as follows: enqueue request; sleeping = true; smp_mb(); smp_mb(); if (sleeping) kick();

[PATCH 1/5] monitor: cleanup detection of qmp_dispatcher_co shutting down

2023-05-18 Thread Paolo Bonzini
Instead of overloading qmp_dispatcher_co_busy, make the coroutine pointer NULL. This will make things break spectacularly if somebody tries to start a request after monitor_cleanup(). AIO_WAIT_WHILE_UNLOCKED() does not need qatomic_mb_read(), because the macro contains all the necessary memory ba

[PATCH 3/5] monitor: introduce qmp_dispatcher_co_wake

2023-05-18 Thread Paolo Bonzini
This makes it possible to turn qmp_dispatcher_co_busy into a static variable. Signed-off-by: Paolo Bonzini --- monitor/monitor-internal.h | 2 +- monitor/monitor.c | 26 +- monitor/qmp.c | 32 +--- 3 files changed, 31 ins

[PATCH 4/5] monitor: extract request dequeuing to a new function

2023-05-18 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- monitor/qmp.c | 49 - 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/monitor/qmp.c b/monitor/qmp.c index baa1f6652e07..9ec28be2ee10 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -199,11 +199,6 @@

[PATCH 3/4] monitor: add more *_locked() functions

2023-05-18 Thread Paolo Bonzini
Allow flushing and printing to the monitor while mon->mon_lock is held. This will help cleaning up the locking of mon->mux_out and mon->suspend_cnt. Signed-off-by: Paolo Bonzini --- include/monitor/monitor.h | 3 +++ monitor/monitor.c | 14 -- 2 files changed, 11 insertions

[PATCH 0/5] qmp: cleanup QMP dispatcher coroutine

2023-05-18 Thread Paolo Bonzini
The QMP dispatcher coroutine is a bit messy. Clean it up by creating small and understandable functions, and once the wakeup logic is clear change it to remove the qatomic_mb_read()/qatomic_mb_set() pair. With this change and the other HMP series posted, the last use of qatomic_mb_read() is remov

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

2023-05-18 Thread Michael S. Tsirkin
On Wed, May 17, 2023 at 04:43:53PM +, Bernhard Beschow wrote: > > > 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 u

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

2023-05-18 Thread Michael S. Tsirkin
On Thu, May 18, 2023 at 11:31:47AM +0530, Ani Sinha wrote: > > > > On 17-May-2023, at 9:50 PM, Alex Bennée wrote: > > > > ./tests/bios-tables-test --iasl-path ${CONFIG_IASL} > > > > and then you have the best of both worlds. You can run manually with a > > different path and you don't need to

Re: [PATCH] docs: Convert u2f.txt to rST

2023-05-18 Thread Peter Maydell
On Tue, 16 May 2023 at 17:54, Thomas Huth wrote: > > On 21/04/2023 18.37, Peter Maydell wrote: > > Convert the u2f.txt file to rST, and place it in the right place > > in our manual layout. The old text didn't fit very well into our > > manual style, so the new version ends up looking like a rewri

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

2023-05-18 Thread Ani Sinha
On Thu, 18 May 2023, Michael S. Tsirkin wrote: > On Thu, May 18, 2023 at 11:31:47AM +0530, Ani Sinha wrote: > > > > > > > On 17-May-2023, at 9:50 PM, Alex Bennée wrote: > > > > > > ./tests/bios-tables-test --iasl-path ${CONFIG_IASL} > > > > > > and then you have the best of both worlds. You can

Re: [PATCH v2 1/3] ACPI: bios-tables-test.c step 2 (allowed-diff entries)

2023-05-18 Thread Ani Sinha
On Wed, 17 May 2023, Eric DeVolder wrote: > Following the guidelines in tests/qtest/bios-tables-test.c, > set up bios-tables-test-allowed-diff.h to ignore the > imminent changes to the APIC tables, per step 2. > > Signed-off-by: Eric DeVolder Acked-by: Ani Sinha > --- > tests/qtest/bios-ta

Re: [PATCH v2 3/3] ACPI: bios-tables-test.c step 5 (update expected table binaries)

2023-05-18 Thread Ani Sinha
On Wed, 17 May 2023, Eric DeVolder wrote: > Following the guidelines in tests/qtest/bios-tables-test.c, this > is step 5 and 6. > > An examination of all the files impacted (as listed in > bios-tables-test-allowe-diff.h) shows only the MADT/APIC tables > bumping revision from 1 to 3, and a corr

Re: [RFC PATCH] target/arm: add RAZ/WI handling for DBGDTR[TX|RX]

2023-05-18 Thread Alex Bennée
Peter Maydell writes: > On Tue, 16 May 2023 at 11:44, Alex Bennée wrote: >> >> The commit b3aa2f2128 (target/arm: provide stubs for more external >> debug registers) was added to handle HyperV's unconditional usage of >> Debug Communications Channel. It turns out that Linux will similarly >> b

Re: [PATCH 1/5] runstate: add runstate_get()

2023-05-18 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > It's necessary to restore the state after failed/cancelled migration in > further commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela

Re: [PATCH 2/5] migration: never fail in global_state_store()

2023-05-18 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > Actually global_state_store() can never fail. Let's get rid of extra > error paths. > > To make things clear, use new runstate_get() and use same approach for > global_state_store() and global_state_store_running(). > > Signed-off-by: Vladimir Sementsov-Ogievs

Re: [PATCH 3/5] runstate: drop unused runstate_store()

2023-05-18 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > The function is unused since previous commit. Drop it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Depending on how the discussions on previous one go.

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

2023-05-18 Thread Ani Sinha
> On 18-May-2023, at 4:10 PM, Michael S. Tsirkin wrote: > > he annoying thing with both these approaches is they work > less well than current code since iasl won't be invoked > at all if you do not remember the magic variable to set > or flag to pass. ATM it is self-contained. We could addre

Re: [PATCH 4/5] migration: switch from .vm_was_running to .vm_old_state

2023-05-18 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > No logic change here, only refactoring. That's a preparation for next > commit where we finally restore the stopped vm state on migration > failure or cancellation. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela

Re: [PATCH 5/5] migration: restore vmstate on migration failure

2023-05-18 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > 1. Otherwise failed migration just drops guest-panicked state, which is >not good for management software. > > 2. We do keep different paused states like guest-panicked during >migration with help of global_state state. > > 3. We do restore running sta

Re: [PATCH 0/5] Restore vmstate on cancelled/failed migration

2023-05-18 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > Hi all. > > The problem I want to solve is that guest-panicked state may be lost > when migration is failed (or cancelled) after source stop. > > Still, I try to go further and restore all possible paused states in the > same way. The key patch is the last one

[PATCH] scripts: make sure scripts are invoked via $(PYTHON)

2023-05-18 Thread Paolo Bonzini
Some scripts are invoked via the first "python3" binary in the PATH, because they are executable and their shebang line is "#! /usr/bin/env python3". To enforce usage of $(PYTHON), make them nonexecutable. Scripts invoked via meson need nothing else, and meson-buildoptions.py is already using $(PY

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

2023-05-18 Thread Juan Quintela
Michael Tokarev wrote: > 11.05.2023 11:40, Juan Quintela wrote: >> Fiona Ebner wrote: > ... >>> Closes: https://gitlab.com/qemu-project/qemu/-/issues/1576 >>> >>> AFAICT, this breaks (forward) migration from 8.0 to 8.0 + this patch >>> when using machine type <= 7.2. That is because after this pa

Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-18 Thread Paolo Bonzini
On 5/18/23 11:22, Peter Maydell wrote: /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): in function `__libc_init_first': (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `__environ' defined in .bss section in /u

[PULL v3 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-18 Thread Paolo Bonzini
The following changes since commit d27e7c359330ba7020bdbed7ed2316cb4cf6ffc1: qapi/parser: Drop two bad type hints for now (2023-05-17 10:18:33 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to fe3ab4eb2de46076

[PULL 59/68] build: move warning flag selection to meson

2023-05-18 Thread Paolo Bonzini
Meson already knows to test with the positive form of the flag, which simplifies the test. Warnings are now tested explicitly for the C++ compiler, instead of hardcoding those that are only available for the C language. At this point all compiler flags in QEMU_CFLAGS are global and only depend on

Re: [RFC PATCH] target/arm: add RAZ/WI handling for DBGDTR[TX|RX]

2023-05-18 Thread Peter Maydell
On Thu, 18 May 2023 at 12:11, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Tue, 16 May 2023 at 11:44, Alex Bennée wrote: > >> > >> The commit b3aa2f2128 (target/arm: provide stubs for more external > >> debug registers) was added to handle HyperV's unconditional usage of > >> Debug Co

Re: [PATCH] multifd: Set a higher "backlog" default value for listen()

2023-05-18 Thread Juan Quintela
"Wang, Wei W" wrote: > On Thursday, May 18, 2023 4:52 PM, Wang, Lei4 wrote: >> When destination VM is launched, the "backlog" parameter for listen() is set >> to 1 as default in socket_start_incoming_migration_internal(), which will >> lead to socket connection error (the queue of pending connecti

Re: [RFC v3 1/2] migration: Update error description whenever migration fails

2023-05-18 Thread Juan Quintela
Tejus GK wrote: > There are places in migration.c where the migration is marked failed with > MIGRATION_STATUS_FAILED, but the failure reason is never updated. Hence > libvirt doesn't know why the migration failed when it queries for it. > > Signed-off-by: Tejus GK Reviewed-by: Juan Quintela

Re: [RFC v3 2/2] migration: Update error description whenever migration fails

2023-05-18 Thread Juan Quintela
Tejus GK wrote: > There are places outside of migration.c which eventually leads to a > migration failure, but the failure reason is never updated. Hence > libvirt doesn't know why the migration failed when it queries for it. > > Signed-off-by: Tejus GK Reviewed-by: Juan Quintela If you have

Re: [RFC v3 0/2] migration: Update error description whenever migration fails

2023-05-18 Thread Juan Quintela
Tejus GK wrote: > Hi everyone, > > Thank you everyone for the reviews, this is the v3 patchset based on > the > reviews received on the previous ones. Hi I did the review-by. But you have to resend with a proper PATCH subject line to get this in. I will split the removal of the d

[PATCH v2 0/4] Virtio shared dma-buf

2023-05-18 Thread Albert Esteve
v1 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg00598.html v1 -> v2: - Add new files to MAINTAINERS - Add hash_func and key_equal_func to uuid - Expose functions to send vhost-user shared_object messages back instead of exposing write_msg method This patch covers t

[PATCH v2 2/4] virtio-dmabuf: introduce virtio-dmabuf

2023-05-18 Thread Albert Esteve
This API manages objects (in this iteration, dmabuf fds) that can be shared along different virtio devices. The API allows the different devices to add, remove and/or retrieve the objects by simply invoking the public functions that reside in the virtio-dmabuf file. Suggested-by: Gerd Hoffmann S

[PATCH v2 3/4] vhost-user: add shared_object msg

2023-05-18 Thread Albert Esteve
Add new vhost-user protocol message `VHOST_USER_BACKEND_SHARED_OBJECT`. This new message is sent from vhost-user back-ends to interact with the virtio-dmabuf table in order to add, remove, or lookup for virtio dma-buf shared objects. The action taken in the front-end depends on the type stored in

[PATCH v2 4/4] vhost-user: refactor send_resp code

2023-05-18 Thread Albert Esteve
Refactor code to send response message so that all common parts both for the common REPLY_ACK case, and other data responses, can call it and avoid code repetition. Signed-off-by: Albert Esteve --- hw/virtio/vhost-user.c | 52 +++--- 1 file changed, 24 inserti

[PATCH v2 1/4] uuid: add hash_func and equal_func

2023-05-18 Thread Albert Esteve
Add hash and an equal function to uuid module. Add a couple simple unit tests for new functions, checking collisions for similar UUIDs in the case of the hash function, and comparing generated UUIDs for the equal function. Signed-off-by: Albert Esteve --- include/qemu/uuid.h| 4 tests

tcg-plugins avocado test_aarch64_virt_mem_icount timing out on current git?

2023-05-18 Thread Peter Maydell
This is on current head-of-git: $ (cd build/arm-clang/ && ./tests/venv/bin/avocado run ./tests/avocado/tcg_plugins.py:PluginKernelNormal.test_aarch64_virt_mem_icount) JOB ID : b1d82ead55dbac8c1f17d0217a7572c4378e21e3 JOB LOG: /home/petmay01/avocado/job-results/job-2023-05-18T13.02-b1d82ea

Re: command line, guest console output missing from avocado log

2023-05-18 Thread Peter Maydell
On Fri, 12 May 2023 at 18:10, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Tue, 9 May 2023 at 19:58, Peter Maydell wrote: > >> > >> I just noticed that the guest console output seems to no longer > >> be in the avocado log file. Can it be reinstated, please? > >> The console logs are

Re: [RFC v3 1/2] migration: Update error description whenever migration fails

2023-05-18 Thread Daniel P . Berrangé
On Thu, May 18, 2023 at 06:23:07AM +, Tejus GK wrote: > There are places in migration.c where the migration is marked failed with > MIGRATION_STATUS_FAILED, but the failure reason is never updated. Hence > libvirt doesn't know why the migration failed when it queries for it. > > Signed-off-by:

Re: [PATCH] multifd: Set a higher "backlog" default value for listen()

2023-05-18 Thread Daniel P . Berrangé
On Thu, May 18, 2023 at 09:13:58AM +, Wang, Wei W wrote: > On Thursday, May 18, 2023 4:52 PM, Wang, Lei4 wrote: > > When destination VM is launched, the "backlog" parameter for listen() is set > > to 1 as default in socket_start_incoming_migration_internal(), which will > > lead to socket conne

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

2023-05-18 Thread Eric Blake
On Wed, May 17, 2023 at 05:28:32PM +0200, Kevin Wolf wrote: > 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 inconsiste

Re: [PATCH] multifd: Set a higher "backlog" default value for listen()

2023-05-18 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Thu, May 18, 2023 at 09:13:58AM +, Wang, Wei W wrote: >> On Thursday, May 18, 2023 4:52 PM, Wang, Lei4 wrote: >> > When destination VM is launched, the "backlog" parameter for listen() is >> > set >> > to 1 as default in socket_start_incoming_migration_internal(

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

2023-05-18 Thread Eric Blake
On Wed, May 17, 2023 at 05:28:33PM +0200, Kevin Wolf wrote: > 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

Re: [PATCH 2/9] util: Add cpuinfo-i386.c

2023-05-18 Thread Richard Henderson
On 5/18/23 02:35, Juan Quintela wrote: Richard Henderson wrote: Add cpuinfo.h for i386 and x86_64, and the initialization for that in util/. Populate that with a slightly altered copy of the tcg host probing code. Other uses of cpuid.h will be adjusted one patch at a time. Signed-off-by: Ric

[PATCH 1/2] meson: use subproject for internal libfdt

2023-05-18 Thread Paolo Bonzini
Recent dtc/libfdt can use both Make and meson as the build system. By using a subproject, our own meson.build can remove the hard coded list of source files. In the future, it may also be possible to use wrap to download the submodule. Signed-off-by: Paolo Bonzini --- .gitmodules

[PATCH 0/2] meson: use subprojects for bundled projects

2023-05-18 Thread Paolo Bonzini
QEMU bundles a copy of dtc and keycodemapdb. They both support meson, so run their build system via subproject() instead of hardcoding their contents. Paolo Paolo Bonzini (2): meson: use subproject for internal libfdt meson: use subproject for keycodemapdb .gitmodules

[PATCH 2/2] meson: use subproject for keycodemapdb

2023-05-18 Thread Paolo Bonzini
By using a subproject, our own meson.build can use variables from the subproject instead of hard-coded paths. In the future, it may also be possible to use wrap to download the submodule. Signed-off-by: Paolo Bonzini --- .gitmodules | 4 ++-- configure

Re: [PATCH 5/9] util/bufferiszero: Use i386 cpuinfo.h

2023-05-18 Thread Richard Henderson
On 5/18/23 02:49, Juan Quintela wrote: Richard Henderson wrote: Use cpuinfo_init() during init_accel(), and the variable cpuinfo during test_buffer_is_zero_next_accel(). Adjust the logic that cycles through the set of accelerators for testing. Signed-off-by: Richard Henderson Semi related

[PULL 02/29] target/arm: Fix vd == vm overlap in sve_ldff1_z

2023-05-18 Thread Peter Maydell
From: Richard Henderson If vd == vm, copy vm to scratch, so that we can pre-zero the output and still access the gather indicies. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1612 Signed-off-by: Richard Henderson Message-id: 20230504104232.184-1-richard

[PULL 23/29] target/arm: Convert BR, BLR, RET to decodetree

2023-05-18 Thread Peter Maydell
Convert the simple (non-pointer-auth) BR, BLR and RET insns to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230512144106.3608981-18-peter.mayd...@linaro.org --- target/arm/tcg/a64.decode | 5 target/arm/tcg/translate-a64.c | 55 +++

[PULL 00/29] target-arm queue

2023-05-18 Thread Peter Maydell
-17 10:18:33 -0700) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230518 for you to fetch changes up to 91608e2a44f36e79cb83f863b8a7bb57d2c98061: docs: Convert u2f.txt to rST (2023-05-18 11:40:32 +0100

[PULL 05/29] target/arm: add RAZ/WI handling for DBGDTR[TX|RX]

2023-05-18 Thread Peter Maydell
From: Alex Bennée The commit b3aa2f2128 (target/arm: provide stubs for more external debug registers) was added to handle HyperV's unconditional usage of Debug Communications Channel. It turns out that Linux will similarly break if you enable CONFIG_HVC_DCC "ARM JTAG DCC console". Extend the reg

[PULL 16/29] target/arm: Convert Move wide (immediate) to decodetree

2023-05-18 Thread Peter Maydell
From: Richard Henderson Convert the MON, MOVZ, MOVK instructions. Signed-off-by: Richard Henderson Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell Message-id: 20230512144106.3608981-11-peter.mayd...@linaro.org [PMM: Rebased] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --

[PULL 06/29] sbsa-ref: use Bochs graphics card instead of VGA

2023-05-18 Thread Peter Maydell
From: Marcin Juszkiewicz Bochs card is normal PCI Express card so it fits better in system with PCI Express bus. VGA is simple legacy PCI card. Signed-off-by: Marcin Juszkiewicz Reviewed-by: Leif Lindholm Message-id: 20230505120936.1097060-1-marcin.juszkiew...@linaro.org Signed-off-by: Peter M

[PULL 21/29] target/arm: Convert TBZ, TBNZ to decodetree

2023-05-18 Thread Peter Maydell
Convert the test-and-branch-immediate insns TBZ and TBNZ to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230512144106.3608981-16-peter.mayd...@linaro.org --- target/arm/tcg/a64.decode | 6 ++ target/arm/tcg/translate-a64.c | 25 +---

[PULL 11/29] target/arm: Split gen_add_CC and gen_sub_CC

2023-05-18 Thread Peter Maydell
From: Richard Henderson Split out specific 32-bit and 64-bit functions. These carry the same signature as tcg_gen_add_i64, and so will be easier to pass as callbacks. Retain gen_add_CC and gen_sub_CC during conversion. Signed-off-by: Richard Henderson Signed-off-by: Peter Maydell Reviewed-by:

[PULL 17/29] target/arm: Convert Bitfield to decodetree

2023-05-18 Thread Peter Maydell
From: Richard Henderson Convert the BFM, SBFM, UBFM instructions. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Message-id: 20230512144106.3608981-12-peter.mayd...@linaro.org [PMM: Rebased] Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode

[PULL 14/29] target/arm: Replace bitmask64 with MAKE_64BIT_MASK

2023-05-18 Thread Peter Maydell
From: Richard Henderson Use the bitops.h macro rather than rolling our own here. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Message-id: 20230512144106.3608981-9-peter.mayd...@linaro.org --- target/arm/tcg/translate-a64.c | 11 ++- 1 file

[PULL 01/29] sbsa-ref: switch default cpu core to Neoverse-N1

2023-05-18 Thread Peter Maydell
From: Marcin Juszkiewicz The world outside moves to newer and newer cpu cores. Let move SBSA Reference Platform to something newer as well. Signed-off-by: Marcin Juszkiewicz Reviewed-by: Leif Lindholm Message-id: 20230506183417.1360427-1-marcin.juszkiew...@linaro.org Signed-off-by: Peter Mayde

[PULL 24/29] target/arm: Convert BRA[AB]Z, BLR[AB]Z, RETA[AB] to decodetree

2023-05-18 Thread Peter Maydell
Convert the single-register pointer-authentication variants of BR, BLR, RET to decodetree. (BRAA/BLRAA are in a different branch of the legacy decoder and will be dealt with in the next commit.) Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230512144106.3608981-19-pet

[PULL 03/29] Maintainers: add myself as reviewer for sbsa-ref

2023-05-18 Thread Peter Maydell
From: Marcin Juszkiewicz At Linaro I work on sbsa-ref, know direction it goes. May not get code details each time. Signed-off-by: Marcin Juszkiewicz Reviewed-by: Philippe Mathieu-Daudé Message-id: 20230515143753.365591-1-marcin.juszkiew...@linaro.org Signed-off-by: Peter Maydell --- MAINTAI

[PULL 19/29] target/arm: Convert unconditional branch immediate to decodetree

2023-05-18 Thread Peter Maydell
Convert the unconditional branch immediate insns B and BL to decodetree. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230512144106.3608981-14-peter.mayd...@linaro.org --- target/arm/tcg/a64.decode | 9 + target/arm/tcg/translate-a64.c | 31 +++-

[PULL 27/29] target/arm: Saturate L2CTLR_EL1 core count field rather than overflowing

2023-05-18 Thread Peter Maydell
The IMPDEF sysreg L2CTLR_EL1 found on the Cortex-A35, A53, A57, A72 and which we (arguably dubiously) also provide in '-cpu max' has a 2 bit field for the number of processors in the cluster. On real hardware this must be sufficient because it can only be configured with up to 4 CPUs in the cluster

[PULL 12/29] target/arm: Convert Add/subtract (immediate) to decodetree

2023-05-18 Thread Peter Maydell
From: Richard Henderson Convert the ADD and SUB (immediate) instructions. Signed-off-by: Richard Henderson Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell Message-id: 20230512144106.3608981-7-peter.mayd...@linaro.org [PMM: Rebased; adjusted to use translate.h's TRANS macro] Reviewed-b

[PULL 25/29] target/arm: Convert BRAA, BRAB, BLRAA, BLRAB to decodetree

2023-05-18 Thread Peter Maydell
Convert the last four BR-with-pointer-auth insns to decodetree. The remaining cases in the outer switch in disas_uncond_b_reg() all return early rather than leaving the case statement, so we can delete the now-unused code at the end of that function. Signed-off-by: Peter Maydell Reviewed-by: Rich

[PULL 10/29] target/arm: Convert PC-rel addressing to decodetree

2023-05-18 Thread Peter Maydell
From: Richard Henderson Convert the ADR and ADRP instructions. Signed-off-by: Richard Henderson Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell Message-id: 20230512144106.3608981-5-peter.mayd...@linaro.org [PMM: Rebased] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- t

[PULL 08/29] target/arm: Create decodetree skeleton for A64

2023-05-18 Thread Peter Maydell
The A64 translator uses a hand-written decoder for everything except SVE or SME. It's fairly well structured, but it's becoming obvious that it's still more painful to add instructions to than the A32 translator, because putting a new instruction into the right place in a hand-written decoder is m

[PULL 29/29] docs: Convert u2f.txt to rST

2023-05-18 Thread Peter Maydell
Convert the u2f.txt file to rST, and place it in the right place in our manual layout. The old text didn't fit very well into our manual style, so the new version ends up looking like a rewrite, although some of the original text is preserved: * the 'building' section of the old file is removed,

[PULL 26/29] target/arm: Convert ERET, ERETAA, ERETAB to decodetree

2023-05-18 Thread Peter Maydell
Convert the exception-return insns ERET, ERETA and ERETB to decodetree. These were the last insns left in the legacy decoder function disas_uncond_reg_b(), which allows us to remove it. The old decoder explicitly decoded the DRPS instruction, only in order to call unallocated_encoding() on it, exa

  1   2   3   4   >