Re: [PATCH for-7.1 09/11] pc-bios: Add NPCM8xx Bootrom

2022-04-21 Thread Peter Maydell
On Tue, 5 Apr 2022 at 23:38, Hao Wu wrote: > > The bootrom is a minimal bootrom that can be used to bring up > an NPCM845 Linux kernel. Its source code can be found at > github.com/google/vbootrom/tree/master/npcm8xx > > Signed-off-by: Hao Wu > Reviwed-by: Titus Rwantare > --- > pc-bios/npcm8xx

[PULL 18/31] hw/arm/exynos4210: Delete unused macro definitions

2022-04-21 Thread Peter Maydell
Delete a couple of #defines which are never used. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220404154658.565020-12-peter.mayd...@linaro.org --- include/hw/arm/exynos4210.h | 4 1 file changed, 4 deletions(-) diff --git a/include/hw/arm/exynos4210.h b/includ

[PULL 25/31] hw/arm/exynos4210: Drop Exynos4210Irq struct

2022-04-21 Thread Peter Maydell
The only time we use the int_combiner_irq[] and ext_combiner_irq[] arrays in the Exynos4210Irq struct is during realize of the SoC -- we initialize them with the input IRQs of the combiner devices, and then connect those to outputs of other devices in exynos4210_init_board_irqs(). Now that the com

[PULL 29/31] hw/arm/virt: impact of gic-version on max CPUs

2022-04-21 Thread Peter Maydell
From: Heinrich Schuchardt Describe that the gic-version influences the maximum number of CPUs. Signed-off-by: Heinrich Schuchardt Message-id: 20220413231456.35811-1-heinrich.schucha...@canonical.com [PMM: minor punctuation tweaks] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- d

Re: [PATCH v6 2/4] hw/arm/virt: Consider SMP configuration in CPU topology

2022-04-21 Thread Gavin Shan
Hi Igor, On 4/20/22 10:50 PM, Igor Mammedov wrote: On Wed, 20 Apr 2022 22:24:46 +0800 Gavin Shan wrote: On 4/20/22 7:50 PM, Igor Mammedov wrote: On Wed, 20 Apr 2022 18:31:02 +0800 Gavin Shan wrote: On 4/20/22 4:32 PM, Igor Mammedov wrote: On Mon, 18 Apr 2022 10:09:18 +0800 Gavin Shan wrot

[PULL 24/31] hw/arm/exynos4210: Put combiners into state struct

2022-04-21 Thread Peter Maydell
Switch the creation of the combiner devices to the new-style "embedded in state struct" approach, so we can easily refer to the object elsewhere during realize. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220404154658.565020-18-peter.mayd...@linaro.org --- include/

[PULL 28/31] hw/core/irq: remove unused 'qemu_irq_split' function

2022-04-21 Thread Peter Maydell
From: Zongyuan Li Signed-off-by: Zongyuan Li Reviewed-by: Peter Maydell Message-id: 20220324181557.203805-5-zongyuan...@smartx.com Resolves: https://gitlab.com/qemu-project/qemu/-/issues/811 Signed-off-by: Peter Maydell --- include/hw/irq.h | 5 - hw/core/irq.c| 15 --- 2

Re: [PATCH v2 00/18] tests: introduce testing coverage for TLS with migration

2022-04-21 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > This significantly expands the migration test suite to cover testing > with TLS over TCP and UNIX sockets, with both PSK (pre shared keys) > and x509 credentials, and for both single and multifd scenarios. > > It identified one bug in handling PS

Re: [PATCH 29/34] build: move vhost-vsock configuration to Kconfig

2022-04-21 Thread Marc-André Lureau
On Wed, Apr 20, 2022 at 8:19 PM Paolo Bonzini wrote: > vhost-vsock and vhost-user-vsock are two devices of their own; it should > be possible to enable/disable them with --without-default-devices, not > --without-default-features. Compute their default value in Kconfig to > obtain the more intui

[PULL 30/31] hw/misc: Add PWRON STRAP bit fields in GCR module

2022-04-21 Thread Peter Maydell
From: Hao Wu Similar to the Aspeed code in include/misc/aspeed_scu.h, we define the PWRON STRAP fields in their corresponding module for NPCM7XX. Signed-off-by: Hao Wu Reviewed-by: Patrick Venture Message-id: 20220411165842.3912945-2-wuhao...@google.com Reviewed-by: Peter Maydell Signed-off-b

[PULL 26/31] hw/arm/realview: replace 'qemu_split_irq' with 'TYPE_SPLIT_IRQ'

2022-04-21 Thread Peter Maydell
From: Zongyuan Li Signed-off-by: Zongyuan Li Reviewed-by: Peter Maydell Message-id: 20220324181557.203805-2-zongyuan...@smartx.com Signed-off-by: Peter Maydell --- hw/arm/realview.c | 33 - 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/hw/arm/r

Re: [PATCH 30/34] build: move vhost-scsi configuration to Kconfig

2022-04-21 Thread Marc-André Lureau
On Wed, Apr 20, 2022 at 8:23 PM Paolo Bonzini wrote: > vhost-scsi and vhost-user-scsi are two devices of their own; it should > be possible to enable/disable them with --without-default-devices, not > --without-default-features. Compute their default value in Kconfig to > obtain the more intuiti

[PULL 31/31] hw/arm: Use bit fields for NPCM7XX PWRON STRAPs

2022-04-21 Thread Peter Maydell
From: Hao Wu This patch uses the defined fields to describe PWRON STRAPs for better readability. Signed-off-by: Hao Wu Reviewed-by: Patrick Venture Message-id: 20220411165842.3912945-3-wuhao...@google.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/npcm7xx_boards.c |

Re: [PATCH v6 2/4] hw/arm/virt: Consider SMP configuration in CPU topology

2022-04-21 Thread Gavin Shan
Hi Drew, On 4/21/22 5:02 PM, Andrew Jones wrote: On Wed, Apr 20, 2022 at 10:24:46PM +0800, Gavin Shan wrote: ... With amend to the command lines, the following one is used and below error is raised from the test. The error is mentioned in the commit log in PATCH[v7 2/4]. -machine smp.cpus

Re: [PATCH v7 4/4] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-04-21 Thread wangyanan (Y)
Hi Gavin, On 2022/4/20 18:49, Gavin Shan wrote: When the PPTT table is built, the CPU topology is re-calculated, but it's unecessary because the CPU topology has been populated in virt_possible_cpu_arch_ids() on arm/virt machine. This reworks build_pptt() to avoid by reusing the existing IDs in

Re: [PATCH for-7.1 11/11] hw/arm: Add NPCM845 Evaluation board

2022-04-21 Thread Peter Maydell
On Tue, 5 Apr 2022 at 23:38, Hao Wu wrote: > > Signed-off-by: Hao Wu > Reviwed-by: Patrick Venture > --- > hw/arm/meson.build | 2 +- > hw/arm/npcm8xx_boards.c | 257 +++ > include/hw/arm/npcm8xx.h | 20 +++ > 3 files changed, 278 insertions(+), 1 d

Re: [PATCH v7 4/4] hw/acpi/aml-build: Use existing CPU topology to build PPTT table

2022-04-21 Thread Gavin Shan
Hi Igor, On 4/20/22 10:56 PM, Igor Mammedov wrote: On Wed, 20 Apr 2022 18:49:09 +0800 Gavin Shan wrote: When the PPTT table is built, the CPU topology is re-calculated, but it's unecessary because the CPU topology has been populated in virt_possible_cpu_arch_ids() on arm/virt machine. This r

Re: [PATCH 00/19] block: fix coroutine_fn annotations

2022-04-21 Thread Stefan Hajnoczi
On Fri, Apr 15, 2022 at 03:18:34PM +0200, Paolo Bonzini wrote: > This is the initial result of reviving Marc-André's series at > https://patchew.org/QEMU/20170704220346.29244-1-marcandre.lur...@redhat.com/. > A lot of the patches are similar to the ones that Marc-André wrote, > but due to the chang

Re: [PATCH 2/3] iotests: 314 test on duplicated clusters (parallels format)

2022-04-21 Thread Stefan Hajnoczi
On Mon, Apr 18, 2022 at 02:04:29PM +0300, Natalia Kuzmina wrote: > Reading from duplicated offset and from original offset returns > the same data. After repairing changing either of these > blocks of data does not affect another one. > > Signed-off-by: Natalia Kuzmina > --- > tests/qemu-iotests

Re: [PATCH 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Greg Kurz
On Thu, 21 Apr 2022 13:13:08 +0200 Christian Schoenebeck wrote: > On Donnerstag, 21. April 2022 12:48:35 CEST Greg Kurz wrote: > > On Tue, 19 Apr 2022 13:41:59 +0200 > > > > Christian Schoenebeck wrote: > > > Linux and macOS only share some errno definitions with equal macro > > > name and valu

Re: [PATCH v7 2/4] hw/arm/virt: Consider SMP configuration in CPU topology

2022-04-21 Thread wangyanan (Y)
Hi Gavin, Sorry I missed the v6. On 2022/4/20 18:49, Gavin Shan wrote: Currently, the SMP configuration isn't considered when the CPU topology is populated. In this case, it's impossible to provide the default CPU-to-NUMA mapping or association based on the socket ID of the given CPU. This takes

Re: [PATCH 32/34] meson: create have_vhost_* variables

2022-04-21 Thread Marc-André Lureau
On Wed, Apr 20, 2022 at 8:16 PM Paolo Bonzini wrote: > When using Meson options rather than config-host.h, the "when" clauses > have to be changed to if statements (which is not necessarily great, > though at least it highlights which parts of the build are per-target > and which are not). > > Do

Re: [PATCH v7 1/4] qapi/machine.json: Add cluster-id

2022-04-21 Thread wangyanan (Y)
Hi Gavin, On 2022/4/20 18:49, Gavin Shan wrote: This adds cluster-id in CPU instance properties, which will be used by arm/virt machine. Besides, the cluster-id is also verified or dumped in various spots: * hw/core/machine.c::machine_set_cpu_numa_node() to associate CPU with its NUMA n

Re: [PATCH 33/34] meson: use have_vhost_* variables to pick sources

2022-04-21 Thread Marc-André Lureau
On Wed, Apr 20, 2022 at 8:28 PM Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau > --- > Kconfig.host| 3 --- > backends/meson.build| 8 ++-- > hw/net/meson.build | 8 ++-- > hw/virtio/Kconfig | 3 --- > hw/virtio/me

Re: [PATCH 04/26] coroutine: remove incorrect coroutine_fn annotations

2022-04-21 Thread Stefan Hajnoczi
On Fri, Apr 15, 2022 at 03:18:38PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > include/qemu/coroutine.h | 2 +- > util/qemu-coroutine.c| 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) This one is easy to audit because the implementation of qemu_coroutine_get_

Re: [PATCH 31/34] build: move vhost-user-fs configuration to Kconfig

2022-04-21 Thread Marc-André Lureau
On Wed, Apr 20, 2022 at 8:24 PM Paolo Bonzini wrote: > vhost-user-fs is a device and it should be possible to enable/disable > it with --without-default-devices, not --without-default-features. > Compute its default value in Kconfig to obtain the more intuitive > behavior. > > In this case the co

Re: [PATCH 4/5] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 13:46:26 CEST Greg Kurz wrote: > On Thu, 21 Apr 2022 13:13:08 +0200 > > Christian Schoenebeck wrote: > > On Donnerstag, 21. April 2022 12:48:35 CEST Greg Kurz wrote: > > > On Tue, 19 Apr 2022 13:41:59 +0200 > > > > > > Christian Schoenebeck wrote: > > > > Linux and

Re: Future of libslirp in QEMU

2022-04-21 Thread Paolo Bonzini
On 4/20/22 21:08, Anders Pitman wrote: I noticed in the 7.0 changelog that libslirp might be removed as a submodule in the future. Since user networking is very important for my project, I'm wondering if this is simply an implementation detail, or if there are plans to eventually remove slirp s

Re: [PATCH v8 10/12] target/hexagon: import parser for idef-parser

2022-04-21 Thread Anton Johansson via
Here's an updated version of `gen_set_usr_field_If` https://gitlab.com/AntonJohansson/qemu/-/blob/feature/idef-parser/target/hexagon/genptr.c#L673 If this looks alright and we have your "reviewed-by" on this patch, I'll go ahead and submit the new patchset! :) -- Anton Johansson, rev.ng Labs

Re: [PATCH 24/34] configure: switch directory options to automatic parsing

2022-04-21 Thread Paolo Bonzini
On 4/21/22 11:48, Marc-André Lureau wrote: While prefix, bindir and qemu_suffix needs special treatment due to differences between Windows and POSIX systems, everything else needs no extra code in configure. Afaik, it's not common to install binaries under $prefix on Windows. I don

Re: [PATCH 34/34] configure, meson: move vhost options to Meson

2022-04-21 Thread Marc-André Lureau
On Wed, Apr 20, 2022 at 8:05 PM Paolo Bonzini wrote: > Finish the conversion by moving all the definitions and the constraint > checks to meson_options.txt and meson.build respectively. > > Signed-off-by: Paolo Bonzini > lgtm Reviewed-by: Marc-André Lureau > --- > configure

Re: [PATCH 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Greg Kurz
On Thu, 21 Apr 2022 12:55:24 +0200 Christian Schoenebeck wrote: > On Donnerstag, 21. April 2022 10:26:11 CEST Greg Kurz wrote: > > On Tue, 19 Apr 2022 13:43:30 +0200 > > > > Christian Schoenebeck wrote: > > > When mapped POSIX ACL is used, we are ignoring errors when trying > > > to remove a PO

Re: [PATCH] hw/crypto: add Allwinner sun4i-ss crypto device

2022-04-21 Thread Peter Maydell
On Sun, 10 Apr 2022 at 20:12, Corentin Labbe wrote: > > From: Corentin LABBE > > The Allwinner A10 has a cryptographic offloader device which > could be easily emulated. > The emulated device is tested with Linux only as any of BSD does not > support it. > > Signed-off-by: Corentin LABBE Hi; th

Re: [RFC PATCH] tests/qtest: pass stdout/stderr down to subtests

2022-04-21 Thread Stefan Hajnoczi
On Thu, Apr 14, 2022 at 07:25:54PM +0200, Eric Auger wrote: > Hi Alex, > > On 4/7/22 5:00 PM, Alex Bennée wrote: > > When trying to work out what the virtio-net-tests where doing it was > > hard because the g_test_trap_subprocess redirects all output to > > /dev/null. Lift this restriction by usin

[PULL 00/13] Dump patches

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 9c125d17e9402c232c46610802e5931b3639d77b: Merge tag 'pull-tcg-20220420' of https://gitlab.com/rth7680/qemu into staging (2022-04-20 16:43:11 -0700) are available in the Git repository at: g...@gitlab.com:marcandre.lureau/qemu.git

[PULL 11/13] dump/win_dump: add helper macros for Windows dump header access

2022-04-21 Thread marcandre . lureau
From: Viktor Prutyanov Perform read access to Windows dump header fields via helper macros. This is preparation for the next 32-bit guest Windows dump support. Signed-off-by: Viktor Prutyanov Reviewed-by: Marc-André Lureau Message-Id: <20220406171558.199263-3-viktor.prutya...@redhat.com> ---

[PULL 01/13] dump: Use ERRP_GUARD()

2022-04-21 Thread marcandre . lureau
From: Janosch Frank Let's move to the new way of handling errors before changing the dump code. This patch has mostly been generated by the coccinelle script scripts/coccinelle/errp-guard.cocci. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message

[PULL 07/13] dump: Consolidate phdr note writes

2022-04-21 Thread marcandre . lureau
From: Janosch Frank There's no need to have two write functions. Let's rather have two functions that set the data for elf 32/64 and then write it in a common function. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <20220330123603.10712

[PULL 03/13] dump: Introduce shdr_num to decrease complexity

2022-04-21 Thread marcandre . lureau
From: Janosch Frank Let's move from a boolean to a int variable which will later enable us to store the number of sections that are in the dump file. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <20220330123603.107120-4-fran...@linux.i

[PULL 09/13] dump: Consolidate elf note function

2022-04-21 Thread marcandre . lureau
From: Janosch Frank Just like with the other write functions let's move the 32/64 bit elf handling to a function to improve readability. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Message-Id: <20220330123603.107120-10-fran...@linux.ibm.com> --- dump/dump.c | 18 +++---

[PULL 02/13] dump: Remove the sh_info variable

2022-04-21 Thread marcandre . lureau
From: Janosch Frank There's no need to have phdr_num and sh_info at the same time. We can make phdr_num 32 bit and set PN_XNUM when we write the header if phdr_num >= PN_XNUM. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <2022040709482

[PULL 12/13] include/qemu: add 32-bit Windows dump structures

2022-04-21 Thread marcandre . lureau
From: Viktor Prutyanov These structures are required to produce 32-bit guest Windows Complete Memory Dump. Add 32-bit Windows dump header, CPU context and physical memory descriptor structures along with corresponding definitions. Signed-off-by: Viktor Prutyanov Reviewed-by: Philippe Mathieu-Da

[PULL 10/13] include/qemu: rename Windows context definitions to expose bitness

2022-04-21 Thread marcandre . lureau
From: Viktor Prutyanov Context structure in 64-bit Windows differs from 32-bit one and it should be reflected in its name. Signed-off-by: Viktor Prutyanov Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-Id: <20220406171558.199263-2-viktor.prutya...@redhat.com> ---

[PULL 04/13] dump: Remove the section if when calculating the memory offset

2022-04-21 Thread marcandre . lureau
From: Janosch Frank When s->shdr_num is 0 we'll add 0 bytes of section headers which is equivalent to not adding section headers but with the multiplication we can remove a if/else. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <2022033

[PULL 05/13] dump: Add more offset variables

2022-04-21 Thread marcandre . lureau
From: Janosch Frank Offset calculations are easy enough to get wrong. Let's add a few variables to make moving around elf headers and data sections easier. Signed-off-by: Janosch Frank Reviewed-by: Marc-André Lureau Reviewed-by: Richard Henderson Message-Id: <20220330123603.107120-6-fran...@l

Re: Future of libslirp in QEMU

2022-04-21 Thread Cornelia Huck
On Wed, Apr 20 2022, "Anders Pitman" wrote: > Awesome, thanks. > > Apparently I'm not properly performing a date-sorted search on the list > archives. I started here: > > https://lists.gnu.org/archive/html/qemu-devel/ > > Then entered "slirp" and searched with chronological order, but the latest

[PULL 06/13] dump: Introduce dump_is_64bit() helper function

2022-04-21 Thread marcandre . lureau
From: Janosch Frank Checking d_class in dump_info leads to lengthy conditionals so let's shorten things a bit by introducing a helper function. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <20220330123603.107120-7-fran...@linux.ibm.com

[PULL 08/13] dump: Cleanup dump_begin write functions

2022-04-21 Thread marcandre . lureau
From: Janosch Frank There's no need to have a gigantic if in there let's move the elf 32/64 bit logic into the section, segment or note code. Signed-off-by: Janosch Frank Reviewed-by: Richard Henderson Reviewed-by: Marc-André Lureau Message-Id: <20220330123603.107120-9-fran...@linux.ibm.com>

Re: [PATCH 29/41] tests: run-time skip test-qga if TSAN is enabled

2022-04-21 Thread Marc-André Lureau
Hi On Wed, Apr 20, 2022 at 8:24 PM Daniel P. Berrangé wrote: > On Wed, Apr 20, 2022 at 05:26:12PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > This allows to make sure the test is still built, and gives more > > accurate report details. > > > > Signed-off-by:

[PULL 13/13] dump/win_dump: add 32-bit guest Windows support

2022-04-21 Thread marcandre . lureau
From: Viktor Prutyanov Before this patch, 'dump-guest-memory -w' was accepting only 64-bit dump header provided by guest through vmcoreinfo and thus was unable to produce 32-bit guest Windows dump. So, add 32-bit guest Windows dumping support. Signed-off-by: Viktor Prutyanov Reviewed-by: Philip

Re: [PATCH 32/41] qtest: simplify socket_send()

2022-04-21 Thread Marc-André Lureau
Hi On Wed, Apr 20, 2022 at 8:20 PM Daniel P. Berrangé wrote: > On Wed, Apr 20, 2022 at 05:26:15PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > Reuse qemu_write_full(). > > > > Signed-off-by: Marc-André Lureau > > --- > > tests/qtest/libqtest.c | 16 ++---

Re: [PATCH 5/5] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-04-21 Thread Christian Schoenebeck
On Donnerstag, 21. April 2022 14:26:37 CEST Greg Kurz wrote: > On Thu, 21 Apr 2022 12:55:24 +0200 > > Christian Schoenebeck wrote: > > On Donnerstag, 21. April 2022 10:26:11 CEST Greg Kurz wrote: > > > On Tue, 19 Apr 2022 13:43:30 +0200 > > > > > > Christian Schoenebeck wrote: > > > > When mapp

Q: TX (THR) throttling for serial interface?

2022-04-21 Thread REITHER Robert
Hello, ich have (realtime) problems in a QEMU client, spending too much time with the serial IRQ (INT 4) while sending massive data over the serial interface (sttyS0) I've found out that IRQ loops as long as there is send data available (LSR_THRE always 1, IIR_THRI always 1), which can lead to

Re: [PATCH] hw/crypto: add Allwinner sun4i-ss crypto device

2022-04-21 Thread Daniel P . Berrangé
On Thu, Apr 21, 2022 at 01:38:00PM +0100, Peter Maydell wrote: > On Sun, 10 Apr 2022 at 20:12, Corentin Labbe wrote: > > > > From: Corentin LABBE > > > > The Allwinner A10 has a cryptographic offloader device which > > could be easily emulated. > > The emulated device is tested with Linux only as

Re: [PATCH 3/6] scsi-disk: add MODE_PAGE_APPLE quirk for Macintosh

2022-04-21 Thread Fam Zheng
On 2022-04-21 07:51, Mark Cave-Ayland wrote: > One of the mechanisms MacOS uses to identify drives compatible with MacOS is > to > send a custom MODE SELECT command for page 0x30 to the drive. The response to > this is a hard-coded manufacturer string which must match in order for the > drive to b

Re: [PATCH 26/41] compiler.h: add QEMU_SANITIZE_{ADDRESS,THREAD}

2022-04-21 Thread Daniel P . Berrangé
On Wed, Apr 20, 2022 at 05:26:09PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Simplify a bit pre-compiler conditions. > > For TSAN, QEMU already has CONFIG_TSAN, but it is only set when the > fiber API is present. (I wonder whether supporting TSAN without the > fiber

[PATCH] qga: use fixed-length and GDateTime for log timestamp

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The old code is kind of wrong. Say it's 1649309843.01 seconds past the epoch. Prints "1649309843.1". 9us later, it prints "1649309843.10". Should really use %06lu for the microseconds part. Use GDateTime instead, as suggested by Daniel. Suggested-by: Markus Armbruste

Re: [PATCH v3] Use io_uring_register_ring_fd() to skip fd operations

2022-04-21 Thread Fam Zheng
On 2022-04-19 07:33, Sam Li wrote: > Linux recently added a new io_uring(7) optimization API that QEMU > doesn't take advantage of yet. The liburing library that QEMU uses > has added a corresponding new API calling io_uring_register_ring_fd(). > When this API is called after creating the ring, the

Re: [PATCH 27/41] Use QEMU_SANITIZE_THREAD

2022-04-21 Thread Daniel P . Berrangé
On Wed, Apr 20, 2022 at 05:26:10PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > include/qemu/atomic.h| 8 +--- > subprojects/libvhost-user/include/compiler.h | 1 + > 2 files changed, 6 insertions(+)

Re: [PATCH] qga: use fixed-length and GDateTime for log timestamp

2022-04-21 Thread Daniel P . Berrangé
On Thu, Apr 21, 2022 at 05:35:49PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The old code is kind of wrong. Say it's 1649309843.01 seconds past > the epoch. Prints "1649309843.1". 9us later, it prints "1649309843.10". > Should really use %06lu for the microsecond

[PULL 00/30] Misc patches

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 9c125d17e9402c232c46610802e5931b3639d77b: Merge tag 'pull-tcg-20220420' of https://gitlab.com/rth7680/qemu into staging (2022-04-20 16:43:11 -0700) are available in the Git repository at: g...@gitlab.com:marcandre.lureau/qemu.git

[PULL 01/30] glib-compat: isolate g_date_time_format_iso8601 version-bypass

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The solution was discussed with Markus Armbruster during the review: https://patchew.org/QEMU/20220323155743.1585078-1-marcandre.lur...@redhat.com/20220323155743.1585078-14-marcandre.lur...@redhat.com/ Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Mes

[PULL 02/30] scripts/analyze-inclusions: drop qemu-common.h from analysis

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The header is no longer commonly included. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-4-marcandre.lur...@redhat.com> --- scripts/analyze-inclusions | 4 1 file changed, 4 deletions(-) diff --git a/scripts/

[PULL 09/30] arm/allwinner-a10: replace snprintf() with g_strdup_printf()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Also fixes a GCC 12.0.1 false-positive: ../hw/arm/allwinner-a10.c: In function ‘aw_a10_realize’: ../hw/arm/allwinner-a10.c:135:35: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 8 [-Werror=format-overflow=] 135 | sprintf(bus, "usb

[PULL 05/30] include: rename qemu-common.h qemu/help-texts.h

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Suggested-by: Peter Maydell Signed-off-by: Marc-André Lureau Reviewed-by: Warner Losh Message-Id: <20220420132624.2439741-7-marcandre.lur...@redhat.com> --- include/{qemu-common.h => qemu/help-texts.h} | 0 bsd-user/main.c | 2 +- linux-use

[PULL 07/30] docs: trace-events-all is installed without renaming

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-13-marcandre.lur...@redhat.com> --- docs/devel/tracing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/tracing.rst b/docs/devel/tracin

[PULL 03/30] Simplify softmmu/main.c

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Move qemu_main() declaration to a new header. Simplify main.c since both cocoa & sdl cannot be enabled together. Signed-off-by: Marc-André Lureau Reviewed-by: Akihiko Odaki Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-5-marcandre.lur...@redhat.c

[PULL 15/30] include: move qemu_fdatasync() to osdep

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Move QEMU-specific code to util/osdep.c, so cutils can become a common subproject. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-22-marcandre.lur...@redhat.com> --- include/qemu/cutils.h | 1 - include/qemu/osdep.

[PULL 04/30] hw/hyperv: remove needless qemu-common.h include

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-6-marcandre.lur...@redhat.com> --- hw/hyperv/syndbg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c index 89ae19b9aab6..ebb8

[PULL 10/30] intc/exynos4210_gic: replace snprintf() with g_strdup_printf()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau While at it, replace '%x' with '%u' as suggested by Philippe Mathieu-Daudé. Also fixes a GCC 12.0.1 -Wformat-overflow false-positive. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-16-mar

[PULL 12/30] osdep.h: move qemu_build_not_reached()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Move the macro and declaration so it can use glib in the following patch (it already depends on glib anyway for !optimize) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-19-marcandre.lur...@redhat.com> --- include/q

[PULL 21/30] Move error_printf_unless_qmp() with monitor unit

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Since it depends on monitor code, and error_vprintf_unless_qmp() is already there. This will help to move error-report in a common subproject. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-31-marcandre.lur...@redha

[PULL 06/30] qga: replace usleep() with g_usleep()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The latter simply requires glib.h, while the former is not in the Windows API (but provided by mingw header & CRT) Also simplify the expression for 1/10s. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id:

[PULL 14/30] include: move qemu_msync() to osdep

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The implementation depends on the OS. (and longer-term goal is to move cutils to a common subproject) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-21-marcandre.lur...@redhat.com> --- include/qemu/cutils.h | 1 -

[PULL 22/30] qga: move qga_get_host_name()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The function is specific to qemu-ga, no need to share it in QEMU. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Reviewed-by: Konstantin Kostiuk Message-Id: <20220420132624.2439741-32-marcandre.lur...@redhat.com> --- include/qemu/osdep.h | 10 --

[PULL 13/30] compiler.h: replace QEMU_NORETURN with G_NORETURN

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau G_NORETURN was introduced in glib 2.68, fallback to G_GNUC_NORETURN in glib-compat. Note that this attribute must be placed before the function declaration (bringing a bit of consistency in qemu codebase usage). Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Be

[PULL 08/30] arm/digic: replace snprintf() with g_strdup_printf()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Also fixes a GCC 12.0.1 false-positive: ../hw/arm/digic.c: In function ‘digic_init’: ../hw/arm/digic.c:45:54: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 5 [-Werror=format-truncation=] 45 | snprintf(name, D

[PULL 16/30] include: add qemu/keyval.h

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Do not require the whole option machinery to handle keyval, as it is used by QAPI alone, without the option API. And match the associated unit name. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-24-marcandre.lur...@

[PULL 24/30] util: simplify write in signal handler

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Use qemu_write_full() instead of open-coding a write loop. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-36-marcandre.lur...@redhat.com> --- util/compatfd.c | 18 ++ 1 file changed, 2 insertions(+),

[PULL 17/30] include: move qdict_{crumple,flatten} declarations

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Move them where they belong, since the functions are implemented in block-qdict.c. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-25-marcandre.lur...@redhat.com> --- include/block/qdict.h | 3 +++ include/qapi

[PULL 11/30] doc/style: CLang -> Clang

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau It's not the way it is usually written (see https://clang.llvm.org/). Signed-off-by: Marc-André Lureau Reviewed-by: Damien Hedde Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-17-marcandre.lur...@redhat.com> ---

[PULL 18/30] tests: remove block/qdict checks from check-qobject.c

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The functions are already covered in check-block-qdict.c. This will help moving QAPI-related tests in a common subproject. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-26-marcandre.lur...@redhat.com> --- tests/uni

[PULL 29/30] tests/fuzz: fix warning

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau ../tests/qtest/fuzz/generic_fuzz.c:746:17: warning: variable 'name' set but not used [-Wunused-but-set-variable] Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20220420132624.2439741-42-marcandre.lur...@redhat.com> --- tests/qtest/fuzz/generic_

[PULL 19/30] compiler.h: add QEMU_SANITIZE_{ADDRESS,THREAD}

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Simplify a bit pre-compiler conditions. For TSAN, QEMU already has CONFIG_TSAN, but it is only set when the fiber API is present. (I wonder whether supporting TSAN without the fiber API is really relevant) Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé

[PULL 20/30] tests: run-time skip test-qga if TSAN is enabled

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau This allows to make sure the test is still built, and gives more accurate report details. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-30-marcandre.lur...@redhat.com> --- tests/unit/test-qga.c | 7 +++ tests/

Re: [PULL 00/23] ppc queue

2022-04-21 Thread Richard Henderson
On 4/20/22 15:13, Daniel Henrique Barboza wrote: The following changes since commit 2d20a57453f6a206938cbbf77bed0b378c806c1f: Merge tag 'pull-fixes-for-7.1-200422-1' of https://github.com/stsquad/qemu into staging (2022-04-20 11:13:08 -0700) are available in the Git repository at: https

[PULL 28/30] qga: remove need for QEMU atomic.h

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Since the introduction of guest-exec in/out/err redirections in commit a1853dca74 ("qga: guest-exec simple stdin/stdout/stderr redirection"), some execution state variables are handled with atomic ops. However, there are no threads involved in this code (and glib sources a

[PULL 25/30] util: use qemu_write_full() in qemu_write_pidfile()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Mostly for correctness. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-37-marcandre.lur...@redhat.com> --- util/oslib-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/oslib-posix.c b/

[PULL 23/30] qtest: simplify socket_send()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Reuse qemu_write_full(). Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20220420132624.2439741-33-marcandre.lur...@redhat.com> --- tests/qtest/libqtest.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tests

Re: [PATCH v4 00/19] migration: Postcopy Preemption

2022-04-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This is v4 of postcopy preempt series. It can also be found here: > > https://github.com/xzpeter/qemu/tree/postcopy-preempt > > RFC: > https://lore.kernel.org/qemu-devel/20220119080929.39485-1-pet...@redhat.com > V1: > https://lore.kernel.org/qemu-dev

[PULL 26/30] util: use qemu_create() in qemu_write_pidfile()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau qemu_open_old(O_CREATE) should be replaced with qemu_create() which handles Error reporting. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-38-marcandre.lur...@redhat.com> --- util/oslib-posix.c | 3 +-- 1 file chan

Re: [RFC PATCH] tests/qtest: pass stdout/stderr down to subtests

2022-04-21 Thread Alex Bennée
Stefan Hajnoczi writes: > [[PGP Signed Part:Undecided]] > On Thu, Apr 14, 2022 at 07:25:54PM +0200, Eric Auger wrote: >> Hi Alex, >> >> On 4/7/22 5:00 PM, Alex Bennée wrote: >> > When trying to work out what the virtio-net-tests where doing it was >> > hard because the g_test_trap_subprocess r

[PULL 27/30] util: replace qemu_get_local_state_pathname()

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau Simplify the function to only return the directory path. Callers are adjusted to use the GLib function to build paths, g_build_filename(). Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-39-marcandre.lur...@redhat.com

Re: [PATCH v5 2/2] Added parameter to take screenshot with screendump as PNG

2022-04-21 Thread Markus Armbruster
Kshitij Suri writes: > Currently screendump only supports PPM format, which is un-compressed. Added > a "format" parameter to QMP and HMP screendump command to support PNG image > capture using libpng. > > QMP example usage: > { "execute": "screendump", "arguments": { "filename": "/tmp/image", >

[PULL 30/30] qga: use fixed-length and GDateTime for log timestamp

2022-04-21 Thread marcandre . lureau
From: Marc-André Lureau The old code is kind of wrong. Say it's 1649309843.01 seconds past the epoch. Prints "1649309843.1". 9us later, it prints "1649309843.10". Should really use %06lu for the microseconds part. Use GDateTime instead, as suggested by Daniel. Suggested-by: Markus Armbruste

Re: [PATCH] migration: Fix operator type

2022-04-21 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Apr 06, 2022 at 11:25:15AM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Clang spotted an & that should have been an &&; fix it. > > > > Reported by: David Binderman / https://gitlab.com/dcb > > Fixes: 65daca

Re: [PULL 13/13] dump/win_dump: add 32-bit guest Windows support

2022-04-21 Thread Marc-André Lureau
On Thu, Apr 21, 2022 at 5:08 PM wrote: > From: Viktor Prutyanov > > Before this patch, 'dump-guest-memory -w' was accepting only 64-bit > dump header provided by guest through vmcoreinfo and thus was unable > to produce 32-bit guest Windows dump. So, add 32-bit guest Windows > dumping support. >

Re: [PATCH v5 0/2] Option to take screenshot with screendump as PNG

2022-04-21 Thread Markus Armbruster
Kshitij Suri writes: > Hi, > > Hope this mail finds everyone well! I have updated the code as > required and would be grateful if I could get your reviews for any > changes that are needed to be implemented in the patch. In case no > change is required, please do let me know the next steps for th

Re: [PULL 00/23] ppc queue

2022-04-21 Thread Peter Maydell
On Thu, 21 Apr 2022 at 14:53, Richard Henderson wrote: > > On 4/20/22 15:13, Daniel Henrique Barboza wrote: > > The following changes since commit 2d20a57453f6a206938cbbf77bed0b378c806c1f: > > > >Merge tag 'pull-fixes-for-7.1-200422-1' of > > https://github.com/stsquad/qemu into staging (2022

Re: [PATCH] migration: Read state once

2022-04-21 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > > The 'status' field for the migration is updated normally using > an atomic operation from the migration thread. > Most readers of it aren't that careful, and in most cases it doesn't > matter. > > In

<    1   2   3   4   5   6   >