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

2023-02-09 Thread John Paul Adrian Glaubitz
On Thu, 2023-02-09 at 14:23 +, Peter Maydell wrote: > > So, just include "-ldl" in LD_FLAGS? > > If this is necessary, then pkg-config should tell us to do it :-) > > But in the usual situation that you put the statically linked > QEMU binary into a chroot, the dlopen() that libdw is going to

Re: [PATCH v2 00/13] Dynamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-09 Thread Lei Yang
QE tested this series on the rhel. Creating two vdpa_sim devices, and boot two VMs without shadow vq. The migration was successful and everything worked fine Tested-by: Lei Yang Alvaro Karsz 于2023年2月8日周三 18:29写道: > > HI Eugenio, thanks for the series! > > I tested the series with our DPU, Solid

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

2023-02-09 Thread Steven Sistare
On 2/9/2023 5:02 AM, Markus Armbruster wrote: > Alex Bennée writes: > >> Steven Sistare writes: >> >>> On 2/8/2023 1:43 AM, Marc-André Lureau wrote: Hi On Tue, Feb 7, 2023 at 10:50 PM Steve Sistare wrote: > > Generalize hmp_split_at_comma() to take any delimiter cha

Re: [PATCH V2 0/4] string list functions

2023-02-09 Thread Steven Sistare
On 2/9/2023 5:05 AM, Markus Armbruster wrote: > Steve Sistare writes: > >> Add some handy string list functions, for general use now, and for >> eventual use in the cpr/live update patches. > > Submit them together with uses, please. Are you OK with me describing my intended uses in the commit

Re: [PATCH V2 0/4] string list functions

2023-02-09 Thread Steven Sistare
On 2/9/2023 5:48 AM, Daniel P. Berrangé wrote: > On Tue, Feb 07, 2023 at 10:48:43AM -0800, Steve Sistare wrote: >> Add some handy string list functions, for general use now, and for >> eventual use in the cpr/live update patches. >> >> Steve Sistare (4): >> qapi: strList_from_string >> qapi: QA

Re: [PATCH v15 10/11] qapi/s390x/cpu topology: CPU_POLARITY_CHANGE qapi event

2023-02-09 Thread Nina Schoetterl-Glausch
On Thu, 2023-02-09 at 14:00 +0100, Pierre Morel wrote: > > On 2/9/23 13:28, Nina Schoetterl-Glausch wrote: > > On Wed, 2023-02-08 at 20:23 +0100, Markus Armbruster wrote: > > > Nina Schoetterl-Glausch writes: > > > > > ... > > > > > > > > > > I also wonder if you should add 'feature' : [ 'un

Re: [PATCH] tests/qtest/npcm7xx_pwm-test: Be less verbose unless V=2

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 14:50, Peter Maydell wrote: The npcm7xx_pwm-test produces a lot of output at V=1, which means that on our CI tests the log files exceed the gitlab 500KB limit. Suppress the messages about exactly what is being tested unless at V=2 and above. This follows the pattern we use with qom-tes

[PATCH v3] tests/docker: Use binaries for debian-tricore-cross

2023-02-09 Thread Bastian Koppelmann
since binutils is pretty old, it fails our CI repeatedly during the compilation of tricore-binutils. We created a precompiled version using the debian docker image and download it instead of building it ourself. We also updated the package to include a newer version of binutils, gcc, and newlib. T

Re: rainier-bmc machine dumping core with latest qemu

2023-02-09 Thread Ninad Palsule
Hi Emanuele, On 2/9/23 5:24 AM, Emanuele Giuseppe Esposito wrote: Adding Kevin too. I can't reproduce your issue. I tried the exact steps showed in your mail, both with BLD_VERSION=20230205025034 (not anymore latest compose) and BLD_VERSION=20230209025037 (currently latest), and the VM boots t

Re: [PULL v2 00/11] Misc patches for 2023-02-08

2023-02-09 Thread Peter Maydell
On Thu, 9 Feb 2023 at 09:36, Paolo Bonzini wrote: > > The following changes since commit ae2b5d8381a73b27f35f19c988d45c78bb4d5768: > > Merge tag 'pull-include-2023-02-06-v2' of https://repo.or.cz/qemu/armbru > into staging (2023-02-08 10:40:06 +) > > are available in the Git repository at:

Re: [PATCH] virtio-blk: add missing AioContext lock

2023-02-09 Thread Stefan Hajnoczi
On Wed, Feb 08, 2023 at 06:11:48AM -0500, Emanuele Giuseppe Esposito wrote: > virtio_blk_update_config() calls blk_get_geometry and blk_getlength, > and both functions eventually end up calling bdrv_poll_co when not > running in a coroutine: > - blk_getlength is a co_wrapper_mixed function > - blk_

Re: [PATCH] virtio-blk: add missing AioContext lock

2023-02-09 Thread Stefan Hajnoczi
On Wed, Feb 08, 2023 at 06:11:48AM -0500, Emanuele Giuseppe Esposito wrote: > virtio_blk_update_config() calls blk_get_geometry and blk_getlength, > and both functions eventually end up calling bdrv_poll_co when not > running in a coroutine: > - blk_getlength is a co_wrapper_mixed function > - blk_

[PATCH v2] 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

Re: [PATCH] migration: I messed state_pending_exact/estimate

2023-02-09 Thread Juan Quintela
Juan Quintela wrote: > And called then in the wrong place. > > Thanks to Avihai Horon for finding it. > > Signed-off-by: Juan Quintela Nack. Sent another version with the commit information when the messed up camed in.

Re: [PATCH v4 0/4] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-09 Thread Stefan Hajnoczi
On Tue, Feb 07, 2023 at 03:37:15PM -0500, Stefan Hajnoczi wrote: > v4: > - Add 'r' to read_f() getopt() call [Hanna] > - Fix qemu_io_alloc() and friends buf and len with qemuio_misalign [Hanna] > - Fix qemu_iovec_destroy()/qemu_io_free() ordering in aio_write_done() [Hanna] > - Add mutually exclusi

Re: [PULL 03/30] migration: Split save_live_pending() into state_pending_*

2023-02-09 Thread Juan Quintela
Avihai Horon wrote: > On 07/02/2023 2:56, Juan Quintela wrote: >> External email: Use caution opening links or attachments >> >> >> We split the function into to: >> >> - state_pending_estimate: We estimate the remaining state size without >>stopping the machine. >> >> - state pending_exact: W

[PULL 1/6] vhost-user-fs: Back up vqs before cleaning up vhost_dev

2023-02-09 Thread Stefan Hajnoczi
From: Akihiko Odaki vhost_dev_cleanup() clears vhost_dev so back up its vqs member to free the memory pointed by the member. Fixes: 98fc1ada4c ("virtio: add vhost-user-fs base device") Signed-off-by: Akihiko Odaki Signed-off-by: Stefan Hajnoczi Message-Id: <20230130140225.77964-1-akihiko.od...

[PULL 2/6] virtio-blk: add missing AioContext lock

2023-02-09 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito virtio_blk_update_config() calls blk_get_geometry and blk_getlength, and both functions eventually end up calling bdrv_poll_co when not running in a coroutine: - blk_getlength is a co_wrapper_mixed function - blk_get_geometry calls bdrv_get_geometry -> bdrv_nb_sec

[PULL 0/6] Block patches

2023-02-09 Thread Stefan Hajnoczi
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/stefanha/qemu.git tags/block-pull-request for you to fetch c

[PULL 4/6] qemu-io: use BdrvRequestFlags instead of int

2023-02-09 Thread Stefan Hajnoczi
The block layer APIs use BdrvRequestFlags while qemu-io code uses int. Although the code compiles and runs fine, BdrvRequestFlags is clearer because it differentiates between other types of flags like bdrv_open() flags. This is purely refactoring. Reviewed-by: Eric Blake Reviewed-by: Hanna Czenc

[PULL 3/6] block: fix detect-zeroes= with BDRV_REQ_REGISTERED_BUF

2023-02-09 Thread Stefan Hajnoczi
When a write request is converted into a write zeroes request by the detect-zeroes= feature, it is no longer associated with an I/O buffer. The BDRV_REQ_REGISTERED_BUF flag doesn't make sense without an I/O buffer and must be cleared because bdrv_co_do_pwrite_zeroes() fails with -EINVAL when it's s

[PULL 6/6] iotests/detect-zeroes-registered-buf: add new test

2023-02-09 Thread Stefan Hajnoczi
This regression test demonstrates that detect-zeroes works with registered buffers. Bug details: https://gitlab.com/qemu-project/qemu/-/issues/1404 Reviewed-by: Eric Blake Reviewed-by: Hanna Czenczek Signed-off-by: Stefan Hajnoczi Message-Id: <20230207203719.242926-5-stefa...@redhat.com> --- .

[PULL 5/6] qemu-io: add -r option to register I/O buffer

2023-02-09 Thread Stefan Hajnoczi
The blk_register_buf() API is an optimization hint that allows some block drivers to avoid I/O buffer housekeeping or bounce buffers. Add an -r option to register the I/O buffer so that qemu-io can be used to test the blk_register_buf() API. The next commit will add a test that uses the new option

Re: [PATCH v2] migration: I messed state_pending_exact/estimate

2023-02-09 Thread Peter Maydell
On Thu, 9 Feb 2023 at 15:23, Juan Quintela wrote: > > 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_

[PATCH 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 --- .gitla

[PATCH 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 t

[PATCH 5/7] 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. Note that this requires OpenSuSE Leap 15.3; 15.2 won't cut it. This is just to prove that bumping our dependency works. Sig

[PATCH 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 instea

[PATCH 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 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 whe

[PATCH 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 --- pyt

[PATCH 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. Since it is safe to under our supported platfor

[PATCH] block/file-posix: don't use functions calling AIO_WAIT_WHILE in worker threads

2023-02-09 Thread Emanuele Giuseppe Esposito
When calling bdrv_getlength() in handle_aiocb_write_zeroes(), the function creates a new coroutine and then waits that it finishes using AIO_WAIT_WHILE. The problem is that this function could also run in a worker thread, that has a different AioContext from main loop and iothreads, therefore in AI

Re: [PATCH RFC 0/7] revert RNG seed mess

2023-02-09 Thread Nathan Chancellor
On Wed, Feb 08, 2023 at 04:12:23PM -0500, Michael S. Tsirkin wrote: > All attempts to fix up passing RNG seed via setup_data entry failed. > Let's just rip out all of it. We'll start over. > > > Warning: all I did was git revert the relevant patches and resolve the > (trivial) conflicts. Not eve

Re: [PATCH RFC 6/7] Revert "x86: return modified setup_data only if read as memory, not as file"

2023-02-09 Thread Jason A. Donenfeld
On Wed, Feb 08, 2023 at 04:12:51PM -0500, Michael S. Tsirkin wrote: > This reverts commit e935b735085dfa61d8e6d276b6f9e7687796a3c7. > > Fixes: e935b73508 ("x86: return modified setup_data only if read as memory, > not as file") > Signed-off-by: Michael S. Tsirkin > --- > include/hw/nvram/fw_cfg

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

2023-02-09 Thread Thomas Huth
On 09/02/2023 16.40, John Snow wrote: 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. I think it would be good to have a RFC or DONOTMERGE in the patch title, so that it

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

2023-02-09 Thread Thomas Huth
On 09/02/2023 16.40, 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 1/7] python: support pylint 2.16

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 16:40, John Snow wrote: 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

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

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 16:40, 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] block/file-posix: don't use functions calling AIO_WAIT_WHILE in worker threads

2023-02-09 Thread Philippe Mathieu-Daudé
On 9/2/23 16:45, Emanuele Giuseppe Esposito wrote: When calling bdrv_getlength() in handle_aiocb_write_zeroes(), the function creates a new coroutine and then waits that it finishes using AIO_WAIT_WHILE. The problem is that this function could also run in a worker thread, that has a different Aio

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

2023-02-09 Thread John Snow
On Thu, Feb 9, 2023 at 10:56 AM Thomas Huth wrote: > > On 09/02/2023 16.40, John Snow wrote: > > 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. > > I think it would

[PATCH] hw/misc/sga: Remove the deprecated "sga" device

2023-02-09 Thread Thomas Huth
It's been deprecated since QEMU v6.2, so it should be OK to finally remove this now. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 - docs/about/deprecated.rst | 9 docs/about/removed-features.rst | 10 hw/misc/sga.c |

Re: [PATCH v2 1/6] migration: moved hmp_split_at_commma() helper func to qapi-util.c file

2023-02-09 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Het Gala writes: >> >>> renamed hmp_split_at_comma() --> str_split_at_comma() >>> Shifted helper function to qapi-util.c file. >> >> Not an appropriate home. > > I don't have an opinion here. > >> If we have to split up a string in QAPI/QMP, w

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

2023-02-09 Thread Markus Armbruster
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 have the QAPI generator wired up to support

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

2023-02-09 Thread Daniel P . Berrangé
On Thu, Feb 09, 2023 at 10:40:34AM -0500, John Snow wrote: > 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 t

Re: [PATCH V2 0/4] string list functions

2023-02-09 Thread Markus Armbruster
Steven Sistare writes: > On 2/9/2023 5:05 AM, Markus Armbruster wrote: >> Steve Sistare writes: >> >>> Add some handy string list functions, for general use now, and for >>> eventual use in the cpr/live update patches. >> >> Submit them together with uses, please. > > Are you OK with me descri

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

2023-02-09 Thread Nina Schoetterl-Glausch
On Wed, 2023-02-01 at 14:20 +0100, Pierre Morel wrote: > On interception of STSI(15.1.x) the System Information Block > (SYSIB) is built from the list of pre-ordered topology entries. > > Signed-off-by: Pierre Morel > --- > include/hw/s390x/cpu-topology.h | 22 +++ > include/hw/s390x/sclp.h

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

2023-02-09 Thread John Snow
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. Newer versions of upstream libraries have > > begun dropping support for this version and it is becoming more > > cumbersome to support. Avoca

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

2023-02-09 Thread Markus Armbruster
Steven Sistare writes: > On 2/9/2023 5:02 AM, Markus Armbruster wrote: >> Alex Bennée writes: >> >>> Steven Sistare writes: >>> On 2/8/2023 1:43 AM, Marc-André Lureau wrote: > Hi > > On Tue, Feb 7, 2023 at 10:50 PM Steve Sistare > wrote: >> >> Generalize hmp_spli

Re: [PATCH v2] migration: I messed state_pending_exact/estimate

2023-02-09 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > I called the helper function from the wrong top level function. Oops yes; as Peter says, this needs a Fixes: line, bu tother than that. Reviewed-by: Dr. David Alan Gilbert > This code was introduced in: > > commit c8df4a7aeffcb46020f610526eea621f

[PATCH] tests/avocado: Add set of boot tests on SBSA-ref

2023-02-09 Thread Marcin Juszkiewicz
From: Philippe Mathieu-Daudé This change adds set of boot tests on SBSA-ref machine: 1. boot TF-A up to the EDK2 banner 2. boot Linux kernel/initrd up to Busybox shell Prebuilt flash volumes are included, built using upstream documentation. EDK2 and TF-A are updated to have SVE/SME properly ena

[PATCH] vdpa: stop all svq on device deletion

2023-02-09 Thread Eugenio Pérez
Not stopping them leave the device in a bad state when virtio-net fronted device is unplugged with device_del monitor command. This is not triggable in regular poweroff or qemu forces shutdown because cleanup is called right after vhost_vdpa_dev_start(false). But devices hot unplug does not call

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

2023-02-09 Thread Steven Sistare
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 1:43 AM, Marc-André Lureau wrote: >> Hi >> >> On Tue, Feb 7, 2023 at 10:50 PM Ste

Re: [PATCH] vdpa: stop all svq on device deletion

2023-02-09 Thread Laurent Vivier
On 2/9/23 18:00, Eugenio Pérez wrote: Not stopping them leave the device in a bad state when virtio-net fronted device is unplugged with device_del monitor command. This is not triggable in regular poweroff or qemu forces shutdown because cleanup is called right after vhost_vdpa_dev_start(false)

Re: [PATCH v15 00/11] s390x: CPU Topology

2023-02-09 Thread Nina Schoetterl-Glausch
IMO this series looks good overall and like it's nearing the final stages. You use "polarity" instead of "polarization" a lot. Since the PoP uses polarization I think that term would be preferred. With the series as it is, one cannot set the polarization via qmp, only the entitlement of individua

Re: [PATCH] block/file-posix: don't use functions calling AIO_WAIT_WHILE in worker threads

2023-02-09 Thread Kevin Wolf
Am 09.02.2023 um 16:45 hat Emanuele Giuseppe Esposito geschrieben: > When calling bdrv_getlength() in handle_aiocb_write_zeroes(), the > function creates a new coroutine and then waits that it finishes using > AIO_WAIT_WHILE. > The problem is that this function could also run in a worker thread, >

Re: [PATCH 1/3] migration: In case of postcopy, the memory ends in res_postcopy_only

2023-02-09 Thread Vladimir Sementsov-Ogievskiy
On 08.02.23 16:57, Juan Quintela wrote: So remove last assignation of res_compatible. I hoped for some description when asked to split it out :) Signed-off-by: Juan Quintela --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migratio

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

2023-02-09 Thread Beraldo Leal
On Thu, Feb 09, 2023 at 10:40:28AM -0500, John Snow wrote: > 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 t

Re: [PATCH] hw/misc/sga: Remove the deprecated "sga" device

2023-02-09 Thread Juan Quintela
Thomas Huth wrote: > It's been deprecated since QEMU v6.2, so it should be OK to > finally remove this now. > > Signed-off-by: Thomas Huth Reviewed-by: Juan Quintela

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

2023-02-09 Thread Daniel P . Berrangé
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. Newer versions of upstream libraries have > > > begun dropping support f

Re: [PATCH 1/3] migration: In case of postcopy, the memory ends in res_postcopy_only

2023-02-09 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 08.02.23 16:57, Juan Quintela wrote: >> So remove last assignation of res_compatible. > > I hoped for some description when asked to split it out :) > >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c | 2 +- >> 1 file changed, 1 insertion(+), 1

[PATCH v3 3/7] qapi/expr: Split check_expr out from check_exprs

2023-02-09 Thread John Snow
Primarily, this reduces a nesting level of a particularly long block. It's mostly code movement, but a new docstring is created. It also has the effect of creating a fairly convenient "catch point" in check_exprs for exception handling without making the nesting level even worse. Signed-off-by: J

[PATCH v3 0/7] qapi: static typing conversion, pt5c

2023-02-09 Thread John Snow
This is part five (c), and focuses on sharing strict types between parser.py and expr.py. gitlab: https://gitlab.com/jsnow/qemu/-/commits/python-qapi-cleanup-pt5c Every commit should pass with: - `isort -c qapi/` - `flake8 qapi/` - `pylint --rcfile=qapi/pylintrc qapi/` - `mypy --config-file=q

[PATCH v3 2/7] qapi: update pylint configuration

2023-02-09 Thread John Snow
Newer versions of pylint disable the "no-self-use" message by default. Older versions don't, though. If we leave the suppressions in, pylint yelps about useless options. Just tell pylint to shush. Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- scripts/qapi/pylintrc | 1 + 1 file ch

[PATCH v3 7/7] qapi: remove JSON value FIXME

2023-02-09 Thread John Snow
With the two major JSON-ish type hierarchies clarified for distinct purposes; QAPIExpression for parsed expressions and JSONValue for introspection data, remove this FIXME as no longer an action item. In theory, it may be possible to define a completely agnostic one-size-fits-all JSON type hierarc

[PATCH v3 4/7] qapi/expr: add typing workaround for AbstractSet

2023-02-09 Thread John Snow
mypy can only narrow the type of `Mapping[str, ...].keys() & Set[str]` to `AbstractSet[str]` and not a `Set[str]`. As a result, if the type of an expression is changed to a Mapping[], mypy is unsure if the .pop() is safe. A forthcoming commit does exactly that, so wrap the expression in a set() co

[PATCH v3 1/7] qapi: Update flake8 config

2023-02-09 Thread John Snow
New versions of flake8 don't like same-line comments. (It's a version newer than what fc37 ships, but it still makes my life easier to fix it now.) Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- scripts/qapi/.flake8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --gi

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

2023-02-09 Thread Markus Armbruster
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 1:43 AM, Marc-André Lureau wrote: >>> Hi >>> >

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

2023-02-09 Thread Avihai Horon
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 migration code. Signed-off-by: Avihai Horon Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cédric Le Goater --- migration/qemu-file.h

[PATCH v10 02/12] vfio/migration: Fix NULL pointer dereference bug

2023-02-09 Thread Avihai Horon
As part of its error flow, vfio_vmstate_change() accesses MigrationState->to_dst_file without any checks. This can cause a NULL pointer dereference if the error flow is taken and MigrationState->to_dst_file is not set. For example, this can happen if VM is started or stopped not during migration a

[PATCH v10 06/12] vfio/migration: Block multiple devices migration

2023-02-09 Thread Avihai Horon
Currently VFIO migration doesn't implement some kind of intermediate quiescent state in which P2P DMAs are quiesced before stopping or running the device. This can cause problems in multi-device migration where the devices are doing P2P DMAs, since the devices are not stopped together at the same t

[PATCH v10 03/12] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support

2023-02-09 Thread Avihai Horon
Currently, if IOMMU of a VFIO container doesn't support dirty page tracking, migration is blocked. This is because a DMA-able VFIO device can dirty RAM pages without updating QEMU about it, thus breaking the migration. However, this doesn't mean that migration can't be done at all. In such case, a

[PATCH v10 01/12] linux-headers: Update to v6.2-rc1

2023-02-09 Thread Avihai Horon
Update to commit 1b929c02afd3 ("Linux 6.2-rc1"). Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Reviewed-by: Michael S. Tsirkin --- include/standard-headers/drm/drm_fourcc.h | 63 +++- include/standard-headers/linux/ethtool.h | 81 - include/standard-headers/linux/fus

[PATCH v10 08/12] vfio/migration: Rename functions/structs related to v1 protocol

2023-02-09 Thread Avihai Horon
To avoid name collisions, rename functions and structs related to VFIO migration protocol v1. This will allow the two protocols to co-exist when v2 protocol is added, until v1 is removed. No functional changes intended. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- include/hw/vf

[PATCH v10 05/12] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one

2023-02-09 Thread Avihai Horon
vfio_devices_all_running_and_saving() is used to check if migration is in pre-copy phase. This is done by checking if migration is in setup or active states and if all VFIO devices are in pre-copy state, i.e. _SAVING | _RUNNING. In VFIO migration protocol v2 pre-copy support is made optional. Henc

[PATCH v10 09/12] vfio/migration: Implement VFIO migration protocol v2

2023-02-09 Thread Avihai Horon
Implement the basic mandatory part of VFIO migration protocol v2. This includes all functionality that is necessary to support VFIO_MIGRATION_STOP_COPY part of the v2 protocol. The two protocols, v1 and v2, will co-exist and in the following patches v1 protocol code will be removed. There are sev

[PATCH v10 11/12] vfio: Alphabetize migration section of VFIO trace-events file

2023-02-09 Thread Avihai Horon
Sort the migration section of VFIO trace events file alphabetically and move two misplaced traces to common.c section. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- hw/vfio/trace-events | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw

[PATCH v10 10/12] vfio/migration: Remove VFIO migration protocol v1

2023-02-09 Thread Avihai Horon
Now that v2 protocol implementation has been added, remove the deprecated v1 implementation. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 5 - hw/vfio/common.c | 17 +- hw/vfio/migration.c | 702 ++---

[PATCH v10 07/12] vfio/migration: Move migration v1 logic to vfio_migration_init()

2023-02-09 Thread Avihai Horon
Move vfio_dev_get_region_info() logic from vfio_migration_probe() to vfio_migration_init(). This logic is specific to v1 protocol and moving it will make it easier to add the v2 protocol implementation later. No functional changes intended. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goate

[PATCH v10 12/12] docs/devel: Align VFIO migration docs to v2 protocol

2023-02-09 Thread Avihai Horon
Now that VFIO migration protocol v2 has been implemented and v1 protocol has been removed, update the documentation according to v2 protocol. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- docs/devel/vfio-migration.rst | 72 +-- 1 file changed, 34

[PATCH v10 00/12] vfio/migration: Implement VFIO migration protocol v2

2023-02-09 Thread Avihai Horon
Hello, This v10 is rebased over Juan's pull request [1] which made some changes to the migration handlers. Therefore, I had to do some more significant changes to the main patch (#9) and thus removed Cedric's R-b. The full changelog is below. Following VFIO migration protocol v2 acceptance in k

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 functi

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 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 connecti

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 works

[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? The

[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 PCI_EXP_

[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 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 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 b/inc

[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 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 ++ inc

[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 --- a/hw/pci/shpc

[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 +6

[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 Seme

[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 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 insert

[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 chang

[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 inserti

[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 @

<    1   2   3   >