[Bug 1926052] Re: qemu freezes during grub on arch cloudimg

2021-04-24 Thread David Hauer
Sorry, this is actually not a qemu problem. The arch system just doesn't display any messages during boot when `-nographic` is used. The issue can be closed. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: constant_tsc support for SVM guest

2021-04-24 Thread Wei Huang
On 4/23/21 4:27 PM, Eduardo Habkost wrote: 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

[Bug 1926052] [NEW] qemu freezes during grub on arch cloudimg

2021-04-24 Thread David Hauer
Public bug reported: When booting the Arch Linux cloud image and setting `-nographic`, qemu will freeze during the grub bootloader. Tested with qemu 5.1 and 5.2. Reproduce: ``` wget

Re: [PATCH RFC 1/1] msix: add hmp interface to dump MSI-X info

2021-04-24 Thread Jason Wang
在 2021/4/24 上午1:32, Dongli Zhang 写道: On 4/23/21 12:59 AM, Jason Wang wrote: 在 2021/4/23 下午12:47, Dongli Zhang 写道: This patch is to add the HMP interface to dump MSI-X table and PBA, in order to help diagnose the loss of IRQ issue in VM (e.g., if an MSI-X vector is erroneously masked

Re: [PATCH RFC 0/1] To add HMP interface to dump PCI MSI-X table/PBA

2021-04-24 Thread Jason Wang
在 2021/4/24 上午1:26, Dongli Zhang 写道: On 4/22/21 11:01 PM, Jason Wang wrote: 在 2021/4/23 下午12:47, Dongli Zhang 写道: This is inspired by the discussion with Jason on below patchset.

Re: [PATCH v6 0/7] eBPF RSS support for virtio-net

2021-04-24 Thread Jason Wang
在 2021/4/12 下午4:25, Andrew Melnychenko 写道: This set of patches introduces the usage of eBPF for packet steering and RSS hash calculation: * RSS(Receive Side Scaling) is used to distribute network packets to guest virtqueues by calculating packet hash * Additionally adding support for the usage

[Bug 1926044] Re: QEMU-user doesn't report HWCAP2_MTE

2021-04-24 Thread Vitaly Buka
Sorry, 0 7 8 should be "HWCAP2_DCPODP HWCAP2_FLAGM2 HWCAP2_FRINT" -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1926044 Title: QEMU-user doesn't report HWCAP2_MTE Status in QEMU: New Bug

[Bug 1926044] Re: QEMU-user doesn't report HWCAP2_MTE

2021-04-24 Thread Vitaly Buka
Actually if we make it like this: #include #include int main(int ac, char **av) { for (int i = 0; i < 32; ++i) if ((int)(getauxval(AT_HWCAP2) & (1 << i))) printf("%d\n", i); } clang mytest.c -target aarch64-linux-gnu -fsanitize=memtag -march=armv8+memtag qemu-aarch64

[Bug 1926044] [NEW] QEMU-user doesn't report HWCAP2_MTE

2021-04-24 Thread Vitaly Buka
Public bug reported: Reproducible on ffa090bc56e73e287a63261e70ac02c0970be61a Host Debian 5.10.24 x86_64 GNU Configured with "configure --disable-system --enable-linux-user --static" This one works and prints "OK" as expected: clang tests/tcg/aarch64/mte-3.c -target aarch64-linux-gnu

Re: [PATCH 2/3] hw/ide: Add Kconfig dependency MICRODRIVE -> PCMCIA

2021-04-24 Thread Warner Losh
On Sat, Apr 24, 2021 at 4:24 PM Philippe Mathieu-Daudé wrote: > The Microdrive Compact Flash can be plugged on a PCMCIA bus. > Express the dependency using the 'depends on' Kconfig expression. > Reviewed-by: Warner Losh > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/ide/Kconfig | 1 + >

Re: [PATCH 1/3] hw/arm/pxa2xx: Declare PCMCIA bus with Kconfig

2021-04-24 Thread Warner Losh
On Sat, Apr 24, 2021 at 4:22 PM Philippe Mathieu-Daudé wrote: > The Intel XScale PXA chipsets provide a PCMCIA controller, > which expose a PCMCIA (IDE) bus. Express this dependency using > the Kconfig 'select' expression. > I'd consider dropping the (IDE) in the description of the PCMCIA bus

[PATCH 2/2] hw/usb: Do not build USB subsystem if not required

2021-04-24 Thread Philippe Mathieu-Daudé
If the Kconfig 'USB' value is not selected, it is pointless to build the USB core components. Add a stub for the HMP commands and usbdevice_create() which is called by usb_device_add in softmmu/vl.c. Signed-off-by: Philippe Mathieu-Daudé --- stubs/usb-dev-stub.c | 25 +

[PATCH 1/2] hw/usb/host-stub: Remove unused header

2021-04-24 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/host-stub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/host-stub.c b/hw/usb/host-stub.c index 538ed29684c..80809ceba54 100644 --- a/hw/usb/host-stub.c +++ b/hw/usb/host-stub.c @@ -31,7 +31,6 @@ */ #include "qemu/osdep.h"

[PATCH 0/2] hw/usb: Do not build USB subsystem if not required

2021-04-24 Thread Philippe Mathieu-Daudé
Not all targets use USB: allow the build system to not build it if not selected. Philippe Mathieu-Daudé (2): hw/usb/host-stub: Remove unused header hw/usb: Do not build USB subsystem if not required hw/usb/host-stub.c | 1 - stubs/usb-dev-stub.c | 25 +

Re: [PATCH 0/3] hw: Restrict PCMCIA to ARM target

2021-04-24 Thread Richard Henderson
On 4/24/21 3:20 PM, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (3): hw/arm/pxa2xx: Declare PCMCIA bus with Kconfig hw/ide: Add Kconfig dependency MICRODRIVE -> PCMCIA hw/pcmcia: Do not register PCMCIA type if not required Reviewed-by: Richard Henderson r~

[PATCH 3/3] hw/pcmcia: Do not register PCMCIA type if not required

2021-04-24 Thread Philippe Mathieu-Daudé
If the Kconfig 'PCMCIA' value is not selected, it is pointless to build the PCMCIA core components. (Currently only one machine of the ARM targets requires this). Signed-off-by: Philippe Mathieu-Daudé --- hw/pcmcia/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/3] hw/ide: Add Kconfig dependency MICRODRIVE -> PCMCIA

2021-04-24 Thread Philippe Mathieu-Daudé
The Microdrive Compact Flash can be plugged on a PCMCIA bus. Express the dependency using the 'depends on' Kconfig expression. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig index

[PATCH 1/3] hw/arm/pxa2xx: Declare PCMCIA bus with Kconfig

2021-04-24 Thread Philippe Mathieu-Daudé
The Intel XScale PXA chipsets provide a PCMCIA controller, which expose a PCMCIA (IDE) bus. Express this dependency using the Kconfig 'select' expression. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig

[PATCH 0/3] hw: Restrict PCMCIA to ARM target

2021-04-24 Thread Philippe Mathieu-Daudé
Only a pair of ARM PXA machines requires the PCMCIA type. Complete the Kconfig dependencies to only build the PCMCIA related devices when required. Philippe Mathieu-Daudé (3): hw/arm/pxa2xx: Declare PCMCIA bus with Kconfig hw/ide: Add Kconfig dependency MICRODRIVE -> PCMCIA hw/pcmcia: Do

Re: [PATCH v2 48/48] bsd-user: put back a break; that had gone missing...

2021-04-24 Thread Richard Henderson
On 4/24/21 9:00 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 47/48] bsd-user: style tweak: don't assign in if statement.

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

Re: [PATCH v2 45/48] bsd-user: style tweak: Use preferred {} in if/else statements.

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

Re: [PATCH v2 44/48] bsd-user: style tweak: use preferred block comments

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

Re: [PATCH v2 42/48] bsd-user: style tweak: spaces around operators and commas

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

Re: [PATCH v2 46/48] bsd-user: style tweak: Return is not a function call.

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

Re: [PATCH v2 41/48] bsd-user: style tweak: don't assign in if statements

2021-04-24 Thread Richard Henderson
On 4/24/21 9:00 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/strace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 43/48] bsd-user: style tweak: fold long lines

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

Re: [PATCH v2 39/48] bsd-user: style tweak: spaces around =, remove stray space

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

Re: [PATCH v2 40/48] bsd-user: style tweak: Use preferred block comments

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

Re: [PATCH v2 38/48] bsd-user: style tweak: use {} for all if statements, format else correctly

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

Re: [PATCH v2 37/48] bsd-user: style tweak: don't assign in if statements

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

Re: [PATCH v2 36/48] bsd-user: style tweak: Use preferred block comments

2021-04-24 Thread Richard Henderson
On 4/24/21 9:00 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/uaccess.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 35/48] bsd-user: style tweak: use {} for all if statements, format else correctly

2021-04-24 Thread Richard Henderson
On 4/24/21 9:00 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 34/48] bsd-user: style tweak: don't assign in if statements

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

Re: [PATCH v2 33/48] bsd-user: style tweak: Use preferred block comments

2021-04-24 Thread Richard Henderson
On 4/24/21 9:00 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 74 - 1 file changed, 43 insertions(+), 31 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 32/48] bsd-user: style tweak: remove spacing after '*' and add after }

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

Re: [PATCH v2 31/48] bsd-user: style tweak: use {} for all if statements, format else correctly

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/mmap.c | 112 1 file changed, 74 insertions(+), 38 deletions(-) Reviewed-by: Richard Henderson r~

[Bug 1855617] Re: savevm with hax saves wrong register state

2021-04-24 Thread Alex
** 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/1855617 Title: savevm with hax saves wrong register state Status in QEMU: New Bug

Re: [PATCH v2 30/48] bsd-user: style tweak: fix block comments

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

Re: [PATCH v2 29/48] bsd-user: style tweak: use {} correctly

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Format if/for/while statements with {} always, on a separate line and fix a couple indentations issues for singletons. Signed-off-by: Warner Losh --- bsd-user/elfload.c | 147 - 1 file

Re: [PATCH v2 28/48] bsd-user: style tweak: comments

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Use the preferred block comment style, move comments as needed for line length restrictions, delete some dead code that looked like a comment, break some lines 80 columns at the same time since there are many associated with

Re: [PATCH v2 27/48] bsd-user: style tweak: space pedantry

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: -start_data = 0; +start_data =n 0; Typo. Is this inside an ifdef or such? Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH v2 26/48] bsd-user: move sparc cpu_loop into target_arch_cpu.h as target_cpu_loop

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, 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: [PATCH v2 25/48] bsd-user: move x86 (i386 and x86_64) cpu_loop to target_arch_cpu.h

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, 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: [PATCH v2 22/48] bsd-user: use qemu_strtoul in preference to strtol

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

Re: [PATCH v2 21/48] bsd-user: style nits: return is not a function

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

Re: [PATCH v2 14/48] bsd-user: style tweak: Remove #if 0'd code

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/x86_64/target_syscall.h | 15 --- 1 file changed, 15 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 16/48] bsd-user: style tweak: Put {} around all if/else/for statements

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/bsdload.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 15/48] bsd-user: style tweak: return is not a function, eliminate ()

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/bsdload.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 13/48] bsd-user: style tweak: Remove #if 0'd code

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/strace.c | 8 1 file changed, 8 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 12/48] bsd-user: style tweak: Remove #if 0'd code

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/main.c | 143 1 file changed, 143 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 11/48] bsd-user: style tweak: Remove #if 0'd code

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/elfload.c | 12 1 file changed, 12 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 10/48] bsd-user: Remove commented out code

2021-04-24 Thread Richard Henderson
On 4/24/21 8:59 AM, i...@bsdimp.com wrote: From: Warner Losh Remove dead code that's been commented out forever. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 4 1 file changed, 4 deletions(-) Reviewed-by: Richard Henderson r~

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

2021-04-24 Thread Richard Henderson
On 4/23/21 8:34 PM, Alistair Francis wrote: BugLink: https://gitlab.com/qemu-project/qemu/-/issues/6 The issue got renumbered to 47, fwiw. Reviewed-by: Richard Henderson r~ Signed-off-by: Alistair Francis --- target/riscv/insn32.decode | 2 +- 1 file changed, 1 insertion(+), 1

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

2021-04-24 Thread Richard Henderson
On 4/23/21 8:34 PM, Alistair Francis wrote: --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -74,8 +74,6 @@ static inline bool has_ext(DisasContext *ctx, uint32_t ext) #ifdef TARGET_RISCV32 # define is_32bit(ctx) true -#elif defined(CONFIG_USER_ONLY) -# define

Re: [PATCH v2 00/48] bsd-user style and reorg patches

2021-04-24 Thread Warner Losh
This is a false positive. The files were wrong before, so it's detecting residual wrongness in the incremental changes. The cumulative diff of all 48 patches passes with only warnings: Use of uninitialized value $acpi_testexpected in string eq at ../scripts/ checkpatch.pl line 1529. WARNING:

Re: [PATCH v2 00/48] bsd-user style and reorg patches

2021-04-24 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210424160016.15200-1-...@bsdimp.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210424160016.15200-1-...@bsdimp.com Subject: [PATCH v2 00/48] bsd-user style and reorg

[PATCH 5/5] hw/arm/armsse: Manually reset the OR_IRQ devices

2021-04-24 Thread Philippe Mathieu-Daudé
The OR_IRQ device is bus-less, thus isn't reset automatically. Manually reset the OR IRQs in the armsse_reset() handler. Fixes: bb75e16d5e6 ("hw/arm/iotkit: Wire up MPC interrupt lines") Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/armsse.c | 4 1 file changed, 4 insertions(+) diff

[PATCH 4/5] hw/pci-host/raven: Manually reset the OR_IRQ device

2021-04-24 Thread Philippe Mathieu-Daudé
The OR_IRQ device is bus-less, thus isn't reset automatically. Add the raven_pcihost_reset() handler to manually reset the OR IRQ. Fixes: f40b83a4e31 ("40p: use OR gate to wire up raven PCI interrupts") Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/prep.c | 10 ++ 1 file

[PATCH v2 45/48] bsd-user: style tweak: Use preferred {} in if/else statements.

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 120 + 1 file changed, 78 insertions(+), 42 deletions(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index fbe3b3b2fe..36ffa6a880 100644 --- a/bsd-user/syscall.c +++

[PATCH 3/5] hw/block/nand: Register machine reset handler

2021-04-24 Thread Philippe Mathieu-Daudé
The TYPE_NAND device is bus-less, thus isn't reset automatically. Register a reset handler to get reset with the machine. Fixed: 7426aa72c36 ("nand: Don't inherit from Sysbus") Signed-off-by: Philippe Mathieu-Daudé --- hw/block/nand.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH v2 48/48] bsd-user: put back a break; that had gone missing...

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 1851311acd..d5c3168a6d 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -209,6 +209,7 @@ static int

[PATCH v2 42/48] bsd-user: style tweak: spaces around operators and commas

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 3352735c68..5e033e8bf4 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@

[PATCH v2 46/48] bsd-user: style tweak: Return is not a function call.

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 36ffa6a880..1f6b93923c 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -187,7 +187,7 @@ oidfmt(int

[PATCH v2 44/48] bsd-user: style tweak: use preferred block comments

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 46c0e29841..fbe3b3b2fe 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -140,8

[PATCH 2/5] hw/pcmcia/microdrive: Register machine reset handler

2021-04-24 Thread Philippe Mathieu-Daudé
The abstract PCMCIA_CARD is a bus-less TYPE_DEVICE, so devices implementing it are not reset automatically. Register a reset handler so children get reset on machine reset. Note, the DSCM-1 device (TYPE_DSCM1) which inherits TYPE_MICRODRIVE and PCMCIA_CARD reset itself when a disk is

[PATCH v2 41/48] bsd-user: style tweak: don't assign in if statements

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/strace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bsd-user/strace.c b/bsd-user/strace.c index aa4ab8cee7..94f2b59565 100644 --- a/bsd-user/strace.c +++ b/bsd-user/strace.c @@ -80,7 +80,8 @@ static void

[PATCH v2 34/48] bsd-user: style tweak: don't assign in if statements

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- 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 7f3cfa68aa..2494d9209d 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -288,7 +288,8 @@ static inline bool

[PATCH v2 43/48] bsd-user: style tweak: fold long lines

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 40 +--- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 5e033e8bf4..46c0e29841 100644 --- a/bsd-user/syscall.c +++

[PATCH v2 38/48] bsd-user: style tweak: use {} for all if statements, format else correctly

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/uaccess.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bsd-user/uaccess.c b/bsd-user/uaccess.c index aab5e995a9..2e8ad2982f 100644 --- a/bsd-user/uaccess.c +++ b/bsd-user/uaccess.c @@ -54,8 +54,9 @@ abi_long

[PATCH v2 25/48] bsd-user: move x86 (i386 and x86_64) cpu_loop to target_arch_cpu.h

2021-04-24 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 ---

[PATCH v2 39/48] bsd-user: style tweak: spaces around =, remove stray space

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/strace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/strace.c b/bsd-user/strace.c index be40b8a20c..e4153fd0a1 100644 --- a/bsd-user/strace.c +++ b/bsd-user/strace.c @@ -147,11 +147,11 @@ static void

[PATCH v2 29/48] bsd-user: style tweak: use {} correctly

2021-04-24 Thread imp
From: Warner Losh Format if/for/while statements with {} always, on a separate line and fix a couple indentations issues for singletons. Signed-off-by: Warner Losh --- bsd-user/elfload.c | 147 - 1 file changed, 92 insertions(+), 55 deletions(-)

[PATCH v2 19/48] bsd-user: style tweak: move extern to header file

2021-04-24 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.

[PATCH v2 37/48] bsd-user: style tweak: don't assign in if statements

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/uaccess.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bsd-user/uaccess.c b/bsd-user/uaccess.c index 7eb4546fed..aab5e995a9 100644 --- a/bsd-user/uaccess.c +++ b/bsd-user/uaccess.c @@ -14,7 +14,8 @@ abi_long

[PATCH v2 32/48] bsd-user: style tweak: remove spacing after '*' and add after }

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 5a82722281..de20e8329a 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -124,19 +124,19 @@ struct

[PATCH v2 22/48] bsd-user: use qemu_strtoul in preference to strtol

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/main.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 8f5cb7162d..a98a45df21 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -37,6 +37,7 @@ #include

[PATCH v2 35/48] bsd-user: style tweak: use {} for all if statements, format else correctly

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 2494d9209d..8d3767964d 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -358,16 +358,18 @@

[PATCH v2 31/48] bsd-user: style tweak: use {} for all if statements, format else correctly

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/mmap.c | 112 1 file changed, 74 insertions(+), 38 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 0ff06d7349..1aec1916c0 100644 --- a/bsd-user/mmap.c +++

[PATCH 1/5] hw/ppc/spapr_iommu: Register machine reset handler

2021-04-24 Thread Philippe Mathieu-Daudé
The TYPE_SPAPR_TCE_TABLE device is bus-less, thus isn't reset automatically. Register a reset handler to get reset with the machine. It doesn't seem to be an issue because it is that way since the device QDev'ifycation 8 years ago, in commit a83000f5e3f ("spapr-tce: make sPAPRTCETable a proper

[PATCH v2 23/48] bsd-user: introduce host_os.h for bsd-specific code and defaults

2021-04-24 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. Reviewed-by: Richard

[PATCH v2 36/48] bsd-user: style tweak: Use preferred block comments

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/uaccess.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bsd-user/uaccess.c b/bsd-user/uaccess.c index 89163257f4..7eb4546fed 100644 --- a/bsd-user/uaccess.c +++ b/bsd-user/uaccess.c @@ -4,9 +4,10 @@

[PATCH v2 26/48] bsd-user: move sparc cpu_loop into target_arch_cpu.h as target_cpu_loop

2021-04-24 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 | 270

[PATCH 0/5] hw: Fix reset of bus-less devices

2021-04-24 Thread Philippe Mathieu-Daudé
Hi, This series is the result of a code audit of the DeviceClass::reset() method uses, having Markus following explanation in mind [1]: "Propagating reset from the root of the qtree to the leaves won't reach a bus-less device, because the qtree contains only the devices that plug into a

[PATCH v2 16/48] bsd-user: style tweak: Put {} around all if/else/for statements

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/bsdload.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c index fd14ffa4cd..e1ed3b7b60 100644 --- a/bsd-user/bsdload.c +++ b/bsd-user/bsdload.c @@ -13,8 +13,9 @@

[PATCH v2 33/48] bsd-user: style tweak: Use preferred block comments

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/qemu.h | 74 - 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index de20e8329a..7f3cfa68aa 100644 --- a/bsd-user/qemu.h +++

[PATCH v2 24/48] bsd-user: create target_arch_cpu.h

2021-04-24 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

[PATCH v2 14/48] bsd-user: style tweak: Remove #if 0'd code

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/x86_64/target_syscall.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/bsd-user/x86_64/target_syscall.h b/bsd-user/x86_64/target_syscall.h index a8e6274b76..ec99354e15 100644 --- a/bsd-user/x86_64/target_syscall.h

[PATCH v2 28/48] bsd-user: style tweak: comments

2021-04-24 Thread imp
From: Warner Losh Use the preferred block comment style, move comments as needed for line length restrictions, delete some dead code that looked like a comment, break some lines > 80 columns at the same time since there are many associated with comments. Signed-off-by: Warner Losh ---

[PATCH v2 21/48] bsd-user: style nits: return is not a function

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 2c6764d372..243a5a5048 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -1544,7 +1544,7 @@ int

[PATCH v2 11/48] bsd-user: style tweak: Remove #if 0'd code

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/elfload.c | 12 1 file changed, 12 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 87154283ef..2c6764d372 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -1270,9 +1270,6 @@ int

[PATCH v2 27/48] bsd-user: style tweak: space pedantry

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/elfload.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 243a5a5048..f455a3812a 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@

[PATCH v2 17/48] bsd-user: style tweak: Fix commentary issues

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

[PATCH v2 13/48] bsd-user: style tweak: Remove #if 0'd code

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/strace.c | 8 1 file changed, 8 deletions(-) diff --git a/bsd-user/strace.c b/bsd-user/strace.c index 2c3b59caf0..be40b8a20c 100644 --- a/bsd-user/strace.c +++ b/bsd-user/strace.c @@ -128,14 +128,6 @@ static void

[PATCH v2 47/48] bsd-user: style tweak: don't assign in if statement.

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/syscall.c | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 1f6b93923c..1851311acd 100644 --- a/bsd-user/syscall.c +++

[PATCH v2 20/48] bsd-user: style tweak: use {} consistently in for / if / else statements

2021-04-24 Thread imp
From: Warner Losh Fix various issues with {} not being present on if / for statements. Minor line length tweaks Move an assignment in an if out. Reviewed-by: Richard Henderson Signed-off-by: Warner Losh --- bsd-user/main.c | 66 - 1 file

[PATCH v2 10/48] bsd-user: Remove commented out code

2021-04-24 Thread imp
From: Warner Losh Remove dead code that's been commented out forever. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 4 1 file changed, 4 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index b836b603af..7ccc8ad397 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@

[PATCH v2 07/48] bsd-user: style tweak: keyword space (

2021-04-24 Thread imp
From: Warner Losh Reviewed-by: Richard Henderson 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

[PATCH v2 40/48] bsd-user: style tweak: Use preferred block comments

2021-04-24 Thread imp
From: Warner Losh Signed-off-by: Warner Losh --- bsd-user/strace.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bsd-user/strace.c b/bsd-user/strace.c index e4153fd0a1..aa4ab8cee7 100644 --- a/bsd-user/strace.c +++ b/bsd-user/strace.c @@ -159,8 +159,10 @@ static

[PATCH v2 18/48] bsd-user: style tweak: Use preferred block comments

2021-04-24 Thread imp
From: Warner Losh Use the preferred block comment style. Reviewed-by: Richard Henderson 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

  1   2   >