[PATCH v2 17/28] qapi pci: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/pci.json. Said commit explains the transforma

[PATCH v2 04/28] qapi: Start to elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
In QAPI, absent optional members are distinct from any present value. We thus represent an optional schema member FOO as two C members: a FOO with the member's type, and a bool has_FOO. Likewise for function arguments. However, has_FOO is actually redundant for a pointer-valued FOO, which can be

[PATCH v2 08/28] qapi block: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/block*.json. Said commit explains the transfo

[PATCH v2 19/28] qapi replay: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/replay.json. Said commit explains the transfo

[PATCH v2 26/28] qapi virtio: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/virtio.json. Said commit explains the transfo

Re: [PATCH] qga: Fix memory leak in split_list

2022-10-18 Thread Marc-André Lureau
Hi On Tue, Oct 18, 2022 at 8:47 AM Miaoqian Lin wrote: > We should use g_strfreev to free the memory allocated by g_strsplit(). > Use g_free() will cause a memory leak. > > Signed-off-by: Miaoqian Lin > --- > qga/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/q

[PATCH v2 05/28] qapi tests: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for tests/qapi-schema/qapi-schema-test.json. Said comm

[PATCH v2 25/28] qapi ui: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/ui.json. Said commit explains the transformat

[PATCH v2 21/28] qapi run-state: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/run-state.json. Said commit explains the tran

Re: [PATCH v2] migration/channel-block: fix return value for qio_channel_block_{readv, writev}

2022-10-18 Thread Fiona Ebner
Am 17.10.22 um 11:54 schrieb Zhang, Chen: > > >> -Original Message- >> From: Qemu-devel >> On Behalf Of Fiona Ebner >> Sent: Thursday, October 13, 2022 4:41 PM >> To: qemu-devel@nongnu.org >> Cc: dgilb...@redhat.com; quint...@redhat.com; berra...@redhat.com >> Subject: [PATCH v2] migrati

Re: [PATCH] qga: Fix memory leak in split_list

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 06:46, Miaoqian Lin wrote: We should use g_strfreev to free the memory allocated by g_strsplit(). Use g_free() will cause a memory leak. Signed-off-by: Miaoqian Lin --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index 5a

[PATCH v2 11/28] qapi dump: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/dump.json. Said commit explains the transform

Re: [PATCH] elf2dmp: free memory in failure

2022-10-18 Thread Philippe Mathieu-Daudé
On 29/9/22 14:04, luzhipeng wrote: From: lu zhipeng Signed-off-by: lu zhipeng --- contrib/elf2dmp/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index b9fc6d230c..d77b8f98f7 100644 --- a/contrib/elf2dmp/main.c +++ b/contrib/elf2dmp

[PATCH v2 18/28] qapi qdev qom: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/qdev.json and qapi/qom.json. Said commit expl

Re: [PATCH v12 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-18 Thread Sam Li
Dmitry Fomichev 于2022年10月17日周一 08:57写道: > > On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use the new

Re: [PATCH v12 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-18 Thread Sam Li
Damien Le Moal 于2022年10月17日周一 12:57写道: > > On 10/16/22 23:51, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use the new block > > layer A

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Bernhard Beschow
Am 16. Oktober 2022 14:15:09 UTC schrieb BALATON Zoltan : >On Sun, 16 Oct 2022, Bernhard Beschow wrote: >> Allows e500 boards to have their root file system reside on flash using >> only builtin devices located in the eLBC memory region. >> >> Note that the flash memory area is only created when a

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Bin Meng
On Tue, Oct 18, 2022 at 3:46 PM Bernhard Beschow wrote: > > Am 16. Oktober 2022 14:15:09 UTC schrieb BALATON Zoltan : > >On Sun, 16 Oct 2022, Bernhard Beschow wrote: > >> Allows e500 boards to have their root file system reside on flash using > >> only builtin devices located in the eLBC memory re

Re: MultiFD and default channel out of order mapping on receive side.

2022-10-18 Thread Daniel P . Berrangé
On Mon, Oct 17, 2022 at 05:15:35PM -0400, Peter Xu wrote: > On Mon, Oct 17, 2022 at 12:38:30PM +0100, Daniel P. Berrangé wrote: > > On Mon, Oct 17, 2022 at 01:06:00PM +0530, manish.mishra wrote: > > > Hi Daniel, > > > > > > I was thinking for some solutions for this so wanted to discuss that > >

Re: [PATCH v12 3/7] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-18 Thread Sam Li
Stefan Hajnoczi 于2022年10月17日周一 22:44写道: > > On Sun, Oct 16, 2022 at 10:51:06PM +0800, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use t

Re: [PATCH] hw/block/nvme: re-enable NVMe PCI hotplug

2022-10-18 Thread Daniel Wagner
On Mon, Oct 10, 2022 at 07:15:08PM +0200, Klaus Jensen wrote: > This is all upstream. Namespaces with 'shared=on' *should* all be > automatically attached to any hotplugged controller devices. > > With what setup is this not working for you? Ah okay, I missed the 'shared=on' bit. Let me try again

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-10-18 Thread Julien Grall
Hi Stefano, On 18/10/2022 02:26, Stefano Stabellini wrote: On Sun, 16 Oct 2022, Julien Grall wrote: Hi, There seem to be some missing patches on xen-devel (including the cover letter). Is that expected? On 15/10/2022 06:07, Vikram Garhwal wrote: Add a new machine xenpv which creates a IOREQ

Re: [PATCH v12 6/7] qemu-iotests: test new zone operations

2022-10-18 Thread Sam Li
Dmitry Fomichev 于2022年10月17日周一 08:57写道: > > On Sun, 2022-10-16 at 22:51 +0800, Sam Li wrote: > > We have added new block layer APIs of zoned block devices. > > Test it with: > > Create a null_blk device, run each zone operation on it and see > > whether reporting right zone information. > > change

Re: [PATCH v2] nbd/client: Use smarter assert

2022-10-18 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > Assigning strlen() to a uint32_t and then asserting that it isn't too > large doesn't catch the case of an input string 4G in length. > Thankfully, the incoming strings can never be that large: if the > export name or query is reflecting a string the client

[PATCH v3 0/2] Refactoring: expand usage of TFR() macro

2022-10-18 Thread Nikita Ivanov
At the moment, TFR() macro has a vague name and is not used where it possibly could be. In order to make it more transparent and useful, it was decided to refactor it to make it closer to the similar one in glibc: TEMP_FAILURE_RETRY(). Now, macro evaluates into an expression and is named RETRY_ON_E

[PATCH v3 1/2] Refactoring: refactor TFR() macro to RETRY_ON_EINTR()

2022-10-18 Thread Nikita Ivanov
Rename macro name to more transparent one and refactor it to expression. Signed-off-by: Nikita Ivanov --- chardev/char-fd.c | 2 +- chardev/char-pipe.c| 8 +--- include/qemu/osdep.h | 8 +++- net/tap-bsd.c | 6 +++--- net/tap-linux.c| 2 +- net/tap-solaris.c

[PATCH v3 2/2] error handling: Use RETRY_ON_EINTR() macro where applicable

2022-10-18 Thread Nikita Ivanov
There is a defined RETRY_ON_EINTR() macro in qemu/osdep.h which handles the same while loop. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/415 Signed-off-by: Nikita Ivanov --- block/file-posix.c| 37 - chardev/char-pty.c| 4 +--- hw/

Re: [PATCH v4 2/3] block: introduce zone append write for zoned devices

2022-10-18 Thread Sam Li
Damien Le Moal 于2022年10月17日周一 13:22写道: > > On 10/16/22 23:56, Sam Li wrote: > > A zone append command is a write operation that specifies the first > > logical block of a zone as the write position. When writing to a zoned > > block device using zone append, the byte offset of writes is pointing >

Re: [RFC v3 2/2] virtio-blk: add zoned storage emulation for zoned devices

2022-10-18 Thread Sam Li
Dmitry Fomichev 于2022年10月17日周一 09:01写道: > > On Sun, 2022-10-16 at 23:05 +0800, Sam Li wrote: > > This patch extends virtio-blk emulation to handle zoned device commands > > by calling the new block layer APIs to perform zoned device I/O on > > behalf of the guest. It supports Report Zone, four zon

Re: [PATCH v2 01/11] migration: support file: uri for source migration

2022-10-18 Thread Daniel P . Berrangé
On Mon, Oct 10, 2022 at 04:33:58PM +0300, Nikolay Borisov wrote: > Implement support for a "file:" uri so that a migration can be initiated > directly to a file from QEMU. > > Signed-off-by: Nikolay Borisov > --- > migration/file.c | 23 +++ > migration/file.h | 9

Re: [PATCH v2 01/11] migration: support file: uri for source migration

2022-10-18 Thread Daniel P . Berrangé
On Mon, Oct 10, 2022 at 04:33:58PM +0300, Nikolay Borisov wrote: > Implement support for a "file:" uri so that a migration can be initiated > directly to a file from QEMU. Can we add a reminder here Unlike other migration protocol backends, the 'file' protocol cannot honour non-blocking mode.

Re: [v2] hw: misc: edu: fix 2 off-by-one errors

2022-10-18 Thread Alex Bennée
Jiri Slaby writes: > On 17. 10. 22, 16:13, Peter Maydell wrote: >> * for situations where the guest has misprogrammed the device, >> log that with qemu_log_mask(LOG_GUEST_ERROR, ...) >> and continue with whatever the real hardware would do, or >> some reasonable choice if the h/w

Re: [PATCH v3 1/2] Refactoring: refactor TFR() macro to RETRY_ON_EINTR()

2022-10-18 Thread Marc-André Lureau
On Tue, Oct 18, 2022 at 12:44 PM Nikita Ivanov wrote: > Rename macro name to more transparent one and refactor > it to expression. > > Signed-off-by: Nikita Ivanov > Reviewed-by: Marc-André Lureau > --- > chardev/char-fd.c | 2 +- > chardev/char-pipe.c| 8 +--- > include/qemu/

Re: Question about TCG backend correctness

2022-10-18 Thread Alex Bennée
Richard Henderson writes: > On 10/18/22 01:27, LIU Zhiwei wrote: >> Maybe I can run RISU on qemu-aarch64(x86) and qemu-aarch64(risc-v) >> to check the RISC-V backend. > > This is a good start for debugging a tcg backend. It's not > comprehensive, because RISU executes one instruction at a time

Re: [PATCH v3 2/9] hw/{arm,ppc}: Resolve unreachable code

2022-10-18 Thread Peter Maydell
On Mon, 17 Oct 2022 at 21:57, Philippe Mathieu-Daudé wrote: > > On 16/10/22 14:27, Bernhard Beschow wrote: > > pflash_cfi01_register() always returns with a non-NULL pointer (otherwise > > it would crash internally). Therefore, the bodies of the if-statements > > are unreachable. > > This is true,

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread Peter Maydell
On Sun, 16 Oct 2022 at 13:28, Bernhard Beschow wrote: > > Allows e500 boards to have their root file system reside on flash using > only builtin devices located in the eLBC memory region. > > Note that the flash memory area is only created when a -pflash argument is > given, and that the size is d

Re: [v2] hw: misc: edu: fix 2 off-by-one errors

2022-10-18 Thread Peter Maydell
On Tue, 18 Oct 2022 at 10:21, Alex Bennée wrote: > > > Jiri Slaby writes: > > > On 17. 10. 22, 16:13, Peter Maydell wrote: > >> * for situations where the guest has misprogrammed the device, > >> log that with qemu_log_mask(LOG_GUEST_ERROR, ...) > >> and continue with whatever the real

Re: [PATCH v3 1/2] Refactoring: refactor TFR() macro to RETRY_ON_EINTR()

2022-10-18 Thread Bin Meng
On Tue, Oct 18, 2022 at 4:44 PM Nikita Ivanov wrote: > > Rename macro name to more transparent one and refactor > it to expression. > > Signed-off-by: Nikita Ivanov > --- > chardev/char-fd.c | 2 +- > chardev/char-pipe.c| 8 +--- > include/qemu/osdep.h | 8 +++- > net/tap-bsd.

Re: [PATCH 1/4] ui: fix tab indentation

2022-10-18 Thread Daniel P . Berrangé
On Tue, Oct 18, 2022 at 02:23:56AM +0800, amarjargal wrote: > The TABs should be replaced with spaces, to make sure that we have a > consistent coding style with an indentation of 4 spaces everywhere. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/370 > Signed-off-by: amarjargal > --

Re: [PATCH v2 01/11] migration: support file: uri for source migration

2022-10-18 Thread Nikolay Borisov
On 18.10.22 г. 12:10 ч., Daniel P. Berrangé wrote: On Mon, Oct 10, 2022 at 04:33:58PM +0300, Nikolay Borisov wrote: Implement support for a "file:" uri so that a migration can be initiated directly to a file from QEMU. Can we add a reminder here Unlike other migration protocol backends,

Re: x86, pflash, unassigned memory access

2022-10-18 Thread Philippe Mathieu-Daudé
On 4/10/22 05:00, Alexey Kardashevskiy wrote: Anyone, ping? On 27/09/2022 12:35, Alexey Kardashevskiy wrote: Hi! I am trying qemu-system-x86_64 with OVMF with the q35 machine, the complete command line is below. It works fine (including SEV on AMD EPYC), but these 2 parameters make me wond

Re: [PATCH v2 03/11] migration: Make migration json writer part of MigrationState struct

2022-10-18 Thread Daniel P . Berrangé
On Mon, Oct 10, 2022 at 04:34:00PM +0300, Nikolay Borisov wrote: > This is required so that migration stream configuration is written > to the migration stream. This would allow analyze-migration to > parse enabled capabilities for the migration and adjust its behavior > accordingly. This is in pre

Re: [PATCH v2 02/11] migration: Add support for 'file:' uri for incoming migration

2022-10-18 Thread Daniel P . Berrangé
On Mon, Oct 10, 2022 at 04:33:59PM +0300, Nikolay Borisov wrote: > This is a counterpart to the 'file:' uri support for source migration, > now a file can also serve as the source of an incoming migration. As with the prvious patch, can we add a reminder: Unlike other migration protocol backend

Re: [PATCH v2 2/7] tests/docker: update test-mingw to run single build

2022-10-18 Thread Philippe Mathieu-Daudé
On 13/10/22 17:47, Alex Bennée wrote: 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

Re: [PATCH v2 04/11] io: add pwritev support to QIOChannelFile

2022-10-18 Thread Daniel P . Berrangé
On Mon, Oct 10, 2022 at 04:34:01PM +0300, Nikolay Borisov wrote: > The upcoming 'fixed-ram' feature would require qemu to write data at > specific offsets of the file. This is currently missing so this patch > adds it. I've chosen to implement it as a type-specific function rather > than plumb it t

Re: [PATCH v2 05/11] io: Add support for seekable channels

2022-10-18 Thread Daniel P . Berrangé
On Mon, Oct 10, 2022 at 04:34:02PM +0300, Nikolay Borisov wrote: > Add a bunch of auxiliarry methods and a feature flag to work with > SEEKABLE channels. Currently the only channel considered seekable is > QIOChannelFile. Also add a bunch of helper functions to QEMUFile that > can make use of t

Re: [PATCH] linux-user: Implement faccessat2

2022-10-18 Thread Michael Tokarev
10.10.2022 11:53, Helge Deller wrote: On 10/9/22 08:08, WANG Xuerui wrote: User space has been preferring this syscall for a while, due to its closer match with C semantics, and newer platforms such as LoongArch apparently have libc implementations that don't fallback to faccessat so normal acce

has anybody looked at the long-standing intermittent raspi2 avocado test failure?

2022-10-18 Thread Peter Maydell
If you run this single avocado test: while ./build/x86/tests/venv/bin/avocado run build/x86/tests/avocado/boot_linux_console.py:BootLinuxConsole.test_arm_raspi2_initrd ; do true; done then on my machine it will fail within 4 or 5 iterations. Has anybody looked into this? Looking at a log from a f

Re: [PATCH] bsd-user: Catch up with sys/param.h requirement for machine/pmap.h

2022-10-18 Thread Philippe Mathieu-Daudé
On 12/10/22 20:56, Warner Losh wrote: From: Muhammad Moinur Rahman Some versions of FreeBSD now require sys/param.h for machine/pmap.h on x86. Include them here to meet that requirement. It does no harm on older versions, so there's no need to #ifdef it. Signed-off-by: Muhammad Moinur Rahman

Re: [PATCH v2 15/28] qapi misc: Elide redundant has_FOO in generated C

2022-10-18 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > The has_FOO for pointer-valued FOO are redundant, except for arrays. > They are also a nuisance to work with. Recent commit "qapi: Start to > elide redundant has_FOO in generated C" provided the means to elide > them step by step. This is the step

Re: [PATCH RESEND] hw/i2c: Enable an id for the pca954x devices

2022-10-18 Thread Philippe Mathieu-Daudé
On 11/10/22 17:46, Patrick Venture wrote: This allows the devices to be more readily found and specified. Without setting the id field, they can only be found by device type name, which doesn't let you specify the second of the same device type behind a bus. Tested: Verified that by default the

Re: [PATCH] vhost-user: Fix out of order vring host notification handling

2022-10-18 Thread Alex Bennée
Yajun Wu writes: > vhost backend sends host notification for every VQ. If backend creates > VQs in parallel, the VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG may > arrive to QEMU in different order than incremental queue index order. > > For example VQ 1's message arrive earlier than VQ 0's: > Afte

Re: [PATCH v2 05/11] io: Add support for seekable channels

2022-10-18 Thread Nikolay Borisov
On 18.10.22 г. 13:14 ч., Daniel P. Berrangé wrote: On Mon, Oct 10, 2022 at 04:34:02PM +0300, Nikolay Borisov wrote: Add a bunch of auxiliarry methods and a feature flag to work with SEEKABLE channels. Currently the only channel considered seekable is QIOChannelFile. Also add a bunch of

Re: [PATCH v2 05/11] io: Add support for seekable channels

2022-10-18 Thread Daniel P . Berrangé
On Tue, Oct 18, 2022 at 01:46:45PM +0300, Nikolay Borisov wrote: > > > On 18.10.22 г. 13:14 ч., Daniel P. Berrangé wrote: > > On Mon, Oct 10, 2022 at 04:34:02PM +0300, Nikolay Borisov wrote: > > > Add a bunch of auxiliarry methods and a feature flag to work with > > > SEEKABLE channels. Curre

Re: [PATCH v3 7/9] hw/ppc/e500: Implement pflash handling

2022-10-18 Thread BALATON Zoltan
On Tue, 18 Oct 2022, Bin Meng wrote: On Tue, Oct 18, 2022 at 3:46 PM Bernhard Beschow wrote: Am 16. Oktober 2022 14:15:09 UTC schrieb BALATON Zoltan : On Sun, 16 Oct 2022, Bernhard Beschow wrote: Allows e500 boards to have their root file system reside on flash using only builtin devices loc

Re: [PATCH v2 15/28] qapi misc: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> The has_FOO for pointer-valued FOO are redundant, except for arrays. >> They are also a nuisance to work with. Recent commit "qapi: Start to >> elide redundant has_FOO in generated C" provided the means to elide

Re: [PATCH v2 15/28] qapi misc: Elide redundant has_FOO in generated C

2022-10-18 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> The has_FOO for pointer-valued FOO are redundant, except for arrays. > >> They are also a nuisance to work with. Recent commit "qapi: Start to > >> elide re

Re: [PATCH v3 00/13] Misc ppc/mac machines clean up

2022-10-18 Thread BALATON Zoltan
On Tue, 11 Oct 2022, BALATON Zoltan wrote: On Mon, 3 Oct 2022, BALATON Zoltan wrote: This series includes some clean ups to mac_newworld and mac_oldworld to make them a bit simpler and more readable, It also removes the shared mac.h file that turns out was more of a random collection of unrelate

Re: [PATCH 00/20] tests/9p: introduce declarative function calls

2022-10-18 Thread Christian Schoenebeck
On Tuesday, October 4, 2022 10:56:44 PM CEST Christian Schoenebeck wrote: > This series converts relevant 9p (test) client functions to use named > function arguments. For instance > > do_walk_expect_error(v9p, "non-existent", ENOENT); > > becomes > > twalk({ > .client = v9p, .pa

Re: [PATCH v2 10/28] qapi crypto: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [PATCH v2 21/28] qapi run-state: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [PATCH v2 19/28] qapi replay: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [PATCH v2 23/28] qapi tpm: Elide redundant has_FOO in generated C

2022-10-18 Thread Stefan Berger
On 10/18/22 08:01, Philippe Mathieu-Daudé wrote: On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with.  Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to

Re: [PATCH v2 17/28] qapi pci: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [PATCH v2 23/28] qapi tpm: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [PATCH v2 28/28] qapi: Drop temporary logic to support conversion step by step

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé --- scripts/qapi/schema.py | 6 -- 1 file changed, 6 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 22/28] qapi stats: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [PATCH v2 09/28] qapi char: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [v2] hw: misc: edu: fix 2 off-by-one errors

2022-10-18 Thread Alex Bennée
Peter Maydell writes: > On Tue, 18 Oct 2022 at 10:21, Alex Bennée wrote: >> >> >> Jiri Slaby writes: >> >> > On 17. 10. 22, 16:13, Peter Maydell wrote: >> >> * for situations where the guest has misprogrammed the device, >> >> log that with qemu_log_mask(LOG_GUEST_ERROR, ...) >> >>

Re: [PATCH v2 07/28] qapi audio: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [PATCH v2 26/28] qapi virtio: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On 18/10/22 08:28, Markus Armbruster wrote: The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/

Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped

2022-10-18 Thread Jason Gunthorpe
On Fri, Oct 14, 2022 at 01:29:51PM +0100, Joao Martins wrote: > On 14/10/2022 12:28, Juan Quintela wrote: > > Joao Martins wrote: > >> On 13/10/2022 17:08, Juan Quintela wrote: > >>> Oops. My understanding was that once the guest is stopped you can say > >>> how big is it. > > > > Hi > > > >>

[PATCH v4 3/3] hw: misc: edu: use qemu_log_mask instead of hw_error

2022-10-18 Thread Chris Friedt
Log a guest error instead of a hardware error when the guest tries to DMA to / from an invalid address. Signed-off-by: Chris Friedt --- hw/misc/edu.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index 52afbd792a..a18f803815 100644

[PATCH v4 1/3] hw: misc: edu: fix 2 off-by-one errors

2022-10-18 Thread Chris Friedt
In the case that size1 was zero, because of the explicit 'end1 > addr' check, the range check would fail and the error message would read as shown below. The correct comparison is 'end1 >= addr'. EDU: DMA range 0x4-0x3 out of bounds (0x4-0x40fff)! At the opposite end, in the case that

[PATCH v4 2/3] hw: misc: edu: rename local vars in edu_check_range

2022-10-18 Thread Chris Friedt
This serves to make the local variables a bit less ambiguous. The latter two arguments are named to match DMA_START, and DMA_SIZE. Signed-off-by: Chris Friedt --- hw/misc/edu.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/misc/edu.c b/hw/misc/edu.c ind

[PATCH] vhost: Warn if DEVIOTLB_UNMAP is not supported and ats is set

2022-10-18 Thread Eric Auger
Since b68ba1ca5767 ("memory: Add IOMMU_NOTIFIER_DEVIOTLB_UNMAP IOMMUTLBNotificationType"), vhost attempts to register DEVIOTLB_UNMAP notifier. This latter is supported by the intel-iommu which supports device-iotlb if the corresponding option is set. Then 958ec334bca3 ("vhost: Unbreak SMMU and virt

Re: [PATCH v2 23/28] qapi tpm: Elide redundant has_FOO in generated C

2022-10-18 Thread Philippe Mathieu-Daudé
On Tue, 18 Oct 2022 at 14:12, Stefan Berger wrote: > On 10/18/22 08:01, Philippe Mathieu-Daudé wrote: > > On 18/10/22 08:28, Markus Armbruster wrote: > >> The has_FOO for pointer-valued FOO are redundant, except for arrays. > >> They are also a nuisance to work with. Recent commit "qapi: Start to

Re: [PATCH v2 09/28] qapi char: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 18/10/22 08:28, Markus Armbruster wrote: >> The has_FOO for pointer-valued FOO are redundant, except for arrays. >> They are also a nuisance to work with. Recent commit "qapi: Start to >> elide redundant has_FOO in generated C" provided the means to elide >> t

Re: [PATCH v2 15/28] qapi misc: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert" writes: >> >> > * Markus Armbruster (arm...@redhat.com) wrote: >> >> The has_FOO for pointer-valued FOO are redundant, except for arrays. >> >> They are also a nuisance to work with. R

Re: [PATCH v2 23/28] qapi tpm: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On Tue, 18 Oct 2022 at 14:12, Stefan Berger wrote: >> On 10/18/22 08:01, Philippe Mathieu-Daudé wrote: >> > On 18/10/22 08:28, Markus Armbruster wrote: >> >> The has_FOO for pointer-valued FOO are redundant, except for arrays. >> >> They are also a nuisance to wo

Re: [PATCH v2 21/28] qapi run-state: Elide redundant has_FOO in generated C

2022-10-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 18/10/22 08:28, Markus Armbruster wrote: >> The has_FOO for pointer-valued FOO are redundant, except for arrays. >> They are also a nuisance to work with. Recent commit "qapi: Start to >> elide redundant has_FOO in generated C" provided the means to elide >> t

RE: KVM Call for 2022-10-18

2022-10-18 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+shameerali.kolothum.thodi=huawei.com@nong > nu.org] On Behalf Of Juan Quintela > Sent: 14 October 2022 11:11 > To: kvm-devel ; qemu-devel@nongnu.org > Subject: KVM Call for 2022-10-18 > > > > Hi > > Please, send any

Re: [PATCH] target/i386: Save and restore pc_save before tcg_remove_ops_after

2022-10-18 Thread Paolo Bonzini
Queued, thanks. Paolo

[PULL 01/53] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events

2022-10-18 Thread Paolo Bonzini
From: Venu Busireddy Section 5.6.6.3 of VirtIO specification states, "Events will also be reported via sense codes..." However, no sense data is sent when VIRTIO_SCSI_EVT_RESET_RESCAN or VIRTIO_SCSI_EVT_RESET_REMOVED events are reported (when disk hotplug/hotunplug events occur). SCSI layer on So

[PULL 02/53] configure: don't enable firmware for targets that are not built

2022-10-18 Thread Paolo Bonzini
This avoids the unfortunate effect of building pc-bios blobs even for targets the user isn't interested in. Due to the bi-arch nature of x86 and PPC firmware, check for the desired target by hand, and don't just look for the compilation target in $target_list. Signed-off-by: Paolo Bonzini --- c

[PULL 03/53] scsi: Use device_cold_reset() and bus_cold_reset()

2022-10-18 Thread Paolo Bonzini
From: Peter Maydell In the SCSI subsystem we currently use the legacy functions qdev_reset_all() and qbus_reset_all(). These perform a recursive reset, starting from either a qbus or a qdev. However they do not permit any of the devices in the tree to use three-phase reset, because device reset

[PULL 04/53] hw/scsi/vmw_pvscsi.c: Use device_cold_reset() to reset SCSI devices

2022-10-18 Thread Paolo Bonzini
From: Peter Maydell Currently the vwm_pvscsi controller resets individual SCSI devices with the device_legacy_reset() function. The only difference between this and device_cold_reset() is that device_legacy_reset() resets the device but not any child qbuses it might have. In this case, no SCSI

[PULL 08/53] target/i386: Save and restore pc_save before tcg_remove_ops_after

2022-10-18 Thread Paolo Bonzini
From: Richard Henderson Restore pc_save while undoing any state change that may have happened while decoding the instruction. Leave a TODO about removing all of that when the table-based decoder is complete. Cc: Paolo Bonzini Suggested-by: Peter Maydell Signed-off-by: Richard Henderson Messa

[PULL 06/53] configure: Avoid using strings binary

2022-10-18 Thread Paolo Bonzini
From: Michal Privoznik When determining the endiandness of the target architecture we're building for a small program is compiled, which in an obfuscated way declares two strings. Then, we look which string is in correct order (using strings binary) and deduct the endiandness. But using the strin

[PULL 14/53] target/i386: Use MMU_NESTED_IDX for vmload/vmsave

2022-10-18 Thread Paolo Bonzini
From: Richard Henderson Use MMU_NESTED_IDX for each memory access, rather than just a single translation to physical. Adjust svm_save_seg and svm_load_seg to pass in mmu_idx. This removes the last use of get_hphys so remove it. Signed-off-by: Richard Henderson Message-Id: <20221002172956.2657

[PULL 16/53] target/i386: Use atomic operations for pte updates

2022-10-18 Thread Paolo Bonzini
From: Richard Henderson Use probe_access_full in order to resolve to a host address, which then lets us use a host cmpxchg to update the pte. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/279 Signed-off-by: Richard Henderson Message-Id: <20221002172956.265735-9-richard.hender...@linar

[PULL 15/53] target/i386: Combine 5 sets of variables in mmu_translate

2022-10-18 Thread Paolo Bonzini
From: Richard Henderson We don't need one variable set per translation level, which requires copying into pte/pte_addr for huge pages. Standardize on pte/pte_addr for all levels. Signed-off-by: Richard Henderson Message-Id: <20221002172956.265735-8-richard.hender...@linaro.org> Signed-off-by: P

[PULL 17/53] target/i386: Use probe_access_full for final stage2 translation

2022-10-18 Thread Paolo Bonzini
From: Richard Henderson Rather than recurse directly on mmu_translate, go through the same softmmu lookup that we did for the page table walk. This centralizes all knowledge of MMU_NESTED_IDX, with respect to setup of TranslationParams, to get_physical_address. Signed-off-by: Richard Henderson

[PULL 19/53] target/i386: make ldo/sto operations consistent with ldq

2022-10-18 Thread Paolo Bonzini
ldq takes a pointer to the first byte to load the 64-bit word in; ldo takes a pointer to the first byte of the ZMMReg. Make them consistent, which will be useful in the new SSE decoder's load/writeback routines. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/tr

[PULL 21/53] target/i386: add core of new i386 decoder

2022-10-18 Thread Paolo Bonzini
The new decoder is based on three principles: - use mostly table-driven decoding, using tables derived as much as possible from the Intel manual. Centralizing the decode the operands makes it more homogeneous, for example all immediates are signed. All modrm handling is in one function, an

[PULL 22/53] target/i386: add ALU load/writeback core

2022-10-18 Thread Paolo Bonzini
Add generic code generation that takes care of preparing operands around calls to decode.e.gen in a table-driven manner, so that ALU operations need not take care of that. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 33 ++- target/i386

[PULL 40/53] target/i386: reimplement 0x0f 0xd0-0xd7, 0xe0-0xe7, 0xf0-0xf7, add AVX

2022-10-18 Thread Paolo Bonzini
The more complicated ones here are d6-d7, e6-e7, f7. The others are trivial. For LDDQU, using gen_load_sse directly might corrupt the register if the second part of the load fails. Therefore, add a custom X86_TYPE_WM value; like X86_TYPE_W it does call gen_load(), but it also rejects a value of

[PULL 35/53] target/i386: reimplement 0x0f 0x60-0x6f, add AVX

2022-10-18 Thread Paolo Bonzini
These are both MMX and SSE/AVX instructions, except for vmovdqu. In both cases the inputs and output is in s->ptr{0,1,2}, so the only difference between MMX, SSE, and AVX is which helper to call. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc |

[PULL 53/53] target/i386: remove old SSE decoder

2022-10-18 Thread Paolo Bonzini
With all SSE (and AVX!) instructions now implemented in disas_insn_new, it's possible to remove gen_sse, as well as the helpers for instructions that now use gvec. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h| 124 --- target/i386/ops_sse_he

[PULL 33/53] target/i386: implement additional AVX comparison operators

2022-10-18 Thread Paolo Bonzini
The new implementation of SSE will cover AVX from the get go, so include the 24 extra comparison operators that are only available with the VEX prefix. Based on a patch by Paul Brook . Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/ops_sse.h| 38 +++

  1   2   3   >