Re: [PATCH] docs: expand firmware descriptor to allow flash without NVRAM

2022-01-24 Thread Gerd Hoffmann
Hi, > > { 'struct' : 'FirmwareMappingFlash', > > - 'data' : { 'executable' : 'FirmwareFlashFile', > > - 'nvram-template' : 'FirmwareFlashFile' } } > > + 'data' : { 'mode': 'FirmwareFlashMode', > > + 'executable' : 'FirmwareFlashFile', > > +

[PATCH v6 2/5] target/riscv: add PTE_A/PTE_D/PTE_U bits check for inner PTE

2022-01-24 Thread Weiwei Li
Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Anup Patel --- target/riscv/cpu_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 2a921bedfd..a5bf07ccb6 100644 --- a/target/riscv/cpu_helper.c +++

[PATCH v6 4/5] target/riscv: add support for svinval extension

2022-01-24 Thread Weiwei Li
- sinval.vma, hinval.vvma and hinval.gvma do the same as sfence.vma, hfence.vvma and hfence.gvma except extension check - do nothing other than extension check for sfence.w.inval and sfence.inval.ir Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Anup Patel ---

[PATCH v6 3/5] target/riscv: add support for svnapot extension

2022-01-24 Thread Weiwei Li
- add PTE_N bit - add PTE_N bit check for inner PTE - update address translation to support 64KiB continuous region (napot_bits = 4) Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Anup Patel --- target/riscv/cpu.c| 2 ++ target/riscv/cpu_bits.h | 1 +

Re: [PATCH v2 14/14] target/ppc: 405: Watchdog timer exception cleanup

2022-01-24 Thread Cédric Le Goater
On 1/18/22 19:44, Fabiano Rosas wrote: Remove references to BookE. Signed-off-by: Fabiano Rosas trace point is becoming redundant. Anyhow, Reviewed-by: Cédric Le Goater Thanks, C. --- target/ppc/excp_helper.c | 9 - 1 file changed, 9 deletions(-) diff --git

Re: RFC: QMP configuration - allocating/setting qdev array properties?

2022-01-24 Thread Markus Armbruster
John Snow writes: > On Wed, Jan 19, 2022 at 5:12 AM Markus Armbruster wrote: [...] >> Another stop gap solution could be making QDict iterate in insertion >> order, like Python dict does since 3.6. >> > > I like this idea, I think. Are there any possible downsides here? > Making the order

[PATCH v6 0/5] support subsets of virtual memory extension

2022-01-24 Thread Weiwei Li
This patchset implements virtual memory related RISC-V extensions: Svnapot version 1.0, Svinval vesion 1.0, Svpbmt version 1.0. Specification: https://github.com/riscv/virtual-memory/tree/main/specs The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-virtmem-upstream-v6

[PATCH v6 1/5] target/riscv: Ignore reserved bits in PTE for RV64

2022-01-24 Thread Weiwei Li
From: Guo Ren Highest bits of PTE has been used for svpbmt, ref: [1], [2], so we need to ignore them. They cannot be a part of ppn. 1: The RISC-V Instruction Set Manual, Volume II: Privileged Architecture 4.4 Sv39: Page-Based 39-bit Virtual-Memory System 4.5 Sv48: Page-Based 48-bit

Re: [PATCH v2] target/riscv: correct "code should not be reached" for x-rv128

2022-01-24 Thread LIU Zhiwei
On 2022/1/25 04:24, Frédéric Pétrot wrote: The addition of uxl support in gdbstub adds a few checks on the maximum register length, but omitted MXL_RV128, an experimental feature. This patch makes rv128 react as rv64, as previously. Signed-off-by: Frédéric Pétrot Reviewed-by: LIU Zhiwei

Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net

2022-01-24 Thread Akihiko Odaki
On Tue, Jan 25, 2022 at 8:00 AM Roman Bolshakov wrote: > > On Mon, Jan 24, 2022 at 08:14:31PM +, Peter Maydell wrote: > > On Mon, 24 Jan 2022 at 17:49, Roman Bolshakov wrote: > > > I'm not sure why blocks are Objective-C specific. All the data I have > > > shows the opposite [3][4][5].

[PATCH] linux-user: Implement starttime field in self stat emulation

2022-01-24 Thread Cameron Esfahani
Instead of always returning 0, return actual starttime. Signed-off-by: Cameron Esfahani --- linux-user/syscall.c | 28 1 file changed, 28 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5950222a77..59265ab986 100644 ---

[PATCH v2 37/40] bsd-user/signal.c: do_sigaltstack

2022-01-24 Thread Warner Losh
Implement the meat of the sigaltstack(2) system call with do_sigaltstack. With that, all the stubbed out routines are complete, so remove now-incorrect comment. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 72

[PATCH v2 33/40] bsd-user/signal.c: tswap_siginfo

2022-01-24 Thread Warner Losh
Convert siginfo from targer to host. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 53 +++ 1 file changed, 53 insertions(+) diff --git a/bsd-user/signal.c b/bsd-user/signal.c index

[PATCH v2 35/40] bsd-user/signal.c: implement do_sigreturn

2022-01-24 Thread Warner Losh
Implements the meat of a sigreturn(2) system call via do_sigreturn, and helper reset_signal_mask. Fix the prototype of do_sigreturn in qemu.h and remove do_rt_sigreturn since it's linux only. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh PENDING COMMENTS: from

[PATCH v2 32/40] bsd-user/signal.c: handle_pending_signal

2022-01-24 Thread Warner Losh
Handle a queued signal. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 7 bsd-user/signal.c | 87 +++ 2 files changed, 94 insertions(+) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h

[PATCH v2 28/40] bsd-user/signal.c: Implement dump_core_and_abort

2022-01-24 Thread Warner Losh
Force delivering a signal and generating a core file. It's a global function for the moment... Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/signal.c | 76 +

[PATCH v2 22/40] bsd-user: Add host signals to the build

2022-01-24 Thread Warner Losh
Start to add the host signal functionality to the build. Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/meson.build | 1 + bsd-user/signal.c| 1 + meson.build | 1 + 3 files changed, 3 insertions(+) diff --git

[PATCH v2 38/40] MAINTAINERS: Add tests/vm/*bsd to the list to get reviews on

2022-01-24 Thread Warner Losh
tests/vm/*bsd (especailly tests/vm/freebsd) are adjacent to the bsd-user stuff and we're keen on keeping them working as well. Signed-off-by: Warner Losh --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index c98a61caeee..a2809761f65 100644 ---

[PATCH v2 29/40] bsd-user/signal.c: Fill in queue_signal

2022-01-24 Thread Warner Losh
Fill in queue signal implementation, as well as routines allocate and delete elements of the signal queue. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 1 + bsd-user/signal.c | 13 - 2 files changed, 13 insertions(+), 1

[PATCH v2 25/40] bsd-user/signal.c: Implement rewind_if_in_safe_syscall

2022-01-24 Thread Warner Losh
Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 2 ++ bsd-user/signal.c | 13 - 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index

[PATCH v2 40/40] bsd-user/freebsd/target_os_ucontext.h: Prefer env as arg name for CPUArchState args

2022-01-24 Thread Warner Losh
Signed-off-by: Warner Losh --- bsd-user/freebsd/target_os_ucontext.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsd-user/freebsd/target_os_ucontext.h b/bsd-user/freebsd/target_os_ucontext.h index 41b28b2c150..b196b1c629f 100644 ---

[PATCH v2 24/40] bsd-user/signal.c: host_to_target_siginfo_noswap

2022-01-24 Thread Warner Losh
Implement conversion of host to target siginfo. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 113 ++ 1 file changed, 113 insertions(+) diff --git a/bsd-user/signal.c b/bsd-user/signal.c

[PATCH v2 36/40] bsd-user/signal.c: implement do_sigaction

2022-01-24 Thread Warner Losh
Implement the meat of the sigaction(2) system call with do_sigaction and helper routiner block_signals (which is also used to implemement signal masking so it's global). Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Pending Comments from Peter Maydell (1) in

[PATCH v2 21/40] bsd-user/host/x86_64/host-signal.h: Implement host_signal_*

2022-01-24 Thread Warner Losh
Implement host_signal_pc, host_signal_set_pc and host_signal_write for x86_64. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/host/x86_64/host-signal.h | 37 ++ 1 file changed, 37

[PATCH v2 30/40] bsd-user/signal.c: sigset manipulation routines.

2022-01-24 Thread Warner Losh
target_sigemptyset: resets a set to having no bits set target_sigaddset: adds a signal to a set target_sigismember: returns true when signal is a member host_to_target_sigset_internal: convert host sigset to target host_to_target_sigset: convert host sigset to target

[PATCH v2 26/40] bsd-user/signal.c: Implement host_signal_handler

2022-01-24 Thread Warner Losh
Implement host_signal_handler to handle signals generated by the host and to do safe system calls. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 105 ++ 1 file changed, 105 insertions(+) diff

[PATCH v2 27/40] bsd-user/strace.c: print_taken_signal

2022-01-24 Thread Warner Losh
print_taken_signal() prints signals when we're tracing signals. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/qemu.h | 10 + bsd-user/strace.c | 97

[PATCH v2 39/40] bsd-user: Rename arg name for target_cpu_reset to env

2022-01-24 Thread Warner Losh
Rename the parameter name for target_cpu_reset's CPUArchState * arg from cpu to env. Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h| 2 +- bsd-user/i386/target_arch_cpu.h | 4 ++-- bsd-user/x86_64/target_arch_cpu.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)

[PATCH v2 34/40] bsd-user/signal.c: process_pending_signals

2022-01-24 Thread Warner Losh
Process the currently queued signals. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 56 ++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/bsd-user/signal.c b/bsd-user/signal.c

[PATCH v2 19/40] bsd-user/host/arm/host-signal.h: Implement host_signal_*

2022-01-24 Thread Warner Losh
Implement host_signal_pc, host_signal_set_pc and host_signal_write for arm. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/host/arm/host-signal.h | 35 + 1 file changed, 35 insertions(+) create mode 100644 bsd-user/host/arm/host-signal.h

[PATCH v2 16/40] bsd-user/signal.c: implement abstract target / host signal translation

2022-01-24 Thread Warner Losh
Implement host_to_target_signal and target_to_host_signal. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell --- bsd-user/signal-common.h | 2 ++ bsd-user/signal.c| 16 2 files changed, 18 insertions(+) diff

[PATCH v2 23/40] bsd-user: Add trace events for bsd-user

2022-01-24 Thread Warner Losh
Add the bsd-user specific events and infrastructure. Only include the linux-user trace events for linux-user, not bsd-user. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/signal.c | 1

[PATCH v2 15/40] bsd-user/arm/target_arch_cpu.h: Implement data faults

2022-01-24 Thread Warner Losh
Update for the richer set of data faults that are now possible. Copied largely from linux-user/arm/cpu_loop.c, with minor typo fixes. Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 45 ++

[PATCH v2 18/40] bsd-user/signal.c: Add si_type argument to queue_signal

2022-01-24 Thread Warner Losh
Mirror the linux-user practice and add a si_type argument to queue signal. This will be transported as the upper 8 bits in the si_type element of siginfo so that we know what bits of the structure are valid and so we can properly implement host_to_target_siginfo_noswap and tswap_siginfo. Adapt the

[PATCH v2 17/40] bsd-user/signal.c: Implement signal_init()

2022-01-24 Thread Warner Losh
Initialize the signal state for the emulator. Setup a set of sane default signal handlers, mirroring the host's signals. For fatal signals (those that exit by default), establish our own set of signal handlers. Stub out the actual signal handler we use for the moment. Signed-off-by: Stacey Son

[PATCH v2 31/40] bsd-user/signal.c: setup_frame

2022-01-24 Thread Warner Losh
setup_frame sets up a signalled stack frame. Associated routines to extract the pointer to the stack frame and to support alternate stacks. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/main.c | 5 +++ bsd-user/qemu.h | 3 +-

[PATCH v2 13/40] bsd-user/arm/target_arch_cpu.h: Correct code pointer

2022-01-24 Thread Warner Losh
The code has moved in FreeBSD since the emulator was started, update the comment to reflect that change. Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 20/40] bsd-user/host/i386/host-signal.h: Implement host_signal_*

2022-01-24 Thread Warner Losh
Implement host_signal_pc, host_signal_set_pc and host_signal_write for i386. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/host/i386/host-signal.h | 37 1 file changed, 37

[PATCH v2 08/40] bsd-user/signal.c: implement force_sig_fault

2022-01-24 Thread Warner Losh
Start to implement the force_sig_fault code. This currently just calls queue_signal(). The bsd-user fork version of that will handle this the synchronous nature of this call. Add signal-common.h to hold signal helper functions like force_sig_fault. Signed-off-by: Stacey Son Signed-off-by: Kyle

[PATCH v2 14/40] bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF

2022-01-24 Thread Warner Losh
Use force_sig_fault to implement unknown opcode. This just uninlines that function, so simplify things by using it. Fold in EXCP_NOCP and EXCP_INVSTATE, as is done in linux-user. Make a note about slight differences with FreeBSD in case any of them turn out to be important later. Signed-off-by:

[PATCH v2 10/40] bsd-user/signal.c: Implement cpu_loop_exit_sigsegv

2022-01-24 Thread Warner Losh
First attempt at implementing cpu_loop_exit_sigsegv, mostly copied from linux-user version of this function. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/signal.c | 15 --- 1

[PATCH v2 12/40] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together

2022-01-24 Thread Warner Losh
Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in linux-user. The prior adjustment of register 15 isn't needed, so remove that. Remove a redunant comment (that code in FreeBSD never handled break points). It's unclear why BKPT was an alias for system calls, but FreeBSD doesn't do that

[PATCH v2 05/40] bsd-user: Remove vestiges of signal queueing code

2022-01-24 Thread Warner Losh
bsd-user was copied from linux-user at a time when it queued signals. Remove those vestiges of thse code. Retain the init function, even though it's now empty since other stuff will likely be added there. Make it static since it's not called from outside of main.c Signed-off-by: Warner Losh ---

[PATCH v2 09/40] bsd-user/signal-common.h: Move signal functions prototypes to here

2022-01-24 Thread Warner Losh
Signed-off-by: Warner Losh --- bsd-user/qemu.h | 8 bsd-user/signal-common.h | 6 ++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 671b26f00cc..99c37fc9942 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -199,14

[PATCH v2 03/40] bsd-user/arm/signal.c: Implement setup_sigframe_arch for arm

2022-01-24 Thread Warner Losh
Fix the broken context setting for arm. FreeBSD's get_mcontext does not fill in the vfp info. It's filled in in sigframe(). This corresponds to the new setup_sigframe_arch which fills in mcontext, then adjusts it to point to the vfp context in the sigframe and fills in that context as well. Add

[PATCH v2 02/40] bsd-user: Create setup_sigframe_arch to setup sigframe context

2022-01-24 Thread Warner Losh
Define setup_sigframe_arch whose job it is to setup the mcontext for the sigframe. Implement for x86 to just call mcontext. Signed-off-by: Warner Losh --- bsd-user/freebsd/target_os_signal.h | 3 +++ bsd-user/i386/signal.c | 13 + bsd-user/x86_64/signal.c|

[PATCH v2 11/40] bsd-user/signal.c: implement cpu_loop_exit_sigbus

2022-01-24 Thread Warner Losh
First attempt at implementing cpu_loop_exit_sigbus, mostly copied from linux-user version of this function. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/signal.c | 12 +--- 1

[PATCH v2 06/40] bsd-user: Bring in docs from linux-user for signal_pending

2022-01-24 Thread Warner Losh
This is currently unused, so no code adjustments are needed. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 4dd209e402d..671b26f00cc 100644 --- a/bsd-user/qemu.h +++

[PATCH v2 07/40] bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user

2022-01-24 Thread Warner Losh
Move the EXCP_ATOMIC case to match linux-user/arm/cpu_loop.c:cpu_loop ordering. Signed-off-by: Warner Losh Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v2 04/40] bsd-user/arm/signal.c: get_mcontext should zero vfp data

2022-01-24 Thread Warner Losh
FreeBSD's get_mcontext doesn't return any vfp data. Instead, it zeros out the vfp feilds (and all the spare fields). Impelement this behavior. We're still missing the sysarch(ARM_GET_VFPCONTEXT) syscall, though. Signed-off-by: Warner Losh --- bsd-user/arm/signal.c | 8 1 file changed,

[PATCH v2 01/40] bsd-user: Complete FreeBSD siginfo

2022-01-24 Thread Warner Losh
Fill in the missing FreeBSD siginfo fields, and add some comments. Signed-off-by: Warner Losh --- bsd-user/freebsd/target_os_siginfo.h | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bsd-user/freebsd/target_os_siginfo.h b/bsd-user/freebsd/target_os_siginfo.h

[PATCH v2 00/40] bsd-user: upstream our signal implementation

2022-01-24 Thread Warner Losh
Upstream the bsd-user fork signal implementation, for the most part. This series of commits represents nearly all of the infrastructure that surround signals, except the actual system call glue (that was also reworked in the fork and needs its own series). In addition, this adds the sigsegv and

Re: [PATCH] target/ppc: Fix test on mmu_model in hreg_compute_hflags_value()

2022-01-24 Thread David Gibson
On Mon, Jan 24, 2022 at 09:16:09AM +0100, Cédric le Goater wrote: > POWERPC_MMU_BOOKE is not a mask and should not be tested with a > bitwise AND operator. > > It went unnoticed because it only impacts the 601 CPU implementation > for which we don't have a known firmware image. > >

[PATCH] hw/misc/macio/cuda: Simplify using the ldst API

2022-01-24 Thread Philippe Mathieu-Daudé via
This code is easier to review using the load/store API. Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/macio/cuda.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c index e917a6a095..f1186671bf 100644 ---

Re: [PATCH] target/ppc: Put do_rfi under a TCG-only block

2022-01-24 Thread Philippe Mathieu-Daudé via
On 24/1/22 20:15, Fabiano Rosas wrote: The --disable-tcg build broke when do_rfi stopped being inlined. Fixes: 62e79ef914 ("target/ppc: Remove static inline") Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-by: Philippe

Re: [PATCH v2] target/riscv: correct "code should not be reached" for x-rv128

2022-01-24 Thread Philippe Mathieu-Daudé via
On 24/1/22 21:24, Frédéric Pétrot wrote: The addition of uxl support in gdbstub adds a few checks on the maximum register length, but omitted MXL_RV128, an experimental feature. This patch makes rv128 react as rv64, as previously. Signed-off-by: Frédéric Pétrot --- target/riscv/cpu.c | 3

Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net

2022-01-24 Thread Roman Bolshakov
On Mon, Jan 24, 2022 at 08:14:31PM +, Peter Maydell wrote: > On Mon, 24 Jan 2022 at 17:49, Roman Bolshakov wrote: > > I'm not sure why blocks are Objective-C specific. All the data I have > > shows the opposite [3][4][5]. They're just extensively used in Apple APIs. > > This is true, but for

Re: [PATCH v1 21/22] target/i386: use CPU_LOG_INT for IRQ servicing

2022-01-24 Thread Philippe Mathieu-Daudé via
On 1/24/22 21:16, Alex Bennée wrote: > I think these have been wrong since f193c7979c (do not depend on > thunk.h - more log items). Fix them so as not to confuse other > debugging. > > Signed-off-by: Alex Bennée > --- > target/i386/tcg/sysemu/seg_helper.c | 4 ++-- > 1 file changed, 2

Re: [PATCH v1 20/22] tests/plugins: add instruction matching to libinsn.so

2022-01-24 Thread Philippe Mathieu-Daudé via
On 1/24/22 21:16, Alex Bennée wrote: > This adds simple instruction matching to the libinsn.so plugin which > is useful for examining the execution distance between instructions. > For example to track how often we flush in ARM due to TLB updates: > > -plugin

Re: [PATCH v1 15/22] tracing: remove the trace-tcg includes from the build

2022-01-24 Thread Philippe Mathieu-Daudé via
On 1/24/22 21:16, Alex Bennée wrote: > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson > Cc: Luis Vilanova > Cc: Stefan Hajnoczi > > --- > v2 > - dropped includes here instead of next patch > --- > include/exec/helper-proto.h | 1 - > include/exec/helper-tcg.h | 1 - >

Re: [PATCH v1 14/22] tracing: remove TCG memory access tracing

2022-01-24 Thread Philippe Mathieu-Daudé via
On 1/24/22 21:16, Alex Bennée wrote: > If you really want to trace all memory operations TCG plugins gives > you a more flexible interface for doing so. > > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson > Cc: Luis Vilanova > Cc: Stefan Hajnoczi > > -- git tools need 3 dashes

[PATCH v2 2/3] block/export/fuse: Extract fuse_fallocate_zero_range()

2022-01-24 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- block/export/fuse.c | 48 + 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/block/export/fuse.c b/block/export/fuse.c index 31cb0503adc..3a158342c75 100644 --- a/block/export/fuse.c +++

[PATCH v2 3/3] block/export/fuse: Fix build failure on FreeBSD

2022-01-24 Thread Philippe Mathieu-Daudé via
When building on FreeBSD we get: [816/6851] Compiling C object libblockdev.fa.p/block_export_fuse.c.o ../block/export/fuse.c:612:16: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' if (mode & FALLOC_FL_KEEP_SIZE) { ^ ../block/export/fuse.c:616:16: error:

[PATCH v2 1/3] block/export/fuse: Extract fuse_fallocate_punch_hole()

2022-01-24 Thread Philippe Mathieu-Daudé via
Extract fuse_fallocate_punch_hole() to avoid #ifdef'ry mixed within if/else statement. Signed-off-by: Philippe Mathieu-Daudé --- block/export/fuse.c | 59 +++-- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/block/export/fuse.c

[PATCH v2 0/3] block/export/fuse: Fix build failure on FreeBSD

2022-01-24 Thread Philippe Mathieu-Daudé via
Since v1: - Extract fuse_allocate_*() to avoid mixing #ifdef'ry with if/else Philippe Mathieu-Daudé (3): block/export/fuse: Extract fuse_fallocate_punch_hole() block/export/fuse: Extract fuse_fallocate_zero_range() block/export/fuse: Fix build failure on FreeBSD block/export/fuse.c | 109

Re: [PATCH 16/30] bsd-user/signal.c: host_to_target_siginfo_noswap

2022-01-24 Thread Warner Losh
On Sun, Jan 23, 2022 at 7:05 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/10/22 3:19 AM, Warner Losh wrote: > > +static inline void host_to_target_siginfo_noswap(target_siginfo_t > *tinfo, > > +const siginfo_t *info) > > +{ > > +int sig, code; > > + > > +sig

[PATCH v4 1/9] linux-headers: Update headers to v5.17-rc1

2022-01-24 Thread Vivek Goyal
Update headers to 5.17-rc1. I need latest fuse changes. Signed-off-by: Vivek Goyal --- include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/drm/drm_fourcc.h | 11 ++ include/standard-headers/linux/ethtool.h | 1 + include/standard-headers/linux/fuse.h

Re: [PATCH v8 19/23] hw/riscv: virt: Add optional AIA APLIC support to virt machine

2022-01-24 Thread Alistair Francis
On Thu, Jan 20, 2022 at 2:38 AM Anup Patel wrote: > > From: Anup Patel > > We extend virt machine to emulate AIA APLIC devices only when > "aia=aplic" parameter is passed along with machine name in QEMU > command-line. When "aia=none" or not specified then we fallback > to original PLIC device

Re: [PATCH 10/30] bsd-user/signal.c: Implement signal_init()

2022-01-24 Thread Warner Losh
On Sun, Jan 23, 2022 at 6:38 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/10/22 3:19 AM, Warner Losh wrote: > > Initialize the signal state for the emulator. Setup a set of sane > > default signal handlers, mirroring the host's signals. For fatal signals > > (those that exit

[PATCH v4 3/9] virtiofsd: Parse extended "struct fuse_init_in"

2022-01-24 Thread Vivek Goyal
Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal ---

[PATCH v4 7/9] virtiofsd: Create new file with fscreate set

2022-01-24 Thread Vivek Goyal
This patch adds support to set /proc/thread-self/attr/fscreate before file creation. It is set to a value as sent by client. This will allow for atomic creation of security context on files w.r.t file creation. This is primarily useful when either there is no SELinux enabled on host or host and

[PATCH v4 5/9] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-01-24 Thread Vivek Goyal
Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_common.h | 5 ++ tools/virtiofsd/fuse_i.h| 7

[PATCH v4 2/9] virtiofsd: Fix breakage due to fuse_init_in size change

2022-01-24 Thread Vivek Goyal
Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major 7 and minor > 6).

[PATCH v4 0/9] virtiofsd: Add support for file security context at creation

2022-01-24 Thread Vivek Goyal
Hi, This is V4 of the patches. I posted V3 here. https://listman.redhat.com/archives/virtio-fs/2021-November/msg00058.html Now corresponding kernel patches have been merged in 5.17-rc1. So I am requesting for inclusion of these patches. These will allow us to support SELinux with virtiofs.

[PATCH v4 6/9] virtiofsd: Move core file creation code in separate function

2022-01-24 Thread Vivek Goyal
Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Signed-off-by: Vivek Goyal --- tools/virtiofsd/passthrough_ll.c | 36

[PATCH v4 4/9] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-01-24 Thread Vivek Goyal
->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32 bit fields are not

[PATCH v4 8/9] virtiofsd: Create new file using O_TMPFILE and set security context

2022-01-24 Thread Vivek Goyal
If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony useful for

[PATCH v4 9/9] virtiofsd: Add an option to enable/disable security label

2022-01-24 Thread Vivek Goyal
Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is expected to be a SELinux

Re: [PATCH v1 04/22] .gitignore: add .gcov pattern

2022-01-24 Thread Philippe Mathieu-Daudé via
On 1/24/22 21:15, Alex Bennée wrote: > The gcovr tool is very messy and can leave a lot of crap in the source > tree even when using build directories. > > Signed-off-by: Alex Bennée > --- > .gitignore | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v1 01/22] tests/Makefile.include: clean-up old code

2022-01-24 Thread Philippe Mathieu-Daudé via
On 1/24/22 21:15, Alex Bennée wrote: > This is no longer needed since 5516623020 ("meson: convert migration > directory to Meson") > > Signed-off-by: Alex Bennée > --- > tests/Makefile.include | 4 > 1 file changed, 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v1 18/22] contrib/plugins: add a drcov plugin

2022-01-24 Thread Alex Bennée
From: Ivanov Arkady This patch adds the ability to generate files in drcov format. Primary goal this script is to have coverage logfiles thatwork in Lighthouse. Signed-off-by: Ivanov Arkady Message-Id: <163491884553.304355.13246023070235438959.stgit@pc-System-Product-Name> [AJB: use

[PATCH v1 16/22] tracing: excise the tcg related from tracetool

2022-01-24 Thread Alex Bennée
Now we have no TCG trace events and no longer handle them in the code we can remove the handling from the tracetool to generate them. vcpu tracing is still available although the existing syscall event is an exercise in redundancy (plugins and -strace can also get the information). Signed-off-by:

[PATCH v1 13/22] docs: remove references to TCG tracing

2022-01-24 Thread Alex Bennée
Users wanting this sort of functionality should turn to TCG plugins instead. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi --- docs/about/removed-features.rst | 13 + docs/devel/tracing.rst | 85 -

[PATCH v1 11/22] tests/lcitool: Install libibumad to cover RDMA on Debian based distros

2022-01-24 Thread Alex Bennée
From: Philippe Mathieu-Daudé On Debian we also need libibumad to enable RDMA: $ ../configure --enable-rdma ERROR: OpenFabrics librdmacm/libibverbs/libibumad not present. Your options: (1) Fast: Install infiniband packages (devel) from your distro. (2)

[PATCH v1 19/22] tests/plugin: allow libinsn.so per-CPU counts

2022-01-24 Thread Alex Bennée
We won't go fully flexible but for most system emulation 8 vCPUs resolution should be enough for anybody ;-) Signed-off-by: Alex Bennée --- tests/plugin/insn.c | 39 +++ 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/tests/plugin/insn.c

[PATCH v1 21/22] target/i386: use CPU_LOG_INT for IRQ servicing

2022-01-24 Thread Alex Bennée
I think these have been wrong since f193c7979c (do not depend on thunk.h - more log items). Fix them so as not to confuse other debugging. Signed-off-by: Alex Bennée --- target/i386/tcg/sysemu/seg_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v1 17/22] plugins: add helper functions for coverage plugins

2022-01-24 Thread Alex Bennée
From: Ivanov Arkady Which provide information about: - start_code. - end_code. - entry. - path to the executable binary. Signed-off-by: Ivanov Arkady Message-Id: <163491883461.304355.8210754161847179432.stgit@pc-System-Product-Name> [AJB: reword title, better descriptions, defaults, rm

[PATCH v1 09/22] tests/lcitool: Refresh submodule and remove libxml2

2022-01-24 Thread Alex Bennée
From: Philippe Mathieu-Daudé The previous commit removed all uses of libxml2. Refresh lcitool submodule, update qemu.yml and refresh the generated files by running: $ make lcitool-refresh Note: This refreshment also removes libudev dependency on Fedora and CentOS due to libvirt-ci commit

[PATCH v1 14/22] tracing: remove TCG memory access tracing

2022-01-24 Thread Alex Bennée
If you really want to trace all memory operations TCG plugins gives you a more flexible interface for doing so. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi -- v2 - dropped extra line --- accel/tcg/atomic_template.h | 12

[PATCH v1 10/22] tests: Manually remove libxml2 on MSYS2 runners

2022-01-24 Thread Alex Bennée
From: Philippe Mathieu-Daudé lcitool doesn't support MSYS2 targets, so manually remove this now unnecessary library. Reviewed-by: Daniel P. Berrangé Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id:

[PATCH v1 08/22] drop libxml2 checks since libxml is not actually used (for parallels)

2022-01-24 Thread Alex Bennée
From: Michael Tokarev For a long time, we assumed that libxml2 is necessary for parallels block format support (block/parallels*). However, this format actually does not use libxml [*]. Since this is the only user of libxml2 in whole QEMU tree, we can drop all libxml2 checks and dependencies

[PATCH v1 03/22] Makefile: also remove .gcno files when cleaning

2022-01-24 Thread Alex Bennée
Left over .gcno files from old builds can really confuse gcov and the user expects a clean slate after "make clean". Make clean mean clean. Signed-off-by: Alex Bennée --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index

[PATCH v2] target/riscv: correct "code should not be reached" for x-rv128

2022-01-24 Thread Frédéric Pétrot
The addition of uxl support in gdbstub adds a few checks on the maximum register length, but omitted MXL_RV128, an experimental feature. This patch makes rv128 react as rv64, as previously. Signed-off-by: Frédéric Pétrot --- target/riscv/cpu.c | 3 +-- target/riscv/gdbstub.c | 3 +++ 2

[PATCH v1 12/22] plugins: stxp test case from Aaron (!upstream)

2022-01-24 Thread Alex Bennée
Signed-off-by: Alex Bennée Cc: Aaron Lindsay Message-ID: --- [AJB] this was for testing, I think you can show the same stuff with the much more complete execlog now. --- contrib/plugins/stxp-plugin.c | 50 +++ tests/tcg/aarch64/stxp.c | 28

[PATCH v1 04/22] .gitignore: add .gcov pattern

2022-01-24 Thread Alex Bennée
The gcovr tool is very messy and can leave a lot of crap in the source tree even when using build directories. Signed-off-by: Alex Bennée --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index eb2553026c..9726a778b3 100644 --- a/.gitignore +++

[PATCH v1 22/22] plugins: move reset of plugin data to tb_start

2022-01-24 Thread Alex Bennée
We can't always guarantee we get to the end of a translator loop. Although this can happen for a variety of reasons it does happen more often on x86 system emulation when an instruction spans across to an un-faulted page. This caused confusion of the instruction tracking data resulting in apparent

[PATCH v1 06/22] gitmodules: Correct libvirt-ci submodule URL

2022-01-24 Thread Alex Bennée
From: Philippe Mathieu-Daudé Correct the libvirt-ci repository URL to avoid this warning when cloning / refreshing the submodule: warning: redirecting to https://gitlab.com/libvirt/libvirt-ci.git/ Fixes: 4ebb040f1fd ("tests: integrate lcitool for generating build env manifests")

[PATCH v1 20/22] tests/plugins: add instruction matching to libinsn.so

2022-01-24 Thread Alex Bennée
This adds simple instruction matching to the libinsn.so plugin which is useful for examining the execution distance between instructions. For example to track how often we flush in ARM due to TLB updates: -plugin ./tests/plugin/libinsn.so,match=tlbi which leads to output like this:

Re: [PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net

2022-01-24 Thread Christian Schoenebeck
On Montag, 24. Januar 2022 18:49:53 CET Roman Bolshakov wrote: > On Mon, Jan 24, 2022 at 12:27:40PM +0100, Christian Schoenebeck wrote: > > On Montag, 24. Januar 2022 10:56:00 CET Roman Bolshakov wrote: > > > On Thu, Jan 13, 2022 at 08:22:14PM +0300, Vladislav Yaroshchuk wrote: > > > >

[PATCH v1 15/22] tracing: remove the trace-tcg includes from the build

2022-01-24 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Luis Vilanova Cc: Stefan Hajnoczi --- v2 - dropped includes here instead of next patch --- include/exec/helper-proto.h | 1 - include/exec/helper-tcg.h | 1 - include/trace-tcg.h | 6 -- trace/meson.build

  1   2   3   >