[PULL 17/20] crypto: split off helpers for converting LUKS header endianess

2022-10-27 Thread Daniel P . Berrangé
The unit test suite is shortly going to want to convert header endianness separately from the main I/O functions. Reviewed-by: Richard W.M. Jones Signed-off-by: Daniel P. Berrangé --- crypto/block-luks-priv.h | 6 +++ crypto/block-luks.c | 79 2 fi

[PULL 00/20] Crypto and I/O patches

2022-10-27 Thread Daniel P . Berrangé
The following changes since commit e750a7ace492f0b450653d4ad368a77d6f660fb8: Merge tag 'pull-9p-20221024' of https://github.com/cschoenebeck/qemu into staging (2022-10-24 14:27:12 -0400) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/misc-next-pull-request fo

[PULL 19/20] crypto: ensure LUKS tests run with GNUTLS crypto provider

2022-10-27 Thread Daniel P . Berrangé
GNUTLS is supported as a crypto provider since commit cc4c7c738297958b3d1d16269f57d71d22f5a9ff Author: Daniel P. Berrangé Date: Wed Jun 30 17:20:02 2021 +0100 crypto: introduce build system for gnutls crypto backend So enable the LUKS tests in this config. Reviewed-by: Richard W.M.

[PULL 03/20] io/channel-watch: Drop a superfluous '#ifdef WIN32'

2022-10-27 Thread Daniel P . Berrangé
From: Bin Meng In the win32 version qio_channel_create_socket_watch() body there is no need to do a '#ifdef WIN32'. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrangé --- io/channel-watch.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/io/channel-

Re: [PULL 00/23] 9p queue 2022-10-24

2022-10-27 Thread Stefan Hajnoczi
On Thu, 27 Oct 2022 at 12:38, Christian Schoenebeck wrote: > > On Thursday, October 27, 2022 5:53:47 PM CEST Thomas Huth wrote: > > On 24/10/2022 12.54, Christian Schoenebeck wrote: > > > The following changes since commit > > > 0529245488865038344d64fff7ee05864d3d17f6: > > > > > >Merge tag '

[PULL 12/20] crypto: enforce that key material doesn't overlap with LUKS header

2022-10-27 Thread Daniel P . Berrangé
We already check that key material doesn't overlap between key slots, and that it doesn't overlap with the payload. We didn't check for overlap with the LUKS header. Reviewed-by: Richard W.M. Jones Signed-off-by: Daniel P. Berrangé --- crypto/block-luks.c | 8 1 file changed, 8 inserti

[PATCH v3 0/2] hw/nvme: Support for Namespaces Management from guest OS

2022-10-27 Thread Jonathan Derrick
From: Michael Kropaczek Description: Currently namespaces could be configured as follows: 1. Legacy Namespace - just one namespace within Nvme controller's where the back-end was specified for nvme device by -drive parameter pointing directly to the image file. 2. Additional Namespaces - s

[PATCH v3 1/2] hw/nvme: Support for Namespaces Management from guest OS - create-ns

2022-10-27 Thread Jonathan Derrick
From: Michael Kropaczek Added support for NVMEe NameSpaces Mangement allowing the guest OS to create namespaces by issuing nvme create-ns command. It is an extension to currently implemented Qemu nvme virtual device. Virtual devices representing namespaces will be created and/or deleted during Qe

[PATCH v3 2/2] hw/nvme: Support for Namespaces Management from guest OS - delete-ns

2022-10-27 Thread Jonathan Derrick
From: Michael Kropaczek Added support for NVMEe NameSpaces Mangement allowing the guest OS to delete namespaces by issuing nvme delete-ns command. It is an extension to currently implemented Qemu nvme virtual device. Virtual devices representing namespaces will be created and/or deleted during Qe

Re: [PATCH 0/4 v3] Multi-Region and Volatile Memory support for CXL Type-3 Devices

2022-10-27 Thread Adam Manzanares
On Thu, Oct 27, 2022 at 11:58:54AM +0100, Jonathan Cameron wrote: > On Wed, 26 Oct 2022 16:47:18 -0400 > Gregory Price wrote: > > > On Wed, Oct 26, 2022 at 08:13:24PM +, Adam Manzanares wrote: > > > On Tue, Oct 25, 2022 at 08:47:33PM -0400, Gregory Price wrote: > > > > Submitted as an exten

Re: [PATCH 22/24] accel/tcg: Use interval tree for user-only page tracking

2022-10-27 Thread Alex Bennée
Richard Henderson writes: > On 10/26/22 23:36, Alex Bennée wrote: >> Richard Henderson writes: >> >>> Finish weaning user-only away from PageDesc. >>> >>> Using an interval tree to track page permissions means that >>> we can represent very large regions efficiently. >>> >>> Resolves: https:/

Re: [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Kevin Wolf
Am 27.10.2022 um 09:27 hat Emanuele Giuseppe Esposito geschrieben: > blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE > but can be invoked from iothreads when handling scsi requests. > This triggers an assertion failure: > > 0x7fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/li

[PULL 07/58] vhost-user-blk: fix the resize crash

2022-10-27 Thread Kevin Wolf
From: Li Feng If the os is not installed and doesn't have the virtio guest driver, the vhost dev isn't started, so the dev->vdev is NULL. Reproduce: mount a Win 2019 iso, go into the install ui, then resize the virtio-blk device, qemu crash. Signed-off-by: Li Feng Message-Id: <20220919121816.3

[PULL 09/58] block: introduce bdrv_open_file_child() helper

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Almost all drivers call bdrv_open_child() similarly. Let's create a helper for this. The only not updated drivers that call bdrv_open_child() to set bs->file are raw-format and snapshot-access: raw-format sometimes want to have filtered child but do

[PULL 03/58] block: Refactor get_tmp_filename()

2022-10-27 Thread Kevin Wolf
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);

[PULL 08/58] block: BlockDriver: add .filtered_child_is_backing field

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Unfortunately not all filters use .file child as filtered child. Two exclusions are mirror_top and commit_top. Happily they both are private filters. Bad thing is that this inconsistency is observable through qmp commands query-block / query-named-block-nodes. S

[PULL 01/58] MAINTAINERS: Fold "Block QAPI, monitor, ..." into "Block layer core"

2022-10-27 Thread Kevin Wolf
From: Markus Armbruster Section "Block QAPI, monitor, command line" is about the external interfaces we provide for block devices. It covers the relevant QAPI schema parts, monitor and command line code, more or less. The section's files are also covered by section "Block layer core", except fo

[PULL 04/58] vvfat: allow some writes to bootsector

2022-10-27 Thread Kevin Wolf
From: Hervé Poussineau 'reserved1' field in bootsector is used to mark volume dirty, or need to verify. Allow writes to bootsector which only changes the 'reserved1' field. This fixes I/O errors on Windows guests. Resolves: https://bugs.launchpad.net/qemu/+bug/1889421 Signed-off-by: Hervé Pouss

[PULL 17/58] Revert "block: Let replace_child_tran keep indirect pointer"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 82b54cf51656bf3cd5ed1ac549e8a1085a0e3290. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-b

[PULL 26/58] blockjob: implement .change_aio_ctx in child_job

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito child_job_change_aio_ctx() is very similar to child_job_can_set_aio_ctx(), but it implements a new transaction so that if all check pass, the new transaction's .commit() will take care of changin the BlockJob AioContext. child_job_set_aio_ctx_commit() is similar t

[PULL 33/58] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Kevin Wolf
From: Bin Meng libnfs.h declares nfs_fstat() as the following for win32: int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh, struct __stat64 *st); The 'st' parameter should be of type 'struct __stat64'. The codes happen to build successfully for 64-bit Windows, but it

[PULL 11/58] test-bdrv-graph-mod: update test_parallel_perm_update test case

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy test_parallel_perm_update() does two things that we are going to restrict in the near future: 1. It updates bs->file field by hand. bs->file will be managed automatically by generic code (together with bs->children list). Let's better refactor our "trick

[PULL 30/58] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Together with all _can_set_ and _set_ APIs, as they are not needed anymore. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-9-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- include/block/block-global-s

[PULL 05/58] vvfat: allow spaces in file names

2022-10-27 Thread Kevin Wolf
From: Hervé Poussineau In R/W mode, files with spaces were never created on host side. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1176 Fixes: c79e243ed67683d6d06692bd7040f7394da178b0 Signed-off-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf Messa

[PULL 20/58] block: Manipulate bs->file / bs->backing pointers in .attach/.detach

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy bs->file and bs->backing are a kind of duplication of part of bs->children. But very useful diplication, so let's not drop them at all:) We should manage bs->file and bs->backing in same place, where we manage bs->children, to keep them in sync. Moreover, gene

[PULL 34/58] backup: remove incorrect coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The .set_speed callback is not called from coroutine. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-2-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/backup.c | 2 +- 1 file changed, 1 insert

[PULL 13/58] test-bdrv-graph-mod: fix filters to be filters

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy bdrv_pass_through is used as filter, even all node variables has corresponding names. We want to append it, so it should be backing-child-based filter like mirror_top. So, in test_update_perm_tree, first child should be DATA, as we don't want filters with two fi

[PULL 18/58] Revert "block: Restructure remove_file_or_backing_child()"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 562bda8bb41879eeda0bd484dd3d55134579b28e. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-b

[PULL 27/58] block: implement .change_aio_ctx in child_of_bds

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_child_cb_change_aio_ctx() is identical to bdrv_child_cb_can_set_aio_ctx(), as we only need to recursively go on the parent bs. Note: bdrv_child_try_change_aio_context() is not called by anyone at this point. Signed-off-by: Emanuele Giuseppe Esposito Review

[PULL 00/58] Block layer patches

2022-10-27 Thread Kevin Wolf
The following changes since commit 344744e148e6e865f5a57e745b02a87e5ea534ad: Merge tag 'dump-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2022-10-26 10:53:49 -0400) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL 32/58] block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-11-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- docs/devel/multiple-iothreads.txt | 4 ++-- include/block/block-global

[PULL 06/58] block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

2022-10-27 Thread Kevin Wolf
From: Sam Li Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1193 The commit "Use io_uring_register_ring_fd() to skip fd operations" broke when booting a guest with iothread and io_uring. That is because the io_uring_register_ring_fd() call is made from the main thread instead of IOThrea

[PULL 12/58] tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We do add COW child to the node. In future we are going to forbid adding COW child to the node that doesn't support backing. So, fix it here now. Don't worry about setting bs->backing itself: in further commit we'll update the block-layer to automatically set/

[PATCH v4 00/30] testing/next pre-PR

2022-10-27 Thread Alex Bennée
Hi, Pretty much everything is reviewed now except the late breaking fixes mentioned bellow. Consider this a pre-PR series for the pull req I'm going to send in on Haloween (hopefully no hidden gremlins though). The following still need review: - tests/unit: cleanups for test-io-channel-command

[PATCH v4 03/30] tests/docker: Add flex/bison to `debian-all-test`

2022-10-27 Thread Alex Bennée
From: Anton Johansson Adds flex/bison to the debian-all-test-cross container which was missed in the previous CI patch. These dependencies are required by the idef-parser patchset for target/hexagon. Signed-off-by: Anton Johansson Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id

[PULL 52/58] qcow2: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-20-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 8 block/qcow2-refcount.c | 10 +- block/qcow2-snapshot.c

[PULL 16/58] Revert "block: Let replace_child_noperm free children"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We are going to reimplement this behavior (clear bs->file / bs->backing pointers automatically when child->bs is cleared) in a nicer way, see further commit "block: Manipulate bs->file / bs->backing pointers in .attach/.detach". With this revert we bring back a

[PULL 21/58] block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Now the indirection is not actually used, we can safely reduce it to simple pointer. For consistency do a bit of refactoring to get rid of _ptr suffixes that become meaningless. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id:

[PATCH v4 07/30] tests/docker: Add flex/bison to `debian-hexagon-cross`

2022-10-27 Thread Alex Bennée
From: Anton Johansson debian-hexagon-cross contains two images, one to build the toolchain used for building the Hexagon tests themselves, and one image to build QEMU and run the tests. This commit adds flex/bison to the final image that builds QEMU so that it can also build idef-parser. Note:

[PATCH v4 01/30] tests/docker: update fedora-win[32|64]-cross with lcitool

2022-10-27 Thread Alex Bennée
Convert another two dockerfiles to lcitool and update. I renamed the helper because it is not Debian specific. We need an updated lcitool for this to deal with the weirdness of a 32bit nsis tool for both 32 and 64 bit builds. As a result there are some minor whitespace and re-order changes in a bun

[PULL 48/58] block: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-16-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c| 2 +- block/io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PULL 55/58] vhdx: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-23-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vhdx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/vhdx.c

[PULL 28/58] block-backend: implement .change_aio_ctx in child_root

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito blk_root_change_aio_ctx() is very similar to blk_root_can_set_aio_ctx(), but implements a new transaction so that if all check pass, the new transaction's .commit will take care of changing the BlockBackend AioContext. blk_root_set_aio_ctx_commit() is the same as

[PULL 45/58] qcow2: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini The validity of these was double-checked with Alberto Faria's static analyzer. Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-13-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.h | 18 +- blo

[PATCH v4 27/30] contrib/plugins: enable debug on CONFIG_DEBUG_TCG

2022-10-27 Thread Alex Bennée
We used to rely on QEMU_CFLAGS to expose the debug flags but now this is synthesised by meson and only available to the main build. Add our own flags if we detect the build has been enabled with CONFIG_DEBUG_TCG (which is the default for --enable-debug anyway). Signed-off-by: Alex Bennée Reviewed

[PULL 14/58] block: document connection between child roles and bs->backing/bs->file

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Make the informal rules formal. In further commit we'll add corresponding assertions. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-8-vsement...@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by:

[PULL 23/58] block.c: assert bs->aio_context is written under BQL and drains

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Also here ->aio_context is read by I/O threads and written under BQL. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Reviewed-by: Hanna Reitz Message-Id: <20221025084952.2139888-2-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- block.c

[PATCH v4 13/30] block/vvfat: Unify the mkdir() call

2022-10-27 Thread Alex Bennée
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau S

[PATCH v4 22/30] tests/tcg: re-enable threadcount for sh4

2022-10-27 Thread Alex Bennée
This test was marked as broken due to bug #856 which was fixed by ab419fd8a0 (target/sh4: Fix TB_FLAG_UNALIGN). Local testing shows this is solid now so lets re-enable the test. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Cc: Yoshinori Sato --- tests/tcg/sh4/Makefile.target

[PULL 15/58] block/snapshot: stress that we fallback to primary child

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Actually what we chose is a primary child. Let's stress it in the code. We are going to drop indirect pointer logic here in future. Actually this commit simplifies the future work: we drop use of indirection in the assertion now. Signed-off-by: Vladimir Sement

[PATCH v4 21/30] tests/tcg: re-enable linux-test for sh4

2022-10-27 Thread Alex Bennée
This test was marked as broken due to bug #704 which was fixed by aee14c77f4 (linux-user: Rewrite do_getdents, do_getdents64). Local testing shows this is solid now so lets re-enable the test. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Cc: Yoshinori Sato --- tests/tcg/sh4/M

[PATCH v4 25/30] target/s390x: fake instruction loading when handling 'ex'

2022-10-27 Thread Alex Bennée
The s390x EXecute instruction is a bit weird as we synthesis the executed instruction from what we have stored in memory. This missed the plugin instrumentation. Work around this with a special helper to inform the rest of the translator about the instruction so things stay consistent. Reviewed-b

[PATCH v4 02/30] tests/docker: update test-mingw to run single build

2022-10-27 Thread Alex Bennée
While the test-build test happily run for mingw the test-mingw case runs more of the packaging inline with what our CI does. It however fails if we don't find both compilers and expects to be run on a docker image with both. Remove that distinction and make it work more like the other build test s

[PULL 22/58] block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_child

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Now the function can remove any child, so give it more common name. Drop assertions and drop bs argument which becomes unused. Function would be reused in a further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <2022

[PULL 50/58] parallels: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-18-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/parallels.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-

[PATCH v4 12/30] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files

2022-10-27 Thread Alex Bennée
From: Bin Meng Replace the existing logic to get the directory for temporary files with g_get_tmp_dir(), which works for win32 too. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221006151927.2079583-4-bmen

[PATCH v2 0/2] python: misc machine.py improvements

2022-10-27 Thread John Snow
Improve machine.py logging and fix a shutdown bug that we *probably* weren't actually hitting anywhere. Changes for console input logging are on the way, but separate because it will touch avocado. More comprehensive fixes for multiple socket polling are also on the way, but decidedly separate. T

[PATCH v4 19/30] tests/avocado: raspi2_initrd: Wait for guest shutdown message before stopping

2022-10-27 Thread Alex Bennée
From: Peter Maydell The avocado test tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd finishes with exec_command(self, 'halt') # Wait for VM to shut down gracefully self.vm.wait() In theory this should be fine. In practice it runs into two bugs: * when

[PATCH v4 09/30] tests/tcg/nios2: Tweak 10m50-ghrd.ld

2022-10-27 Thread Alex Bennée
From: Richard Henderson More closely follow the default linker script for nios2. This magically fixes a problem resolving .got relocs from the toolchain's libgcc.a. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1258 Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Message-

[PATCH v4 10/30] semihosting/arm-compat-semi: Avoid using hardcoded /tmp

2022-10-27 Thread Alex Bennée
From: Bin Meng Use g_get_tmp_dir() to get the directory to use for temporary files. Signed-off-by: Bin Meng Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221006151927.2079583-2-bmeng...@gmail.com> --- s

[PULL 44/58] qcow: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini get_cluster_offset() and decompress_cluster() are only called from the read and write paths. The validity of these was double-checked with Alberto Faria's static analyzer. Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-12-pbonz...@redhat.com> Reviewed-by: K

[PATCH v4 05/30] configure: fix the --enable-static --disable-pie case

2022-10-27 Thread Alex Bennée
The previous tweak was incomplete as it missed a leg. Fixes: abafb64b6d (configure: explicitly set cflags for --disable-pie) Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure ind

[PATCH v4 04/30] configure: don't enable cross compilers unless in target_list

2022-10-27 Thread Alex Bennée
This avoids the unfortunate effect of always builds the pc-bios blobs for targets the user isn't interested in. Reviewed-by: Richard Henderson Suggested-by: Paolo Bonzini Signed-off-by: Alex Bennée --- configure | 9 + 1 file changed, 9 insertions(+) diff --git a/configure b/configure

[PULL 35/58] block: remove incorrect coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-3-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/io.c b/block/

[PATCH v4 08/30] tests/tcg: use regular semihosting for nios2-softmmu

2022-10-27 Thread Alex Bennée
The nios2 code now plugs into the common semihosting code so we can use the same redirect invocation as the other boards. There is however a bug raised for the fact the tests don't seem to be completing properly and silently passing anyway: https://gitlab.com/qemu-project/qemu/-/issues/1258 Rev

[PATCH v4 23/30] target/s390x: don't use ld_code2 to probe next pc

2022-10-27 Thread Alex Bennée
This isn't an translator picking up an instruction so we shouldn't use the translator_lduw function which has side effects for plugins. Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Acked-by: Ilya Leoshkevich Signed-off-by: Alex Bennée --- target/s390x/tcg/translate.c | 2 +-

[PATCH v4 11/30] tcg: Avoid using hardcoded /tmp

2022-10-27 Thread Alex Bennée
From: Bin Meng Use g_get_tmp_dir() to get the directory to use for temporary files. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20221006151927.2079583-3-bmeng...@gmail.com> --- t

[PULL 37/58] ssh: add missing coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria ssh_write is only called from ssh_co_writev. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-5-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/ssh.c | 6 +++--- 1 file changed, 3 insertions(+),

[PULL 24/58] block: use transactions as a replacement of ->{can_}set_aio_context()

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Simplify the way the aiocontext can be changed in a BDS graph. There are currently two problems in bdrv_try_set_aio_context: - There is a confusion of AioContext locks taken and released, because we assume that old aiocontext is always taken and new one is tak

[PULL 41/58] block: add missing coroutine_fn annotation to BlockDriverState callbacks

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-9-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.h| 14 +++--- include/block/block_int-common.h | 12 +-

[PULL 46/58] vmdk: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini The validity of these was double-checked with Alberto Faria's static analyzer. Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-14-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vmdk.c | 34 +

[PULL 10/58] block/blklogwrites: don't care to remove bs->file child on failure

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We don't need to remove bs->file, generic layer takes care of it. No other driver cares to remove bs->file on failure by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-4-vsement...@yandex-team.ru>

[PATCH v2 2/2] python/machine: Handle termination cases without QMP

2022-10-27 Thread John Snow
If we request a shutdown of a VM without a QMP console, we'll just hang waiting. Not ideal. Add in code that attempts graceful termination in these cases. Tested lightly; it appears to work and I doubt we rely on this case anywhere, but it's a corner you're allowed to wedge yourself in, so it sho

[PATCH v4 30/30] tests/vm: use -o IdentitiesOnly=yes for ssh

2022-10-27 Thread Alex Bennée
From: Ilya Leoshkevich When one has a lot of keys in ~/.ssh directory, the ssh command will try all of them before the one specified on the command line, and this may cause the remote ssh server to reject the connection due to too many failed authentication attempts. Fix by adding -o IdentitiesO

[PATCH v4 16/30] MAINTAINERS: add features_to_c.sh to gdbstub files

2022-10-27 Thread Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f72f02d661..f0a6a588e8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2695,6 +2695,7 @@ F: gdbstub/*

[PATCH v4 29/30] tests/unit: cleanups for test-io-channel-command

2022-10-27 Thread Alex Bennée
This test is hanging under heavy load when the two socats race while trying to create the socket. I've tried various approaches to avoid the race but it seems "creat=0" won't stop socat trying to create a pipe if it executes first. In the end I just use a small sleep which seems to be reliable enou

[PULL 58/58] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE but can be invoked from iothreads when handling scsi requests. This triggers an assertion failure: 0x7fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6 0x7fd6c34ff537 in abort () fr

[PATCH v4 06/30] tests/avocado: extend the timeout for x86_64 tcg tests

2022-10-27 Thread Alex Bennée
These are timing out on gitlab. Acked-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée --- tests/avocado/boot_linux.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py index b7522ad3a1..571d33882a 100644 ---

[PATCH v4 17/30] MAINTAINERS: fix-up for check-tcg Makefile changes

2022-10-27 Thread Alex Bennée
Fixes: fc76c56d3f ("tests/tcg: cleanup Makefile inclusions") Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f0a6a588e8..3f353b56a7 100644 --- a/MAINTAINERS +++ b/MAINT

[PULL 53/58] qed: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-21-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qed-table.c | 2 +- block/qed.c | 12 ++-- 2 files changed, 7 insertions(+), 7 d

[PULL 39/58] coroutine-lock: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The functions are marked coroutine_fn in the definition. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-7-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/qemu/coroutine.h | 10 +- 1

[PULL 38/58] block: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The functions are marked coroutine_fn in the definition. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-6-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block-io.h | 5 +++-- 1 file c

[PATCH v4 20/30] tests/avocado: disable sh4 rd2 tests on Gitlab

2022-10-27 Thread Alex Bennée
Running repeated invocations on a number of test boxes show a fairly high error rate: $ retry.py -n 100 -c -- ./tests/venv/bin/avocado run tests/avocado/boot_linux_console.py:BootLinuxConsole.test_sh4_r2d retry.py called with ['./tests/venv/bin/avocado', 'run', 'tests/avocado/boot_linux_cons

[PULL 25/58] bdrv_change_aio_context: use hash table instead of list of visited nodes

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Minor performance improvement, but given that we have hash tables available, avoid iterating in the visited nodes list every time just to check if a node has been already visited. The data structure is not actually a proper hash map, but an hash set, as we are ju

[PULL 29/58] block: use the new _change_ API instead of _can_set_ and _set_

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx, and call bdrv_child_try_change_aio_context() in bdrv_try_set_aio_context(), the main function called through the whole block layer. >From this point onwards, ->can_set_aio_ctx and ->set_aio_ctx won'

[PULL 02/58] block: Ignore close() failure in get_tmp_filename()

2022-10-27 Thread Kevin Wolf
From: Bin Meng The temporary file has been created and is ready for use. Checking return value of close() does not seem useful. The file descriptor is almost certainly closed; see close(2) under "Dealing with error returns from close()". Let's simply ignore close() failure here. Suggested-by: M

[PULL 42/58] qcow2: add coroutine_fn annotation for indirect-called functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-10-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/qcow2

[PATCH v4 15/30] MAINTAINERS: add entries for the key build bits

2022-10-27 Thread Alex Bennée
Changes to the build files are a bit special in that they usually go through other maintainer trees. However considering the build system is the root of everything a developer is likely to do we should at least set it out in MAINTAINERS. I'm going to nominate Paolo for meson stuff given the conver

[PATCH v4 24/30] target/s390x: don't probe next pc for EXecuted insns

2022-10-27 Thread Alex Bennée
We have finished the TB anyway so we can shortcut the other tests by checking dc->ex_value first. Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Acked-by: Ilya Leoshkevich Signed-off-by: Alex Bennée --- target/s390x/tcg/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PULL 43/58] blkdebug: add missing coroutine_fn annotation for indirect-called functions

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-11-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/blkdebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 5fcf

[PULL 51/58] qcow: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-19-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow.c | 45 +++-- 1 file changed, 23 insertions(+), 22

[PATCH v4 28/30] contrib/plugins: protect execlog's last_exec expansion

2022-10-27 Thread Alex Bennée
We originally naively treated expansion as safe because we expected each new CPU/thread to appear in order. However the -M raspi2 model triggered a case where a new high cpu_index thread started executing just before a smaller one. Clean this up by converting the GArray into the simpler GPtrArray

[PULL 19/58] Revert "block: Pass BdrvChild ** to replace_child_noperm"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit be64bbb0149748f3999c49b13976aafb8330ea86. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-b

[PATCH v2 1/2] python/machine: Add debug logging to key state changes

2022-10-27 Thread John Snow
When key decisions are made about the lifetime of the VM process being managed, there's no log entry. Juxtaposed with the very verbose runstate change logging of the QMP module, machine seems a bit too introverted now. Season the machine.py module with logging statements to taste to help make a ta

[PULL 57/58] monitor: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-25-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.

[PATCH v4 26/30] tests/tcg: include CONFIG_PLUGIN in config-host.mak

2022-10-27 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id: <20221013131304.623740-1-pbonz...@redhat.com> --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 8c2c4c1a04..4275f5419f 100755 --- a/c

[PULL 56/58] vmdk: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-24-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vmdk.c | 54 ++-- 1 file changed, 27 insertions

[PULL 54/58] vdi: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-22-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vdi.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/blo

[PULL 40/58] coroutine-io: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-8-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/qemu/coroutine.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/i

[PATCH v4 18/30] tests/avocado: set -machine none for userfwd and vnc tests

2022-10-27 Thread Alex Bennée
These are exercising core QEMU features and don't actually run code. Not specifying a machine will fail when avocado chooses the native arch binary to run. Be explicit. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/avocado/info_usernet.py | 3 +++ tests/avocado/vnc.py

<    1   2   3   4   5   >