[PATCH] thread-posix: add support for setting threads name on OpenBSD

2022-12-18 Thread Brad Smith
Make use of pthread_set_name_np() to be able to set the threads name on OpenBSD. Signed-off-by: Brad Smith --- meson.build | 12 util/qemu-thread-posix.c | 9 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5c6b5

Re: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-18 Thread Anton Johansson via
On 12/17/22 22:21, Peter Maydell wrote: Does that mean somebody needs to do something before I can merge this? thanks -- PMM Hi Peter, no one needs to do anything about the CI, it has already been taken care of. All containers that need flex/bison have it, and the debian-hexagon-cross cont

Re: [PATCH 1/2] contrib/vhost-user-blk: Replace lseek64 with lseek

2022-12-18 Thread Raphael Norwitz
> On Dec 17, 2022, at 8:08 PM, Khem Raj wrote: > > 64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 > already. Using lseek/off_t also makes it work with latest must without s/must/musl/ ? > using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE > when using g

Re: [PATCH v2 0/3] Decouple INTx-to-LNKx routing from south bridges

2022-12-18 Thread Bernhard Beschow
Am 9. Dezember 2022 15:23:59 UTC schrieb "Philippe Mathieu-Daudé" : >On 20/11/22 16:05, Bernhard Beschow wrote: >> v1: >> === >> >> During my PIIX consolidation work [1] I've noticed that both PIIX models have >> quite different pci_slot_get_pirq() implementations. These functions seem to >> m

Assistance needed, GitLab #677 and #1360

2022-12-18 Thread Adam Baxter
Hi, I've been looking into #677 and #1360 over on the GitLab issue tracker but I need some help to either get a full patch (I think the one in #677 is just a workaround?) and/or to understand what's happening better. It's really tricky to debug in that environment (needs a mingw64 gdb, but to s

Re: [PATCH 00/32] Consolidate PIIX south bridges

2022-12-18 Thread Bernhard Beschow
Am 4. Dezember 2022 19:05:21 UTC schrieb Bernhard Beschow : >This series consolidates the implementations of the PIIX3 and PIIX4 south > >bridges and is an extended version of [1]. The motivation is to share as much > >code as possible and to bring both device models to feature parity such that

Re: [PATCH 32/32] hw/isa/piix: Drop the "3" from the PIIX base class

2022-12-18 Thread Bernhard Beschow
Am 4. Dezember 2022 19:05:53 UTC schrieb Bernhard Beschow : >Now that the base class is used for both PIIX3 and PIIX4, the "3" >became misleading. > >Signed-off-by: Bernhard Beschow >Message-Id: <20221022150508.26830-43-shen...@gmail.com> >--- This patch could be merged into "[PATCH 19/32] hw/

Re: [PATCH v2 0/3] Decouple INTx-to-LNKx routing from south bridges

2022-12-18 Thread Michael S. Tsirkin
On Sun, Dec 18, 2022 at 10:21:49AM +, Bernhard Beschow wrote: > > > Am 9. Dezember 2022 15:23:59 UTC schrieb "Philippe Mathieu-Daudé" > : > >On 20/11/22 16:05, Bernhard Beschow wrote: > >> v1: > >> === > >> > >> During my PIIX consolidation work [1] I've noticed that both PIIX models > >>

Re: [PATCH] MIPS: remove support for trap and emulate KVM

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 01:06, Paolo Bonzini wrote: This support was limited to the Malta board, drop it. I do not have a machine that can run VZ KVM, so I am assuming that it works for -M malta as well. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 9 --- docs/about/removed-fe

Re: [PATCH] KVM: remove support for kernel-irqchip=off

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 01:06, Paolo Bonzini wrote: -machine kernel-irqchip=off is broken for many guest OSes; kernel-irqchip=split is the replacement that works, so remove the deprecated support for the former. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 7 --- docs/about/re

Re: [PATCH] KVM: remove support for kernel-irqchip=off

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 14:38, Philippe Mathieu-Daudé wrote: On 18/12/22 01:06, Paolo Bonzini wrote: -machine kernel-irqchip=off is broken for many guest OSes; kernel-irqchip=split is the replacement that works, so remove the deprecated support for the former. Signed-off-by: Paolo Bonzini ---   docs/abo

Re: [PATCH] util: remove support for hex numbers with a scaling suffix

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 01:06, Paolo Bonzini wrote: This was deprecated in 6.0 and can now be removed. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 8 docs/about/removed-features.rst | 8 tests/unit/test-cutils.c| 8 util/cutils.c

Re: [PATCH] util: remove support -chardev tty and -chardev parport

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 01:06, Paolo Bonzini wrote: These were deprecated in 6.0 and can now be removed. Signed-off-by: Paolo Bonzini --- chardev/char.c | 33 ++--- docs/about/deprecated.rst | 6 -- docs/about/removed-features.rst | 5 + doc

Re: [PATCH] i386: SGX: remove deprecated member of SGXInfo

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 01:06, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 13 - docs/about/removed-features.rst | 13 + hw/i386/sgx.c | 15 ++- qapi/misc-target.json | 12 ++-- 4 files

Re: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-18 Thread Peter Maydell
On Fri, 16 Dec 2022 at 20:49, Taylor Simpson wrote: > > The following changes since commit 4208e6ae114ac8266dcacc9696a443ce5c37b04e: > > Merge tag 'pull-request-2022-12-15' of https://gitlab.com/thuth/qemu into > staging (2022-12-15 21:39:56 +) > > are available in the Git repository at: >

Re: [PATCH 00/32] Consolidate PIIX south bridges

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 11:33, Bernhard Beschow wrote: Am 4. Dezember 2022 19:05:21 UTC schrieb Bernhard Beschow : This series consolidates the implementations of the PIIX3 and PIIX4 south bridges and is an extended version of [1]. The motivation is to share as much code as possible and to bring both de

[PATCH 2/2] hw/arm: Add Olimex H405

2022-12-18 Thread Felipe Balbi
Olimex makes a series of low-cost STM32 boards. This commit introduces the minimum setup to support SMT32-H405. See [1] for details [1] https://www.olimex.com/Products/ARM/ST/STM32-H405/ Signed-off-by: Felipe Balbi --- MAINTAINERS | 6 +++ configs/devices/arm-softmm

[PATCH 1/2] hw/arm/stm32f405: correctly describe the memory layout

2022-12-18 Thread Felipe Balbi
STM32F405 has 128K of SRAM and another 64K of CCM (Core-coupled Memory) at a different base address. Correctly describe the memory layout to give existing FW images have a chance to run unmodified. Signed-off-by: Felipe Balbi --- hw/arm/stm32f405_soc.c | 8 include/hw/arm/stm32f

[PATCH] ebpf: fix compatibility with libbpf 1.0+

2022-12-18 Thread Shreesh Adiga
The current implementation fails to load on a system with libbpf 1.0 and reports that legacy map definitions in 'maps' section are not supported by libbpf v1.0+. This commit updates the Makefile to add BTF (-g flag) and appropriately updates the maps in rss.bpf.c and update the skeleton file in rep

[PATCH 0/2] hw/arm: Add support for STM32 H405 and fix STM32F405 memory layout

2022-12-18 Thread Felipe Balbi
Hi, The following patches pass checkpatch.pl and have been tested against today's HEAD (55745005e90a). Felipe Balbi (2): hw/arm/stm32f405: correctly describe the memory layout hw/arm: Add Olimex H405 MAINTAINERS | 6 +++ configs/devices/arm-softmmu/default.mak |

Re: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-18 Thread Anton Johansson via
On 12/18/22 14:52, Peter Maydell wrote: Failed to build, s390x: https://gitlab.com/qemu-project/qemu/-/jobs/3492490152 Program scripts/decodetree.py found: YES (/usr/bin/python3 /home/gitlab-runner/builds/-LCfcJ2T/0/qemu-project/qemu/scripts/decodetree.py) Program flex found: NO ../target/hexa

Re: [PATCH] ebpf: fix compatibility with libbpf 1.0+

2022-12-18 Thread Philippe Mathieu-Daudé
Hi, On 18/12/22 15:39, Shreesh Adiga wrote: The current implementation fails to load on a system with libbpf 1.0 and reports that legacy map definitions in 'maps' section are not supported by libbpf v1.0+. This commit updates the Makefile to add BTF (-g flag) and appropriately updates the maps i

Re: [PATCH v2 1/3] hw/mips/malta: Introduce PIIX4_PCI_DEVFN definition

2022-12-18 Thread Bernhard Beschow
Am 27. Oktober 2022 20:47:18 UTC schrieb "Philippe Mathieu-Daudé" : >The PIIX4 PCI-ISA bridge function is always located at 10:0. >Since we want to re-use its address, add the PIIX4_PCI_DEVFN >definition. > >Signed-off-by: Philippe Mathieu-Daudé >--- Reviewed-by: Bernhard Beschow > hw/mips/

Re: [PATCH v2 3/3] hw/isa/piix4: Correct IRQRC[A:D] reset values

2022-12-18 Thread Bernhard Beschow
Am 27. Oktober 2022 20:47:20 UTC schrieb "Philippe Mathieu-Daudé" : >IRQRC[A:D] registers reset value is 0x80. We were forcing >the MIPS Malta machine routing to be able to boot a Linux >kernel without any bootloader. >We now have these registers initialized in the Malta machine >write_bootload

Re: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-18 Thread Richard Henderson
On 12/18/22 05:52, Peter Maydell wrote: On Fri, 16 Dec 2022 at 20:49, Taylor Simpson wrote: The following changes since commit 4208e6ae114ac8266dcacc9696a443ce5c37b04e: Merge tag 'pull-request-2022-12-15' of https://gitlab.com/thuth/qemu into staging (2022-12-15 21:39:56 +) are avail

Re: [PULL 0/1] loongarch-to-apply queue

2022-12-18 Thread Peter Maydell
On Thu, 15 Dec 2022 at 08:11, Song Gao wrote: > > The following changes since commit 5204b499a6cae4dfd9fe762d5e6e82224892383b: > > mailmap: Fix Stefan Weil author email (2022-12-13 15:56:57 -0500) > > are available in the Git repository at: > > https://gitlab.com/gaosong/qemu.git tags/pull-loo

Re: [PULL 00/21] Hexagon update: bug fixes, performance, idef-parser

2022-12-18 Thread Peter Maydell
On Sun, 18 Dec 2022 at 16:53, Richard Henderson wrote: > > On 12/18/22 05:52, Peter Maydell wrote: > > On Fri, 16 Dec 2022 at 20:49, Taylor Simpson wrote: > >> > >> The following changes since commit > >> 4208e6ae114ac8266dcacc9696a443ce5c37b04e: > >> > >>Merge tag 'pull-request-2022-12-15'

Re: [PATCH] thread-posix: add support for setting threads name on OpenBSD

2022-12-18 Thread Richard Henderson
On 12/18/22 00:22, Brad Smith wrote: Make use of pthread_set_name_np() to be able to set the threads name on OpenBSD. Signed-off-by: Brad Smith --- meson.build | 12 util/qemu-thread-posix.c | 9 - 2 files changed, 20 insertions(+), 1 deletion(-) Reviewed

[PATCH 00/11] audio: more improvements

2022-12-18 Thread Volker Rümelin
A few patches from my audio patch queue. Patches 1 - 2: If a guest selects an unsupported sample rate, an error message is currently shown. The first patch takes care to suppress the error message and reports with the qemu_log_mask(LOG_UNIMP, ...) function that this is not supported. The secon

[PATCH 01/11] audio: log unimplemented audio device sample rates

2022-12-18 Thread Volker Rümelin
Some emulated audio devices allow guests to select very low sample rates that the audio subsystem doesn't support. The lowest supported sample rate depends on the audio backend used and in most cases can be changed with various -audiodev arguments. Until now, the audio_bug function emits an error m

[PATCH 07/11] audio/audio_template: use g_malloc0() to replace audio_calloc()

2022-12-18 Thread Volker Rümelin
Use g_malloc0() as a direct replacement for audio_calloc(). Signed-off-by: Volker Rümelin --- audio/audio_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index d343a1dcb3..5f51ef26b2 100644 --- a/audio/audio_template.

[PATCH 05/11] audio/mixeng: use g_new0() instead of audio_calloc()

2022-12-18 Thread Volker Rümelin
Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument of 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Signed-off-by: Volker Rümelin --- audio/audio.c | 5 - audio/audio_template.h | 6 +- audio/mixeng.c | 7 +-- 3

[PATCH 06/11] audio/alsaaudio: use g_new0() instead of audio_calloc()

2022-12-18 Thread Volker Rümelin
Replace audio_calloc() with the equivalent g_new0(). The value of the g_new0() argument count is >= 1, which means g_new0() will never return NULL. Also remove the unnecessary NULL check. Signed-off-by: Volker Rümelin --- audio/alsaaudio.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions

[PATCH 04/11] audio: remove unused #define AUDIO_STRINGIFY

2022-12-18 Thread Volker Rümelin
Remove the unused #define AUDIO_STRINGIFY. It was last used before commit 470bcabd8f ("audio: Replace AUDIO_FUNC with __func__"). Signed-off-by: Volker Rümelin --- audio/audio_int.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/audio/audio_int.h b/audio/audio_int.h index e87ce014a0..4632

[PATCH 11/11] alsaaudio: reintroduce default recording settings

2022-12-18 Thread Volker Rümelin
Audio recording with ALSA default settings currently doesn't work. The debug log shows updates every 0.75s and 1.5s. audio: Elapsed since last alsa run (running): 0.743030 audio: Elapsed since last alsa run (running): 1.486048 audio: Elapsed since last alsa run (running): 0.743008 audio: Elapsed s

[PATCH 09/11] audio: remove audio_calloc() function

2022-12-18 Thread Volker Rümelin
Now that the last call site of audio_calloc() was removed, remove the unused audio_calloc() function. Signed-off-by: Volker Rümelin --- audio/audio.c | 20 audio/audio_int.h | 1 - 2 files changed, 21 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index ac5434

[PATCH 03/11] audio: rename hardware store to backend

2022-12-18 Thread Volker Rümelin
Use a consistent friendly name for the HWVoiceOut and HWVoiceIn structures. Signed-off-by: Volker Rümelin --- audio/audio_template.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index ee320a2e3f..ac744d3484 100644 --- a/a

[PATCH 02/11] audio: don't show unnecessary error messages

2022-12-18 Thread Volker Rümelin
Let the audio_pcm_create_voice_pair_* functions handle error reporting. This avoids an additional error message in case the guest selected an unimplemented sample rate. Signed-off-by: Volker Rümelin --- audio/audio_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/au

[PATCH 10/11] alsaaudio: change default playback settings

2022-12-18 Thread Volker Rümelin
The currently used default playback settings in the ALSA audio backend are a bit unfortunate. With a few emulated audio devices, audio playback does not work properly. Here is a short part of the debug log while audio is playing (elapsed time in seconds). audio: Elapsed since last alsa run (runnin

[PATCH 08/11] audio/audio_template: use g_new0() to replace audio_calloc()

2022-12-18 Thread Volker Rümelin
Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument >= 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Signed-off-by: Volker Rümelin --- audio/audio_template.h | 23 ++- 1 file changed, 6 insertions(+), 17 deletions(-) dif

Re: [PATCH 02/11] audio: don't show unnecessary error messages

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 18:15, Volker Rümelin wrote: Let the audio_pcm_create_voice_pair_* functions handle error reporting. This avoids an additional error message in case the guest selected an unimplemented sample rate. Signed-off-by: Volker Rümelin --- audio/audio_template.h | 2 +- 1 file changed, 1

Re: [PATCH v4 00/27] tcg misc patches

2022-12-18 Thread Richard Henderson
Ping. r~ On 12/13/22 13:25, Richard Henderson wrote: For v4, I've sorted some of the reviewed patches to the beginning of the queue and omitted them; this was not possible for all. This set begins with the first patch that is missing review. I've not tested this set separately, so in case it d

Re: [PATCH 06/11] audio/alsaaudio: use g_new0() instead of audio_calloc()

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 18:15, Volker Rümelin wrote: Replace audio_calloc() with the equivalent g_new0(). The value of the g_new0() argument count is >= 1, which means g_new0() will never return NULL. Also remove the unnecessary NULL check. Yes, since commit 7267c0947d (Sat Aug 20 22:09:37 2011)... Revie

Re: [PATCH 07/11] audio/audio_template: use g_malloc0() to replace audio_calloc()

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 18:15, Volker Rümelin wrote: Use g_malloc0() as a direct replacement for audio_calloc(). Signed-off-by: Volker Rümelin --- audio/audio_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index d343a1dcb3..

Re: [PATCH 09/11] audio: remove audio_calloc() function

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 18:15, Volker Rümelin wrote: Now that the last call site of audio_calloc() was removed, remove the unused audio_calloc() function. Signed-off-by: Volker Rümelin --- audio/audio.c | 20 audio/audio_int.h | 1 - 2 files changed, 21 deletions(-) Reviewed

Re: [PATCH 04/11] audio: remove unused #define AUDIO_STRINGIFY

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 18:15, Volker Rümelin wrote: Remove the unused #define AUDIO_STRINGIFY. It was last used before commit 470bcabd8f ("audio: Replace AUDIO_FUNC with __func__"). Signed-off-by: Volker Rümelin --- audio/audio_int.h | 3 --- 1 file changed, 3 deletions(-) Reviewed-by: Philippe Mathi

Re: [PATCH] accel/tcg/plugin: Fix op_rw

2022-12-18 Thread Richard Henderson
Ping. r~ On 11/21/22 12:39, Richard Henderson wrote: The value of op->args[2] is enum qemu_plugin_mem_rw, which is already 1-based. Adding 1 produces incorrect results for QEMU_PLUGIN_MEM_W and QEMU_PLUGIN_MEM_RW. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 5 + 1 fi

Re: [PATCH 07/11] audio/audio_template: use g_malloc0() to replace audio_calloc()

2022-12-18 Thread Volker Rümelin
Am 18.12.22 um 18:26 schrieb Philippe Mathieu-Daudé: On 18/12/22 18:15, Volker Rümelin wrote: Use g_malloc0() as a direct replacement for audio_calloc(). Signed-off-by: Volker Rümelin ---   audio/audio_template.h | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/audio_

[PULL 0/2] target sh4 and tricore patches

2022-12-18 Thread Richard Henderson
The following changes since commit 562d4af32ec2213061f844b3838223fd7711b56a: Merge tag 'pull-loongarch-20221215' of https://gitlab.com/gaosong/qemu into staging (2022-12-18 13:53:29 +) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-mis

[PULL 2/2] target/tricore: Fix gdbstub write to address registers

2022-12-18 Thread Richard Henderson
Typo had double-writes to data registers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1363 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/tricore/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/tricore/gdbstub.c b

[PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags

2022-12-18 Thread Richard Henderson
From: Guenter Roeck The values in env->flags are a subset of tb->flags. Restore only the bits that belong. Cc: qemu-sta...@nongnu.org Fixes: ab419fd8a035 ("target/sh4: Fix TB_FLAG_UNALIGN") Signed-off-by: Guenter Roeck Message-ID: <20221212011345.ga2235...@roeck-us.net> [rth: Reduce to only the

Re: [RFC PATCH 0/1] QEMU: Dirty quota-based throttling of vcpus

2022-12-18 Thread Shivam Kumar
On 06/12/22 10:59 pm, Hyman Huang wrote: 在 2022/12/7 0:00, Peter Xu 写道: Hi, Shivam, On Tue, Dec 06, 2022 at 11:18:52AM +0530, Shivam Kumar wrote: [...] Note -- -- We understand that there is a good scope of improvement in the current implementation. Here is a list of th

Re: [PATCH] accel/tcg/plugin: Fix op_rw

2022-12-18 Thread Alex Bennée
Richard Henderson writes: > The value of op->args[2] is enum qemu_plugin_mem_rw, which > is already 1-based. Adding 1 produces incorrect results > for QEMU_PLUGIN_MEM_W and QEMU_PLUGIN_MEM_RW. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech

Re: [PATCH] target/i386/gdbstub: Fix a bug about order of FPU stack in 'g' packets.

2022-12-18 Thread Richard Henderson
On 12/8/22 04:30, TaiseiIto wrote: Before this commit, when GDB attached an OS working on QEMU, order of FPU stack registers printed by GDB command 'info float' was wrong. There was a bug causing the problem in 'g' packets sent by QEMU to GDB. The packets have values of registers of machine emula

Re: [PATCH 07/11] audio/audio_template: use g_malloc0() to replace audio_calloc()

2022-12-18 Thread Christian Schoenebeck
On Sunday, December 18, 2022 6:39:00 PM CET Volker Rümelin wrote: > Am 18.12.22 um 18:26 schrieb Philippe Mathieu-Daudé: > > On 18/12/22 18:15, Volker Rümelin wrote: > >> Use g_malloc0() as a direct replacement for audio_calloc(). > >> > >> Signed-off-by: Volker Rümelin > >> --- > >> audio/audio

Re: [PATCH 01/11] audio: log unimplemented audio device sample rates

2022-12-18 Thread Christian Schoenebeck
On Sunday, December 18, 2022 6:15:29 PM CET Volker Rümelin wrote: > Some emulated audio devices allow guests to select very low > sample rates that the audio subsystem doesn't support. The lowest > supported sample rate depends on the audio backend used and in > most cases can be changed with vario

Re: [PATCH 07/11] audio/audio_template: use g_malloc0() to replace audio_calloc()

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 21:05, Christian Schoenebeck wrote: On Sunday, December 18, 2022 6:39:00 PM CET Volker Rümelin wrote: Am 18.12.22 um 18:26 schrieb Philippe Mathieu-Daudé: On 18/12/22 18:15, Volker Rümelin wrote: Use g_malloc0() as a direct replacement for audio_calloc(). Signed-off-by: Volker Rüm

Re: [PATCH 06/11] audio/alsaaudio: use g_new0() instead of audio_calloc()

2022-12-18 Thread Richard Henderson
On 12/18/22 09:15, Volker Rümelin wrote: Replace audio_calloc() with the equivalent g_new0(). The value of the g_new0() argument count is >= 1, which means g_new0() will never return NULL. Also remove the unnecessary NULL check. Signed-off-by: Volker Rümelin --- audio/alsaaudio.c | 6 +-

Re: [PATCH 05/11] audio/mixeng: use g_new0() instead of audio_calloc()

2022-12-18 Thread Richard Henderson
On 12/18/22 09:15, Volker Rümelin wrote: Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument of 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Signed-off-by: Volker Rümelin --- audio/audio.c | 5 - audio/audio_template.h | 6 +

Re: [PATCH 08/11] audio/audio_template: use g_new0() to replace audio_calloc()

2022-12-18 Thread Richard Henderson
On 12/18/22 09:15, Volker Rümelin wrote: Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument >= 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Signed-off-by: Volker Rümelin --- audio/audio_template.h | 23 ++- 1 file ch

Re: [PATCH v4 20/27] tcg: Vary the allocation size for TCGOp

2022-12-18 Thread Philippe Mathieu-Daudé
Splitting this patch in 2 to ease review. Philippe Mathieu-Daudé (1): tcg: Pass number of arguments to tcg_emit_op() / tcg_op_insert_*() Richard Henderson (1): tcg: Vary the allocation size for TCGOp accel/tcg/plugin-gen.c | 11 --- include/exec/helper-head.h | 2 -- include/tcg/tc

[PATCH v2 3/7] hw/i2c: Allwinner TWI/I2C Emulation

2022-12-18 Thread Strahinja Jankovic
This patch implements Allwinner TWI/I2C controller emulation. Only master-mode functionality is implemented. The SPL boot for Cubieboard expects AXP209 PMIC on TWI0/I2C0 bus, so this is first part enabling the TWI/I2C bus operation. Since both Allwinner A10 and H3 use the same module, it is added

[PATCH v4 20a/27] tcg: Pass number of arguments to tcg_emit_op() / tcg_op_insert_*()

2022-12-18 Thread Philippe Mathieu-Daudé
In order to have variable size allocated TCGOp, pass the number of arguments we use (and would allocate) up to tcg_op_alloc(). This alters tcg_emit_op(), tcg_op_insert_before() and tcg_op_insert_after() prototypes. In tcg_op_alloc() ensure the number of arguments is in range. Signed-off-by: Rich

[PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-18 Thread Strahinja Jankovic
This patch series adds missing Allwinner A10 modules needed for successful SPL boot: - Clock controller module - DRAM controller - I2C0 controller (added also for Allwinner H3 since it is the same) - AXP-209 connected to I2C0 bus It also updates Allwinner A10 emulation so SPL is copied from attach

[PATCH v2 2/7] hw/misc: Allwinner A10 DRAM Controller Emulation

2022-12-18 Thread Strahinja Jankovic
During SPL boot several DRAM Controller registers are used. Most important registers are those related to DRAM initialization and calibration, where SPL initiates process and waits until certain bit is set/cleared. This patch adds these registers, initializes reset values from user's guide and upd

[PATCH v2 7/7] docs/system/arm: Update Allwinner with TWI (I2C)

2022-12-18 Thread Strahinja Jankovic
TWI (I2C) is supported so docs are updated for Cubieboard and Orangepi-PC board. Signed-off-by: Strahinja Jankovic --- docs/system/arm/cubieboard.rst | 1 + docs/system/arm/orangepi.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/system/arm/cubieboard.rst b/docs/system/arm/cubie

[PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
This patch adds minimal support for AXP-209 PMU. Most important is chip ID since U-Boot SPL expects version 0x1. Besides the chip ID register, reset values for two more registers used by A10 U-Boot SPL are covered. Signed-off-by: Strahinja Jankovic --- hw/arm/Kconfig | 1 + hw/mis

[PATCH v2 1/7] hw/misc: Allwinner-A10 Clock Controller Module Emulation

2022-12-18 Thread Strahinja Jankovic
During SPL boot several Clock Controller Module (CCM) registers are read, most important are PLL and Tuning, as well as divisor registers. This patch adds these registers and initializes reset values from user's guide. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- hw/arm/

[PATCH v4 20b/27] tcg: Vary the allocation size for TCGOp

2022-12-18 Thread Philippe Mathieu-Daudé
From: Richard Henderson We have been allocating a worst case number of arguments to support calls. Instead, allow the size to vary. By default leave space for 4 args, to maximize reuse, but allow calls to increase the number of args to 32. Signed-off-by: Richard Henderson [PMD: Split patch in

[PATCH v2 5/7] hw/arm: Add AXP-209 to Cubieboard

2022-12-18 Thread Strahinja Jankovic
SPL Boot for Cubieboard expects AXP-209 connected to I2C0 bus. Signed-off-by: Strahinja Jankovic --- hw/arm/cubieboard.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 5e3372a3c7..afc7980414 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/

[PATCH v2 6/7] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-18 Thread Strahinja Jankovic
This patch enables copying of SPL from MMC if `-kernel` parameter is not passed when starting QEMU. SPL is copied to SRAM_A. The approach is reused from Allwinner H3 implementation. Tested with Armbian and custom Yocto image. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank ---

Re: [PATCH v4 26/27] tcg/aarch64: Merge tcg_out_callr into tcg_out_call

2022-12-18 Thread Philippe Mathieu-Daudé
On 13/12/22 22:25, Richard Henderson wrote: There is only one use, and BLR is perhaps even more self-documentary than CALLR. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 17/27] accel/tcg/plugin: Don't search for the function pointer index

2022-12-18 Thread Philippe Mathieu-Daudé
On 13/12/22 22:25, Richard Henderson wrote: The function pointer is immediately after the output and input operands; no need to search. Signed-off-by: Richard Henderson --- Cc: Alex Bennée --- accel/tcg/plugin-gen.c | 29 +++-- 1 file changed, 11 insertions(+), 18 de

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
I forgot to add Philippe Mathieu-Daudé in CC for this patch, so I'm fixing it now. Best regards, Strahinja Jankovic On Sun, Dec 18, 2022 at 10:19 PM Strahinja Jankovic wrote: > > This patch adds minimal support for AXP-209 PMU. > Most important is chip ID since U-Boot SPL expects version 0x1. Be

Re: [PATCH v4 06/27] target/sparc: Avoid TCGV_{LOW,HIGH}

2022-12-18 Thread Philippe Mathieu-Daudé
On 13/12/22 22:25, Richard Henderson wrote: Use the official extend/extract functions instead of routines that will shortly be internal to tcg. Cc: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 21 - 1 file changed, 4 insertions(+), 17

Re: [PATCH v4 09/27] tcg: Simplify calls to temp_sync vs mem_coherent

2022-12-18 Thread Philippe Mathieu-Daudé
On 13/12/22 22:25, Richard Henderson wrote: The first thing that temp_sync does is check mem_coherent, so there's no need for the caller to do so. Signed-off-by: Richard Henderson --- tcg/tcg.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Philippe Mathieu-Daud

Re: [PATCH v4 20a/27] tcg: Pass number of arguments to tcg_emit_op() / tcg_op_insert_*()

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 22:18, Philippe Mathieu-Daudé wrote: In order to have variable size allocated TCGOp, pass the number of arguments we use (and would allocate) up to tcg_op_alloc(). This alters tcg_emit_op(), tcg_op_insert_before() and tcg_op_insert_after() prototypes. In tcg_op_alloc() ensure the nu

Re: [PATCH v4 20b/27] tcg: Vary the allocation size for TCGOp

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 22:18, Philippe Mathieu-Daudé wrote: From: Richard Henderson We have been allocating a worst case number of arguments to support calls. Instead, allow the size to vary. By default leave space for 4 args, to maximize reuse, but allow calls to increase the number of args to 32. Sign

Re: [PATCH v2 5/7] hw/arm: Add AXP-209 to Cubieboard

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 22:19, Strahinja Jankovic wrote: SPL Boot for Cubieboard expects AXP-209 connected to I2C0 bus. Signed-off-by: Strahinja Jankovic --- hw/arm/cubieboard.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index 5e3372a3c7..afc79804

Re: [PATCH v2 6/7] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 22:19, Strahinja Jankovic wrote: This patch enables copying of SPL from MMC if `-kernel` parameter is not passed when starting QEMU. SPL is copied to SRAM_A. The approach is reused from Allwinner H3 implementation. Tested with Armbian and custom Yocto image. Signed-off-by: Strahinj

Re: [PATCH v2 7/7] docs/system/arm: Update Allwinner with TWI (I2C)

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 22:19, Strahinja Jankovic wrote: TWI (I2C) is supported so docs are updated for Cubieboard and Orangepi-PC board. Signed-off-by: Strahinja Jankovic --- docs/system/arm/cubieboard.rst | 1 + docs/system/arm/orangepi.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/docs

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 22:19, Strahinja Jankovic wrote: This patch adds minimal support for AXP-209 PMU. Most important is chip ID since U-Boot SPL expects version 0x1. Besides the chip ID register, reset values for two more registers used by A10 U-Boot SPL are covered. Signed-off-by: Strahinja Jankovic -

[PATCH v2] contrib/vhost-user-blk: Replace lseek64 with lseek

2022-12-18 Thread Khem Raj
64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 already. Using lseek/off_t also makes it work with latest musl without using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE when using glibc but not with musl. Signed-off-by: Khem Raj Cc: Michael S. Tsirkin CC

Re: [PATCH v2 7/7] docs/system/arm: Update Allwinner with TWI (I2C)

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:02 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > TWI (I2C) is supported so docs are updated for Cubieboard and > > Orangepi-PC board. > > > > Signed-off-by: Strahinja Jankovic > > --- > > docs/system/arm/cubieboard.rst | 1

Re: [PATCH v2] contrib/vhost-user-blk: Replace lseek64 with lseek

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 23:07, Khem Raj wrote: 64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 already. Using lseek/off_t also makes it work with latest musl without using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE when using glibc but not with musl. Signed-off-by:

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:07 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > This patch adds minimal support for AXP-209 PMU. > > Most important is chip ID since U-Boot SPL expects version 0x1. Besides > > the chip ID register, reset values for two more

Re: [PATCH v2 6/7] hw/arm: Allwinner A10 enable SPL load from MMC

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 10:59 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > This patch enables copying of SPL from MMC if `-kernel` parameter is not > > passed when starting QEMU. SPL is copied to SRAM_A. > > > > The approach is reused from Allwinner H3

Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 22:19, Strahinja Jankovic wrote: This patch series adds missing Allwinner A10 modules needed for successful SPL boot: - Clock controller module - DRAM controller - I2C0 controller (added also for Allwinner H3 since it is the same) - AXP-209 connected to I2C0 bus It also updates Allwi

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Philippe Mathieu-Daudé
On 18/12/22 23:12, Strahinja Jankovic wrote: Hi, On Sun, Dec 18, 2022 at 11:07 PM Philippe Mathieu-Daudé wrote: On 18/12/22 22:19, Strahinja Jankovic wrote: This patch adds minimal support for AXP-209 PMU. Most important is chip ID since U-Boot SPL expects version 0x1. Besides the chip ID re

Re: [PATCH v2] contrib/vhost-user-blk: Replace lseek64 with lseek

2022-12-18 Thread Raphael Norwitz
> On Dec 19, 2022, at 12:07 AM, Khem Raj wrote: > > 64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 > already. Using lseek/off_t also makes it work with latest musl without > using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE > when using glibc but not

Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:17 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 22:19, Strahinja Jankovic wrote: > > This patch series adds missing Allwinner A10 modules needed for > > successful SPL boot: > > - Clock controller module > > - DRAM controller > > - I2C0 controller (added also f

Re: [PATCH v2 4/7] hw/misc: Allwinner AXP-209 Emulation

2022-12-18 Thread Strahinja Jankovic
Hi, On Sun, Dec 18, 2022 at 11:23 PM Philippe Mathieu-Daudé wrote: > > On 18/12/22 23:12, Strahinja Jankovic wrote: > > Hi, > > > > On Sun, Dec 18, 2022 at 11:07 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 18/12/22 22:19, Strahinja Jankovic wrote: > >>> This patch adds minimal support for

Re: [PATCH v4 20b/27] tcg: Vary the allocation size for TCGOp

2022-12-18 Thread Richard Henderson
On 12/18/22 13:49, Philippe Mathieu-Daudé wrote: + found:   memset(op, 0, offsetof(TCGOp, link));   op->opc = opc; -    s->nb_ops++; +    op->nargs = nargs; We can move this assignation before the 'found' label. No, affected by the memset. r~

Re: [PATCH v2 0/7] Enable Cubieboard A10 boot SPL from SD card

2022-12-18 Thread Strahinja Jankovic
Hi, I just looked around a bit more. Would OpenWrt image be acceptable? It looks like there are releases for cubieboard that are kept for a longer time, and I just checked that they work properly, so I could add them to the acceptance test. Best regards, Strahinja On Sun, Dec 18, 2022 at 11:34 P

Re: [PATCH] virtio-mem: Fix the bitmap index of the section offset

2022-12-18 Thread Chenyi Qiang
On 12/16/2022 6:30 PM, David Hildenbrand wrote: > On 16.12.22 09:52, David Hildenbrand wrote: >> On 16.12.22 07:22, Chenyi Qiang wrote: >>> vmem->bitmap indexes the memory region of the virtio-mem backend at a >>> granularity of block_size. To calculate the index of target section >>> offset, >>

[PULL 01/45] target/riscv: Fix PMP propagation for tlb

2022-12-18 Thread Alistair Francis
From: LIU Zhiwei Only the pmp index that be checked by pmp_hart_has_privs can be used by pmp_get_tlb_size to avoid an error pmp index. Before modification, we may use an error pmp index. For example, we check address 0x4fc, and the size 0x4 in pmp_hart_has_privs. If there is an pmp rule, valid r

[PULL 12/45] target/riscv: Add itrigger support when icount is not enabled

2022-12-18 Thread Alistair Francis
From: LIU Zhiwei When icount is not enabled, there is no API in QEMU that can get the guest instruction number. Translate the guest code in a way that each TB only has one instruction. After executing the instruction, decrease the count by 1 until it reaches 0 where the itrigger fires. Note tha

[PULL 02/45] hw/registerfields: add `FIELDx_1CLEAR()` macro

2022-12-18 Thread Alistair Francis
From: Wilfred Mallawa Adds a helper macro that implements the register `w1c` functionality. Ex: uint32_t data = FIELD32_1CLEAR(val, REG, FIELD); If ANY bits of the specified `FIELD` is set then the respective field is cleared and returned to `data`. If the field is cleared (0), then no chang

[PULL 09/45] target/riscv: Add smstateen support

2022-12-18 Thread Alistair Francis
From: Mayuresh Chitale Smstateen extension specifies a mechanism to close the potential covert channels that could cause security issues. This patch adds the CSRs defined in the specification and the corresponding predicates and read/write functions. Signed-off-by: Mayuresh Chitale Reviewed-by

[PULL 05/45] tcg/riscv: Fix reg overlap case in tcg_out_addsub2

2022-12-18 Thread Alistair Francis
From: Richard Henderson There was a typo using opc_addi instead of opc_add with the two registers. While we're at it, simplify the gating test to al == bl to improve dynamic scheduling even when the output register does not overlap the inputs. Reported-by: LIU Zhiwei Signed-off-by: Richard Hen

  1   2   >