Re: USB-MSD non-functional after merging v5.1 to v6.x (seems to be internal USB stack issue?)

2021-09-02 Thread kra...@redhat.com
Hi, > At some point during implementation of the STM USB stack must have run > into the same problem with the communications choking during MSD init. > And at the time (which involved a LOT of wireshark comparisons with a > real USB drive on the host and on the DCW2 Rpi2 stack) I'd added the >

Re: [PATCH v2 01/22] target/riscv: Fix trap cause for RV32 HS-mode CSR access from RV64 HS-mode

2021-09-02 Thread Alistair Francis
On Thu, Sep 2, 2021 at 9:36 PM Anup Patel wrote: > > We should be returning illegal instruction trap when RV64 HS-mode tries > to access RV32 HS-mode CSR. > > Fixes: d6f20dacea51 ("target/riscv: Fix 32-bit HS mode access permissions") > Signed-off-by: Anup Patel Reviewed-by: Alistair Francis

Re: USB-MSD non-functional after merging v5.1 to v6.x (seems to be internal USB stack issue?)

2021-09-02 Thread VintagePC
Well... the plot thickens. I have found the smoking gun. At some point during implementation of the STM USB stack must have run into the same problem with the communications choking during MSD init. And at the time (which involved a LOT of wireshark comparisons with a real USB drive on the

RE: [RFC][PATCH v1 00/10] Enable encrypted guest memory access in QEMU

2021-09-02 Thread Yao, Yuan
>-Original Message- >From: Ashish Kalra >Sent: Thursday, September 02, 2021 22:05 >To: yuan@linux.intel.com >Cc: thomas.lenda...@amd.com; arm...@redhat.com; ashish.ka...@amd.com; >brijesh.si...@amd.com; >dgilb...@redhat.com; ehabk...@redhat.com; Yamahata, Isaku >;

Re: [RFC 0/5] VirtIO RDMA

2021-09-02 Thread Jason Wang
On Thu, Sep 2, 2021 at 9:07 PM Junji Wei wrote: > > Hi all, > > This RFC aims to reopen the discussion of Virtio RDMA. > Now this is based on Yuval Shaia's RFC "VirtIO RDMA" > which implemented a frame for Virtio RDMA and a simple > control path (Not sure if Yuval Shaia has any further > plan for

Re: [PATCH v3 21/30] target/ppc: Introduce PowerPCCPUClass::has_work()

2021-09-02 Thread David Gibson
On Thu, Sep 02, 2021 at 06:15:34PM +0200, Philippe Mathieu-Daudé wrote: > Each POWER cpu has its own has_work() implementation. Instead of > overloading CPUClass on each PowerPCCPUClass init, register the > generic ppc_cpu_has_work() handler, and have it call the POWER > specific has_work(). I

Re: [PATCH 17/24] target/ppc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread David Gibson
On Thu, Sep 02, 2021 at 05:17:08PM +0200, Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/cpu.h | 4 ++-- > target/ppc/cpu_init.c| 2 +- >

Re: [PATCH v3 20/30] target/ppc: Restrict has_work() handler to sysemu and TCG

2021-09-02 Thread David Gibson
On Thu, Sep 02, 2021 at 06:15:33PM +0200, Philippe Mathieu-Daudé wrote: > Restrict has_work() to TCG sysemu. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/cpu_init.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git

[PATCH v3 39/43] bsd-user: Refactor load_elf_sections and is_target_elf_binary

2021-09-02 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 --- bsd-user/elfload.c | 344 + 1 file changed, 158 insertions(+),

[PATCH v3 35/43] bsd-user: Add target_arch_reg to describe a target's register set

2021-09-02 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 ---

[PATCH v3 42/43] bsd-user: Add '-0 argv0' option to bsd-user/main.c

2021-09-02 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:

[PATCH v3 28/43] bsd-user: Move stack initializtion into a per-os file.

2021-09-02 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 +

[PATCH v3 24/43] bsd-user: Create target specific vmparam.h

2021-09-02 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

[PATCH v3 43/43] bsd-user: Update mapping to handle reserved and starting conditions

2021-09-02 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

[PATCH v3 38/43] bsd-user: elfload.c style catch up patch

2021-09-02 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(-)

[PATCH v3 40/43] bsd-user: move qemu_log to later in the file

2021-09-02 Thread imp
From: Warner Losh Signed-off-by: Warner Losh Acked-by: Richard Henderson --- 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 50c8fdc1e2..1de86ae493 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c

[PATCH v3 23/43] bsd-user: define max args in terms of pages

2021-09-02 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

[PATCH v3 41/43] bsd-user: Implement interlock for atomic operations

2021-09-02 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

[PATCH v3 34/43] bsd-user: update debugging in mmap.c

2021-09-02 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 --- bsd-user/mmap.c | 55

[PATCH v3 37/43] bsd-user: add stubbed out core dump support

2021-09-02 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

[PATCH v3 19/43] bsd-user: start to move target CPU functions to target_arch*

2021-09-02 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 +

[PATCH v3 30/43] bsd-user: elf cleanup

2021-09-02 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

[PATCH v3 21/43] bsd-user: pull in target_arch_thread.h update target_arch_elf.h

2021-09-02 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

[PATCH v3 36/43] bsd-user: Add target_os_user.h to capture the user/kernel structures

2021-09-02 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 --- bsd-user/freebsd/target_os_user.h | 427

[PATCH v3 18/43] bsd-user: save the path to the qemu emulator

2021-09-02 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 --- bsd-user/main.c | 21 + bsd-user/qemu.h | 1 + 2 files

[PATCH v3 32/43] bsd-user: Rewrite target system call definintion glue

2021-09-02 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

[PATCH v3 27/43] bsd-user: Implement --seed and initialize random state

2021-09-02 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 glibc if a specific seed is specified or use the qcrypto library if not. Signed-off-by: Warner Losh ---

[PATCH v3 25/43] bsd-user: Add system independent stack, data and text limiting

2021-09-02 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

[PATCH v3 22/43] bsd-user: Include more things in qemu.h

2021-09-02 Thread imp
From: Warner Losh Include more header files to match bsd-user fork. 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 5e4cbb40d4..55d71130bb 100644 --- a/bsd-user/qemu.h +++

[PATCH v3 15/43] bsd-user: assume pthreads and support of __thread

2021-09-02 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

[PATCH v3 33/43] bsd-user: Make cpu_model and cpu_type visible to all of main.c

2021-09-02 Thread imp
From: Warner Losh cpu_model and cpu_type will be used future commits, so move them from main() scoped to file scoped. Signed-off-by: Warner Losh Acked-by: Richard Henderson --- bsd-user/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/main.c

[PATCH v3 13/43] bsd-user: TARGET_NGROUPS unused in this file, remove

2021-09-02 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

[PATCH v3 14/43] bsd-user: elfload: simplify bswap a bit.

2021-09-02 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

[PATCH v3 31/43] bsd-user: Remove dead #ifdefs from elfload.c

2021-09-02 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

[PATCH v3 12/43] bsd-user: remove a.out support

2021-09-02 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

[PATCH v3 17/43] bsd-user: Include host-os.h from main

2021-09-02 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 +++-

[PATCH v3 16/43] bsd-user: add host-os.h

2021-09-02 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 +++

[PATCH v3 11/43] bsd-user: Eliminate elf personality

2021-09-02 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.

[PATCH v3 26/43] bsd-user: *BSD specific siginfo defintions

2021-09-02 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 ---

[PATCH v3 10/43] bsd-user: implement path searching

2021-09-02 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

[PATCH v3 07/43] bsd-user: move arch specific defines out of elfload.c

2021-09-02 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 ---

[PATCH v3 29/43] bsd-user: Add architecture specific signal tramp code

2021-09-02 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 ---

[PATCH v3 09/43] bsd-user: Fix calculation of size to allocate

2021-09-02 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.

[PATCH v3 04/43] bsd-user: add license to bsdload.c

2021-09-02 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

[PATCH v3 20/43] bsd-user: Move per-cpu code into target_arch_cpu.h

2021-09-02 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 --- bsd-user/i386/target_arch_cpu.c | 1 + bsd-user/i386/target_arch_cpu.h | 209 bsd-user/main.c

[PATCH v3 08/43] bsd-user: pass the bsd_param into loader_exec

2021-09-02 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é

[PATCH v3 05/43] bsd-user: style nits: bsdload.c whitespace to qemu standard

2021-09-02 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 +++

[PATCH v3 02/43] bsd-user: add copyright header to elfload.c

2021-09-02 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

[PATCH v3 01/43] bsd-user: remove sparc and sparc64

2021-09-02 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

[PATCH v3 00/43] bsd-user updates to run hello world

2021-09-02 Thread imp
From: Warner Losh This series of patches gets me to the point that I can run "Hello World" on i386 and x86_64. This is for static binaries only, that are relatively small, but it's better than the 100% instant mmap failre that is the current state of all things bsd-user in upstream qemu. Future

[PATCH v3 06/43] bsd-user: Remove all non-x86 code from elfload.c

2021-09-02 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

[PATCH v3 03/43] bsd-user: Add Stacey's copyright to main.c

2021-09-02 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

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

2021-09-02 Thread Alistair Francis
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. Signed-off-by: Justin Restivo Signed-off-by: Alexandra Clifford Signed-off-by: Amanda Strnad Signed-off-by: Alistair Francis ---

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

2021-09-02 Thread Alistair Francis
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 - hw/timer/sifive_pwm.c | 1 + hw/riscv/Kconfig

[PATCH v1 1/2] target/riscv: Implement the stval/mtval illegal instruction

2021-09-02 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 0/2] Add the SiFive PWM device

2021-09-02 Thread Alistair Francis
From: Alistair Francis This series adds a the SiFive PWM device and connects it to the sifive_u machine. This has been tested as a timer with seL4. v2: - Address Bin's comments - Expose PWM via the device tree Alistair Francis (2): hw/timer: Add SiFive PWM support sifive_u: Connect the

[PATCH v1 2/2] target/riscv: Set mtval and stval support

2021-09-02 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 6d41a16ae3..64ebb593fb 100644 --- a/target/riscv/cpu.h +++

[PATCH v1 0/2] RISC-V: Populate mtval and stval

2021-09-02 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 (2): target/riscv: Implement the stval/mtval illegal instruction target/riscv: Set mtval and stval support target/riscv/cpu.h| 6

Re: [PATCH v4 7/9] migration: Simplify alignment and alignment checks

2021-09-02 Thread Peter Xu
On Thu, Sep 02, 2021 at 03:14:30PM +0200, David Hildenbrand wrote: > diff --git a/migration/migration.c b/migration/migration.c > index bb909781b7..ae97c2c461 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -391,7 +391,7 @@ int >

Re: [PATCH v4 8/9] migration/ram: Factor out populating pages readable in ram_block_populate_pages()

2021-09-02 Thread Peter Xu
On Thu, Sep 02, 2021 at 03:14:31PM +0200, David Hildenbrand wrote: > Let's factor out prefaulting/populating to make further changes easier to > review. While at it, use the actual page size of the ramblock, which > defaults to qemu_real_host_page_size for anonymous memory. > > Signed-off-by:

Re: [PATCH] net: Add "info neighbors" command

2021-09-02 Thread Patrick Venture
On Thu, Sep 2, 2021 at 2:21 PM Doug Evans wrote: > This command dumps the ARP and NDP tables maintained within slirp. > One use-case for it is showing the guest's IPv6 address(es). > > Signed-off-by: Doug Evans > Reviewed-by: Patrick Venture > --- > hmp-commands-info.hx | 15

Re: [PATCH v5 2/2] memory: Have 'info mtree' remove duplicated Address Space information

2021-09-02 Thread Peter Xu
Hi, Phil, On Thu, Sep 02, 2021 at 08:26:04AM +0200, Philippe Mathieu-Daudé wrote: > address-space shared 4 times: I commented on the format of the output, I saw that it's switched back to the v1. Any reason? Although I still think what I proposed looks better, I don't have a strong "no" to

Re: [PATCH v5 1/2] memory: Split mtree_info() as mtree_info_flatview() + mtree_info_as()

2021-09-02 Thread Peter Xu
On Thu, Sep 02, 2021 at 08:26:03AM +0200, Philippe Mathieu-Daudé wrote: > While mtree_info() handles both ASes and flatviews cases, > the two cases share basically no code. Split mtree_info() > as mtree_info_flatview() + mtree_info_as() to simplify. > > Suggested-by: Peter Maydell > Reviewed-by:

[PATCH] net: Add "info neighbors" command

2021-09-02 Thread Doug Evans
This command dumps the ARP and NDP tables maintained within slirp. One use-case for it is showing the guest's IPv6 address(es). Signed-off-by: Doug Evans --- hmp-commands-info.hx | 15 +++ include/net/slirp.h| 1 + net/slirp.c| 15

RE: [PATCH v2 04/19] host-utils: add 128-bit quotient support to divu128/divs128

2021-09-02 Thread Luis Fernando Fujita Pires
From: Richard Henderson > Hmm. I'll note that we have a better divmod primitive in tree, but we aren't > using it > here: udiv_qrnnd in include/fpu/softfloat-macros.h. Good to know! I'll change to a (much simpler) implementation using udiv_qrnnd. Any pointers on what would be a good place to

RE: [PATCH v2 03/19] host-utils: move checks out of divu128/divs128

2021-09-02 Thread Luis Fernando Fujita Pires
From: Richard Henderson > > -static inline int divs128(int64_t *plow, int64_t *phigh, int64_t > > divisor) > > +static inline void divs128(int64_t *plow, int64_t *phigh, int64_t > > +divisor) > > { > > -if (divisor == 0) { > > -return 1; > > -} else { > > -__int128_t

Re: [PATCH 24/24] user: Remove cpu_get_pic_interrupt() stubs

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:19 AM Philippe Mathieu-Daudé wrote: > cpu_get_pic_interrupt() is now unreachable from user-mode, > delete the unnecessary stubs. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/cpu.h | 2 +- > bsd-user/main.c | 7 --- > linux-user/main.c | 7 ---

Re: [PATCH 22/24] target/xtensa: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:19 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/xtensa/cpu.h| 4 ++-- > target/xtensa/cpu.c| 2 +- > target/xtensa/exc_helper.c | 7 ++- > 3

Re: [PATCH 18/24] target/riscv: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/riscv/cpu.h| 2 +- > target/riscv/cpu.c| 2 +- > target/riscv/cpu_helper.c | 5 - > 3 files

Re: [PATCH 21/24] target/rx: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:19 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/rx/cpu.h| 2 ++ > target/rx/cpu.c| 2 +- > target/rx/helper.c | 4 > 3 files changed, 7 insertions(+), 1

Re: [PATCH 17/24] target/ppc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/ppc/cpu.h | 4 ++-- > target/ppc/cpu_init.c| 2 +- > target/ppc/excp_helper.c | 21

Re: [PATCH 20/24] target/sparc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:19 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sparc/cpu.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > Reviewed-by: Warner Losh > diff --git

Re: [PATCH 15/24] target/nios2: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/nios2/cpu.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Reviewed-by: Warner Losh > diff --git

Re: [PATCH 19/24] target/sh4: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:19 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/sh4/cpu.h| 4 ++-- > target/sh4/cpu.c| 2 +- > target/sh4/helper.c | 9 ++--- > 3 files changed, 5

Re: [PATCH 14/24] target/mips: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/tcg/tcg-internal.h | 5 +++-- > target/mips/cpu.c | 2 +- > target/mips/tcg/exception.c

Re: [PATCH 16/24] target/openrisc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/openrisc/cpu.h | 5 +++-- > target/openrisc/cpu.c | 2 +- > target/openrisc/interrupt.c | 2 -- >

Re: [PATCH 13/24] target/microblaze: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/microblaze/cpu.h| 2 ++ > target/microblaze/cpu.c| 2 +- > target/microblaze/helper.c | 13 ++--- >

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

2021-09-02 Thread Patrick Venture
On Thu, Sep 2, 2021 at 12:01 PM Chris Rauer wrote: > kudo-bmc is a board supported by OpenBMC. > https://github.com/openbmc/openbmc/tree/master/meta-fii/meta-kudo > > Tested: Booted kudo firmware. > Signed-off-by: Chris Rauer > Reviewed-by: Patrick Venture > --- > docs/system/arm/nuvoton.rst

Re: [PATCH 11/24] target/i386: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/tcg/helper-tcg.h | 2 ++ > target/i386/tcg/seg_helper.c | 10 ++ > target/i386/tcg/tcg-cpu.c| 2 +-

Re: [PATCH 12/24] target/m68k: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/m68k/cpu.h | 2 ++ > target/m68k/cpu.c | 2 +- > target/m68k/op_helper.c | 16 +++- > 3

Re: [PATCH 10/24] target/hppa: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/hppa/cpu.h| 4 ++-- > target/hppa/cpu.c| 2 +- > target/hppa/int_helper.c | 7 ++- > 3 files

Re: [PATCH 08/24] target/avr: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/avr/cpu.h| 2 ++ > target/avr/cpu.c| 2 +- > target/avr/helper.c | 2 ++ > 3 files changed, 5 insertions(+),

Re: [PATCH 09/24] target/cris: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/cris/cpu.h| 2 +- > target/cris/cpu.c| 4 ++-- > target/cris/helper.c | 17 ++--- > 3 files

Re: [PATCH 07/24] target/arm: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:17 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/arm/cpu.h | 3 +-- > target/arm/cpu.c | 7 +-- > target/arm/cpu_tcg.c | 6 +++--- > 3 files changed, 9

Re: [PATCH 06/24] target/alpha: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:17 AM Philippe Mathieu-Daudé wrote: > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/alpha/cpu.h| 2 +- > target/alpha/cpu.c| 2 +- > target/alpha/helper.c | 5 ++--- > 3 files changed, 4

Re: [RFC PATCH 04/24] accel/tcg: Rename user-mode do_interrupt hack as fake_user_exception

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:17 AM Philippe Mathieu-Daudé wrote: > do_interrupt() is sysemu specific. However due to some X86 > specific hack, it is also used in user-mode emulation, which > is why it couldn't be restricted to CONFIG_SOFTMMU (see the > comment around added in commit 78271684719:

Re: [PATCH 03/24] target/i386: Simplify TARGET_X86_64 #ifdef'ry

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:17 AM Philippe Mathieu-Daudé wrote: > Merge two TARGET_X86_64 consecutive blocks. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/i386/tcg/seg_helper.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > Reviewed-by: Warner Losh > > diff --git

Re: [PATCH 02/24] target/i386: Restrict sysemu-only fpu_helper helpers

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:17 AM Philippe Mathieu-Daudé wrote: > Restrict some sysemu-only fpu_helper helpers (see commit > 83a3d9c7402: "i386: separate fpu_helper sysemu-only parts"). > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Warner Losh > --- > target/i386/cpu.h | 3 +++ > 1

Re: [PATCH 01/24] target/xtensa: Restrict do_transaction_failed() to sysemu

2021-09-02 Thread Warner Losh
On Thu, Sep 2, 2021 at 9:17 AM Philippe Mathieu-Daudé wrote: > The do_transaction_failed() is restricted to system emulation since > commit cbc183d2d9f ("cpu: move cc->transaction_failed to tcg_ops"). > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Warner Losh > --- >

Re: [PATCH v2 4/9] escc: introduce escc_hard_reset_chn() for hardware reset

2021-09-02 Thread Mark Cave-Ayland
On 02/09/2021 20:31, Peter Maydell wrote: On Thu, 2 Sept 2021 at 18:46, Mark Cave-Ayland wrote: On 02/09/2021 16:42, Peter Maydell wrote: On Thu, 2 Sept 2021 at 11:33, Mark Cave-Ayland wrote: This new hardware reset function is to be called for both channels when the hardware reset bit

Re: [PATCH v2 4/9] escc: introduce escc_hard_reset_chn() for hardware reset

2021-09-02 Thread Peter Maydell
On Thu, 2 Sept 2021 at 18:46, Mark Cave-Ayland wrote: > > On 02/09/2021 16:42, Peter Maydell wrote: > > > On Thu, 2 Sept 2021 at 11:33, Mark Cave-Ayland > > wrote: > >> > >> This new hardware reset function is to be called for both channels when the > >> hardware reset bit is written to register

Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-02 Thread Peter Maydell
On Thu, 2 Sept 2021 at 17:09, Guenter Roeck wrote: > > On 9/2/21 8:58 AM, Peter Maydell wrote: > > On Sun, 8 Aug 2021 at 02:34, Guenter Roeck wrote: > >> > >> The control register does not really have a means to deselect > >> all chip selects directly. As result, CS is effectively never > >>

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

2021-09-02 Thread Chris Rauer
kudo-bmc is a board supported by OpenBMC. https://github.com/openbmc/openbmc/tree/master/meta-fii/meta-kudo Tested: Booted kudo firmware. Signed-off-by: Chris Rauer --- docs/system/arm/nuvoton.rst | 1 + hw/arm/npcm7xx_boards.c | 34 ++ 2 files changed, 35

Re: [PATCH v2 4/9] escc: introduce escc_hard_reset_chn() for hardware reset

2021-09-02 Thread Mark Cave-Ayland
On 02/09/2021 16:42, Peter Maydell wrote: On Thu, 2 Sept 2021 at 11:33, Mark Cave-Ayland wrote: This new hardware reset function is to be called for both channels when the hardware reset bit is written to register WR9. Its initial implementation is the same as the existing escc_reset_chn()

[PATCH v2 3/5] hw/virtio: Remove NULL check in virtio_free_region_cache()

2021-09-02 Thread Philippe Mathieu-Daudé
virtio_free_region_cache() is called within call_rcu(), always with a non-NULL argument. Ensure new code keep it that way by replacing the NULL check by an assertion. Add a comment this function is called within call_rcu(). Reviewed-by: Stefano Garzarella Reviewed-by: Stefan Hajnoczi

[PATCH v2 5/5] hw/virtio: Have virtqueue_get_avail_bytes() pass caches arg to callees

2021-09-02 Thread Philippe Mathieu-Daudé
Both virtqueue_packed_get_avail_bytes() and virtqueue_split_get_avail_bytes() access the region cache, but their caller also does. Simplify by having virtqueue_get_avail_bytes calling both with RCU lock held, and passing the caches as argument. Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH v2 2/5] hw/virtio: Comment virtqueue_flush() must be called with RCU read lock

2021-09-02 Thread Philippe Mathieu-Daudé
Reported-by: Stefano Garzarella Suggested-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio.h | 7 +++ hw/virtio/virtio.c | 1 + 2 files changed, 8 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index

[PATCH v2 4/5] hw/virtio: Acquire RCU read lock in virtqueue_packed_drop_all()

2021-09-02 Thread Philippe Mathieu-Daudé
vring_get_region_caches() must be called with the RCU read lock acquired. virtqueue_packed_drop_all() does not, and uses the 'caches' pointer. Fix that by using the RCU_READ_LOCK_GUARD() macro. Reported-by: Stefano Garzarella Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio.c | 2 ++

[PATCH v2 1/5] hw/virtio: Document virtio_queue_packed_empty_rcu is called within RCU

2021-09-02 Thread Philippe Mathieu-Daudé
While virtio_queue_packed_empty_rcu() uses the '_rcu' suffix, it is not obvious it is called within rcu_read_lock(). All other functions from this file called with the RCU locked have a comment describing it. Document this one similarly for consistency. Reviewed-by: Stefano Garzarella

[PATCH v2 0/5] hw/virtio: Minor housekeeping patches

2021-09-02 Thread Philippe Mathieu-Daudé
Hi, This series contains few patches I gathered while tooking notes trying to understand issues #300-#302. Since v1: - Added virtqueue_flush comment (Stefano) - Call RCU_READ_LOCK_GUARD in virtqueue_packed_drop_all (Stefano) Philippe Mathieu-Daudé (5): hw/virtio: Document

  1   2   3   4   5   >