Re: [PATCH] qemu-thread: avoid false positive in pthread_cleanup_push

2021-09-07 Thread Paolo Bonzini
On 07/09/21 16:20, Richard Henderson wrote: On 9/7/21 2:51 PM, Paolo Bonzini wrote: +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow"   pthread_cleanup_push(qemu_thread_atexit_notify, NULL); +#pragma GCC diagnostic pop I had a patch for this that didn't

Re: [PATCH v2 3/3] target/riscv: Set mtval and stval support

2021-09-07 Thread Bin Meng
On Wed, Sep 8, 2021 at 12:55 PM Alistair Francis wrote: > > From: Alistair Francis > > Signed-off-by: Alistair Francis > --- > target/riscv/cpu.h | 1 + > target/riscv/cpu.c | 6 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h >

Re: [PATCH v2 2/3] target/riscv: Implement the stval/mtval illegal instruction

2021-09-07 Thread Bin Meng
On Wed, Sep 8, 2021 at 12:54 PM Alistair Francis wrote: > > From: Alistair Francis > > The stval and mtval registers can optionally contain the faulting > instruction on an illegal instruction exception. This patch adds support > for setting the stval and mtval registers based on the CPU

Re: [PATCH] fuzz: fix unbound variable in build.sh

2021-09-07 Thread Thomas Huth
On 07/09/2021 14.51, Alexander Bulekov wrote: On 210907 1432, Thomas Huth wrote: On 07/09/2021 13.08, Alexander Bulekov wrote: /src/build.sh: line 76: GITLAB_CI: unbound variable Fix that. Signed-off-by: Alexander Bulekov --- This change is in preparation to revert: 7602748c ("qemu:

Re: [PATCH] meson: look up cp and dtrace with find_program()

2021-09-07 Thread Paolo Bonzini
On 07/09/21 21:06, Marc-André Lureau wrote: Hi On Tue, Sep 7, 2021 at 9:27 PM Paolo Bonzini > wrote: Avoid that meson prints a "Program xyz found" test once per custom_target. Signed-off-by: Paolo Bonzini mailto:pbonz...@redhat.com>> Reviewed-by:

Re: [PATCH] fw_cfg: add etc/msr_feature_control

2021-09-07 Thread Paolo Bonzini
On 07/09/21 20:19, Philippe Mathieu-Daudé wrote: Fixes: 217f1b4a721 ("target-i386: Publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg") Yes, thanks. Paolo

Re: [PATCH] ebpf: only include in system emulators

2021-09-07 Thread Paolo Bonzini
On 08/09/21 05:08, Jason Wang wrote: 在 2021/9/7 下午6:45, Paolo Bonzini 写道: eBPF files are being included in system emulators, which is useless I think it should work since it's an independent feature. The current use case is to offload the RSS from Qemu to kernel TAP. Sorry, I meant "user

Re: [PATCH v2 1/3] target/riscv: Set the opcode in DisasContext

2021-09-07 Thread Bin Meng
On Wed, Sep 8, 2021 at 12:54 PM Alistair Francis wrote: > > From: Alistair Francis > > Signed-off-by: Alistair Francis > --- > target/riscv/translate.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > Reviewed-by: Bin Meng

Re: [PATCH v10 15/16] target/riscv: Remove RVB (replaced by Zb[abcs])

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:53 AM Philipp Tomsich wrote: > > With everything classified as Zb[abcs] and pre-0.93 draft-B > instructions that are not part of Zb[abcs] removed, we can remove the > remaining support code for RVB. > > Note that RVB has been retired for good and misa.B will neither mean

Re: [PATCH v10 12/16] target/riscv: Add a REQUIRE_32BIT macro

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:47 AM Philipp Tomsich wrote: > > With the changes to Zb[abcs], there's some encodings that are > different in RV64 and RV32 (e.g., for rev8 and zext.h). For these, > we'll need a helper macro allowing us to select on RV32, as well. > > Signed-off-by: Philipp Tomsich >

Re: [PATCH v10 10/16] target/riscv: Reassign instructions to the Zbb-extension

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:38 AM Philipp Tomsich wrote: > > This reassigns the instructions that are part of Zbb into it, with the > notable exceptions of the instructions (rev8, zext.w and orc.b) that > changed due to gorci, grevi and pack not being part of Zb[abcs]. > > Signed-off-by: Philipp

Re: [PATCH v10 05/16] target/riscv: Reassign instructions to the Zba-extension

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:38 AM Philipp Tomsich wrote: > > The following instructions are part of Zba: > - add.uw (RV64 only) > - sh[123]add (RV32 and RV64) > - sh[123]add.uw (RV64-only) > - slli.uw (RV64-only) > > Signed-off-by: Philipp Tomsich > Reviewed-by: Richard Henderson >

Re: [PATCH v10 08/16] target/riscv: Reassign instructions to the Zbs-extension

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:43 AM Philipp Tomsich wrote: > > The following instructions are part of Zbs: > - b{set,clr,ext,inv} > - b{set,clr,ext,inv}i > > Signed-off-by: Philipp Tomsich > Reviewed-by: Richard Henderson > Reviewed-by: Alistair Francis > --- > > (no changes since v3) > > Changes

Re: [PATCH v10 07/16] target/riscv: Remove shift-one instructions (proposed Zbo in pre-0.93 draft-B)

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:40 AM Philipp Tomsich wrote: > > The Zb[abcs] ratification package does not include the proposed > shift-one instructions. There currently is no clear plan to whether > these (or variants of them) will be ratified as Zbo (or a different > extension) or what the timeframe

Re: [PATCH v10 06/16] target/riscv: Remove the W-form instructions from Zbs

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:49 AM Philipp Tomsich wrote: > > Zbs 1.0.0 (just as the 0.93 draft-B before) does no provide for W-form does not > instructions for Zbs (single-bit instructions). Remove them. > > Note that these instructions had already been removed for the 0.93 > version of the

Re: [PATCH v10 04/16] target/riscv: Add x-zba, x-zbb, x-zbc and x-zbs properties

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:35 AM Philipp Tomsich wrote: > > The bitmanipulation ISA extensions will be ratified as individual > small extension packages instead of a large B-extension. The first > new instructions through the door (these have completed public review) > are Zb[abcs]. > > This adds

Re: [PATCH v10 02/16] target/riscv: fix clzw implementation to operate on arg1

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:35 AM Philipp Tomsich wrote: > > The refactored gen_clzw() uses ret as its argument, instead of arg1. > Fix it. > > Signed-off-by: Philipp Tomsich > --- > > Changes in v10: > - New patch, fixing regressions discovered with x264_r. > >

Re: [PATCH v10 01/16] target/riscv: Introduce temporary in gen_add_uw()

2021-09-07 Thread Bin Meng
On Sun, Sep 5, 2021 at 4:40 AM Philipp Tomsich wrote: > > Following the recent changes in translate.c, gen_add_uw() causes > failures on CF3 and SPEC2017 due to the reuse of arg1. Fix these > regressions by introducing a temporary. > > Signed-off-by: Philipp Tomsich > --- > > Changes in v10: >

[PATCH v2 2/3] target/riscv: Implement the stval/mtval illegal instruction

2021-09-07 Thread Alistair Francis
From: Alistair Francis The stval and mtval registers can optionally contain the faulting instruction on an illegal instruction exception. This patch adds support for setting the stval and mtval registers based on the CPU feature. Signed-off-by: Alistair Francis --- target/riscv/cpu.h|

[PATCH v2 3/3] target/riscv: Set mtval and stval support

2021-09-07 Thread Alistair Francis
From: Alistair Francis Signed-off-by: Alistair Francis --- target/riscv/cpu.h | 1 + target/riscv/cpu.c | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index d11db1f031..5b0bbf2fca 100644 --- a/target/riscv/cpu.h +++

[PATCH 0/5] qapi: Another round of minor fixes and cleanups

2021-09-07 Thread Markus Armbruster
Markus Armbruster (5): qapi: Fix a botched type annotation qapi: Drop Indentation.__bool__() qapi: Bury some unused code in class Indentation tests/qapi-schema: Cover 'not' condition with empty argument qapi: Fix bogus error for 'if': { 'not': '' } scripts/qapi/common.py|

[PATCH v2 1/3] target/riscv: Set the opcode in DisasContext

2021-09-07 Thread Alistair Francis
From: Alistair Francis Signed-off-by: Alistair Francis --- target/riscv/translate.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index e356fc6c46..25670be435 100644 --- a/target/riscv/translate.c +++

[PATCH 1/5] qapi: Fix a botched type annotation

2021-09-07 Thread Markus Armbruster
Mypy is unhappy: $ mypy --config-file=scripts/qapi/mypy.ini `git-ls-files scripts/qapi/\*py` scripts/qapi/common.py:208: error: Function is missing a return type annotation scripts/qapi/common.py:227: error: Returning Any from function declared to return "str" Messed up in commit

[PATCH 2/5] qapi: Drop Indentation.__bool__()

2021-09-07 Thread Markus Armbruster
Intentation.__bool__() is not worth its keep: it has just one user, which can just as well check .__str__() instead. Signed-off-by: Markus Armbruster --- scripts/qapi/common.py | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/qapi/common.py

[PATCH 5/5] qapi: Fix bogus error for 'if': { 'not': '' }

2021-09-07 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi/expr.py | 21 + tests/qapi-schema/bad-if-not.err | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py index b62f0a3640..ad3732c7f0 100644 ---

[PATCH v2 0/3] RISC-V: Populate mtval and stval

2021-09-07 Thread Alistair Francis
From: Alistair Francis Populate mtval and stval when taking an illegal instruction exception if the features are set for the CPU. Alistair Francis (3): target/riscv: Set the opcode in DisasContext target/riscv: Implement the stval/mtval illegal instruction target/riscv: Set mtval and

[PATCH 4/5] tests/qapi-schema: Cover 'not' condition with empty argument

2021-09-07 Thread Markus Armbruster
We flag this, but the error message is bogus: bad-if-not.json:2: 'if' condition [] of struct is useless The next commit will fix it. Signed-off-by: Markus Armbruster --- tests/qapi-schema/bad-if-not.err | 2 ++ tests/qapi-schema/bad-if-not.json | 3 +++ tests/qapi-schema/bad-if-not.out

[PATCH 3/5] qapi: Bury some unused code in class Indentation

2021-09-07 Thread Markus Armbruster
.__int__() has never been used. Drop it. .decrease() raises ArithmeticError when asked to decrease indentation level below zero. Nothing catches it. It's a programming error. Dumb down to assert. Signed-off-by: Markus Armbruster --- scripts/qapi/common.py | 7 +-- 1 file changed, 1

Re: [PATCH] hw/i386/acpi-build: adjust q35 IO addr range for acpi pci hotplug

2021-09-07 Thread Ani Sinha
On Wed, 8 Sep 2021, Ani Sinha wrote: > Change caf108bc58790 ("hw/i386/acpi-build: Add ACPI PCI hot-plug methods to > Q35") > selects an IO address range for acpi based PCI hotplug for q35 arbitrarily. It > starts at address 0x0cc4 and ends at 0x0cdb. It was assumed that this address > range

[PATCH] hw/i386/acpi-build: adjust q35 IO addr range for acpi pci hotplug

2021-09-07 Thread Ani Sinha
Change caf108bc58790 ("hw/i386/acpi-build: Add ACPI PCI hot-plug methods to Q35") selects an IO address range for acpi based PCI hotplug for q35 arbitrarily. It starts at address 0x0cc4 and ends at 0x0cdb. It was assumed that this address range was free and available. However, upon more testing,

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-07 Thread Jason Wang
On Tue, Sep 7, 2021 at 6:40 PM Yuri Benditovich wrote: > > On Wed, Sep 1, 2021 at 9:42 AM Jason Wang wrote: > > > > > > 在 2021/8/31 上午1:07, Yuri Benditovich 写道: > > > On Fri, Aug 20, 2021 at 6:41 AM Jason Wang wrote: > > >> > > >> 在 2021/7/13 下午11:37, Andrew Melnychenko 写道: > > >>> Helper

Re: [PATCH v2 1/2] hw/timer: Add SiFive PWM support

2021-09-07 Thread Bin Meng
On Fri, Sep 3, 2021 at 7:25 AM Alistair Francis wrote: > > From: Alistair Francis > > This is the initial commit of the SiFive PWM timer. This is used by > guest software are a timer and is included in the SiFive FU540 SoC. "guest software are a time .. This does not read right. > >

Re: [PATCH v2 2/2] sifive_u: Connect the SiFive PWM device

2021-09-07 Thread Bin Meng
On Fri, Sep 3, 2021 at 7:25 AM Alistair Francis wrote: > > From: Alistair Francis > > Connect the SiFive PWM device and expose it via the device tree. > > Signed-off-by: Alistair Francis > --- > include/hw/riscv/sifive_u.h | 14 +- > hw/riscv/sifive_u.c | 55

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Jason Wang
On Wed, Sep 8, 2021 at 11:24 AM Peter Xu wrote: > > On Wed, Sep 08, 2021 at 10:59:57AM +0800, Jason Wang wrote: > > On Wed, Sep 8, 2021 at 2:32 AM Peter Xu wrote: > > > > > > On Thu, Sep 02, 2021 at 04:22:55AM -0300, Leonardo Bras Soares Passos > > > wrote: > > > > > I don't think it is valid

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Peter Xu
On Wed, Sep 08, 2021 at 10:59:57AM +0800, Jason Wang wrote: > On Wed, Sep 8, 2021 at 2:32 AM Peter Xu wrote: > > > > On Thu, Sep 02, 2021 at 04:22:55AM -0300, Leonardo Bras Soares Passos wrote: > > > > I don't think it is valid to unconditionally enable this feature due to > > > > the > > > >

Re: [PATCH v5 3/4] spapr_numa.c: base FORM2 NUMA affinity support

2021-09-07 Thread David Gibson
On Tue, Sep 07, 2021 at 07:07:41AM -0300, Daniel Henrique Barboza wrote: 65;6402;1c> > > On 9/6/21 10:02 PM, David Gibson wrote: > > On Mon, Sep 06, 2021 at 09:25:26PM -0300, Daniel Henrique Barboza wrote: > > > The main feature of FORM2 affinity support is the separation of NUMA > > > distances

Re: [PATCH] ebpf: only include in system emulators

2021-09-07 Thread Jason Wang
在 2021/9/7 下午6:45, Paolo Bonzini 写道: eBPF files are being included in system emulators, which is useless I think it should work since it's an independent feature. The current use case is to offload the RSS from Qemu to kernel TAP. and also breaks compilation because ebpf/trace-events

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Jason Wang
On Wed, Sep 8, 2021 at 2:32 AM Peter Xu wrote: > > On Thu, Sep 02, 2021 at 04:22:55AM -0300, Leonardo Bras Soares Passos wrote: > > > I don't think it is valid to unconditionally enable this feature due to > > > the > > > resource usage implications > > > > > >

Re: Application of QEMUTimer in short timing.

2021-09-07 Thread Duo jia
thank you for your reply.I understand. Also I want to know how to make a delay in qemu. For example, when I send a UART data, there is a certain time interval from setting the register to when the data is sent. Most of this time does not affect the simulation effect, but some guest firmware will

Re: [PATCH v5 1/4] spapr: move NUMA associativity init to machine reset

2021-09-07 Thread David Gibson
On Tue, Sep 07, 2021 at 09:10:13AM +0200, Greg Kurz wrote: > On Tue, 7 Sep 2021 10:37:27 +1000 > David Gibson wrote: > > > On Mon, Sep 06, 2021 at 09:25:24PM -0300, Daniel Henrique Barboza wrote: > > > At this moment we only support one form of NUMA affinity, FORM1. This > > > allows us to init

Re: arm: Launching EFI-enabled arm32 Linux

2021-09-07 Thread Andre Przywara
On Wed, 8 Sep 2021 01:25:04 +0200 Adam Lackorzynski wrote: Hi Adam, > On Mon Sep 06, 2021 at 16:34:03 +0100, Andre Przywara wrote: > > On Sat, 4 Sep 2021 21:26:45 +0200 > > Adam Lackorzynski wrote: > > > > Hi Adam, > > > > > while trying to launch an EFI-enabled arm32 Linux binary (zImage)

[PATCH 2/4] hw/sd: add nuvoton MMC

2021-09-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting --- hw/arm/npcm7xx.c | 12 +++- hw/sd/meson.build | 1 + hw/sd/npcm7xx_sdhci.c | 131 ++

[PATCH 4/4] tests/qtest: add qtests for npcm7xx sdhci

2021-09-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting --- tests/qtest/meson.build | 1 + tests/qtest/npcm7xx_sdhci-test.c | 201 +++ 2 files changed, 202 insertions(+) create mode 100644

[PATCH 0/4] hw/arm: Add MMC device for NPCM7XX boards

2021-09-07 Thread Hao Wu
This patch set implements the Nuvoton MMC device for NPCM7XX boards. The MMC device is compatible with the SDHCI interface in QEMU. It allows the user to attach an SD card image to it. Shengtan Mao (4): tests/qtest/libqos: add SDHCI commands hw/sd: add nuvoton MMC hw/arm: Attach MMC to

[PATCH 1/4] tests/qtest/libqos: add SDHCI commands

2021-09-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Chris Rauer Reviewed-by: Tyrone Ting --- tests/qtest/libqos/meson.build | 1 + tests/qtest/libqos/sdhci-cmd.c | 116 + tests/qtest/libqos/sdhci-cmd.h | 70

[PATCH 3/4] hw/arm: Attach MMC to quanta-gbs-bmc

2021-09-07 Thread Hao Wu
From: Shengtan Mao Signed-off-by: Shengtan Mao Reviewed-by: Hao Wu Reviewed-by: Tyrone Ting --- hw/arm/npcm7xx_boards.c | 21 + 1 file changed, 21 insertions(+) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index e5a3243995..7205483280 100644 ---

Re: arm: Launching EFI-enabled arm32 Linux

2021-09-07 Thread Adam Lackorzynski
Hi Andre, On Mon Sep 06, 2021 at 16:34:03 +0100, Andre Przywara wrote: > On Sat, 4 Sep 2021 21:26:45 +0200 > Adam Lackorzynski wrote: > > Hi Adam, > > > while trying to launch an EFI-enabled arm32 Linux binary (zImage) I > > noticed I get an undefined instruction exception on the first > >

Re: [PATCH v3 5/5] hw/intc: ibex_timer: Convert the timer to use RISC-V CPU GPIO lines

2021-09-07 Thread Alistair Francis
On Mon, Aug 30, 2021 at 3:36 PM Alistair Francis wrote: > > From: Alistair Francis > > Instead of using riscv_cpu_update_mip() let's instead use the new RISC-V > CPU GPIO lines to set the timer MIP bits. > > Signed-off-by: Alistair Francis > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by:

[PATCH v2] hw/arm: Add support for kudo-bmc board.

2021-09-07 Thread Chris Rauer
kudo-bmc is a board supported by OpenBMC. https://github.com/openbmc/openbmc/tree/master/meta-fii/meta-kudo Since v1: - hyphenated Cortex-A9 Tested: Booted kudo firmware. Signed-off-by: Chris Rauer --- docs/system/arm/nuvoton.rst | 1 + hw/arm/npcm7xx_boards.c | 34

[PULL 42/42] bsd-user: Update mapping to handle reserved and starting conditions

2021-09-07 Thread imp
From: Warner Losh Update the reserved base based on what platform we're on, as well as the start of the mmap range. Update routines that find va ranges to interact with the reserved ranges as well as properly align the mapping (this is especially important for targets whose page size does not

[PULL 38/42] bsd-user: Refactor load_elf_sections and is_target_elf_binary

2021-09-07 Thread imp
From: Warner Losh Factor out load_elf_sections and is_target_elf_binary out of load_elf_interp. Signed-off-by: Mikaël Urankar Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans --- bsd-user/elfload.c | 344 + 1 file

[PULL 36/42] bsd-user: add stubbed out core dump support

2021-09-07 Thread imp
From: Warner Losh Add a stubbed-out version of the bsd-user fork's core dump support. This allows elfload.c to be almost the same between what's upstream and what's in qemu-project upstream w/o the burden of reviewing the core dump support. Signed-off-by: Stacey Son Signed-off-by: Warner Losh

[PULL 34/42] bsd-user: Add target_arch_reg to describe a target's register set

2021-09-07 Thread imp
From: Warner Losh target_reg_t is the normal register. target_fpreg_t is the floating point registers. target_copy_regs copies the registers out of CPU context for things like core dumps. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PULL 40/42] bsd-user: Implement interlock for atomic operations

2021-09-07 Thread imp
From: Warner Losh Implement the internlock in fork_start() and fork_end() to properly cope with atomic operations and to safely keep state for parent and child processes. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/main.c | 24

[PULL 39/42] bsd-user: move gemu_log to later in the file

2021-09-07 Thread imp
From: Warner Losh Signed-off-by: Warner Losh Acked-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/main.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 71fd9d5aba..768f4ee41e 100644 ---

[PULL 33/42] bsd-user: update debugging in mmap.c

2021-09-07 Thread imp
From: Warner Losh Update the debugging code for new features and different targets. Signed-off-by: Mikaël Urankar Signed-off-by: Sean Bruno Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Acked-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/mmap.c | 55

Re: [PATCH v2] Prevent vhost-user-blk-test hang

2021-09-07 Thread ebl...@redhat.com
On Mon, Sep 06, 2021 at 01:25:20PM +, Raphael Norwitz wrote: > In the vhost-user-blk-test, as of now there is nothing stoping > vhost-user-blk in QEMU writing to the socket right after forking off the > storage daemon before it has a chance to come up properly, leaving the > test hanging

[PULL 26/42] bsd-user: *BSD specific siginfo defintions

2021-09-07 Thread imp
From: Warner Losh Add FreeBSD, NetBSD and OpenBSD values for the various signal info types and defines to decode different signals to discover more information about the specific signal types. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Acked-by: Richard Henderson Reviewed-by: Kyle

[PULL 35/42] bsd-user: Add target_os_user.h to capture the user/kernel structures

2021-09-07 Thread imp
From: Warner Losh This file evolved over the years to capture the user/kernel interfaces, including those that changed over time. Signed-off-by: Stacey Son Signed-off-by: Michal Meloun Signed-off-by: Warner Losh Acked-by: Richard Henderson Reviewed-by: Kyle Evans ---

[PULL 41/42] bsd-user: Add '-0 argv0' option to bsd-user/main.c

2021-09-07 Thread imp
From: Colin Percival Previously it was impossible to emulate a program with a file name different from its argv[0]. With this change, you can run qemu -0 fakename realname args which runs the program "realname" with an argv of "fakename args". Signed-off-by: Colin Percival Signed-off-by:

[PULL 27/42] bsd-user: Implement --seed and initialize random state

2021-09-07 Thread imp
From: Warner Losh Copy --seed implementation (translated from linux-user's newer command line scheme to the older one bsd-user still uses). Initialize the randomness with the glib if a specific seed is specified or use the qcrypto library if not. Signed-off-by: Warner Losh Reviewed-by: Richard

[PULL 37/42] bsd-user: elfload.c style catch up patch

2021-09-07 Thread imp
From: Warner Losh Various style fixes to elfload.c that were too painful to make earlier in this series. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/elfload.c | 208 ++--- 1 file changed, 104 insertions(+), 104 deletions(-)

[PULL 32/42] bsd-user: Rewrite target system call definintion glue

2021-09-07 Thread imp
From: Warner Losh Rewrite target definnitions to interface with the FreeBSD system calls. This covers basic types (time_t, iovec, umtx_time, timespec, timeval, rusage, rwusage) and basic defines (mmap, rusage). Also included are FreeBSD version-specific variations. Signed-off-by: Stacey Son

[PULL 24/42] bsd-user: Create target specific vmparam.h

2021-09-07 Thread imp
From: Warner Losh Target specific values for vm parameters and details. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/target_os_vmparam.h | 38 ++ bsd-user/i386/target_arch_vmparam.h | 46

[PULL 31/42] bsd-user: Remove dead #ifdefs from elfload.c

2021-09-07 Thread imp
From: Warner Losh LOW_ELF_STACK doesn't exist on FreeBSD and likely never will. Remove it. Likewise, remove an #if 0 block that's not useful Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/elfload.c | 20 1 file changed, 20 deletions(-) diff --git

[PULL 22/42] bsd-user: Include more things in qemu.h

2021-09-07 Thread imp
From: Warner Losh Include more header files to match bsd-user fork. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 5e4cbb40d4..55d71130bb 100644

[PULL 30/42] bsd-user: elf cleanup

2021-09-07 Thread imp
From: Warner Losh Move OS-dependent defines into target_os_elf.h. Move the architectural dependent stuff into target_arch_elf.h. Adjust elfload.c to use target_create_elf_tables instead of create_elf_tables. Signed-off-by: Warner Losh Signed-off-by: Stacey Son Signed-off-by: Kyle Evans

[PULL 28/42] bsd-user: Move stack initializtion into a per-os file.

2021-09-07 Thread imp
From: Warner Losh Move all of the stack initialization into target_os_stack.h. Each BSD sets up processes a little differently. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/target_os_stack.h | 181 +

[PULL 29/42] bsd-user: Add architecture specific signal tramp code

2021-09-07 Thread imp
From: Warner Losh Add a stubbed out version of setup_sigtramp. This is not yet used for x86, but is used for other architectures. This will be connected in future commits. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PULL 16/42] bsd-user: add host-os.h

2021-09-07 Thread imp
From: Warner Losh Host OS specific bits for this implementation go in this file. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/host-os.h | 23 +++ bsd-user/netbsd/host-os.h | 23 +++

[PULL 20/42] bsd-user: Move per-cpu code into target_arch_cpu.h

2021-09-07 Thread imp
From: Warner Losh Move cpu_loop() into target_cpu_loop(), and put that in target_arch_cpu.h for each architecture. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch_cpu.c | 1 + bsd-user/i386/target_arch_cpu.h | 209

[PULL 21/42] bsd-user: pull in target_arch_thread.h update target_arch_elf.h

2021-09-07 Thread imp
From: Warner Losh Update target_arch_elf.h to remove thread_init. Move its contents to target_arch_thread.h and rename to target_thread_init(). Update elfload.c to call it. Create thread_os_thread.h to hold the os specific parts of the thread and threat manipulation routines. Currently, it just

[PULL 23/42] bsd-user: define max args in terms of pages

2021-09-07 Thread imp
From: Warner Losh For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that to 512k. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git

[PULL 25/42] bsd-user: Add system independent stack, data and text limiting

2021-09-07 Thread imp
From: Warner Losh Eliminate the x86 specific stack stuff in favor of more generic control over the process size: target_maxtsiz max text size target_dfldsiz initial data size limit target_maxdsiz max data size target_dflssiz initial stack size limit target_maxssiz max

[PULL 11/42] bsd-user: Eliminate elf personality

2021-09-07 Thread imp
From: Warner Losh The linux kernel supports a number of different ELF binaries. The Linux userland emulator inheritted some of that. And we inheritted it from there. However, for BSD there's only one kind of ELF file supported per platform, so there's no need to cope with historical quirks.

[PULL 14/42] bsd-user: elfload: simplify bswap a bit.

2021-09-07 Thread imp
From: Warner Losh Reduce the number of ifdefs by always calling the swapping routine, but making them empty when swapping isn't needed. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/elfload.c | 97 ++ 1 file changed, 47

[PULL 17/42] bsd-user: Include host-os.h from main

2021-09-07 Thread imp
From: Warner Losh Include host-os.h from main.c to pick up the default OS to emulate. Set that default in main(). Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/host-os.h | 2 ++ bsd-user/main.c| 4 +++-

[PULL 19/42] bsd-user: start to move target CPU functions to target_arch*

2021-09-07 Thread imp
From: Warner Losh Move the CPU functions into target_arch_cpu.c that are unique to each CPU. These are defined in target_arch.h. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch.h | 31 +

[PULL 12/42] bsd-user: remove a.out support

2021-09-07 Thread imp
From: Warner Losh Remove still-born a.out support. The BSDs switched from a.out to ELF 20+ years ago. It's out of scope for bsd-user, and what little support there was would simply wind up at a not-implemented message. Simplify the whole mess by removing it entirely. Should future support be

[PULL 13/42] bsd-user: TARGET_NGROUPS unused in this file, remove

2021-09-07 Thread imp
From: Warner Losh Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsdload.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c index 6aefc7a28b..5b3c061a45 100644 --- a/bsd-user/bsdload.c +++ b/bsd-user/bsdload.c @@ -19,8 +19,6

[PULL 10/42] bsd-user: implement path searching

2021-09-07 Thread imp
From: Warner Losh Use the PATH to find the executable given a bare argument. We need to do this so we can implement mixing native and emulated binaries (e.g., execing a x86 native binary from an emulated arm binary to optimize parts of the build). By finding the binary, we will know how to exec

[PULL 18/42] bsd-user: save the path to the qemu emulator

2021-09-07 Thread imp
From: Warner Losh Save the path to the qemu emulator. This will be used later when we have a more complete implementation of exec. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Acked-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/main.c | 21 +

[PULL 06/42] bsd-user: Remove all non-x86 code from elfload.c

2021-09-07 Thread imp
From: Warner Losh bsd-user only builds x86 at the moment. Remove all non x86 code from elfload.c. We'll move the x86 code to {i386,x86_64}/target_arch_elf.h and bring it that support code from the forked bsd-user when the time comes. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson

[PULL 07/42] bsd-user: move arch specific defines out of elfload.c

2021-09-07 Thread imp
From: Warner Losh Move the architecture specific defines to target_arch_elf.h and delete them from elfload.c. Only retain ifdefs appropriate for i386 and x86_64. Add the copyright/license comments, and guard ifdefs. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson ---

[PULL 08/42] bsd-user: pass the bsd_param into loader_exec

2021-09-07 Thread imp
From: Warner Losh Pass the bsd_param into loader_exec, and adjust. We use it to track the inital stack allocation and to set stack, open files, and other state shared between bsdload.c and elfload.c Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé

[PULL 15/42] bsd-user: assume pthreads and support of __thread

2021-09-07 Thread imp
From: Warner Losh All compilers for some time have supported this. Follow linux-user and eliminate the #define THREAD and unconditionally insert __thread where needed. Please insert: "(see 24cb36a61c6: "configure: Make NPTL non-optional")" Signed-off-by: Warner Losh Reviewed-by: Richard

[PULL 01/42] bsd-user: remove sparc and sparc64

2021-09-07 Thread imp
From: Warner Losh These are broken here and in the bsd-user fork. They won't be fixed as FreeBSD has dropped support for sparc. If people wish to support this in other BSDs, you're better off starting over than starting from these files. Signed-off-by: Warner Losh Reviewed-by: Richard

[PULL 03/42] bsd-user: Add Stacey's copyright to main.c

2021-09-07 Thread imp
From: Warner Losh Add Stacey's updated copyright to main.c Signed-off-by: Warner Losh Signed-off-by: Stacey Son Reviewed-by: Richard Henderson --- bsd-user/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index

[PULL 05/42] bsd-user: style nits: bsdload.c whitespace to qemu standard

2021-09-07 Thread imp
From: Warner Losh Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsdload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c index 0ade58b9e2..ec71c5e923 100644 --- a/bsd-user/bsdload.c +++

[PULL 09/42] bsd-user: Fix calculation of size to allocate

2021-09-07 Thread imp
From: Warner Losh It was incorrect to subtract off the size of an unsigned int here. In bsd-user fork, this change was made when moving the arch specific items to specific files. The size in BSD that's available for the arguments does not need a return address subtracted from it.

[PULL 04/42] bsd-user: add license to bsdload.c

2021-09-07 Thread imp
From: Warner Losh Pull in the license statement at the top of the bsdload.c file from the bsd-user fork version of this file. No functional changes. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsdload.c | 17 - 1 file changed, 16 insertions(+), 1

[PULL 02/42] bsd-user: add copyright header to elfload.c

2021-09-07 Thread imp
From: Warner Losh Add Stacey's copyright to elfload.c Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/elfload.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c

[PULL 00/42] bsd-user updates to run hello world

2021-09-07 Thread imp
tags/bsd-user-pull-20210907-tag for you to fetch changes up to dc96376e46a52ac63a27ea185c3f0a6fd54e3c82: bsd-user: Update mapping to handle reserved and starting conditions (2021-09-07 08:26:53 -0600) This series of patches

Re: [PATCH v3 9/9] iotests: add nbd-reconnect-on-open test

2021-09-07 Thread Eric Blake
On Mon, Sep 06, 2021 at 10:06:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > .../qemu-iotests/tests/nbd-reconnect-on-open | 71 +++ > .../tests/nbd-reconnect-on-open.out | 11 +++ > 2 files changed, 82

Re: [PATCH v3 5/9] nbd/client-connection: improve error message of cancelled attempt

2021-09-07 Thread Eric Blake
On Mon, Sep 06, 2021 at 10:06:50PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > nbd/client-connection.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake > > diff --git a/nbd/client-connection.c

Re: [PATCH v3 4/9] nbd/client-connection: nbd_co_establish_connection(): return real error

2021-09-07 Thread Eric Blake
On Mon, Sep 06, 2021 at 10:06:49PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The only user of errp is call to nbd_do_establish_connection() in > nbd_open(). The only way to cancel this call is through open_timer The only caller of nbd_do_establish_connection() that uses errp is nbd_open(). >

Re: [PATCH v3 3/9] nbd: allow reconnect on open, with corresponding new options

2021-09-07 Thread Eric Blake
On Mon, Sep 06, 2021 at 10:06:48PM +0300, Vladimir Sementsov-Ogievskiy wrote: > It is useful when start of vm and start of nbd server are not > simple to sync. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > qapi/block-core.json | 9 - > block/nbd.c | 45

Re: [PULL 00/20] s390x patches

2021-09-07 Thread Peter Maydell
On Tue, 7 Sept 2021 at 14:15, Thomas Huth wrote: > > Hi Peter! > > The following changes since commit 935efca6c246c108253b0e4e51cc87648fc7ca10: > > Merge remote-tracking branch > 'remotes/thuth-gitlab/tags/pull-request-2021-09-06' into staging (2021-09-06 > 12:38:07 +0100) > > are available

Re: [PATCH] meson: look up cp and dtrace with find_program()

2021-09-07 Thread Marc-André Lureau
Hi On Tue, Sep 7, 2021 at 9:27 PM Paolo Bonzini wrote: > Avoid that meson prints a "Program xyz found" test once per > custom_target. > > Signed-off-by: Paolo Bonzini > Reviewed-by: Marc-André Lureau Is there a meson bug already? > --- > pc-bios/keymaps/meson.build | 3 ++- >

Re: [PATCH v1 3/3] migration: multifd: Enable zerocopy

2021-09-07 Thread Peter Xu
On Thu, Sep 02, 2021 at 04:22:55AM -0300, Leonardo Bras Soares Passos wrote: > > I don't think it is valid to unconditionally enable this feature due to the > > resource usage implications > > > > https://www.kernel.org/doc/html/v5.4/networking/msg_zerocopy.html > > > > "A zerocopy failure will

  1   2   3   4   5   >