Re: [PATCH v5 20/20] linux-user/s390x: Add vdso

2023-09-06 Thread Richard Henderson
On 9/4/23 08:00, Alex Bennée wrote: Due to the b4 dropping the vdso.so in the patch this fails: Program build-vdso.sh found: YES (/home/alex/lsrc/qemu.git/linux-user/build-vdso.sh) ../../linux-user/s390x/meson.build:24:0: ERROR: File vdso.so does not exist. A full log can be found at

Re: [PATCH v6 06/17] nbd/server: Support a request payload

2023-09-06 Thread Eric Blake
On Tue, Sep 05, 2023 at 05:36:15PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 29.08.23 20:58, Eric Blake wrote: > > Upcoming additions to support NBD 64-bit effect lengths allow for the > > possibility to distinguish between payload length (capped at 32M) and > > effect length (64 bits,

Re: [PATCH v6 04/17] nbd: Prepare for 64-bit request effect lengths

2023-09-06 Thread Eric Blake
On Tue, Sep 05, 2023 at 05:41:33PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > > @@ -1899,7 +1899,7 @@ static int coroutine_fn > > > > nbd_co_send_simple_reply(NBDClient *client, > > > > NBDRequest *request, > > > >

Re: mips system emulation failure with virtio

2023-09-06 Thread Richard Purdie
On Wed, 2023-09-06 at 17:50 +0200, Philippe Mathieu-Daudé wrote: > +rth/pm215/dhildenb > > On 5/9/23 16:50, Richard Purdie wrote: > > On Tue, 2023-09-05 at 14:59 +0100, Alex Bennée wrote: > > > Richard Purdie writes: > > > > > > > With qemu 8.1.0 we see boot hangs fox x86-64 targets. > > > > >

Re: [PATCH 5/5] cxl/vendor: SK hynix Niagara Multi-Headed SLD Device

2023-09-06 Thread Gregory Price
On Wed, Sep 06, 2023 at 02:04:45PM +0100, Jonathan Cameron wrote: > On Thu, 31 Aug 2023 21:29:14 -0400 > Gregory Price wrote: > > Hi Gregory, > > Some comments inline, but I'm happy to add this to my staging tree in the > meantime > as it stands (might be a few days until I push a new branch

Re: [PATCH v6 3/3] vhost-user: add shared_object msg

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 6:01 PM Albert Esteve wrote: > > > On Wed, Sep 6, 2023 at 4:43 PM Philippe Mathieu-Daudé > wrote: > >> On 6/9/23 16:33, Albert Esteve wrote: >> >> > I note you ignored my comment regarding adding a 'Error **' >> argument in >> > the previous version: >> > >>

Re: [PATCH v3 3/6] migration: Move more initializations to migrate_init()

2023-09-06 Thread Cédric Le Goater
On 9/6/23 17:08, Avihai Horon wrote: Initialization of mig_stats, compression_counters and VFIO bytes transferred is hard-coded in migration code path and snapshot code path. Make the code cleaner by initializing them in migrate_init(). Suggested-by: Cédric Le Goater Signed-off-by: Avihai

Re: mips system emulation failure with virtio

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 17:50, Philippe Mathieu-Daudé wrote: +rth/pm215/dhildenb On 5/9/23 16:50, Richard Purdie wrote: On Tue, 2023-09-05 at 14:59 +0100, Alex Bennée wrote: Richard Purdie writes: With qemu 8.1.0 we see boot hangs fox x86-64 targets. These are fixed by

Re: [PATCH v6 3/3] vhost-user: add shared_object msg

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 4:43 PM Philippe Mathieu-Daudé wrote: > On 6/9/23 16:33, Albert Esteve wrote: > > > I note you ignored my comment regarding adding a 'Error **' > argument in > > the previous version: > > >

[PULL 13/18] iotests: Add leak check test for parallels format

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Write a pattern to the last cluster, extend the image by 1 claster, repair and check that the last cluster still has the same pattern. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev ---

[PULL 17/18] iotests: Fix test 131 after repair was added to parallels_open()

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Images repairing in parallels_open() was added, thus parallels tests fail. Access to an image leads to repairing the image. Further image check don't detect any corruption. Remove reads after image creation in test 131. Signed-off-by: Alexander Ivanov Reviewed-by: Denis

[PULL 16/18] iotests: Fix cluster size in parallels images tests (131)

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov In this test cluster size is 64k, but modern tools generate images with cluster size 1M. Calculate cluster size using track field from image header. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev --- tests/qemu-iotests/131

[PULL 15/18] iotests: Refactor tests of parallels images checks (131)

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Replace hardcoded numbers by variables. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev --- tests/qemu-iotests/131 | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git

[PULL 11/18] parallels: Add data_off repairing to parallels_open()

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Place data_start/data_end calculation after reading the image header to s->header. Set s->data_start to the offset calculated in parallels_test_data_off(). Call bdrv_check() if data_off is incorrect. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev

[PULL 10/18] parallels: Add data_off check

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov data_off field of the parallels image header can be corrupted. Check if this field greater than the header + BAT size and less than file size. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev --- block/parallels.c | 80

[PULL 12/18] iotests: Add out-of-image check test for parallels format

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Fill the image with a pattern to generate entries in the BAT, set the first BAT entry outside the image, try to read the corrupted image. At the image opening it should be repaired, check for zeroes in the first cluster. Signed-off-by: Alexander Ivanov Reviewed-by: Denis

[PULL 18/18] iotests: Add test for data_off check

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Write a pattern to the first cluster. Corrupt the data_off field and check if the field was repaired on image opening and the pattern has not changed. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev ---

[PULL 14/18] iotests: Add test for BAT entries duplication check

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Fill a parallels image with a pattern and write another pattern to the second cluster. Corrupt the image and check if the pattern changes. Repair the image and check the patterns on guest and host sides. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev

[PULL 02/18] parallels: Fix comments formatting inside parallels driver

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov This patch is technically necessary as git patch rendering could result in moving some code from one place to the another and that hits checkpatch.pl warning. This problem specifically happens within next series. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V.

[PULL 03/18] parallels: Incorrect data end calculation in parallels_open()

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov The BDRVParallelsState structure contains data_end field that is measured in sectors. In parallels_open() initially this field is set by data_off field from parallels image header. According to the parallels format documentation, data_off field contains an offset, in

[PULL 06/18] parallels: Add data_start field to BDRVParallelsState

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov In the next patch we will need the offset of the data area for host cluster index calculation. Add this field and setting up code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev --- block/parallels.c | 7 ---

[PULL 07/18] parallels: Add checking and repairing duplicate offsets in BAT

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant cluster to a newly allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to

[PULL 01/18] MAINTAINERS: add tree to keep parallels format driver changes

2023-09-06 Thread Denis V. Lunev
Driver changes are driving by me for now. At least we need to get functionally complete check and repair procedure for now. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Stefan Hajnoczi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git

Re: mips system emulation failure with virtio

2023-09-06 Thread Philippe Mathieu-Daudé
+rth/pm215/dhildenb On 5/9/23 16:50, Richard Purdie wrote: On Tue, 2023-09-05 at 14:59 +0100, Alex Bennée wrote: Richard Purdie writes: With qemu 8.1.0 we see boot hangs fox x86-64 targets. These are fixed by 0d58c660689f6da1e3feff8a997014003d928b3b (softmmu: Use async_run_on_cpu in

[PULL 08/18] parallels: Image repairing in parallels_open()

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Repair an image at opening if the image is unclean or out-of-image corruption was detected. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev --- block/parallels.c | 70 +-- 1 file

[PULL 05/18] parallels: Add "explicit" argument to parallels_check_leak()

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov In the on of the next patches we need to repair leaks without changing leaks and leaks_fixed info in res. Also we don't want to print any warning about leaks. Add "explicit" argument to skip info changing if the argument is false. Signed-off-by: Alexander Ivanov

[PULL 04/18] parallels: Check if data_end greater than the file size

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov Initially data_end is set to the data_off image header field and must not be greater than the file size. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev --- block/parallels.c | 5 + 1 file changed, 5 insertions(+) diff

[PULL 09/18] parallels: Use bdrv_co_getlength() in parallels_check_outside_image()

2023-09-06 Thread Denis V. Lunev
From: Alexander Ivanov bdrv_co_getlength() should be used in coroutine context. Replace bdrv_getlength() by bdrv_co_getlength() in parallels_check_outside_image(). Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Signed-off-by: Denis V. Lunev --- block/parallels.c | 2 +- 1 file

[PULL 00/18] Parallels format driver

2023-09-06 Thread Denis V. Lunev
Merge tag 'pull-request-2023-08-31' of https://gitlab.com/thuth/qemu into staging (2023-09-05 09:22:13 -0400) are available in the Git repository at: https://src.openvz.org/scm/~den/qemu.git tags/pull-parallels-2023-09-06 for you to fetch changes up to

Re: [PATCH v6 2/3] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 4:21 PM Philippe Mathieu-Daudé wrote: > On 6/9/23 13:15, Albert Esteve wrote: > > This API manages objects (in this iteration, > > dmabuf fds) that can be shared along different > > virtio devices, associated to a UUID. > > > > The API allows the different devices to add,

Re: [PATCH v3 5/6] vfio/migration: Block VFIO migration with postcopy migration

2023-09-06 Thread Peter Xu
On Wed, Sep 06, 2023 at 06:08:52PM +0300, Avihai Horon wrote: > VFIO migration is not compatible with postcopy migration. A VFIO device > in the destination can't handle page faults for pages that have not been > sent yet. > > Doing such migration will cause the VM to crash in the destination: >

Re: [PATCH 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-06 Thread Peter Xu
On Wed, Sep 06, 2023 at 03:19:32PM +0100, Joao Martins wrote: > On 06/09/2023 14:59, “William Roche wrote: > > From: William Roche > > > > A memory page poisoned from the hypervisor level is no longer readable. > > Thus, it is now treated as a zero-page for the ram saving migration phase. > > >

Re: [PULL 00/14] Block layer patches

2023-09-06 Thread Stefan Hajnoczi
test-bdrv-drain is failing. I think my coroutine wrapper patch might be necessary: https://gitlab.com/qemu-project/qemu/-/jobs/5029372308#L4907 I have dropped this patch series for the time being. Feel free to remove my patches and send a new revision. I will debug the test-bdrv-drain issue.

[PATCH v3 6/6] vfio/migration: Block VFIO migration with background snapshot

2023-09-06 Thread Avihai Horon
Background snapshot allows creating a snapshot of the VM while it's running and keeping it small by not including dirty RAM pages. The way it works is by first stopping the VM, saving the non-iterable devices' state and then starting the VM and saving the RAM while write protecting it with UFFD.

[PATCH v3 5/6] vfio/migration: Block VFIO migration with postcopy migration

2023-09-06 Thread Avihai Horon
VFIO migration is not compatible with postcopy migration. A VFIO device in the destination can't handle page faults for pages that have not been sent yet. Doing such migration will cause the VM to crash in the destination: qemu-system-x86_64: VFIO_MAP_DMA failed: Bad address qemu-system-x86_64:

[PATCH v3 2/6] vfio/migration: Fail adding device with enable-migration=on and existing blocker

2023-09-06 Thread Avihai Horon
If a device with enable-migration=on is added and it causes a migration blocker, adding the device should fail with a proper error. This is not the case with multiple device migration blocker when the blocker already exists. If the blocker already exists and a device with enable-migration=on is

[PATCH v3 1/6] migration: Add migration prefix to functions in target.c

2023-09-06 Thread Avihai Horon
The functions in target.c are not static, yet they don't have a proper migration prefix. Add such prefix. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- migration/migration.h | 4 ++-- migration/migration.c | 6 +++--- migration/savevm.c| 2 +- migration/target.c| 8

[PATCH v3 3/6] migration: Move more initializations to migrate_init()

2023-09-06 Thread Avihai Horon
Initialization of mig_stats, compression_counters and VFIO bytes transferred is hard-coded in migration code path and snapshot code path. Make the code cleaner by initializing them in migrate_init(). Suggested-by: Cédric Le Goater Signed-off-by: Avihai Horon --- migration/migration.c | 14

[PATCH v3 0/6] vfio/migration: Block VFIO migration with postcopy and background snapshot

2023-09-06 Thread Avihai Horon
Hello, Recently added VFIO migration is not compatible with some of the pre-existing migration features. This was overlooked and today these combinations are not blocked by QEMU. This series fixes it. Postcopy migration: VFIO migration is not compatible with postcopy migration. A VFIO device in

[PATCH v3 4/6] migration: Add .save_prepare() handler to struct SaveVMHandlers

2023-09-06 Thread Avihai Horon
Add a new .save_prepare() handler to struct SaveVMHandlers. This handler is called early, even before migration starts, and can be used by devices to perform early checks. Refactor migrate_init() to be able to return errors and call .save_prepare() from there. Suggested-by: Peter Xu

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

2023-09-06 Thread Cédric Le Goater
Hello Nina, On 9/1/23 17:57, Nina Schoetterl-Glausch wrote: From: Pierre Morel 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 Co-developed-by: Nina Schoetterl-Glausch Signed-off-by:

Re: [PATCH v6 3/3] vhost-user: add shared_object msg

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 16:33, Albert Esteve wrote: I note you  ignored my comment regarding adding a 'Error **' argument in the previous version: https://lore.kernel.org/qemu-devel/911eef0c-d04f-2fcf-e78b-2475cd7af...@linaro.org/

Re: [PATCH 00/16] tests: Add CPU topology related smbios test cases

2023-09-06 Thread Philippe Mathieu-Daudé
On 1/9/23 11:55, Michael Tokarev wrote: 25.08.2023 06:36, Zhao Liu wrote: From: Zhao Liu Hi all, This patchset is the follow up tests of previous topology fixes in smbios [1]. In this patchset, add these test cases: 1. Add the case to test 2 newly added topology helpers (patch 1):     *

Re: [PATCH v2 0/6] target/riscv: Add RISC-V Virtual IRQs and IRQ filtering support

2023-09-06 Thread Daniel Henrique Barboza
Hey, What's the latest on this work? It seems that all patches are acked: https://lore.kernel.org/qemu-riscv/20230526162308.22892-1-rkan...@rivosinc.com/ It'll probably conflict with current Alistair's riscv-to-apply.next though, so perhaps Rajnesh could gather the acks and send a rebased

Re: [PATCH v2 04/16] kvm: Return number of free memslots

2023-09-06 Thread David Hildenbrand
On 06.09.23 16:14, David Hildenbrand wrote: On 29.08.23 00:26, Philippe Mathieu-Daudé wrote: On 25/8/23 15:21, David Hildenbrand wrote: Let's return the number of free slots instead of only checking if there is a free slot. While at it, check all address spaces, which will also consider SMM

[PULL v2 00/35] ppc queue

2023-09-06 Thread Cédric Le Goater
The following changes since commit 2d8fbcb1eecd8d39171f457e583428758321d69d: Merge tag 'pull-request-2023-08-31' of https://gitlab.com/thuth/qemu into staging (2023-09-05 09:22:13 -0400) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-ppc-20230906

Re: [PATCH 1/4] target/i386: Split out feature_word_info

2023-09-06 Thread Philippe Mathieu-Daudé
On 11/8/23 15:50, Tim Wiederhake wrote: The isolated part will be generated by a script. Signed-off-by: Tim Wiederhake --- target/i386/cpu.c | 677 +--- target/i386/feature_word_info.c.inc | 676 +++ 2 files changed, 677

Re: [PATCH v6 3/3] vhost-user: add shared_object msg

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 4:27 PM Philippe Mathieu-Daudé wrote: > Hi Albert, > > On 6/9/23 13:15, Albert Esteve wrote: > > Add three new vhost-user protocol > > `VHOST_USER_BACKEND_SHARED_OBJECT_* messages`. > > These new messages are sent from vhost-user > > back-ends to interact with the

Re: [PATCH 2/4] target/i386: Translate feature_word_info to xml

2023-09-06 Thread Philippe Mathieu-Daudé
On 21/8/23 11:54, Tim Wiederhake wrote: On Thu, 2023-08-17 at 12:07 +0100, Daniel P. Berrangé wrote: On Fri, Aug 11, 2023 at 03:50:09PM +0200, Tim Wiederhake wrote: This is the data file that will be used to generate the C code. All information, including the comments, is preserved.

Re: [PATCH] subprojects: add wrap file for libblkio

2023-09-06 Thread Paolo Bonzini
On Wed, Sep 6, 2023 at 4:22 PM Stefano Garzarella wrote: >out = subprocess.check_output(["cargo", "read-manifest"]) > ^^^ > File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output >return

Re: [PATCH v6 3/3] vhost-user: add shared_object msg

2023-09-06 Thread Philippe Mathieu-Daudé
Hi Albert, On 6/9/23 13:15, Albert Esteve wrote: Add three new vhost-user protocol `VHOST_USER_BACKEND_SHARED_OBJECT_* messages`. These new messages are sent from vhost-user back-ends to interact with the virtio-dmabuf table in order to add or remove themselves as virtio exporters, or lookup

Re: [PATCH 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-06 Thread Joao Martins
On 06/09/2023 14:59, “William Roche wrote: > From: William Roche > > A memory page poisoned from the hypervisor level is no longer readable. > Thus, it is now treated as a zero-page for the ram saving migration phase. > > The migration of a VM will crash Qemu when it tries to read the > memory

Re: [PATCH] subprojects: add wrap file for libblkio

2023-09-06 Thread Stefano Garzarella
On Wed, Sep 06, 2023 at 12:45:29PM +0200, Paolo Bonzini wrote: This allows building libblkio at the same time as QEMU, if QEMU is configured with --enable-blkio --enable-download. Signed-off-by: Paolo Bonzini --- subprojects/libblkio.wrap | 6 ++ 1 file changed, 6 insertions(+) create mode

Re: [PATCH 2/4] target/i386: Translate feature_word_info to xml

2023-09-06 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 03:50:09PM +0200, Tim Wiederhake wrote: > This is the data file that will be used to generate the C code. > All information, including the comments, is preserved. > > Signed-off-by: Tim Wiederhake I'd use json I think - we don't use xml widely in qemu ATM. > --- >

Re: [PATCH v6 2/3] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Philippe Mathieu-Daudé
On 6/9/23 13:15, Albert Esteve wrote: This API manages objects (in this iteration, dmabuf fds) that can be shared along different virtio devices, associated to a UUID. The API allows the different devices to add, remove and/or retrieve the objects by simply invoking the public functions that

Re: [PATCH v2 3/5] migration: Add .save_prepare() handler to struct SaveVMHandlers

2023-09-06 Thread Cédric Le Goater
On 9/6/23 16:11, Avihai Horon wrote: On 05/09/2023 19:13, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 9/1/23 17:49, Peter Xu wrote: On Thu, Aug 31, 2023 at 03:57:00PM +0300, Avihai Horon wrote: Add a new .save_prepare() handler to struct

Re: [PATCH v2 3/5] migration: Add .save_prepare() handler to struct SaveVMHandlers

2023-09-06 Thread Avihai Horon
On 05/09/2023 19:13, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 9/1/23 17:49, Peter Xu wrote: On Thu, Aug 31, 2023 at 03:57:00PM +0300, Avihai Horon wrote: Add a new .save_prepare() handler to struct SaveVMHandlers. This handler is called early,

Re: [QEMU PATCH v4 09/13] virtio-gpu: Handle resource blob commands

2023-09-06 Thread Akihiko Odaki
On 2023/09/06 16:56, Huang Rui wrote: On Wed, Sep 06, 2023 at 11:39:09AM +0800, Akihiko Odaki wrote: On 2023/09/06 12:09, Huang Rui wrote: On Tue, Sep 05, 2023 at 05:20:43PM +0800, Akihiko Odaki wrote: On 2023/09/05 18:08, Huang Rui wrote: On Thu, Aug 31, 2023 at 06:24:32PM +0800, Akihiko

Re: [PATCH v2 04/16] kvm: Return number of free memslots

2023-09-06 Thread David Hildenbrand
On 29.08.23 00:26, Philippe Mathieu-Daudé wrote: On 25/8/23 15:21, David Hildenbrand wrote: Let's return the number of free slots instead of only checking if there is a free slot. While at it, check all address spaces, which will also consider SMM under x86 correctly. Make the stub return

[PATCH 2/3] iotests: improve 'not run' message for nbd-multiconn test

2023-09-06 Thread Denis V. Lunev
The test actually requires Python bindings to libnbd rather than libnbd itself. Clarify that inside the message. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Eric Blake CC: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/nbd-multiconn | 2 +- 1 file changed, 1

[PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-06 Thread Denis V. Lunev
Each particular testcase could skipped intentionally and accidentally. For example the test is not designed for a particular image format or is not run due to the missed library. The latter case is unwanted in reality. Though the discussion has revealed that failing the test in such a case would

[PATCH 1/3] iotests: use TEST_IMG_FILE instead of TEST_IMG in _require_large_file

2023-09-06 Thread Denis V. Lunev
We need to check that we are able to create large enough file which is used as an export base rather than connection URL. Unfortunately, there are cases when the TEST_IMG_FILE is not defined. We should fallback to TEST_IMG in that case. This problem has been detected when running ./check -nbd

[PATCH 0/3] separated wanted and unwanted skips in QEMU iotests

2023-09-06 Thread Denis V. Lunev
Some time ago there was a discussion in the QEMU mailing list about the situation when some IO tests were not run and thus the patch has added a regression, namely https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02381.html This series contains a possible answer to the problem. Let us

[PATCH 0/1] Qemu crashes on VM migration after an handled memory error

2023-09-06 Thread “William Roche
From: William Roche A Qemu VM can survive a memory error, as qemu can relay the error to the VM kernel which could also deal with it -- poisoning/off-lining the impacted page. This situation creates a hole in the VM memory address space that the VM kernel knows about (an unreadable page or set

[PATCH 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-06 Thread “William Roche
From: William Roche A memory page poisoned from the hypervisor level is no longer readable. Thus, it is now treated as a zero-page for the ram saving migration phase. The migration of a VM will crash Qemu when it tries to read the memory address space and stumbles on the poisoned page with a

Re: [Virtio-fs] Status of DAX for virtio-fs/virtiofsd?

2023-09-06 Thread Stefan Hajnoczi
On Wed, 6 Sept 2023 at 09:07, Hao Xu wrote: > On 5/18/23 00:26, Stefan Hajnoczi wrote: > > On Wed, 17 May 2023 at 11:54, Alex Bennée wrote: > > Hi Alex, > > There were two unresolved issues: > > > > 1. How to inject SIGBUS when the guest accesses a page that's beyond > > the end-of-file. > > Hi

Re: [PATCH] s390x: do a subsystem reset before the unprotect on reboot

2023-09-06 Thread Christian Borntraeger
Am 01.09.23 um 13:48 schrieb Janosch Frank: Bound APQNs have to be reset before tearing down the secure config via s390_machine_unprotect(). Otherwise the Ultravisor will return a error code. So let's do a subsystem_reset() which includes a AP reset before the unprotect call. We'll do a full

Re: strace showing QEMU process doing >99% ppoll

2023-09-06 Thread Fiona Ebner
Am 10.07.23 um 14:34 schrieb Fiona Ebner: > Hi, > since a while we have about a dozen people reporting [0] VMs rarely > getting stuck with the QEMU process looping and just doing ppoll() and > not much else (example strace [1] output and stacktrace [2]). > > Just wanted to ask if anybody here has

Re: [PULL 00/14] Block patches

2023-09-06 Thread Stefan Hajnoczi
On Fri, 1 Sept 2023 at 04:18, Hanna Czenczek wrote: > > The following changes since commit f5fe7c17ac4e309e47e78f0f9761aebc8d2f2c81: > > Merge tag 'pull-tcg-20230823-2' of https://gitlab.com/rth7680/qemu into > staging (2023-08-28 16:07:04 -0400) > > are available in the Git repository at: > >

[PATCH v2 2/2] tests/qtest: ahci-test: add test exposing reset issue with pending callback

2023-09-06 Thread Fiona Ebner
Before commit "hw/ide: reset: cancel async DMA operation before resetting state", this test would fail, because a reset with a pending write operation would lead to an unsolicited write to the first sector of the disk. The test writes a pattern to the beginning of the disk and verifies that it is

[PATCH v2 1/2] hw/ide: reset: cancel async DMA operation before resetting state

2023-09-06 Thread Fiona Ebner
If there is a pending DMA operation during ide_bus_reset(), the fact that the IDEState is already reset before the operation is canceled can be problematic. In particular, ide_dma_cb() might be called and then use the reset IDEState which contains the signature after the reset. When used to

[PATCH] virtio-gpu: block migration of VMs with blob=true

2023-09-06 Thread marcandre . lureau
From: Marc-André Lureau "blob" resources don't have an associated pixman image: #0 pixman_image_get_stride (image=0x0) at ../pixman/pixman-image.c:921 #1 0x562327c25236 in virtio_gpu_save (f=0x56232bb13b00, opaque=0x56232b555a60, size=0, field=0x5623289ab6c8 <__compound_literal.3+104>,

[PATCH] virtio-gpu/win32: set the destroy function on load

2023-09-06 Thread marcandre . lureau
From: Marc-André Lureau Don't forget to unmap the resource memory. Fixes: commit 9462ff469 ("virtio-gpu/win32: allocate shareable 2d resources/images") Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [Virtio-fs] Status of DAX for virtio-fs/virtiofsd?

2023-09-06 Thread Hao Xu
On 5/18/23 00:26, Stefan Hajnoczi wrote: On Wed, 17 May 2023 at 11:54, Alex Bennée wrote: Hi Alex, There were two unresolved issues: 1. How to inject SIGBUS when the guest accesses a page that's beyond the end-of-file. Hi Stefan, Does this SIGBUS issue exist if the guest kernel can be

Re: [PATCH 5/5] cxl/vendor: SK hynix Niagara Multi-Headed SLD Device

2023-09-06 Thread Jonathan Cameron via
On Thu, 31 Aug 2023 21:29:14 -0400 Gregory Price wrote: > Create a new device to emulate the SK hynix Niagara MHSLD platform. > > This device has custom CCI commands that allow for applying isolation > to each memory block between hosts. This enables an early form of > dynamic capacity, whereby

Re: [PATCH] s390x: do a subsystem reset before the unprotect on reboot

2023-09-06 Thread Viktor Mihajlovski
On Fri, 2023-09-01 at 11:48 +, Janosch Frank wrote: > Bound APQNs have to be reset before tearing down the secure config via > s390_machine_unprotect(). Otherwise the Ultravisor will return a error > code. > > So let's do a subsystem_reset() which includes a AP reset before the > unprotect

Re: [PATCH v2] qdict: Preserve order for iterating qdict elements

2023-09-06 Thread Daniel P . Berrangé
On Wed, Sep 06, 2023 at 12:25:30PM +0200, David Hildenbrand wrote: > On 04.09.23 18:38, Daniel P. Berrangé wrote: > > On Sat, Sep 02, 2023 at 05:40:40PM +0800, William Tsai wrote: > > > Changing the structure of qdict so that it can preserve order when > > > iterating qdict. This will fix

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

2023-09-06 Thread Nina Schoetterl-Glausch
On Wed, 2023-09-06 at 10:21 +0200, Thomas Huth wrote: > On 05/09/2023 17.25, Nina Schoetterl-Glausch wrote: > > On Tue, 2023-09-05 at 15:26 +0200, Thomas Huth wrote: > > > On 01/09/2023 17.57, Nina Schoetterl-Glausch wrote: > > > > From: Pierre Morel > > > > > > > > On interception of

[PATCH v4 11/11] machine: Improve error message when using default RAM backend id

2023-09-06 Thread David Hildenbrand
For migration purposes, users might want to reuse the default RAM backend id, but specify a different memory backend. For example, to reuse "pc.ram" on q35, one has to set -machine q35,memory-backend=pc.ram Only then, can a memory backend with the id "pc.ram" be created manually. Let's

[PATCH v4 10/11] softmmu/physmem: Hint that "readonly=on, rom=off" exists when opening file R/W for private mapping fails

2023-09-06 Thread David Hildenbrand
It's easy to miss that memory-backend-file with "share=off" (default) will always try opening the file R/W as default, and fail if we don't have write permissions to the file. In that case, the user has to explicit specify "readonly=on,rom=off" to get usable RAM, for example, for VM templating.

[PATCH v4 08/11] docs: Don't mention "-mem-path" in multi-process.rst

2023-09-06 Thread David Hildenbrand
"-mem-path" corresponds to "memory-backend-file,share=off" and, therefore, creates a private COW mapping of the file. For multi-proces QEMU, we need proper shared file-backed memory. Let's make that clearer. Signed-off-by: David Hildenbrand --- docs/devel/multi-process.rst | 5 +++-- 1 file

[PATCH v4 07/11] softmmu/physmem: Never return directories from file_ram_open()

2023-09-06 Thread David Hildenbrand
open() does not fail on directories when opening them readonly (O_RDONLY). Currently, we succeed opening such directories and fail later during mmap(), resulting in a misleading error message. $ ./qemu-system-x86_64 \ -object memory-backend-file,id=ram0,mem-path=tmp,readonly=true,size=1g

[PATCH v4 05/11] softmmu/physmem: Bail out early in ram_block_discard_range() with readonly files

2023-09-06 Thread David Hildenbrand
fallocate() will fail, let's print a nicer error message. Suggested-by: Peter Xu Reviewed-by: Peter Xu Signed-off-by: David Hildenbrand --- softmmu/physmem.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 88482bd32a..c520c2ac55

[PATCH v4 09/11] docs: Start documenting VM templating

2023-09-06 Thread David Hildenbrand
Let's add some details about VM templating, focusing on the VM memory configuration only. There is much more to VM templating (VM state? block devices?), but I leave that as future work. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand --- MAINTAINERS |

[PATCH v4 06/11] softmmu/physmem: Fail creation of new files in file_ram_open() with readonly=true

2023-09-06 Thread David Hildenbrand
Currently, if a file does not exist yet, file_ram_open() will create new empty file and open it writable. However, it even does that when readonly=true was specified. Specifying O_RDONLY instead to create a new readonly file would theoretically work, however, ftruncate() will refuse to resize the

[PATCH v4 04/11] softmmu/physmem: Remap with proper protection in qemu_ram_remap()

2023-09-06 Thread David Hildenbrand
Let's remap with the proper protection that we can derive from RAM_READONLY. Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand --- softmmu/physmem.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/softmmu/physmem.c

[PATCH v4 03/11] backends/hostmem-file: Add "rom" property to support VM templating with R/O files

2023-09-06 Thread David Hildenbrand
For now, "share=off,readonly=on" would always result in us opening the file R/O and mmap'ing the opened file MAP_PRIVATE R/O -- effectively turning it into ROM. Especially for VM templating, "share=off" is a common use case. However, that use case is impossible with files that lack write

[PATCH v4 02/11] softmmu/physmem: Distinguish between file access mode and mmap protection

2023-09-06 Thread David Hildenbrand
There is a difference between how we open a file and how we mmap it, and we want to support writable private mappings of readonly files. Let's define RAM_READONLY and RAM_READONLY_FD flags, to replace the single "readonly" parameter for file-related functions. In memory_region_init_ram_from_fd()

[PATCH v4 01/11] nvdimm: Reject writing label data to ROM instead of crashing QEMU

2023-09-06 Thread David Hildenbrand
Currently, when using a true R/O NVDIMM (ROM memory backend) with a label area, the VM can easily crash QEMU by trying to write to the label area, because the ROM memory is mmap'ed without PROT_WRITE. [root@vm-0 ~]# ndctl disable-region region0 disabled 1 region [root@vm-0 ~]# ndctl

[PATCH v4 00/11] memory-backend-file related improvements and VM templating support

2023-09-06 Thread David Hildenbrand
If there are no more comments, I'll queue this myself soon. --- This is the result of the previous discussion of: * "[PATCH v2] softmmu/physmem: try opening file readonly before failure in file_ram_open" [1] * "[PATCH v1 0/3] softmmu/physmem: file_ram_open() readonly improvements" [2]

Re: [PATCH v6 2/3] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Albert Esteve
On Wed, Sep 6, 2023 at 1:15 PM Albert Esteve wrote: > This API manages objects (in this iteration, > dmabuf fds) that can be shared along different > virtio devices, associated to a UUID. > > The API allows the different devices to add, > remove and/or retrieve the objects by simply > invoking

Re: CXL Namespaces of ACPI disappearing in Qemu demo

2023-09-06 Thread Yuquan Wang
Hi, Jonathan On 2023-09-05 22:34, jonathan.cameron wrote: > > As I understand it the distinction is more about the format / contents of > that memory > than how you access them. Yes, RCH DP RCRB includes registers from PCIe Type 1 Config Header and PCIe capabilities and extended capabilities

[PATCH v6 0/3] Virtio shared dma-buf

2023-09-06 Thread Albert Esteve
v1 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg00598.html v2 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg04530.html v3 link -> https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg06126.html v4 link ->

[PATCH v6 1/3] uuid: add a hash function

2023-09-06 Thread Albert Esteve
Add hash function to uuid module using the djb2 hash algorithm. Add a couple simple unit tests for the hash function, checking collisions for similar UUIDs. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Albert Esteve --- include/qemu/uuid.h| 2 ++ tests/unit/test-uuid.c | 27

[PATCH v6 2/3] virtio-dmabuf: introduce virtio-dmabuf

2023-09-06 Thread Albert Esteve
This API manages objects (in this iteration, dmabuf fds) that can be shared along different virtio devices, associated to a UUID. The API allows the different devices to add, remove and/or retrieve the objects by simply invoking the public functions that reside in the virtio-dmabuf file. For

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

2023-09-06 Thread Albert Esteve
Add three new vhost-user protocol `VHOST_USER_BACKEND_SHARED_OBJECT_* messages`. These new messages are sent from vhost-user back-ends to interact with the virtio-dmabuf table in order to add or remove themselves as virtio exporters, or lookup for virtio dma-buf shared objects. The action taken

Re: [PATCH 65/67] ppc/kconfig: make SAM460EX depend on PPC & PIXMAN

2023-09-06 Thread Paolo Bonzini
On Tue, Sep 5, 2023 at 10:07 PM Marc-André Lureau wrote: > Indeed, and it is disabled not by Kconfig but by meson: > system_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true: > files('ati.c', 'ati_2d.c', 'ati_dbg.c')) It's better to add a "depends on", so that it fails to compile with

Re: [PATCH v3 4/4] migration/qapi: Drop @MigrationParameter enum

2023-09-06 Thread Daniel P . Berrangé
On Wed, Sep 06, 2023 at 12:14:54PM +0200, Philippe Mathieu-Daudé wrote: > On 6/9/23 11:00, Daniel P. Berrangé wrote: > > On Wed, Sep 06, 2023 at 06:42:16AM +0200, Philippe Mathieu-Daudé wrote: > > > On 5/9/23 18:23, Peter Xu wrote: > > > > Drop the enum in qapi because it is never used in QMP

[PATCH] subprojects: add wrap file for libblkio

2023-09-06 Thread Paolo Bonzini
This allows building libblkio at the same time as QEMU, if QEMU is configured with --enable-blkio --enable-download. Signed-off-by: Paolo Bonzini --- subprojects/libblkio.wrap | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 subprojects/libblkio.wrap diff --git

Re: PCI Hotplug ACPI device names only 3 characters long

2023-09-06 Thread Marcello Sylverster Bauer
Hi Igor, Hi Michael, On 9/6/23 10:19, Igor Mammedov wrote: On Tue, 5 Sep 2023 16:43:54 -0400 "Michael S. Tsirkin" wrote: On Tue, Sep 05, 2023 at 07:45:12PM +0200, Marcello Sylverster Bauer wrote: Hi Michael, On 9/5/23 18:44, Michael S. Tsirkin wrote: On Tue, Sep 05, 2023 at 05:05:33PM

<    1   2   3   >