Re: [PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'

2022-08-05 Thread gaosong
Ping for 7.1 On 2022/7/24 上午11:27, Richard Henderson wrote: On 7/21/22 09:30, Song Gao wrote: Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0;     ^

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Thomas Huth
On 02/08/2022 12.00, Zhang, Chen wrote: -Original Message- From: Qemu-devel On Behalf Of Jagannathan Raman Sent: Tuesday, August 2, 2022 9:24 AM To: qemu-devel@nongnu.org Cc: stefa...@gmail.com; berra...@redhat.com Subject: [PATCH 0/1] Update vfio-user module to the latest Hi, This

Re: [PATCH 1/2] hw/arm/virt: Improve address assignment for highmem IO regions

2022-08-05 Thread Gavin Shan
Hi Eric, On 8/4/22 5:19 PM, Eric Auger wrote: On 8/4/22 04:47, Gavin Shan wrote: On 8/3/22 10:52 PM, Eric Auger wrote: On 8/3/22 15:02, Gavin Shan wrote: On 8/3/22 5:01 PM, Marc Zyngier wrote: On Wed, 03 Aug 2022 04:01:04 +0100, Gavin Shan wrote: On 8/2/22 7:41 PM, Eric Auger wrote: On

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread Cédric Le Goater
On 8/4/22 21:26, BALATON Zoltan wrote: On Thu, 4 Aug 2022, Peter Maydell wrote: On Thu, 4 Aug 2022 at 19:03, BALATON Zoltan wrote: I was trying to find out how to do it but I don't understand QOM enough to answer the simple question of how to get the cpu object from QOM. My guesses are:

Re: [PATCH 7.1] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Michael S. Tsirkin
On Thu, Aug 04, 2022 at 02:56:59PM -0400, Stefan Hajnoczi wrote: > On Wed, Aug 03, 2022 at 12:28:24PM -0400, Stefan Hajnoczi wrote: > > As soon as virtio_scsi_data_plane_start() attaches host notifiers the > > IOThread may start virtqueue processing. There is a race between > > IOThread virtqueue

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Michael S. Tsirkin
On Wed, Aug 03, 2022 at 12:28:24PM -0400, Stefan Hajnoczi wrote: > As soon as virtio_scsi_data_plane_start() attaches host notifiers the > IOThread may start virtqueue processing. There is a race between > IOThread virtqueue processing and virtio_scsi_data_plane_start() because > it only assigns

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:41:01 +0100 Daniel P. Berrangé wrote: > On Thu, Aug 04, 2022 at 04:49:29PM +0200, Claudio Imbrenda wrote: > > On Thu, 4 Aug 2022 09:29:39 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Aug 03, 2022 at 06:34:45PM +0100, Daniel P. Berrangé wrote: > > > > On Wed,

Re: [PATCH for 7.1] linux-user: fix compat with glibc >= 2.36 sys/mount.h

2022-08-05 Thread Florian Weimer
* Daniel P. Berrangé: > CC'ing Florian to get the POV of a glibc maintainer on what we've > had to do to work around this compatibility brekage. Meh, that's really not great. 8-( I'll see if I can add a similar workaround to the glibc headers. Unfortunately I'm busy with other stuff right now,

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:56:34 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal signal, > > the VM is

Re: [PATCH] target/loongarch: Fix macros SET_FPU_* in cpu.h

2022-08-05 Thread gaosong
Cc: Richard Apply to 7.1? On 2022/8/4 下午9:24, Qi Hu wrote: The macros SET_FPU_* are used to set corresponding bits of fcsr. Unfortunately it forgets to set the result and it causes fcsr's "CAUSE" never being updated. This patch is to fix this bug. Signed-off-by: Qi Hu ---

Re: [PATCH v2] pc: add property for Linux setup_data random number seed

2022-08-05 Thread Michael S. Tsirkin
On Thu, Aug 04, 2022 at 11:24:41PM +0200, Paolo Bonzini wrote: > Using a property makes it possible to use the normal compat property > mechanism instead of ad hoc code; it avoids parameter proliferation > in x86_load_linux; and allows shipping the code even if it is > disabled by default. > >

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Laszlo Ersek
On 08/05/22 00:56, Jason A. Donenfeld wrote: > Hey Laszlo, > > On Thu, Aug 04, 2022 at 03:56:54PM +0200, Laszlo Ersek wrote: >> - do we want setup_data chaining work generally? >> >> - or do we want only the random seed injection to stop crashing OVMF guests? > > Preferably the first -

RE: [PATCH v2 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-05 Thread Zhao, Zhou
Hi: Its convenient for other guys if they need use other avx flag, they need not change the meson file again. So we all disable that avx flag in that meson option file exclude for that "avx512_bw" that we used. -Original Message- From: Daniel P. Berrangé Sent: Friday, August 5, 2022

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Thomas Huth
On 05/08/2022 10.55, Michael S. Tsirkin wrote: On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: On 02/08/2022 12.00, Zhang, Chen wrote: -Original Message- From: Qemu-devel On Behalf Of Jagannathan Raman Sent: Tuesday, August 2, 2022 9:24 AM To: qemu-devel@nongnu.org Cc:

[PATCH for-7.2 v2 03/20] hw/nios2: set machine->fdt in nios2_load_dtb()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all nios2 machines that uses nios2_load_dtb(). Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Daniel Henrique Barboza --- hw/nios2/boot.c | 13 - hw/nios2/meson.build | 2 +- 2 files changed, 13

[PATCH for-7.2 v2 11/20] hw/riscv: set machine->fdt in sifive_u_machine_init()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the sifive_u machine. Cc: Alistair Francis Cc: Bin Meng Cc: Palmer Dabbelt Signed-off-by: Daniel Henrique Barboza --- hw/riscv/sifive_u.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/riscv/sifive_u.c

Re: [PATCH v2 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 08:37:27AM +, Zhao, Zhou wrote: > Hi: > Its convenient for other guys if they need use other avx flag, > they need not change the meson file again. So we all disable > that avx flag in that meson option file exclude for that > "avx512_bw" that we used. I don't think

[PATCH for-7.2 v2 17/20] device_tree.c: support remaining FDT prop types

2022-08-05 Thread Daniel Henrique Barboza
When printing a blob with 'dtc' using the '-O dts' option there are 3 distinct data types being printed: strings, arrays of uint32s and regular byte arrays. Previous patch added support to print strings. Let's add the remaining formats. We want to resemble the format that 'dtc -O dts' uses, so

[PATCH for-7.1] vl: fix [memory] section with -readconfig

2022-08-05 Thread Paolo Bonzini
The -M memory.* options do not have magic applied to them than the -m option, namely no "M" (for mebibytes) is tacked at the end of a suffixless value for "-M memory.size". This magic is performed by parse_memory_options, and we have to do it for both "-m" and the [memory] section of a config

Re: [PATCH] pc-bios/s390-ccw: Fix booting with logical block size < physical block size

2022-08-05 Thread Cornelia Huck
On Fri, Aug 05 2022, Thomas Huth wrote: > For accessing single blocks during boot, it's the logical block size that > matters. (Physical block sizes are rather interesting e.g. for creating > file systems with the correct alignment for speed reasons etc.). > So the s390-ccw bios has to use the

Re: [PATCH 1/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Ilya Leoshkevich
On Fri, 2022-08-05 at 09:50 +0100, Peter Maydell wrote: > On Thu, 4 Aug 2022 at 19:50, Ilya Leoshkevich > wrote: > > > > When the first instruction of a translation block is located in a > > non-readable page, qemu-user fills siginfo_t correctly. For the > > other > > instructions the result is

Re: [PATCH RFC 3/7] util: Introduce ThreadContext user-creatable object

2022-08-05 Thread Michal Prívozník
On 7/21/22 14:07, David Hildenbrand wrote: > Setting the CPU affinity of QEMU threads is a bit problematic, because > QEMU doesn't always have permissions to set the CPU affinity itself, > for example, with seccomp after initialized by QEMU: > -sandbox enable=on,resourcecontrol=deny > > While

Re: [PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Jason A. Donenfeld
Hi Paolo, On Fri, Aug 05, 2022 at 10:10:02AM +0200, Paolo Bonzini wrote: > On 8/5/22 01:04, Jason A. Donenfeld wrote: > > +/* Nothing else uses this part of the hardware mapped region */ > > +setup_data_base = 0xf - 0x1000; > > Isn't this where the BIOS lives? I don't think this

Re: [PATCH v7 04/14] mm/shmem: Support memfile_notifier

2022-08-05 Thread David Hildenbrand
On 06.07.22 10:20, Chao Peng wrote: > From: "Kirill A. Shutemov" > > Implement shmem as a memfile_notifier backing store. Essentially it > interacts with the memfile_notifier feature flags for userspace > access/page migration/page reclaiming and implements the necessary > memfile_backing_store

Re: [PATCH for-7.1] vl: fix [memory] section with -readconfig

2022-08-05 Thread Markus Armbruster
Paolo Bonzini writes: > The -M memory.* options do not have magic applied to them than the -m > option, namely no "M" (for mebibytes) is tacked at the end of a > suffixless value for "-M memory.size". This sentence is confusing. Do you mean "like the -m option"? > This magic is performed by

[PATCH v6 2/8] file-posix: introduce get_sysfs_long_val for the long sysfs attribute

2022-08-05 Thread Sam Li
Use sysfs attribute files to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke --- block/file-posix.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/block/file-posix.c

[PATCH v6 1/8] include: add zoned device structs

2022-08-05 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) diff --git a/include/block/block-common.h b/include/block/block-common.h index fdb7306e78..36bd0e480e 100644 ---

Re: [PATCH 1/2] hw/arm/virt: Improve address assignment for highmem IO regions

2022-08-05 Thread Eric Auger
Hi Gavin, On 8/5/22 10:36, Gavin Shan wrote: > Hi Eric, > > On 8/4/22 5:19 PM, Eric Auger wrote: >> On 8/4/22 04:47, Gavin Shan wrote: >>> On 8/3/22 10:52 PM, Eric Auger wrote: On 8/3/22 15:02, Gavin Shan wrote: > On 8/3/22 5:01 PM, Marc Zyngier wrote: >> On Wed, 03 Aug 2022 04:01:04

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: > On 02/08/2022 12.00, Zhang, Chen wrote: > > > > > > > -Original Message- > > > From: Qemu-devel > > bounces+chen.zhang=intel@nongnu.org> On Behalf Of Jagannathan > > > Raman > > > Sent: Tuesday, August 2, 2022 9:24 AM >

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Emanuele Giuseppe Esposito
Am 03/08/2022 um 18:28 schrieb Stefan Hajnoczi: > As soon as virtio_scsi_data_plane_start() attaches host notifiers the > IOThread may start virtqueue processing. There is a race between > IOThread virtqueue processing and virtio_scsi_data_plane_start() because > it only assigns

Re: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 06:56, Zhang, Chen wrote: > > > > > -Original Message- > > From: Jason Wang > > I wonder under which case we can see data == NULL? > > > > AFAIK, data is either dup via packet_new() or assigned to a pointer to the > > buf > > in packet_new_nocopy(). > > Yes, you

[PATCH for-7.2 v2 05/20] hw/ppc: set machine->fdt in bamboo_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the bamboo machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/ppc440_bamboo.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/ppc/ppc440_bamboo.c

[PATCH for-7.2 v2 04/20] hw/ppc: set machine->fdt in ppce500_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the e500 machine. Cc: Cédric Le Goater Signed-off-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index

[PATCH for-7.2 v2 12/20] hw/riscv: set machine->fdt in spike_board_init()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the spike machine. Cc: Palmer Dabbelt Cc: Alistair Francis Cc: Bin Meng Signed-off-by: Daniel Henrique Barboza --- hw/riscv/spike.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/riscv/spike.c

Re: Regression in -readconfig [memory] size (was: [PULL 13/27] machine: add mem compound property)

2022-08-05 Thread Paolo Bonzini
On 8/5/22 11:30, Markus Armbruster wrote: This appears to change the meaning of [memory] size = "1024" in a -readconfig file from 1024MiB to 8KiB (1024 Bytes rounded up to 8KiB silently). No reply so far. If we can't fix this, we better mention it in the release notes. Can we

[PATCH V2] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Zhang Chen
When enable the virtio-net-pci, guest network packet will load the vnet_hdr. In COLO status, the primary VM's network packet maybe redirect to another VM, it need filter-redirect enable the vnet_hdr flag at the same time, COLO-proxy will correctly parse the original network packet. If have any

[PATCH 2/2] char: open unidirectional in/out pipes with one-way mode

2022-08-05 Thread marcandre . lureau
From: Marc-André Lureau This is how those paths are meant to be used. Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c index f9897a3786..3759558d81 100644 ---

Re: [PATCH 1/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 11:28, Ilya Leoshkevich wrote: > On Fri, 2022-08-05 at 09:50 +0100, Peter Maydell wrote: > > Which guests do you observe this on ? I think we should indeed > > fix this in the translators. More specifically, I think we should > > get this correct already on Arm, and I would

Re: [PATCH RFC 7/7] vl: Allow ThreadContext objects to be created before the sandbox option

2022-08-05 Thread Michal Prívozník
On 7/21/22 14:07, David Hildenbrand wrote: > Currently, there is no way to configure a CPU affinity inside QEMU when > the sandbox option disables it for QEMU as a whole, for example, via: > -sandbox enable=on,resourcecontrol=deny > > While ThreadContext objects can be created on the QEMU

Re: [PATCH v3] hw/i386: place setup_data at fixed place in memory

2022-08-05 Thread Ard Biesheuvel
On Fri, 5 Aug 2022 at 10:10, Paolo Bonzini wrote: > > On 8/5/22 01:04, Jason A. Donenfeld wrote: > > +/* Nothing else uses this part of the hardware mapped region */ > > +setup_data_base = 0xf - 0x1000; > > Isn't this where the BIOS lives? I don't think this works. > > Does it work

[PATCH 0/1] tests/qtest: add testing coverage of -readconfig

2022-08-05 Thread Daniel P . Berrangé
I reviewing Paolo's latest fix for -readconfig I noticed that we have absolutely zero coverage of -readconfig under tests/, which makes it way too easy for regressions to slip in. This following patch doesn't do much, but it tests the last three regressions we've had and gives a starting point

Re: [PATCH v7 02/14] selftests/memfd: Add tests for F_SEAL_AUTO_ALLOCATE

2022-08-05 Thread David Hildenbrand
On 06.07.22 10:20, Chao Peng wrote: > Add tests to verify sealing memfds with the F_SEAL_AUTO_ALLOCATE works > as expected. > > Signed-off-by: Chao Peng > --- > tools/testing/selftests/memfd/memfd_test.c | 166 + > 1 file changed, 166 insertions(+) > > diff --git

[PATCH 2/2] target/ppc: Bugfix FP when OE/UE are set

2022-08-05 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" When an overflow exception occurs and OE is set the intermediate result should be adjusted (by subtracting from the exponent) to avoid rounding to inf. The same applies to an underflow exceptionion and UE (but adding to the exponent). To do this set the

[PATCH v6 3/8] file-posix: introduce get_sysfs_str_val for device zoned model

2022-08-05 Thread Sam Li
Use sysfs attribute files to get the string value of device zoned model. Then get_sysfs_zoned_model can convert it to BlockZoneModel type in QEMU. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke --- block/file-posix.c | 70

[PATCH v6 6/8] config: add check to block layer

2022-08-05 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- block.c | 13 + block/file-posix.c | 1 + block/raw-format.c | 1 +

Re: [PATCH 0/1] Update vfio-user module to the latest

2022-08-05 Thread Michael S. Tsirkin
On Fri, Aug 05, 2022 at 09:24:56AM +0100, Daniel P. Berrangé wrote: > On Fri, Aug 05, 2022 at 09:21:07AM +0200, Thomas Huth wrote: > > On 02/08/2022 12.00, Zhang, Chen wrote: > > > > > > > > > > -Original Message- > > > > From: Qemu-devel > > > bounces+chen.zhang=intel@nongnu.org>

Re: [PATCH v10 14/21] jobs: protect job.aio_context with BQL and job_mutex

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > In order to make it thread safe, implement a "fake rwlock", > where we allow reads under BQL *or* job_mutex held, but > writes only under BQL *and* job_mutex. Oh, so the "or BQL" part is only for job.aio_context? Okay. > The

Re: [PATCH v10 15/21] blockjob.h: categorize fields in struct BlockJob

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > The same job lock is being used also to protect some of blockjob fields. > Categorize them just as done in job.h. > > Reviewed-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Emanuele Giuseppe Esposito Why do speed, limit

Re: [PATCH v2 for-7.1] hw/usb/hcd-xhci: Fix unbounded loop in xhci_ring_chain_length() (CVE-2020-14394)

2022-08-05 Thread Mauro Matteo Cascella
On Thu, Aug 4, 2022 at 3:13 PM Thomas Huth wrote: > > The loop condition in xhci_ring_chain_length() is under control of > the guest, and additionally the code does not check for failed DMA > transfers (e.g. if reaching the end of the RAM), so the loop there > could run for a very long time or

Re: [PATCH v10 16/21] blockjob: rename notifier callbacks as _locked

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > They all are called with job_lock held, in job_event_*_locked() Worth documenting that for the notifier lists in struct Job, too? > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Stefan Hajnoczi > Signed-off-by:

[PATCH for-7.2 v2 15/20] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-05 Thread Daniel Henrique Barboza
Reading the FDT requires that the user saves the fdt_blob and then use 'dtc' to read the contents. Saving the file and using 'dtc' is a strong use case when we need to compare two FDTs, but it's a lot of steps if you want to do quick check on a certain node or property. 'info fdt' retrieves FDT

Re: [PATCH for-7.2 04/10] ppc/pnv: add helpers for pnv-phb user devices

2022-08-05 Thread Frederic Barrat
On 03/08/2022 15:44, Daniel Henrique Barboza wrote: pnv_parent_qom_fixup() and pnv_parent_bus_fixup() are versions of the helpers that were reverted by commit 9c10d86fee "ppc/pnv: Remove user-created PHB{3,4,5} devices". They are needed to amend the QOM and bus hierarchies of user created

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Christian Schoenebeck
On Donnerstag, 4. August 2022 09:25:17 CEST Nikita Ivanov wrote: > From 0ceb04ada1ed5a863914f4449469d7572d3443ed Mon Sep 17 00:00:00 2001 > From: Nikita Ivanov > Date: Wed, 3 Aug 2022 12:54:00 +0300 > Subject: [PATCH] error handling: Use TFR() macro where applicable > > There is a defined TFR()

Re: [PATCH v2 14/15] mtest2make.py: teach suite name that are just "PROJECT"

2022-08-05 Thread Marc-André Lureau
Hi On Fri, Aug 5, 2022 at 2:39 PM Paolo Bonzini wrote: > On 7/12/22 11:35, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > A subproject test may be simply in the "PROJECT" suite (such as > > "qemu-common" with the following patches) > > > > Signed-off-by: Marc-André

Re: [PATCH v6 2/2] target/s390x: support SHA-512 extensions

2022-08-05 Thread David Hildenbrand
On 03.08.22 19:15, Jason A. Donenfeld wrote: > In order to fully support MSA_EXT_5, we have to also support the SHA-512 > special instructions. So implement those. > > The implementation began as something TweetNacl-like, and then was > adjusted to be useful here. It's not very beautiful, but it

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 12:27, Marc-André Lureau wrote: > On Fri, Aug 5, 2022 at 3:11 PM Christian Schoenebeck > wrote: > > I was thinking the same as Marc-André before: > > > > commit 1dacd88ddcf33eb6ed044c4080e3ef5e3de4b6b6 > > Author: Marc-André Lureau > > Date: Wed Mar 23 19:57:27 2022

Re: [PATCH v2 00/11] Refactor bdrv_try_set_aio_context using transactions

2022-08-05 Thread Emanuele Giuseppe Esposito
Am 27/07/2022 um 18:13 schrieb Vladimir Sementsov-Ogievskiy: > On 7/25/22 15:21, Emanuele Giuseppe Esposito wrote: >> The aim of this series is to reorganize bdrv_try_set_aio_context >> and drop BDS ->set_aio_context and ->can_set_aio_ctx callbacks in >> favour of a new one, ->change_aio_ctx.

Re: [PATCH v10 12/21] commit and mirror: create new nodes using bdrv_get_aio_context, and not the job aiocontext

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > We are always using the given bs AioContext, so there is no need > to take the job ones (which is identical anyways). > This also reduces the point we need to check when protecting > job.aio_context field. > > Reviewed-by:

[PATCH v6 7/8] qemu-iotests: test new zone operations

2022-08-05 Thread Sam Li
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. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned.out | 53 ++

Re: [PATCH 1/2] linux-user: Fix siginfo_t contents when jumping to non-readable pages

2022-08-05 Thread Peter Maydell
On Thu, 4 Aug 2022 at 19:50, Ilya Leoshkevich wrote: > > When the first instruction of a translation block is located in a > non-readable page, qemu-user fills siginfo_t correctly. For the other > instructions the result is as if it were the first instruction, which > is not correct. > > The

RE: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity.

2022-08-05 Thread Zhang, Chen
> -Original Message- > From: Peter Maydell > Sent: Friday, August 5, 2022 4:53 PM > To: Zhang, Chen > Cc: Jason Wang ; Li Zhijian ; > qemu-dev > Subject: Re: [PATCH] net/colo.c: Fix the pointer issuse reported by Coverity. > > On Fri, 5 Aug 2022 at 06:56, Zhang, Chen wrote: > > > >

[PATCH for-7.2 v2 01/20] hw/arm: do not free machine->fdt in arm_load_dtb()

2022-08-05 Thread Daniel Henrique Barboza
At this moment, arm_load_dtb() can free machine->fdt when binfo->dtb_filename is NULL. If there's no 'dtb_filename', 'fdt' will be retrieved by binfo->get_dtb(). If get_dtb() returns machine->fdt, as is the case of machvirt_dtb() from hw/arm/virt.c, fdt now has a pointer to machine->fdt. And, in

[PATCH for-7.2 v2 13/20] hw/xtensa: set machine->fdt in xtfpga_init()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all xtensa machines that uses a FDT. Signed-off-by: Daniel Henrique Barboza --- hw/xtensa/meson.build | 2 +- hw/xtensa/xtfpga.c| 11 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Paolo Bonzini
On 8/5/22 09:04, Michael S. Tsirkin wrote: Buglink:https://bugzilla.redhat.com/show_bug.cgi?id=2099541 Reported-by: Qing Wang Signed-off-by: Stefan Hajnoczi A scsi thing that tree seems more appropriate. Reviewed-by: Michael S. Tsirkin Since the same thing has to be done in virtio-blk,

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Stefan Hajnoczi
On Fri, Aug 5, 2022, 05:59 Paolo Bonzini wrote: > On 8/3/22 18:28, Stefan Hajnoczi wrote: > > diff --git a/hw/scsi/virtio-scsi-dataplane.c > b/hw/scsi/virtio-scsi-dataplane.c > > index 8bb6e6acfc..a575c3f0cd 100644 > > --- a/hw/scsi/virtio-scsi-dataplane.c > > +++

Re: [PATCH] error handling: Use TFR() macro where applicable

2022-08-05 Thread Marc-André Lureau
Hi On Fri, Aug 5, 2022 at 3:11 PM Christian Schoenebeck wrote: > > On Donnerstag, 4. August 2022 09:25:17 CEST Nikita Ivanov wrote: > > From 0ceb04ada1ed5a863914f4449469d7572d3443ed Mon Sep 17 00:00:00 2001 > > From: Nikita Ivanov > > Date: Wed, 3 Aug 2022 12:54:00 +0300 > > Subject: [PATCH]

Re: [PATCH for-7.1] vl: fix [memory] section with -readconfig

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 12:06:35PM +0200, Paolo Bonzini wrote: > The -M memory.* options do not have magic applied to them than the -m > option, namely no "M" (for mebibytes) is tacked at the end of a > suffixless value for "-M memory.size". > > This magic is performed by parse_memory_options,

Re: [PATCH for-7.2 v2 09/20] hw/ppc: set machine->fdt in pnv_reset()

2022-08-05 Thread Daniel Henrique Barboza
On 8/5/22 08:03, Frederic Barrat wrote: On 05/08/2022 11:39, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all powernv machines. Cc: Cédric Le Goater Cc: Frederic Barrat Signed-off-by: Daniel Henrique Barboza ---   hw/ppc/pnv.c |

Re: [PATCH v6 2/2] target/s390x: support SHA-512 extensions

2022-08-05 Thread Jason A. Donenfeld
Hi David, On Fri, Aug 05, 2022 at 01:28:18PM +0200, David Hildenbrand wrote: > On 03.08.22 19:15, Jason A. Donenfeld wrote: > > In order to fully support MSA_EXT_5, we have to also support the SHA-512 > > special instructions. So implement those. > > > > The implementation began as something

[PATCH 0/2] Floating-point OE/UE exception bug

2022-08-05 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Changes in v2: - Completely reworked the solution: * Created re_bias in FloatFmt, it is 3/4 of the total exponent range of a FP type * Added rebias bools that dictates if the result should have its exponent

Re: [PATCH v2 1/2] Update AVX512 support for xbzrle_encode_buffer function

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 12:25:07PM +0800, ling xu wrote: > This commit adds runtime check of AVX512 on running machine, and implements > AVX512 of > xbzrle_encode_buffer function to accelerate xbzrle encoding speed. > Compared with C version of xbzrle_encode_buffer function, AVX512 version > can

Re: [PATCH v2] pc: add property for Linux setup_data random number seed

2022-08-05 Thread Paolo Bonzini
On 8/5/22 09:01, Michael S. Tsirkin wrote: -if (!legacy_no_rng_seed) { +if (x86ms->linuxboot_randomness != ON_OFF_AUTO_OFF && +(protocol >= 0x209 || x86ms->linuxboot_randomness == ON_OFF_AUTO_ON)) { Hmm so if user requested "on" but protocol is too old then we just ignore it

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-08-05 Thread Marc-André Lureau
Hi On Fri, Aug 5, 2022 at 12:12 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > This is just moving qapi-gen.py and related subdir to qemu-common, to > > ease review and proceed step by step. The following patches will move > > related

Re: [PATCH] ui/console: fix qemu_console_resize() regression

2022-08-05 Thread Marc-André Lureau
Hi On Thu, Aug 4, 2022 at 12:11 PM Mark Cave-Ayland wrote: > > On 25/07/2022 17:35, Mark Cave-Ayland wrote: > > > On 25/07/2022 12:58, marcandre.lur...@redhat.com wrote: > > > >> From: Marc-André Lureau > >> > >> The display may be corrupted when changing screen colour depth in > >>

[PATCH for-7.2 v2 06/20] hw/ppc: set machine->fdt in sam460ex_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the sam460ex machine. Cc: BALATON Zoltan Signed-off-by: Daniel Henrique Barboza --- hw/ppc/sam460ex.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index

[PATCH for-7.2 v2 02/20] hw/microblaze: set machine->fdt in microblaze_load_dtb()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all microblaze machines that uses microblaze_load_dtb(). Cc: Edgar E. Iglesias Signed-off-by: Daniel Henrique Barboza --- hw/microblaze/boot.c | 13 - hw/microblaze/meson.build | 2 +- 2 files changed, 13

[PATCH for-7.2 v2 08/20] hw/ppc: set machine->fdt in pegasos2_machine_reset()

2022-08-05 Thread Daniel Henrique Barboza
We'll introduce QMP/HMP commands that requires machine->fdt to be set properly. Cc: BALATON Zoltan Cc: qemu-...@nongnu.org Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pegasos2.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index

[PATCH for-7.2 v2 09/20] hw/ppc: set machine->fdt in pnv_reset()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all powernv machines. Cc: Cédric Le Goater Cc: Frederic Barrat Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pnv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c

[PATCH 1/2] char: open pipe in write-only mode

2022-08-05 Thread marcandre . lureau
From: Marc-André Lureau When not using the "path.in", "path.out", open "path" in read-only mode, as eating our own output is usually not what we want. Related to: https://bugzilla.redhat.com/show_bug.cgi?id=2106975 Signed-off-by: Marc-André Lureau --- chardev/char-pipe.c | 6 --

Re: [PATCH for-7.2 v2 09/20] hw/ppc: set machine->fdt in pnv_reset()

2022-08-05 Thread Frederic Barrat
On 05/08/2022 11:39, Daniel Henrique Barboza wrote: This will enable support for 'dumpdtb' and 'info fdt' HMP commands for all powernv machines. Cc: Cédric Le Goater Cc: Frederic Barrat Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pnv.c | 6 +- 1 file changed, 5 insertions(+),

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-05 Thread Peter Maydell
On Fri, 5 Aug 2022 at 13:55, BALATON Zoltan wrote: > I know this is a mess curently but QOM is full of boilerplate code which > is confusing for new people and makes it hard to undestand the code. So > cutting down the boilerplate and making things simpler would help people > who want to get

Re: [PATCH v7 03/14] mm: Introduce memfile_notifier

2022-08-05 Thread David Hildenbrand
On 06.07.22 10:20, Chao Peng wrote: > This patch introduces memfile_notifier facility so existing memory file > subsystems (e.g. tmpfs/hugetlbfs) can provide memory pages to allow a > third kernel component to make use of memory bookmarked in the memory > file and gets notified when the pages in

[PATCH 1/2] fpu: Add rebias bool, value and operation

2022-08-05 Thread Lucas Mateus Castro(alqotel)
From: "Lucas Mateus Castro (alqotel)" Added the possibility of recalculating a result if it overflows or underflows, if the result overflow and the rebias bool is true then the intermediate result should have 3/4 of the total range subtracted from the exponent. The same for underflow but it

[PATCH v6 5/8] raw-format: add zone operations to pass through requests

2022-08-05 Thread Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- block/raw-format.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c

[PATCH v6 4/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-08-05 Thread Sam Li
By adding zone management operations in BlockDriver, storage controller emulation can use the new block layer APIs including Report Zone and four zone management operations (open, close, finish, reset). Add zoned storage commands of the device: zone_report(zrp), zone_open(zo), zone_close(zc),

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-05 Thread Claudio Imbrenda
On Thu, 4 Aug 2022 17:58:34 +0100 Daniel P. Berrangé wrote: > On Thu, Aug 04, 2022 at 09:20:59AM +0100, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 07:56:49AM +0200, Claudio Imbrenda wrote: > > > On Wed, 3 Aug 2022 18:34:45 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On

Re: [PATCH v10 13/21] job: detect change of aiocontext within job coroutine

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > From: Paolo Bonzini > > We want to make sure access of job->aio_context is always done > under either BQL or job_mutex. Is this the goal of this series? If so, it would have been useful to state somewhere more obvious, because

Regression in -readconfig [memory] size (was: [PULL 13/27] machine: add mem compound property)

2022-08-05 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> Make -m syntactic sugar for a compound property "-machine >> mem.{size,max-size,slots}". The new property does not have >> the magic conversion to megabytes of unsuffixed arguments, >> and also does not understand that "0" means the

[PATCH for-7.2 v2 00/20] QMP/HMP: add 'dumpdtb' and 'info fdt' commands

2022-08-05 Thread Daniel Henrique Barboza
Hi, This second version implements the review comments/suggestion made in the v1 review [1]. First 13 patches are adaptations (basically set machine->fdt) I made in several machines to enable them to work with these commands. Patches 14-20 have the actual QMP/HMP/device_tree implementation. A

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-05 Thread Paolo Bonzini
On 8/3/22 18:28, Stefan Hajnoczi wrote: diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c index 8bb6e6acfc..a575c3f0cd 100644 --- a/hw/scsi/virtio-scsi-dataplane.c +++ b/hw/scsi/virtio-scsi-dataplane.c @@ -66,6 +66,21 @@ static int

[PATCH for-7.2 v2 07/20] hw/ppc: set machine->fdt in xilinx_load_device_tree()

2022-08-05 Thread Daniel Henrique Barboza
This will enable support for 'dumpdtb' and 'info fdt' HMP commands for the virtex_ml507 machine. Cc: Edgar E. Iglesias Signed-off-by: Daniel Henrique Barboza --- hw/ppc/virtex_ml507.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/ppc/virtex_ml507.c

[PATCH for-7.2 v2 14/20] qmp/hmp, device_tree.c: introduce dumpdtb

2022-08-05 Thread Daniel Henrique Barboza
To save the FDT blob we have the '-machine dumpdtb=' property. With this property set, the machine saves the FDT in and exit. The created file can then be converted to plain text dts format using 'dtc'. There's nothing particularly sophisticated into saving the FDT that can't be done with the

Re: [PATCH v2 14/15] mtest2make.py: teach suite name that are just "PROJECT"

2022-08-05 Thread Paolo Bonzini
On 7/12/22 11:35, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau A subproject test may be simply in the "PROJECT" suite (such as "qemu-common" with the following patches) Signed-off-by: Marc-André Lureau --- scripts/mtest2make.py | 7 +-- 1 file changed, 5 insertions(+), 2

Re: [PATCH] RFC: char: deprecate usage of bidirectional pipe

2022-08-05 Thread Daniel P . Berrangé
On Fri, Aug 05, 2022 at 01:55:41PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Jul 26, 2022 at 12:44 PM Daniel P. Berrangé > wrote: > > > > On Tue, Jul 26, 2022 at 12:32:32PM +0400, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > As Ed Swierk explained back in

Re: [PATCH for-7.2 06/10] ppc/pnv: enable user created pnv-phb for powernv8

2022-08-05 Thread Frederic Barrat
diff --git a/hw/pci-host/pnv_phb.c b/hw/pci-host/pnv_phb.c index 077f391d59..953c384bf6 100644 --- a/hw/pci-host/pnv_phb.c +++ b/hw/pci-host/pnv_phb.c @@ -17,6 +17,7 @@ #include "hw/ppc/pnv.h" #include "hw/qdev-properties.h" #include "qom/object.h" +#include "sysemu/sysemu.h" /*

Re: [PATCH v10 17/21] blockjob: protect iostatus field in BlockJob struct

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > iostatus is the only field (together with .job) that needs > protection using the job mutex. > > It is set in the main loop (GLOBAL_STATE functions) but read > in I/O code (block_job_error_action). > > In order to protect it,

Re: [PATCH for-7.1 v2 0/5] Fix gdb bugs and update gdb-xml

2022-08-05 Thread Alex Bennée
Song Gao writes: > Hi,All > > This series fiex LoongArch GDB get the wrong pc, because the xml missing > the register orig_a0, and update loongarch gdb-xml to match GDB[1] > > [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch > > Please review! For the whole

Re: [PATCH v10 20/21] blockjob: remove unused functions

2022-08-05 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > These public functions are not used anywhere, thus can be dropped. > > Signed-off-by: Emanuele Giuseppe Esposito > Reviewed-by: Stefan Hajnoczi > @@ -113,6 +111,7 @@ BlockJob *block_job_next_locked(BlockJob *job); > * Get

Re: [PATCH] pc-bios/s390-ccw: Fix booting with logical block size < physical block size

2022-08-05 Thread Eric Farman
On Fri, 2022-08-05 at 12:14 +0200, Cornelia Huck wrote: > On Fri, Aug 05 2022, Thomas Huth wrote: > > > For accessing single blocks during boot, it's the logical block > > size that > > matters. (Physical block sizes are rather interesting e.g. for > > creating > > file systems with the correct

[PATCH v6 8/8] docs/zoned-storage: add zoned device documentation

2022-08-05 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li --- docs/devel/zoned-storage.rst | 41 ++ docs/system/qemu-block-drivers.rst.inc | 6 2 files changed, 47 insertions(+) create mode 100644

  1   2   3   >