Re: [PATCH v2 4/7] configure: Add nice hint to Python failure message

2023-02-09 Thread Thomas Huth
On 10/02/2023 01.31, John Snow wrote: If we begin requiring Python 3.7+, a few platforms are going to need to install an additional package. This is at least mildly annoying to the user (and I hate negative attention), so solve the user's problem for them before they get a chance to become

Re: [PULL 12/17] AVX512 support for xbzrle_encode_buffer

2023-02-09 Thread Thomas Huth
On 10/02/2023 00.34, Juan Quintela wrote: From: ling xu This commit is the same with [PATCH v6 1/2], and provides avx512 support for xbzrle_encode_buffer function to accelerate xbzrle encoding speed. Hi! Just a hint for future patches: Please don't put version information into the patch

Re: [PATCH v2 3/7] configure: Look for auxiliary Python installations

2023-02-09 Thread Thomas Huth
On 10/02/2023 01.31, John Snow wrote: At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify

QAPI unions as branches / unifying struct and union types (was: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command)

2023-02-09 Thread Markus Armbruster
Daniel P. Berrangé writes: [...] >> +## >> +# @MigrateAddress: >> +# >> +# The options available for communication transport mechanisms for migration >> +# >> +# Since 8.0 >> +## >> +{ 'union' : 'MigrateAddress', >> + 'base' : { 'transport' : 'MigrateTransport'}, >> + 'discriminator' :

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-09 Thread Philippe Mathieu-Daudé
On 10/2/23 01:31, John Snow wrote: CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian.

Re: [PATCH v7 2/2] Update bench-code for addressing CI problem

2023-02-09 Thread Philippe Mathieu-Daudé
On 10/2/23 00:50, Juan Quintela wrote: Philippe Mathieu-Daudé wrote: On 16/11/22 16:29, ling xu wrote: Unit test code is in test-xbzrle.c, and benchmark code is in xbzrle-bench.c for performance benchmarking. we have modified xbzrle-bench.c to address CI problem. Signed-off-by: ling xu

Re: [PATCH v2 4/6] migration: Avoid multiple parsing of uri in migration code flow

2023-02-09 Thread Het Gala
On 09/02/23 7:36 pm, Daniel P. Berrangé wrote: On Thu, Feb 09, 2023 at 07:24:48PM +0530, Het Gala wrote: On 09/02/23 5:39 pm, Daniel P. Berrangé wrote: On Wed, Feb 08, 2023 at 09:35:58AM +, Het Gala wrote: In existing senario, 'migrate' QAPI argument - string uri, is encoded twice to

Re: [PATCH v2 3/6] migration: HMP side changes for modified 'migrate' QAPI design

2023-02-09 Thread Het Gala
On 09/02/23 7:30 pm, Daniel P. Berrangé wrote: On Thu, Feb 09, 2023 at 07:08:13PM +0530, Het Gala wrote: On 09/02/23 5:35 pm, Daniel P. Berrangé wrote: On Wed, Feb 08, 2023 at 09:35:57AM +, Het Gala wrote: hmp_migrate() stores modified QAPI 'migrate' arguments from qdict into well

Re: [PATCH v1 4/4] migration/multifd: Move load_cleanup inside incoming_state_destroy

2023-02-09 Thread Leonardo Brás
On Fri, 2023-02-10 at 03:36 -0300, Leonardo Bras wrote: > Currently running migration_incoming_state_destroy() without first running > multifd_load_cleanup() will cause a yank error: > > qemu-system-x86_64: ../util/yank.c:107: yank_unregister_instance: > Assertion `QLIST_EMPTY(>yankfns)' failed.

Re: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-02-09 Thread Het Gala
On 09/02/23 7:08 pm, Daniel P. Berrangé wrote: On Thu, Feb 09, 2023 at 10:23:43AM +, Daniel P. Berrangé wrote: On Wed, Feb 08, 2023 at 02:17:12PM -0600, Eric Blake wrote: On Wed, Feb 08, 2023 at 09:35:56AM +, Het Gala wrote: Existing 'migrate' QAPI design enforces transport

[PATCH v1 2/4] migration/multifd: Remove unnecessary assignment on multifd_load_cleanup()

2023-02-09 Thread Leonardo Bras
Before assigning "p->quit = true" for every multifd channel, multifd_load_cleanup() will call multifd_recv_terminate_threads() which already does the same assignment, while protected by a mutex. So there is no point doing the same assignment again. Signed-off-by: Leonardo Bras ---

[PATCH v1 3/4] migration/multifd: Join all multifd threads in order to avoid leaks

2023-02-09 Thread Leonardo Bras
Current approach will only join threads that are still running. For the threads not joined, resources or private memory are always kept in the process space and never reclaimed before process end, and this risks serious memory leaks. This should usually not represent a big problem, since multifd

[PATCH v1 1/4] migration/multifd: Change multifd_load_cleanup() signature and usage

2023-02-09 Thread Leonardo Bras
Since it's introduction in commit f986c3d256 ("migration: Create multifd migration threads"), multifd_load_cleanup() never returned any value different than 0, neither set up any error on errp. Even though, on process_incoming_migration_bh() an if clause uses it's return value to decide on

[PATCH v1 4/4] migration/multifd: Move load_cleanup inside incoming_state_destroy

2023-02-09 Thread Leonardo Bras
Currently running migration_incoming_state_destroy() without first running multifd_load_cleanup() will cause a yank error: qemu-system-x86_64: ../util/yank.c:107: yank_unregister_instance: Assertion `QLIST_EMPTY(>yankfns)' failed. (core dumped) The above error happens in the target host, when

Re: [PATCH v1 1/4] migration/multifd: Change multifd_load_cleanup() signature and usage

2023-02-09 Thread Leonardo Brás
Sent with the incorrect credentials. Sorry about the noise. Will resend them correctly. On Fri, 2023-02-10 at 03:31 -0300, Leonardo Bras wrote: > Since it's introduction in commit f986c3d256 ("migration: Create multifd > migration threads"), multifd_load_cleanup() never returned any value >

[PATCH v1 1/4] migration/multifd: Change multifd_load_cleanup() signature and usage

2023-02-09 Thread Leonardo Bras
Since it's introduction in commit f986c3d256 ("migration: Create multifd migration threads"), multifd_load_cleanup() never returned any value different than 0, neither set up any error on errp. Even though, on process_incoming_migration_bh() an if clause uses it's return value to decide on

[PATCH v1 4/4] migration/multifd: Move load_cleanup inside incoming_state_destroy

2023-02-09 Thread Leonardo Bras
Currently running migration_incoming_state_destroy() without first running multifd_load_cleanup() will cause a yank error: qemu-system-x86_64: ../util/yank.c:107: yank_unregister_instance: Assertion `QLIST_EMPTY(>yankfns)' failed. (core dumped) The above error happens in the target host, when

[PATCH v1 3/4] migration/multifd: Join all multifd threads in order to avoid leaks

2023-02-09 Thread Leonardo Bras
Current approach will only join threads that are still running. For the threads not joined, resources or private memory are always kept in the process space and never reclaimed before process end, and this risks serious memory leaks. This should usually not represent a big problem, since multifd

[PATCH v1 2/4] migration/multifd: Remove unnecessary assignment on multifd_load_cleanup()

2023-02-09 Thread Leonardo Bras
Before assigning "p->quit = true" for every multifd channel, multifd_load_cleanup() will call multifd_recv_terminate_threads() which already does the same assignment, while protected by a mutex. So there is no point doing the same assignment again. Signed-off-by: Leonardo Bras ---

Re: [PATCH v4 3/4] multifd: Only sync once each full round of memory

2023-02-09 Thread Markus Armbruster
Juan Quintela writes: > We need to add a new flag to mean to sync at that point. > Notice that we still synchronize at the end of setup and at the end of > complete stages. > > Signed-off-by: Juan Quintela > > --- > > Add missing qemu_fflush(), now it passes all tests always. > --- [...] >

Re: [PATCH v4 1/4] multifd: Create property multifd-sync-after-each-section

2023-02-09 Thread Markus Armbruster
Juan Quintela writes: > We used to synchronize all channels at the end of each RAM section > sent. That is not needed, so preparing to only synchronize once every > full round in latests patches. > > Notice that we initialize the property as true. We will change the > default when we introduce

Re: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-02-09 Thread Het Gala
On 09/02/23 9:56 pm, Markus Armbruster wrote: Daniel P. Berrangé writes: On Wed, Feb 08, 2023 at 02:17:12PM -0600, Eric Blake wrote: [...] I'm guessing the reason you didn't go with 'socket': 'SocketAddress' is that SocketAddress is itself a discriminated union, and Markus does not yet

Re: [PATCH v2 12/23] vfio-user: region read/write

2023-02-09 Thread John Johnson
> On Feb 8, 2023, at 12:33 PM, Alex Williamson > wrote: > > On Wed, 8 Feb 2023 06:38:27 + > John Johnson wrote: > >>> On Feb 6, 2023, at 11:07 AM, Alex Williamson >>> wrote: >>> >>> On Wed, 1 Feb 2023 21:55:48 -0800 >>> John Johnson wrote: >>> Add support for posted writes on

Re: [PATCH v2 15/23] vfio-user: forward msix BAR accesses to server

2023-02-09 Thread John Johnson
> On Feb 8, 2023, at 1:30 PM, Alex Williamson > wrote: > > On Wed, 8 Feb 2023 06:38:30 + > John Johnson wrote: > >>> On Feb 6, 2023, at 12:33 PM, Alex Williamson >>> wrote: >>> >>> On Wed, 1 Feb 2023 21:55:51 -0800 >>> John Johnson wrote: >>> Server holds device current

Re: [PATCH RFCv1 2/8] memory: Add last stage indicator to global dirty log synchronization

2023-02-09 Thread Gavin Shan
On 2/10/23 6:48 AM, Peter Xu wrote: On Mon, Feb 06, 2023 at 07:20:04PM +0800, Gavin Shan wrote: The global dirty log synchronization is used when KVM and dirty ring are enabled. There is a particularity for ARM64 where the backup bitmap is used to track dirty pages in non-running-vcpu

Re: [PATCH] target/riscv: Smepmp: Skip applying default rules when address matches

2023-02-09 Thread Alistair Francis
On Thu, Feb 9, 2023 at 3:53 PM Himanshu Chauhan wrote: > > When MSECCFG.MML is set, after checking the address range in PMP if the > asked permissions are not same as programmed in PMP, the default > permissions are applied. This should only be the case when there > is no matching address is

Re: [PATCH] MAINTAINERS: Add some RISC-V reviewers

2023-02-09 Thread Alistair Francis
On Thu, Feb 9, 2023 at 10:33 AM Alistair Francis wrote: > > From: Alistair Francis > > This patch adds some active RISC-V members as reviewers to the > MAINTAINERS file. > > Signed-off-by: Alistair Francis Thanks! Applied to riscv-to-apply.next Alistair > --- > MAINTAINERS | 3 +++ > 1

[PATCH v2 1/2] meson: Add missing libdw knobs

2023-02-09 Thread Ilya Leoshkevich
Add the missing meson infrastructure bits for the new libdw dependency. Model them after the existing capstone knobs. Fixes: 7c10cb38ccb8 ("accel/tcg: Add debuginfo support") Reported-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Reviewed-by: Thomas Huth --- meson.build |

[PATCH v2 2/2] meson: Disable libdw for static builds by default

2023-02-09 Thread Ilya Leoshkevich
Static QEMU build fails on Debian Bullseye: /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libdw.a(debuginfod-client.o): in function `__libdwfl_debuginfod_init': (.text.startup+0x17): undefined reference to `dlopen' The reason is that pkg-config does not suggest -ldl for libdw, and adding

Re: [PATCH v10 2/9] KVM: Introduce per-page memory attributes

2023-02-09 Thread Sean Christopherson
On Wed, Feb 08, 2023, Isaku Yamahata wrote: > On Fri, Dec 02, 2022 at 02:13:40PM +0800, > Chao Peng wrote: > > > +static int kvm_vm_ioctl_set_mem_attributes(struct kvm *kvm, > > + struct kvm_memory_attributes *attrs) > > +{ > > + gfn_t start, end; > > +

[PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-09 Thread John Snow
CentOS 8 does not ship with a sphinx new enough for our purposes (It necessarily uses Python 3.6), so drop this from this build. We can resume building docs on CentOS 9 if we wish, but we also currently test and build docs on Fedora, Ubuntu, Alpine and Debian. Signed-off-by: John Snow ---

[PATCH v2 2/7] python: drop pipenv

2023-02-09 Thread John Snow
The pipenv tool was nice in theory, but in practice it's just too hard to update selectively, and it makes using it a pain. The qemu.qmp repo dropped pipenv support a while back and it's been functioning just fine, so I'm backporting that change here to qemu.git. Signed-off-by: John Snow ---

[PATCH v2 1/7] python: support pylint 2.16

2023-02-09 Thread John Snow
Pylint 2.16 adds a few new checks that cause the optional check-tox CI job to fail. 1. The superfluous-parens check seems to be a bit more aggressive, 2. broad-exception-raised is new; it discourages "raise Exception". Fix these minor issues and turn the lights green. Signed-off-by: John Snow

[PATCH v2 4/7] configure: Add nice hint to Python failure message

2023-02-09 Thread John Snow
If we begin requiring Python 3.7+, a few platforms are going to need to install an additional package. This is at least mildly annoying to the user (and I hate negative attention), so solve the user's problem for them before they get a chance to become irritated while searching on Google for how

[PATCH v2 7/7] Python: Drop support for Python 3.6

2023-02-09 Thread John Snow
Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6, but won't until QEMU does. Versions of Python

[PATCH v2 3/7] configure: Look for auxiliary Python installations

2023-02-09 Thread John Snow
At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify --python=/usr/bin/foo every time. We can be kind and

[PATCH v2 5/7] DO-NOT-MERGE: testing: Add Python >= 3.7 to Centos, OpenSuSE

2023-02-09 Thread John Snow
This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way. This is just to prove that bumping our dependency works. Signed-off-by: John Snow ---

[PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-09 Thread John Snow
Howdy, this series increases our minimum python version to 3.7. CI: https://gitlab.com/jsnow/qemu/-/pipelines/771780626 (All green!) GL: https://gitlab.com/jsnow/qemu/-/commits/python-require-37 Patches 1 and 2 are loose pre-requisites; I'd like to merge them into qemu.git within the week

Re: [PATCH v10 04/12] migration/qemu-file: Add qemu_file_get_to_fd()

2023-02-09 Thread Alex Williamson
Hey Juan, I think we're close, please ack this if it looks ok. Thanks, Alex On Thu, 9 Feb 2023 21:20:35 +0200 Avihai Horon wrote: > Add new function qemu_file_get_to_fd() that allows reading data from > QEMUFile and writing it straight into a given fd. > > This will be used later in VFIO

Re: [PATCH v7 2/2] Update bench-code for addressing CI problem

2023-02-09 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > On 16/11/22 16:29, ling xu wrote: >> Unit test code is in test-xbzrle.c, and benchmark code is in xbzrle-bench.c >> for performance benchmarking. we have modified xbzrle-bench.c to address >> CI problem. >> Signed-off-by: ling xu >> Co-authored-by: Zhou Zhao >>

Re: [PATCH v2] target/riscv: Remove privileged spec version restriction for RVV

2023-02-09 Thread Alistair Francis
On Wed, Feb 8, 2023 at 4:32 PM wrote: > > From: Frank Chang > > The RVV specification does not require that the core needs to support > the privileged specification v1.12.0 to support RVV, and there is no > dependency from ISA level. > > This commit removes the restriction from both RVV CSRs and

Re: [PATCH] target/riscv: Smepmp: Skip applying default rules when address matches

2023-02-09 Thread Alistair Francis
On Thu, Feb 9, 2023 at 3:53 PM Himanshu Chauhan wrote: > > When MSECCFG.MML is set, after checking the address range in PMP if the > asked permissions are not same as programmed in PMP, the default > permissions are applied. This should only be the case when there > is no matching address is

[PATCH v4 4/4] ram: Document migration ram flags

2023-02-09 Thread Juan Quintela
0x80 is RAM_SAVE_FLAG_HOOK, it is in qemu-file now. Bigger usable flag is 0x200, noticing that. We can reuse RAM_SAVe_FLAG_FULL. Signed-off-by: Juan Quintela --- migration/ram.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c

[PATCH v4 3/4] multifd: Only sync once each full round of memory

2023-02-09 Thread Juan Quintela
We need to add a new flag to mean to sync at that point. Notice that we still synchronize at the end of setup and at the end of complete stages. Signed-off-by: Juan Quintela --- Add missing qemu_fflush(), now it passes all tests always. --- qapi/migration.json | 2 +- migration/migration.c

[PATCH v4 1/4] multifd: Create property multifd-sync-after-each-section

2023-02-09 Thread Juan Quintela
We used to synchronize all channels at the end of each RAM section sent. That is not needed, so preparing to only synchronize once every full round in latests patches. Notice that we initialize the property as true. We will change the default when we introduce the new mechanism. Signed-off-by:

[PATCH v4 0/4] Eliminate multifd flush

2023-02-09 Thread Juan Quintela
Hi In this v4: - Rebased on top of migration-20230209 PULL request - Integrate two patches in that pull request - Rebase - Address Eric reviews. Please review. In this v3: - update to latest upstream. - fix checkpatch errors. Please, review. In this v2: - update to latest upstream - change 0

[PATCH v4 2/4] multifd: Protect multifd_send_sync_main() calls

2023-02-09 Thread Juan Quintela
We only need to do that on the ram_save_iterate() call on sending and on destination when we get a RAM_SAVE_FLAG_EOS. In setup() and complete() we need to synch in both new and old cases, so don't add a check there. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert

[PULL 10/17] migration: Make ram_save_target_page() a pointer

2023-02-09 Thread Juan Quintela
We are going to create a new function for multifd latest in the series. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

[PULL 04/17] linux-headers: Update to v6.1

2023-02-09 Thread Juan Quintela
From: Peter Xu Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Acked-by: Cornelia Huck Signed-off-by: Juan Quintela --- include/standard-headers/drm/drm_fourcc.h | 34 - include/standard-headers/linux/ethtool.h | 63 +++- include/standard-headers/linux/fuse.h |

[PULL 09/17] migration: Calculate ram size once

2023-02-09 Thread Juan Quintela
We are recalculating ram size continously, when we know that it don't change during migration. Create a field in RAMState to track it. Signed-off-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé --- migration/ram.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PULL 05/17] util/userfaultfd: Support /dev/userfaultfd

2023-02-09 Thread Juan Quintela
From: Peter Xu Teach QEMU to use /dev/userfaultfd when it existed and fallback to the system call if either it's not there or doesn't have enough permission. Firstly, as long as the app has permission to access /dev/userfaultfd, it always have the ability to trap kernel faults which QEMU mostly

[PULL 11/17] migration: I messed state_pending_exact/estimate

2023-02-09 Thread Juan Quintela
I called the helper function from the wrong top level function. This code was introduced in: commit c8df4a7aeffcb46020f610526eea621fa5b0cd47 Author: Juan Quintela Date: Mon Oct 3 02:00:03 2022 +0200 migration: Split save_live_pending() into state_pending_* We split the function into

[PULL 03/17] multifd: Remove some redundant code

2023-02-09 Thread Juan Quintela
From: Li Zhang Clean up some unnecessary code Signed-off-by: Li Zhang Signed-off-by: Juan Quintela --- migration/multifd.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index c8132ab7e8..7aa030fb19 100644 ---

[PULL 14/17] migration: Rework multi-channel checks on URI

2023-02-09 Thread Juan Quintela
From: Peter Xu The whole idea of multi-channel checks was not properly done, IMHO. Currently we check multi-channel in a lot of places, but actually that's not needed because we only need to check it right after we get the URI and that should be it. If the URI check succeeded, we should never

[PULL 16/17] migration: Add a semaphore to count PONGs

2023-02-09 Thread Juan Quintela
From: Peter Xu This is mostly useless, but useful for us to know whether the main channel is correctly established without changing the migration protocol. Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/migration.h | 6 ++

[PULL 13/17] Update bench-code for addressing CI problem

2023-02-09 Thread Juan Quintela
From: ling xu Unit test code is in test-xbzrle.c, and benchmark code is in xbzrle-bench.c for performance benchmarking. we have modified xbzrle-bench.c to address CI problem. Signed-off-by: ling xu Co-authored-by: Zhou Zhao Co-authored-by: Jun Jin Reviewed-by: Juan Quintela Signed-off-by:

[PULL 15/17] migration: Cleanup postcopy_preempt_setup()

2023-02-09 Thread Juan Quintela
From: Peter Xu Since we just dropped the only case where postcopy_preempt_setup() can return an error, it doesn't need a retval anymore because it never fails. Move the preempt check to the caller, preparing it to be used elsewhere to do nothing but as simple as kicking the async connection.

[PULL 17/17] migration: Postpone postcopy preempt channel to be after main

2023-02-09 Thread Juan Quintela
From: Peter Xu Postcopy with preempt-mode enabled needs two channels to communicate. The order of channel establishment is not guaranteed. It can happen that the dest QEMU got the preempt channel connection request before the main channel is established, then the migration may make no progress

[PULL 12/17] AVX512 support for xbzrle_encode_buffer

2023-02-09 Thread Juan Quintela
From: ling xu This commit is the same with [PATCH v6 1/2], and provides avx512 support for xbzrle_encode_buffer function to accelerate xbzrle encoding speed. Runtime check of avx512 support and benchmark for this feature are added. Compared with C version of xbzrle_encode_buffer function,

[PULL 06/17] migration: Simplify ram_find_and_save_block()

2023-02-09 Thread Juan Quintela
We will need later that find_dirty_block() return errors, so simplify the loop. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela --- migration/ram.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git

[PULL 08/17] migration: Split ram_bytes_total_common() in two functions

2023-02-09 Thread Juan Quintela
It is just a big if in the middle of the function, and we need two functions anways. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Juan Quintela --- Reindent to make Phillipe happy (and CODING_STYLE) --- migration/ram.c | 25 ++--- 1 file changed, 14 insertions(+),

[PULL 01/17] migration: Remove spurious files

2023-02-09 Thread Juan Quintela
I introduced spurious files on my tree during a rebase: commit ebfc57871506b3fe36cc41f69ee3ad31a34afd63 Author: Zhenzhong Duan Date: Mon Oct 17 15:53:51 2022 +0800 multifd: Fix flush of zero copy page send request Make IO channel flush call after the inflight request has been drained

[PULL 07/17] migration: Make find_dirty_block() return a single parameter

2023-02-09 Thread Juan Quintela
We used to return two bools, just return a single int with the following meaning: old return / again / new return falsefalse PAGE_ALL_CLEAN falsetruePAGE_TRY_AGAIN true truePAGE_DIRTY_FOUND /* We don't care about again at all */ Signed-off-by: Juan Quintela

[PULL 00/17] Migration 20230209 patches

2023-02-09 Thread Juan Quintela
The following changes since commit 417296c8d8588f782018d01a317f88957e9786d6: tests/qtest/netdev-socket: Raise connection timeout to 60 seconds (2023-02-09 11:23:53 +) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/migration-20230209-pull-request

[PULL 02/17] multifd: cleanup the function multifd_channel_connect

2023-02-09 Thread Juan Quintela
From: Li Zhang Cleanup multifd_channel_connect Signed-off-by: Li Zhang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/multifd.c | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/migration/multifd.c

Re: Linker failures trying to build static qemu-user binary

2023-02-09 Thread Ilya Leoshkevich
On Thu, 2023-02-09 at 14:14 +, Peter Maydell wrote: > On Thu, 9 Feb 2023 at 13:54, John Paul Adrian Glaubitz > wrote: > > > > Hi! > > > > I usually build a static qemu-user binary from the git source using > > the following > > configure line: > > > > export ARCH=m68k && ./configure

Re: [PATCH 6/7] CI: Stop building docs on centos8

2023-02-09 Thread John Snow
On Thu, Feb 9, 2023 at 5:43 PM Paolo Bonzini wrote: > > > > Il gio 9 feb 2023, 16:40 John Snow ha scritto: >> >> CentOS 8 does not ship with a sphinx new enough for our purposes (It >> necessarily uses Python 3.6), so drop this from this build. We can >> resume building docs on CentOS 9 if we

Re: [PATCH v7 2/2] Update bench-code for addressing CI problem

2023-02-09 Thread Philippe Mathieu-Daudé
On 16/11/22 16:29, ling xu wrote: Unit test code is in test-xbzrle.c, and benchmark code is in xbzrle-bench.c for performance benchmarking. we have modified xbzrle-bench.c to address CI problem. Signed-off-by: ling xu Co-authored-by: Zhou Zhao Co-authored-by: Jun Jin ---

Re: [PATCH 6/7] CI: Stop building docs on centos8

2023-02-09 Thread Paolo Bonzini
Il gio 9 feb 2023, 16:40 John Snow ha scritto: > CentOS 8 does not ship with a sphinx new enough for our purposes (It > necessarily uses Python 3.6), so drop this from this build. We can > resume building docs on CentOS 9 if we wish, but we also currently test > and build docs on Fedora, Ubuntu,

Re: [PATCH 07/18] util: Extend iova_tree_foreach() to take data argument

2023-02-09 Thread Peter Xu
On Thu, Jan 26, 2023 at 08:49:37PM +0200, Avihai Horon wrote: > From: Joao Martins > > Extend iova_tree_foreach() to take data argument to be passed and used > by the iterator. > > While at it, fix a documentation error: > The documentation says iova_tree_foreach() returns a value even though >

Re: [PATCH 06/18] util: Add iova_tree_nnodes()

2023-02-09 Thread Peter Xu
On Thu, Jan 26, 2023 at 08:49:36PM +0200, Avihai Horon wrote: > From: Joao Martins > > Add iova_tree_nnodes() which returns the number of nodes in the IOVA > tree. > > Signed-off-by: Joao Martins Acked-by: Peter Xu -- Peter Xu

Re: [PATCH 14/18] intel-iommu: Implement get_attr() method

2023-02-09 Thread Peter Xu
On Thu, Jan 26, 2023 at 08:49:44PM +0200, Avihai Horon wrote: > Implement get_attr() method and use the address width property to report > the IOMMU_ATTR_MAX_IOVA attribute. > > Signed-off-by: Avihai Horon Acked-by: Peter Xu -- Peter Xu

Re: [PATCH 13/18] memory/iommu: Add IOMMU_ATTR_MAX_IOVA attribute

2023-02-09 Thread Peter Xu
On Thu, Jan 26, 2023 at 08:49:43PM +0200, Avihai Horon wrote: > Add a new IOMMU attribute IOMMU_ATTR_MAX_IOVA which indicates the > maximal IOVA that an IOMMU can use. > > This attribute will be used by VFIO device dirty page tracking so it can > track the entire IOVA space when needed (i.e. when

Re: [PATCH v2 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

2023-02-09 Thread Bernhard Beschow
Am 1. Februar 2023 08:11:10 UTC schrieb Bernhard Beschow : > > >Am 24. Januar 2023 17:07:30 UTC schrieb Bernhard Beschow : >> >> >>Am 24. Januar 2023 16:11:47 UTC schrieb Anthony PERARD >>: >>>On Wed, Jan 18, 2023 at 05:13:03AM -0500, Michael S. Tsirkin wrote: On Wed, Jan 04, 2023 at

Re: [PATCH v3 14/15] qapi: introduce DEVICE_ON event

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that device_del command is actually complited. But we don't have a counter-part for device_add. Still it's sensible for SHPC and PCIe-native hotplug, as there are time when the device in some

Re: [PATCH V2 1/4] qapi: strList_from_string

2023-02-09 Thread Steven Sistare
On 2/9/2023 1:59 PM, Markus Armbruster wrote: > Steven Sistare writes: >> On 2/9/2023 11:46 AM, Markus Armbruster wrote: >>> Steven Sistare writes: >>> On 2/9/2023 5:02 AM, Markus Armbruster wrote: > Alex Bennée writes: > >> Steven Sistare writes: >> >>> On 2/8/2023

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote: For PCIe and SHPC hotplug it's important to track led indicators, especially the power led. Add an event that helps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 62

Re: [PATCH v3 10/15] pcie: introduce pcie_sltctl_powered_off() helper

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote: In pcie_cap_slot_write_config() we check for PCI_EXP_SLTCTL_PWR_OFF in a bad form. We should distinguish PCI_EXP_SLTCTL_PWR which is a "mask" and PCI_EXP_SLTCTL_PWR_OFF which is value for that mask. Better code is in

Re: [PATCH 7/7] Python: Drop support for Python 3.6

2023-02-09 Thread John Snow
On Thu, Feb 9, 2023 at 1:03 PM Daniel P. Berrangé wrote: > > On Thu, Feb 09, 2023 at 11:40:57AM -0500, John Snow wrote: > > On Thu, Feb 9, 2023 at 11:27 AM Daniel P. Berrangé > > wrote: > > > > > > On Thu, Feb 09, 2023 at 10:40:34AM -0500, John Snow wrote: > > > > Python 3.6 was EOL 2021-12-31.

"patches" tool has a new patches.json URL

2023-02-09 Thread Stefan Hajnoczi
Hi, For those using the https://github.com/stefanha/patches tool to work with QEMU patch series, please update your configuration file to the new patches.json URL: $ $EDITOR ~/.patchesrc [fetch] url=https://patches.qemu.org/patches.json new URL Sorry for

[PATCH v3 06/15] pcie: pcie_cap_slot_write_config(): use correct macro

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
PCI_EXP_SLTCTL_PIC_OFF is a value, and PCI_EXP_SLTCTL_PIC is a mask. Happily PCI_EXP_SLTCTL_PIC_OFF is a maximum value for this mask and is equal to the mask itself. Still the code looks like a bug. Let's make it more reader-friendly. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[PATCH v3 03/15] pci/shpc: shpc_slot_command(): handle PWRONLY -> ENABLED transition

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
ENABLED -> PWRONLY transition is not allowed and we handle it by shpc_invalid_command(). But PWRONLY -> ENABLED transition is silently ignored, which seems wrong. Let's handle it as correct. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 24 +--- 1 file

[PATCH v3 04/15] pci/shpc: more generic handle hot-unplug in shpc_slot_command()

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
Free slot if both conditions (power-led = OFF and state = DISABLED) becomes true regardless of the sequence. It is similar to how PCIe hotplug works. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 52 ++- 1 file changed, 31

[PATCH v3 01/15] pci/shpc: set attention led to OFF on reset

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
0 is not a valid state for the led. Let's start with OFF. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index fca7f6691a..1b3f619dc9 100644 --- a/hw/pci/shpc.c +++ b/hw/pci/shpc.c @@ -223,6 +223,7

[PATCH v3 02/15] pci/shpc: change shpc_get_status() return type to uint8_t

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
The result of the function is always one byte. The result is always assigned to uint8_t variable. Also, shpc_get_status() should be symmetric to shpc_set_status() which has uint8_t value argument. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 7 +-- 1 file changed, 5

[PATCH v3 14/15] qapi: introduce DEVICE_ON event

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
We have DEVICE_DELETED event, that signals that device_del command is actually complited. But we don't have a counter-part for device_add. Still it's sensible for SHPC and PCIe-native hotplug, as there are time when the device in some intermediate state. Let's add an event that say that the device

[PATCH v3 07/15] pcie_regs: drop duplicated indicator value macros

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
We already have indicator values in include/standard-headers/linux/pci_regs.h , no reason to reinvent them in include/hw/pci/pcie_regs.h. (and we already have usage of PCI_EXP_SLTCTL_PWR_IND_BLINK and PCI_EXP_SLTCTL_PWR_IND_OFF in hw/pci/pcie.c, so let's be consistent) Signed-off-by: Vladimir

[PATCH v3 11/15] pcie: set power indicator to off on reset by default

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
It should be zero, the only valid values are ON, OFF and BLINK. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/pcie.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index e2da00742c..774ce85619 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -684,6

[PATCH v3 05/15] pci/shpc: pass PCIDevice pointer to shpc_slot_command()

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
We'll need it in further patch to report bridge in QAPI event. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/shpc.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index 959dc470f3..9f964b1d70 100644 ---

[PATCH v3 15/15] qapi: introduce query-hotplug command

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
Add a command that returns same information like HOTPLUG_STATE event. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 11 +++ include/hw/hotplug.h| 12 include/hw/pci/pci_bridge.h | 2 ++ include/hw/pci/pcie.h | 2 ++

[PATCH v3 08/15] pcie: drop unused PCIExpressIndicator

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
The structure type is unused. Also, it's the only user of corresponding macros, so drop them too. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé --- include/hw/pci/pcie.h | 8 include/hw/pci/pcie_regs.h | 5 - 2 files changed, 13 deletions(-)

[PATCH v3 12/15] pci: introduce pci_find_the_only_child()

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
To be used in further patch to identify the device hot-plugged into pcie-root-port. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/pci/pci.h | 1 + hw/pci/pci.c | 33 + 2 files changed, 34 insertions(+) diff --git a/include/hw/pci/pci.h

[PATCH v3 10/15] pcie: introduce pcie_sltctl_powered_off() helper

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
In pcie_cap_slot_write_config() we check for PCI_EXP_SLTCTL_PWR_OFF in a bad form. We should distinguish PCI_EXP_SLTCTL_PWR which is a "mask" and PCI_EXP_SLTCTL_PWR_OFF which is value for that mask. Better code is in pcie_cap_slot_unplug_request_cb() and in pcie_cap_update_power(). Let's use same

[PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
For PCIe and SHPC hotplug it's important to track led indicators, especially the power led. Add an event that helps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 62 include/hw/pci/pci.h | 15 +++ hw/pci/pci.c

[PATCH v3 09/15] pcie: pcie_cap_slot_enable_power() use correct helper

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
*_by_mask() helpers shouldn't be used here (and that's the only one). *_by_mask() helpers do shift their value argument, but in pcie.c code we use values that are already shifted appropriately. Happily, PCI_EXP_SLTCTL_PWR_ON is zero, so shift doesn't matter. But if we apply same helper for

[PATCH v3 00/15] pci hotplug tracking

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
Hi all! That's called v3, as it includes "[PATCH v2 0/3] pcie: cleanup code": Supersedes: <20230207121116.325456-1-vsement...@yandex-team.ru> Supersedes: <20230204174758.234951-1-vsement...@yandex-team.ru> Supersedes: <20230207120922.325203-1-vsement...@yandex-team.ru> Ok, what's this about?

Re: [PATCH RFCv1 2/8] memory: Add last stage indicator to global dirty log synchronization

2023-02-09 Thread Peter Xu
On Mon, Feb 06, 2023 at 07:20:04PM +0800, Gavin Shan wrote: > The global dirty log synchronization is used when KVM and dirty ring > are enabled. There is a particularity for ARM64 where the backup > bitmap is used to track dirty pages in non-running-vcpu situations. > It means the dirty ring

Re: [PATCH v3 2/4] migration: Cleanup postcopy_preempt_setup()

2023-02-09 Thread Juan Quintela
Peter Xu wrote: > Since we just dropped the only case where postcopy_preempt_setup() can > return an error, it doesn't need a retval anymore because it never fails. > Move the preempt check to the caller, preparing it to be used elsewhere to > do nothing but as simple as kicking the async

Re: [PATCH v7 2/2] Update bench-code for addressing CI problem

2023-02-09 Thread Juan Quintela
ling xu wrote: > Unit test code is in test-xbzrle.c, and benchmark code is in xbzrle-bench.c > for performance benchmarking. we have modified xbzrle-bench.c to address > CI problem. > > Signed-off-by: ling xu > Co-authored-by: Zhou Zhao > Co-authored-by: Jun Jin Reviewed-by: Juan Quintela

Re: [PATCH v7 1/2] AVX512 support for xbzrle_encode_buffer

2023-02-09 Thread Juan Quintela
ling xu wrote: > This commit is the same with [PATCH v6 1/2], and provides avx512 support for > xbzrle_encode_buffer > function to accelerate xbzrle encoding speed. Runtime check of avx512 > support and benchmark for this feature are added. Compared with C > version of xbzrle_encode_buffer

  1   2   3   >