[Bug 1835694] Re: hardware-based time keeping

2021-04-23 Thread Abdulla
not resolved ** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1835694 Title: hardware-based time keeping Status in QEMU: New Bug description:

Re: Resetting non-qdev children in a 3-phase reset device

2021-04-23 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 4/24/21 1:06 AM, Philippe Mathieu-Daudé wrote: > >> Looking at qemu_register_reset() uses I found this commit: >> >> commit 0c7322cfd3fd382c0096c2a9f00775818a878e13 >> Date: Mon Jun 29 08:21:10 2015 +0200 >> >> watchdog/diag288: correctly register for

Re: [PATCH 03/11] block/block-gen.h: bind monitor

2021-04-23 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > If we have current monitor, let's bind it to wrapper coroutine too. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/block-gen.h | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/block/block-gen.h b/block/block-gen.h >

[PATCH v3 10/10] target/riscv: Fix the RV64H decode comment

2021-04-23 Thread Alistair Francis
BugLink: https://gitlab.com/qemu-project/qemu/-/issues/6 Signed-off-by: Alistair Francis --- target/riscv/insn32.decode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/insn32.decode b/target/riscv/insn32.decode index fecf0f15d5..8901ba1e1b 100644 ---

[PATCH v3 09/10] target/riscv: Consolidate RV32/64 16-bit instructions

2021-04-23 Thread Alistair Francis
This patch removes the insn16-32.decode and insn16-64.decode decode files and consolidates the instructions into the general RISC-V insn16.decode decode tree. This means that all of the instructions are avaliable in both the 32-bit and 64-bit builds. This also means that we run a check to ensure

[PATCH v3 07/10] target/riscv: Remove an unused CASE_OP_32_64 macro

2021-04-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng --- target/riscv/translate.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index a596f80f20..a1f794ffda 100644 --- a/target/riscv/translate.c +++

[PATCH v3 08/10] target/riscv: Consolidate RV32/64 32-bit instructions

2021-04-23 Thread Alistair Francis
This patch removes the insn32-64.decode decode file and consolidates the instructions into the general RISC-V insn32.decode decode tree. This means that all of the instructions are avaliable in both the 32-bit and 64-bit builds. This also means that we run a check to ensure we are running a

[PATCH v3 06/10] target/riscv: Remove the unused HSTATUS_WPRI macro

2021-04-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng --- target/riscv/cpu_bits.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index d98f3bc8bc..52640e6856 100644 --- a/target/riscv/cpu_bits.h +++

[PATCH v3 05/10] target/riscv: Remove the hardcoded SATP_MODE macro

2021-04-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/cpu_bits.h | 11 --- target/riscv/cpu_helper.c | 32 target/riscv/csr.c| 19 +++ target/riscv/monitor.c| 22 +- 4 files

[PATCH v3 04/10] target/riscv: Remove the hardcoded MSTATUS_SD macro

2021-04-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson --- target/riscv/cpu_bits.h | 10 -- target/riscv/csr.c | 12 ++-- target/riscv/translate.c | 19 +-- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/target/riscv/cpu_bits.h

[PATCH v3 03/10] target/riscv: Remove the hardcoded HGATP_MODE macro

2021-04-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng --- target/riscv/cpu_bits.h | 11 --- target/riscv/cpu_helper.c | 24 +++- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/target/riscv/cpu_bits.h

[PATCH v3 02/10] target/riscv: Remove the hardcoded SSTATUS_SD macro

2021-04-23 Thread Alistair Francis
This also ensures that the SD bit is not writable. Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng --- target/riscv/cpu_bits.h | 6 -- target/riscv/csr.c | 9 - 2 files changed, 8 insertions(+), 7 deletions(-) diff --git

[PATCH v3 01/10] target/riscv: Remove the hardcoded RVXLEN macro

2021-04-23 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Richard Henderson Reviewed-by: Bin Meng --- target/riscv/cpu.h | 6 -- target/riscv/cpu.c | 6 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index add734bbbd..7e879fb9ca 100644 ---

[PATCH v3 00/10] RISC-V: Steps towards running 32-bit guests on

2021-04-23 Thread Alistair Francis
This is another step towards running 32-bit CPU code on the 64-bit softmmu builds for RISC-V. I have tested this and am able to run some 32-bit code, but eventually hit some issue. This series doesn't allow users to use 32-bit CPUs with 64-bit softmmu builds as it doesn't work yet. This series

Re: [PULL 21/24] bsd-user: add arm target_signal.h

2021-04-23 Thread Warner Losh
On Fri, Apr 23, 2021 at 5:19 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 4/23/21 1:39 PM, i...@bsdimp.com wrote: > > +static inline abi_ulong get_sp_from_cpustate(CPUARMState *state) > > +{ > > +return state->regs[R_ESP]; > > +} > > Shall we just wait until arm actually

Re: [PULL 10/24] bsd-user: style tweak: use C not C++ comments

2021-04-23 Thread Warner Losh
On Fri, Apr 23, 2021 at 5:06 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 4/23/21 1:39 PM, i...@bsdimp.com wrote: > > From: Warner Losh > > > > Signed-off-by: Warner Losh > > --- > > bsd-user/qemu.h | 10 ++ > > 1 file changed, 6 insertions(+), 4 deletions(-) > >

Re: [RFC PATCH 0/4] target/ppc: code motion to compile translate_init

2021-04-23 Thread Richard Henderson
On 4/23/21 12:18 PM, Bruno Larsen (billionai) wrote: The current patch series aims to isolate common code from translation-related code. This isolation is required to disable TCG at build time, and the final system still work. This patch series is still WIP, so comments are welcome Bruno

[PATCH 2/2] hw/rtc/mc146818rtc: Qdev'ify reset()

2021-04-23 Thread Philippe Mathieu-Daudé
TYPE_MC146818_RTC is an ISA device, so its DeviceClass::reset() handler is called automatically when its qbus parent is reset. We have 2 reset() methods: a generic one and the qdev one. Merge them into the qdev reset handler, rename it, and remove the qemu_register_reset() call. Signed-off-by:

[PATCH 1/2] hw/timer/etraxfs_timer: Qdev'ify reset()

2021-04-23 Thread Philippe Mathieu-Daudé
TYPE_ETRAX_FS_TIMER is a sysbus device, so its DeviceClass::reset() handler is called automatically when its qbus parent is reset. Convert the generic reset to a qdev one, and remove the qemu_register_reset() call. Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/etraxfs_timer.c | 6 +++--- 1

[PATCH 0/2] hw: Qdev'ify reset() for mc146818rtc & etraxfs_timer

2021-04-23 Thread Philippe Mathieu-Daudé
Remove qemu_register_reset() when a qdev type has a qbus parent. Philippe Mathieu-Daudé (2): hw/timer/etraxfs_timer: Qdev'ify reset() hw/rtc/mc146818rtc: Qdev'ify reset() hw/rtc/mc146818rtc.c | 35 +++ hw/timer/etraxfs_timer.c | 6 +++--- 2 files

Re: [PULL 17/24] bsd-user: move extern to header file

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh extern char **environ has no standard home, so move the declaration from the .c file to a handy .h file. Since this is a standard, old-school UNIX interface dating from the 5th edition, it's not quite the same issue that the rule is

Re: Resetting non-qdev children in a 3-phase reset device

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/24/21 1:06 AM, Philippe Mathieu-Daudé wrote: > On 4/22/21 4:20 PM, Philippe Mathieu-Daudé wrote: >> On 4/22/21 3:21 PM, Markus Armbruster wrote: >>> Peter Maydell writes: > >>> Most qdevs plug into a qbus, but some don't. >>> >>> DeviceClass member @bus_type names the kind of bus the device

Re: [PULL 24/24] bsd-user: move sparc cpu_loop into target_arch_cpu.h as target_cpu_loop

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Move the sparc cpu_loop out of main.c and into target_arch_cpu.h and rename it from cpu_loop to target_cpu_loop. Remove the #ifdef around the catch-all cpu_loop. Signed-off-by: Stacey Son Signed-off-by: Warner Losh ---

Re: [PULL 23/24] bsd-user: move x86 (i386 and x86_64) cpu_loop to target_arch_cpu.h

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Move the x86 version of the cpu_loop to target_arch_cpu.h as target_cpu_loop. Create a cpu_loop that calls the target_cpu_loop function, but only for x86 for now. This is code-movement only commit. Signed-off-by: Stacey Son

Re: [PULL 22/24] bsd-user: create target_arch_cpu.h

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Create target_arch_cpu.h to house the target_cpu_loop and target_cpu_init functions. These are the empty files that will be populated by moving the appropriate cpu-specific functions out of main.c. This work pre-dates the linux-user

Re: [PULL 21/24] bsd-user: add arm target_signal.h

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: +static inline abi_ulong get_sp_from_cpustate(CPUARMState *state) +{ +return state->regs[R_ESP]; +} Shall we just wait until arm actually compiles? This won't, being a copy from x86... r~

Re: [PULL 20/24] bsd-user: introduce host_os.h for bsd-specific code and defaults

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Introduce host_os.h for frebsd, netbsd and openbsd. This sets the default bsd being implemented today. In the future it will have code that is per-BSD specific. Abstracted from a larger c93465b6208c4c95cc0a394ffef4180ba6ccf27a in the

Re: [PULL 18/24] bsd-user: style changes for {}

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Fix various issues with {} not being present on if / for / case statements. Tweak indentation where needed to appease checkpatch after this. Minor line length tweaks Signed-off-by: Warner Losh --- bsd-user/main.c | 100

Re: [PULL 16/24] bsd-user: Use preferred block comments

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Use the preferred block comment style. Signed-off-by: Warner Losh --- bsd-user/main.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) Reviewed-by: Richard Henderson r~

Re: Resetting non-qdev children in a 3-phase reset device

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/22/21 4:20 PM, Philippe Mathieu-Daudé wrote: > On 4/22/21 3:21 PM, Markus Armbruster wrote: >> Peter Maydell writes: >> Most qdevs plug into a qbus, but some don't. >> >> DeviceClass member @bus_type names the kind of bus the device plugs >> into. It's a QOM type name. Example: for a PCI

Re: [PULL 08/24] bsd-user: style tweak: use C not C++ comments

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/elfload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PULL 10/24] bsd-user: style tweak: use C not C++ comments

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index b836b603af..3480db890d 100644 --- a/bsd-user/qemu.h +++

Re: [PULL 15/24] bsd-user: Fix commentary issues

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Lines > 80 or 90 characters C++ comments BSD /*- block comment convention removed. Signed-off-by: Warner Losh --- bsd-user/bsd-mman.h | 42 ++ 1 file changed, 26 insertions(+), 16

Re: [PULL 09/24] bsd-user: style tweak: use C not C++ comments

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/main.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PULL 03/24] bsd-user: whitespace changes

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Space after keywords, no space for function calls and spaces around operators. Signed-off-by: Warner Losh --- bsd-user/main.c | 40 1 file changed, 20 insertions(+), 20 deletions(-)

Re: [PULL 07/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/uaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PULL 06/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PULL 02/24] bsd-user: whitespace changes

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Fix various whitespace-only issues from checkpatch: keyword space ( no space before ( on function calls spaces around operators suspect indentations (including one functions reindented) extra spaces around

Re: [PULL 05/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PULL 04/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/mmap.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PULL 01/24] bsd-user: whitespace changes

2021-04-23 Thread Richard Henderson
On 4/23/21 1:39 PM, i...@bsdimp.com wrote: From: Warner Losh keyword space paren, no space before ( in function calls, spaces around operators. Signed-off-by: Warner Losh --- bsd-user/bsdload.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) Reviewed-by:

Re: [PULL 11/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread Richard Henderson
On 4/23/21 3:08 PM, Philippe Mathieu-Daudé wrote: On 4/23/21 11:38 PM, Warner Losh wrote: On Fri, Apr 23, 2021 at 3:23 PM Philippe Mathieu-Daudé mailto:f4...@amsat.org>> wrote: On 4/23/21 10:39 PM, i...@bsdimp.com wrote: > From: Warner Losh

Re: [PATCH] target/mips: Migrate missing CPU fields

2021-04-23 Thread Richard Henderson
On 4/23/21 3:00 PM, Philippe Mathieu-Daudé wrote: Add various missing fields to the CPU migration vmstate: - CP0_VPControl & CP0_GlobalNumber (01bc435b44b 2016-02-03) - CMGCRBase (c870e3f52ca 2016-03-15) - CP0_ErrCtl(0d74a222c27

Re: [PATCH v1 11/25] tests/tcg: Add docker_as and docker_ld cmds

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/19/21 4:54 PM, Alex Bennée wrote: > From: Bastian Koppelmann > > At least for the TriCore target no easily available c compiler exists. > Thus we need to rely on "as" and "ld". This allows us to run them > through the docker image. We don't test the generation capabilities of > docker

Re: [PATCH v1 10/25] tests/docker: Added libbpf library to the docker files.

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/19/21 4:54 PM, Alex Bennée wrote: > From: Andrew Melnychenko > > The series of patches for eBPF RSS adds libbpf dependency for qemu. > https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg08887.html > > With this patch, libbpf added: > Alpine - added libbpf-dev > Centos 8 - added

Re: [PATCH v1 06/25] docker: Add Hexagon image

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/19/21 4:54 PM, Alex Bennée wrote: > From: Alessandro Di Federico > > This image is a little special because it takes a long time to build. > As such most users don't want to be doing that and just pull random > binaries from the ether as intended by the container gods. This > involves

Re: [PATCH v1 07/25] tests/tcg: Use Hexagon Docker image

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/19/21 4:54 PM, Alex Bennée wrote: > From: Alessandro Di Federico > > [PMD: Split from 'Add Hexagon Docker image' patch] > > Signed-off-by: Alessandro Di Federico > Signed-off-by: Philippe Mathieu-Daudé > Signed-off-by: Alex Bennée > Message-Id: <20210228222314.304787-5-f4...@amsat.org>

Re: [PATCH v1 08/25] gitlab: add build-user-hexagon test

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/19/21 4:54 PM, Alex Bennée wrote: > We special case this as the container with the cross compiler for the > tests takes so long to build it is manually uploaded into the > registry. > > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Wainer dos Santos

Re: [PULL 11/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/23/21 11:38 PM, Warner Losh wrote: > On Fri, Apr 23, 2021 at 3:23 PM Philippe Mathieu-Daudé > wrote: > > On 4/23/21 10:39 PM, i...@bsdimp.com wrote: > > From: Warner Losh mailto:i...@bsdimp.com>> > > > > Signed-off-by: Warner

Re: [RFC PATCH 2/4] hw/ppc: Add kvm-only file spapr_hcall_tcg_stub.c

2021-04-23 Thread Fabiano Rosas
"Lucas Mateus Castro (alqotel)" writes: > This file should be used instead of spapr_hcall.c when compiling > without tcg (--disable-tcg) as it does not call tcg-only functions and > trips fatal error when invalid functions are called Not calling any TCG-specific function is not an indication of

[PATCH] target/mips: Migrate missing CPU fields

2021-04-23 Thread Philippe Mathieu-Daudé
Add various missing fields to the CPU migration vmstate: - CP0_VPControl & CP0_GlobalNumber (01bc435b44b 2016-02-03) - CMGCRBase (c870e3f52ca 2016-03-15) - CP0_ErrCtl(0d74a222c27 2016-03-25) - MXU GPR[] & CR

[PATCH 08/11] qemu-io-cmds: refactor read_f(): drop extra helpers and variables

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
Now all commands are in coroutines, so we want to move to _co_ functions. Let's just drop helpers and use blk_co_ functions directly. Note that count is checked at start of read_f anyway. Both blk_co_pread and blk_co_load_vmstate returns 0 on success, so we should not care to set ret to 0

[PATCH 06/11] block: drop unused bdrv_debug_is_suspended()

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
Now it's actually substituted by coroutine based bdrv_debug_wait_break(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 1 - include/block/block_int.h | 1 - block.c | 13 - block/blkdebug.c | 1 - 4 files changed, 16

[PATCH 10/11] qemu-io-cmds: drop do_co_readv() and do_co_writev() helpers

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
They don't make much sense. Call blk_co_ functions directly and also drop some redundant variables. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qemu-io-cmds.c | 38 ++ 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/qemu-io-cmds.c

[PATCH 02/11] block-coroutine-wrapper: support BlockBackend first argument

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
We'll need to wrap functions with first argument of BlockBackend * type. For this let's generalize core function and struct to work with pure AioContext. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-gen.h | 12 ++-- scripts/block-coroutine-wrapper.py | 23

[PATCH 05/11] qemu-io-cmds: move qemu-io commands to coroutine

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
Move qemuio_command to coroutine with all qemu io commands to simplify the code and avoid extra explicit polling loops. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu-io.h | 9 +++- qemu-io-cmds.c| 110 ++ block/meson.build | 3

[PATCH 11/11] block-backend: drop unused blk_save_vmstate() and blk_load_vmstate()

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 3 --- block/block-backend.c | 30 -- 2 files changed, 33 deletions(-) diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 8676bbde5a..14cc410244

[PATCH 09/11] qemu-io-cmds: refactor write_f(): drop extra helpers and variables

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
We are in coroutine context. Let's call blk_co_ functions directly and drop all these helpers. Note that count is checked earlier in write_f, so we don't need the check in helpers. Also, both blk_co_save_vmstate() and blk_co_pwrite() return 0 on success, so we should not care to set ret to 0

[PATCH 01/11] block-coroutine-wrapper: allow non bdrv_ prefix

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
We are going to reuse the script to generate a qcow2_ function in further commit. Prepare the script now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/block-coroutine-wrapper.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 04/11] block: introduce bdrv_debug_wait_break

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
Add a handler to wait for the break to happen in coroutine context. It will be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 1 + include/block/block_int.h | 1 + block.c | 11 +++ block/blkdebug.c | 16

[PATCH 07/11] block-backend: add _co_ versions of blk_save_vmstate / blk_load_vmstate

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
To be used in further commit. Don't worry about some duplication with existing blk_save_vmstate() and blk_load_vmstate(): they will be removed soon. Note the difference: new functions returns 0 on success. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 3 +++

[PATCH 03/11] block/block-gen.h: bind monitor

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
If we have current monitor, let's bind it to wrapper coroutine too. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-gen.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/block-gen.h b/block/block-gen.h index c1fd3f40de..61f055a8cc 100644 --- a/block/block-gen.h

[PATCH 00/11] qemu-io-cmds: move to coroutine

2021-04-23 Thread Vladimir Sementsov-Ogievskiy
Hi! I've done this by accident. I decided that it is needed to make a nice fix for a problem with aio context locking in hmp_qemu_io(). Still, the problem is fixed without this series, so it's based on on the fix instead of being preparation for it: Based-on:

Re: [PULL 11/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread Warner Losh
On Fri, Apr 23, 2021 at 3:23 PM Philippe Mathieu-Daudé wrote: > On 4/23/21 10:39 PM, i...@bsdimp.com wrote: > > From: Warner Losh > > > > Signed-off-by: Warner Losh > > --- > > bsd-user/elfload.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git

Re: constant_tsc support for SVM guest

2021-04-23 Thread Eduardo Habkost
On Fri, Apr 23, 2021 at 12:32:00AM -0500, Wei Huang wrote: > There was a customer request for const_tsc support on AMD guests. Right now > this feature is turned off by default for QEMU x86 CPU types (in > CPUID_Fn8007_EDX[8]). However we are seeing a discrepancy in guest VM > behavior between

Re: [PULL 11/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/23/21 10:39 PM, i...@bsdimp.com wrote: > From: Warner Losh > > Signed-off-by: Warner Losh > --- > bsd-user/elfload.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c > index 87154283ef..07a00ddbd5 100644 > ---

Re: [PULL 19/24] bsd-user: use qemu_strtol in preference to strtol

2021-04-23 Thread Warner Losh
On Fri, Apr 23, 2021 at 3:16 PM Philippe Mathieu-Daudé wrote: > On 4/23/21 10:39 PM, i...@bsdimp.com wrote: > > From: Warner Losh > > > > Signed-off-by: Warner Losh > > --- > > bsd-user/main.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/bsd-user/main.c

Re: [PATCH RESEND 1/2] target/i386: add "-cpu, lbr-fmt=*" support to enable guest LBR

2021-04-23 Thread Eduardo Habkost
Hi, Sorry for missing the previous submission of this series, and thanks for resubmitting. On Fri, Apr 23, 2021 at 10:20:36AM +0800, Like Xu wrote: > The last branch recording (LBR) is a performance monitor unit (PMU) > feature on Intel processors that records a running trace of the most >

Re: [PULL 19/24] bsd-user: use qemu_strtol in preference to strtol

2021-04-23 Thread Philippe Mathieu-Daudé
On 4/23/21 10:39 PM, i...@bsdimp.com wrote: > From: Warner Losh > > Signed-off-by: Warner Losh > --- > bsd-user/main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/bsd-user/main.c b/bsd-user/main.c > index 69e5525607..95fda8c5ae 100644 > --- a/bsd-user/main.c >

Ping: [PATCH] Set icon for QEMU binary on Mac OS

2021-04-23 Thread Programmingkid
This patch was submitted in February and I haven't heard anything about it since. Could this be included in the up coming release please? https://lore.kernel.org/qemu-devel/20210202134410.9274-1-programmingk...@gmail.com/ Before switching the build system over to Meson, an icon was added to

[PATCH v3 2/2] tests/tcg/ppc64le: tests for brh/brw/brd

2021-04-23 Thread matheus . ferst
From: Matheus Ferst Tests for Byte-Reverse Halfword, Word and Doubleword Signed-off-by: Matheus Ferst Tested-by: Fabiano Rosas --- tests/tcg/ppc64/Makefile.target | 7 +++ tests/tcg/ppc64le/Makefile.target | 7 +++ tests/tcg/ppc64le/byte_reverse.c | 21 + 3

[PULL 23/24] bsd-user: move x86 (i386 and x86_64) cpu_loop to target_arch_cpu.h

2021-04-23 Thread imp
From: Warner Losh Move the x86 version of the cpu_loop to target_arch_cpu.h as target_cpu_loop. Create a cpu_loop that calls the target_cpu_loop function, but only for x86 for now. This is code-movement only commit. Signed-off-by: Stacey Son Signed-off-by: Warner Losh ---

[PULL 21/24] bsd-user: add arm target_signal.h

2021-04-23 Thread imp
From: Warner Losh Add a arm target_signal.h to complete the files currently in the tree. The arm directory isn't compiled, so it was missing target_signal.h. Update it to the same level as x86 and sparc. This was abstracted from the target_arch_vmparam.h file in the bsd-user branch.

[PATCH v3 1/2] tests/docker: gcc-10 based images for ppc64{, le} tests

2021-04-23 Thread matheus . ferst
From: Matheus Ferst A newer compiler is needed to build tests for Power10 instructions. As done for arm64 on c729a99d2701, a new '-test-cross' image is created for ppc64 and ppc64le. As done on 936fda4d771f, a test for compiler support is added to verify that the toolchain in use has

[PATCH v3 0/2] tests/docker: tests/tcg/ppc64le: Newer toolchain to build tests for PowerISA v3.1 instructions

2021-04-23 Thread matheus . ferst
From: Matheus Ferst This series adds gcc-10 based images to enable the build of tests with Power10 instructions. Then, to put it to good use, a tests for the byte-reverse instructions (implemented in 9d69cfa2faa7) is introduced. v3: - Fixed field 'needs' of powerpc-test-debian-cross-container

[PULL 20/24] bsd-user: introduce host_os.h for bsd-specific code and defaults

2021-04-23 Thread imp
From: Warner Losh Introduce host_os.h for frebsd, netbsd and openbsd. This sets the default bsd being implemented today. In the future it will have code that is per-BSD specific. Abstracted from a larger c93465b6208c4c95cc0a394ffef4180ba6ccf27a in the qemu-bsd-user repo. Signed-off-by: Stacey

[PULL 22/24] bsd-user: create target_arch_cpu.h

2021-04-23 Thread imp
From: Warner Losh Create target_arch_cpu.h to house the target_cpu_loop and target_cpu_init functions. These are the empty files that will be populated by moving the appropriate cpu-specific functions out of main.c. This work pre-dates the linux-user work that moved these to cpu-loop.c, so was

[PULL 18/24] bsd-user: style changes for {}

2021-04-23 Thread imp
From: Warner Losh Fix various issues with {} not being present on if / for / case statements. Tweak indentation where needed to appease checkpatch after this. Minor line length tweaks Signed-off-by: Warner Losh --- bsd-user/main.c | 100 +--- 1 file

[PULL 19/24] bsd-user: use qemu_strtol in preference to strtol

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 69e5525607..95fda8c5ae 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -821,7 +821,7 @@ int main(int argc, char

[PULL 12/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index ff886de98e..91603f5ac2 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -245,7 +245,7 @@ void

[PULL 15/24] bsd-user: Fix commentary issues

2021-04-23 Thread imp
From: Warner Losh Lines > 80 or 90 characters C++ comments BSD /*- block comment convention removed. Signed-off-by: Warner Losh --- bsd-user/bsd-mman.h | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/bsd-user/bsd-mman.h

[PULL 08/24] bsd-user: style tweak: use C not C++ comments

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/elfload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 3c9d8c2845..87154283ef 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -1010,7 +1010,7 @@ static

[PULL 13/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/strace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/strace.c b/bsd-user/strace.c index 2c3b59caf0..6a78dd7efa 100644 --- a/bsd-user/strace.c +++ b/bsd-user/strace.c @@ -128,7 +128,7 @@ static void

[PULL 24/24] bsd-user: move sparc cpu_loop into target_arch_cpu.h as target_cpu_loop

2021-04-23 Thread imp
From: Warner Losh Move the sparc cpu_loop out of main.c and into target_arch_cpu.h and rename it from cpu_loop to target_cpu_loop. Remove the #ifdef around the catch-all cpu_loop. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/main.c | 305

[PULL 16/24] bsd-user: Use preferred block comments

2021-04-23 Thread imp
From: Warner Losh Use the preferred block comment style. Signed-off-by: Warner Losh --- bsd-user/main.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 91603f5ac2..5958b07e62 100644 ---

[PULL 07/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/uaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/uaccess.c b/bsd-user/uaccess.c index 91e2067933..89163257f4 100644 --- a/bsd-user/uaccess.c +++ b/bsd-user/uaccess.c @@ -46,7 +46,7 @@ abi_long

[PULL 10/24] bsd-user: style tweak: use C not C++ comments

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index b836b603af..3480db890d 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -71,7 +71,7 @@ struct image_info

[PULL 14/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/x86_64/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/x86_64/target_syscall.h b/bsd-user/x86_64/target_syscall.h index a8e6274b76..9a6e072f87 100644 --- a/bsd-user/x86_64/target_syscall.h

[PULL 17/24] bsd-user: move extern to header file

2021-04-23 Thread imp
From: Warner Losh extern char **environ has no standard home, so move the declaration from the .c file to a handy .h file. Since this is a standard, old-school UNIX interface dating from the 5th edition, it's not quite the same issue that the rule is supposed to protect against, though.

[PULL 04/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/mmap.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 01ec808003..0ac1b92706 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -93,11 +93,11 @@

[PULL 09/24] bsd-user: style tweak: use C not C++ comments

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/main.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 455b8eddab..ff886de98e 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -148,7 +148,7 @@ void

[PULL 06/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index adc3d21b54..3352735c68 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -95,7

[PULL 11/24] bsd-user: style tweak: if 0 -> ifdef notyet for code needed in future

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/elfload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 87154283ef..07a00ddbd5 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -1270,7 +1270,7 @@ int

[PULL 01/24] bsd-user: whitespace changes

2021-04-23 Thread imp
From: Warner Losh keyword space paren, no space before ( in function calls, spaces around operators. Signed-off-by: Warner Losh --- bsd-user/bsdload.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c index

[PULL 02/24] bsd-user: whitespace changes

2021-04-23 Thread imp
From: Warner Losh Fix various whitespace-only issues from checkpatch: keyword space ( no space before ( on function calls spaces around operators suspect indentations (including one functions reindented) extra spaces around unary operators Signed-off-by: Warner Losh ---

[PULL 05/24] bsd-user: style tweak: keyword space (

2021-04-23 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index d2bcaab741..b836b603af 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -233,7 +233,7 @@ static inline bool

[PULL 03/24] bsd-user: whitespace changes

2021-04-23 Thread imp
From: Warner Losh Space after keywords, no space for function calls and spaces around operators. Signed-off-by: Warner Losh --- bsd-user/main.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c

[PULL 00/24] bsd-user style and reorg patches

2021-04-23 Thread imp
From: Warner Losh Greetings, This series starts to cleanup bsd-user. The current checkpatch.pl output is on the order of 4500 lines long. These cleanups don't fix everything (there's still plenty of errors, even in some of the files the patches touch). I've tried to make things better in every

Re: [PULL 0/2] pc: last minute bugfixes

2021-04-23 Thread Michael S. Tsirkin
On Fri, Apr 23, 2021 at 09:53:01AM +0100, Peter Maydell wrote: > On Thu, 22 Apr 2021 at 23:24, Michael S. Tsirkin wrote: > > > > The following changes since commit d83f46d189a26fa32434139954d264326f199a45: > > > > virtio-pci: compat page aligned ATS (2021-04-06 07:11:36 -0400) > > > > are

Re: [PATCH v6] qapi: introduce 'query-cpu-model-cpuid' action

2021-04-23 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 12:02:15PM +0300, Valeriy Vdovin wrote: > On Wed, Apr 21, 2021 at 04:17:59PM -0400, Eduardo Habkost wrote: > > On Wed, Apr 21, 2021 at 08:39:42PM +0300, Valeriy Vdovin wrote: > > > On Tue, Apr 20, 2021 at 01:09:00PM -0400, Eduardo Habkost wrote: > > > > On Tue, Apr 20, 2021

  1   2   3   >