Re: [PATCH 01/33] Move _WANT_FREEBSD macros to include/qemu/osdep.h

2023-08-08 Thread Richard Henderson
On 8/7/23 23:07, Karim Taha wrote: From: Warner Losh move _WANT_FREEBSD macros from bsd-user/freebsd/os-syscall.c to include/qemu/osdep.h in order to pull some struct defintions needed later in the build. Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/freebsd/os-syscall.c |

Re: [PATCH for-8.2 v2 1/2] qapi/migration: Deduplicate migration parameter field comments

2023-08-08 Thread Peter Xu
On Sun, Aug 06, 2023 at 11:49:46AM -0400, Peter Xu wrote: > > I think we have a tradeoff here. If perpetuating the unclean and ugly > > use of "" is what it takes to de-triplicate migration parameters, we may > > decide to accept that. > > I don't think it's a must. As Dan raised, we can convert

Re: [PATCH v4 11/11] target/loongarch: Add loongarch32 cpu la132

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: +static void loongarch_la464_initfn(Object *obj) +{ +LoongArchCPU *cpu = LOONGARCH_CPU(obj); +CPULoongArchState *env = &cpu->env; + +loongarch_cpu_initfn_common(env); + +cpu->dtb_compatible = "loongarch,Loongson-3A5000"; +env->cpucfg[0] = 0x

Re: [PATCH v4 10/11] target/loongarch: Sign extend results in VA32 mode

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: --- a/target/loongarch/translate.c +++ b/target/loongarch/translate.c @@ -218,6 +218,19 @@ static TCGv va32_address(DisasContext *ctx, TCGv addr) return addr; } +static uint64_t sign_extend32(uint64_t data) +{ +return (data & 0x7FFF) - (data

Re: [PATCH v4 09/11] target/loongarch: Truncate high 32 bits of address in VA32 mode

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: When running in VA32 mode(LA32 or VA32L[1-3] matching PLV), virtual address is truncated to 32 bits before address mapping. Signed-off-by: Jiajie Chen --- target/loongarch/cpu.h | 6 +- target/loongarch/insn_trans/trans_atomic

Re: [PATCH v4 08/11] target/loongarch: Reject la64-only instructions in la32 mode

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: -TRANS(addi_d, gen_rri_c, EXT_NONE, EXT_NONE, tcg_gen_addi_tl) -TRANS(alsl_w, gen_rrr_sa, EXT_NONE, EXT_SIGN, gen_alsl) -TRANS(alsl_wu, gen_rrr_sa, EXT_NONE, EXT_ZERO, gen_alsl) -TRANS(alsl_d, gen_rrr_sa, EXT_NONE, EXT_NONE, gen_alsl) +TRANS_64(addi_d, gen_rri_

[PULL 3/3] configure: unify case statements for CPU canonicalization

2023-08-08 Thread Paolo Bonzini
The CPU model has to be canonicalized to what Meson wants in the cross file, to what Linux uses for its asm-$ARCH directories, and to what QEMU uses for its user-mode emulation host/$ARCH directories. Do all three in a single case statement, and check that the Linux and QEMU directories actually e

[PULL 2/3] linux-user: cleanup unused linux-user/include/host directories

2023-08-08 Thread Paolo Bonzini
Alpha and 31-bit s390 lack the assembly fragment to handle signals occurring at the same time as system calls, so they cannot run linux-user emulation anymore. Drop the host-signal.h files for them. Signed-off-by: Paolo Bonzini Acked-by: Ilya Leoshkevich Reviewed-by: Michael Tokarev Tested-by:

[PULL 1/3] configure: fix detection for x32 linux-user

2023-08-08 Thread Paolo Bonzini
x32 uses the same signal handling fragments as x86_64, since host_arch is set to x86_64 when Meson runs. Remove the unnecessary forwarder and set the host_arch variable properly in configure. Reviewed-by: Richard Henderson Acked-by: Ilya Leoshkevich Reviewed-by: Michael Tokarev Tested-by: Ilya

[PULL 0/3] fix ppc64le build, fully kill alpha and s390 linux-user

2023-08-08 Thread Paolo Bonzini
The following changes since commit 9400601a689a128c25fa9c21e932562e0eeb7a26: Merge tag 'pull-tcg-20230806-3' of https://gitlab.com/rth7680/qemu into staging (2023-08-06 16:47:48 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

Re: [PATCH 1/2] riscv: zicond: make non-experimental

2023-08-08 Thread Vineet Gupta
On 8/8/23 11:29, Richard Henderson wrote: On 8/8/23 11:17, Vineet Gupta wrote: zicond is now codegen supported in both llvm and gcc. It is still not in https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions Right, its been frozen since April though and with support trickling in

Re: [PATCH] target/loongarch: Split fcc register to fcc0-7 in gdbstub

2023-08-08 Thread Alex Bennée
bibo mao writes: > I think that it is problem of loongarch gdb, rather qemu. > If so, everytime when gdb changes register layout, qemu need modify. > There should be compatible requirements between gdb client and gdb server. > > Tiezhu, > > what is your opition? You can always register additio

Re: [PATCH 1/2] hw/intc: Fix upper/lower mtime write calculation

2023-08-08 Thread Jason Chien
Hi, The patch seems to be ignored. I am not sure who to ping. Could someone please review this patch? Thank you! patch link: https://lore.kernel.org/qemu-devel/20230728082502.26439-1-jason.ch...@sifive.com/ On Fri, Jul 28, 2023 at 4:25 PM Jason Chien wrote: > When writing the upper mtime, we sho

Re: [PATCH v4 07/11] target/loongarch: Add LA32 & VA32 to DisasContext

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: --- a/target/loongarch/translate.c +++ b/target/loongarch/translate.c @@ -119,6 +119,9 @@ static void loongarch_tr_init_disas_context(DisasContextBase *dcbase, ctx->vl = LSX_LEN; } +ctx->la32 = LOONGARCH_CPUCFG_ARCH(env, LA32); +ctx

Re: [PATCH 2/2] hw/intc: Make rtc variable names consistent

2023-08-08 Thread Jason Chien
Hi, The patch seems to be ignored. I am not sure who to ping. Could someone please review this patch? Thank you! patch link: https://lore.kernel.org/qemu-devel/20230728082502.26439-2-jason.ch...@sifive.com/ Jason On Fri, Jul 28, 2023 at 4:25 PM Jason Chien wrote: > The variables whose values ar

Re: [PATCH v4 06/11] target/loongarch: Support LoongArch32 VPPN

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: VPPN of TLBEHI/TLBREHI is limited to 19 bits in LA32. Signed-off-by: Jiajie Chen --- target/loongarch/cpu-csr.h| 6 -- target/loongarch/tlb_helper.c | 23 ++- 2 files changed, 22 insertions(+), 7 deletions(-) Reviewed-by: Ric

Re: [PATCH v4 05/11] target/loongarch: Support LoongArch32 DMW

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: LA32 uses a different encoding for CSR.DMW and a new direct mapping mechanism. Signed-off-by: Jiajie Chen --- target/loongarch/cpu-csr.h| 7 +++ target/loongarch/tlb_helper.c | 26 +++--- 2 files changed, 26 insertions(+), 7 de

Re: [PATCH v4 04/11] target/loongarch: Support LoongArch32 TLB entry

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: The TLB entry of LA32 lacks NR, NX and RPLV and they are hardwired to zero in LoongArch32. Signed-off-by: Jiajie Chen --- target/loongarch/cpu-csr.h| 9 + target/loongarch/tlb_helper.c | 17 - 2 files changed, 17 insertions(+)

Re: [PATCH v4 03/11] target/loongarch: Add GDB support for loongarch32 mode

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: GPRs and PC are 32-bit wide in loongarch32 mode. Signed-off-by: Jiajie Chen --- configs/targets/loongarch64-softmmu.mak | 2 +- gdb-xml/loongarch-base32.xml| 45 + target/loongarch/cpu.c | 10 +-

Re: [PATCH 1/2] riscv: zicond: make non-experimental

2023-08-08 Thread Richard Henderson
On 8/8/23 11:17, Vineet Gupta wrote: zicond is now codegen supported in both llvm and gcc. It is still not in https://wiki.riscv.org/display/HOME/Recently+Ratified+Extensions r~

Re: [PATCH 2/2] block: change reqs_lock to QemuMutex

2023-08-08 Thread Eric Blake
On Tue, Aug 08, 2023 at 11:58:52AM -0400, Stefan Hajnoczi wrote: > CoMutex has poor performance when lock contention is high. The tracked > requests list is accessed frequently and performance suffers in QEMU > multi-queue block layer scenarios. > > It is not necessary to use CoMutex for the reque

Re: [PATCH v4 02/11] target/loongarch: Add new object class for loongarch32 cpus

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: Add object class for future loongarch32 cpus. It is derived from the loongarch64 object class. Signed-off-by: Jiajie Chen --- target/loongarch/cpu.c | 24 target/loongarch/cpu.h | 11 +++ 2 files changed, 35 insertions(+)

[PATCH 2/2] riscv: zicond: make default

2023-08-08 Thread Vineet Gupta
Again this helps with better testing and something qemu has been doing with newer features anyways. Signed-off-by: Vineet Gupta --- target/riscv/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 022bd9d01223..e6e28414b223 1

[PATCH 1/2] riscv: zicond: make non-experimental

2023-08-08 Thread Vineet Gupta
zicond is now codegen supported in both llvm and gcc. This change allows seamless enabling/testing of zicond in downstream projects. e.g. currently riscv-gnu-toolchain parses elf attributes to create a cmdline for qemu but fails short of enabling it because of the "x-" prefix. Signed-off-by: Vine

Re: [PATCH 1/2] block: minimize bs->reqs_lock section in tracked_request_end()

2023-08-08 Thread Eric Blake
On Tue, Aug 08, 2023 at 11:58:51AM -0400, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > block/io.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake > > diff --git a/block/io.c b/block/io.c > index 055fcf7438..85d5176256 100644 > --- a/bl

Re: [PATCH v5 4/5] qmp: Added new command to retrieve eBPF blob.

2023-08-08 Thread Andrew Melnichenko
Hi all, Thanks for the comments - I'll update and send new patches. On Sat, Aug 5, 2023 at 10:34 AM Markus Armbruster wrote: > > Andrew Melnychenko writes: > > > Now, the binary objects may be retrieved by id. > > It would require for future qmp commands that may require specific > > eBPF blob.

Re: [PATCH for-8.1 v10 01/14] linux-user: Adjust task_unmapped_base for reserved_va

2023-08-08 Thread Richard Henderson
On 8/8/23 09:59, Alex Bennée wrote: All of this is part of the "legacy" memory layout, for which there is a personality flag. For 8.2, I think we should work on implementing the "new" memory layout, which places everything top-down. But most importantly it completely separates brk from the bin

Re:[PATCH v1 0/3] softmmu/physmem: file_ram_open() readonly improvements

2023-08-08 Thread ThinerLogoer
At 2023-08-08 03:07:31, "David Hildenbrand" wrote: >Patch #1 is the result of the discussion of: >"[PATCH v2] softmmu/physmem: try opening file readonly before failure > in file_ram_open" [1] > >Instead of handling it inside file_ram_open(), handle it in the caller >and only fallback to r

[PATCH 32/33] Add glue to call the following syscalls to the freebsd_syscall function:

2023-08-08 Thread Karim Taha
From: Warner Losh freebsd11_statfs statfs freebsd11_fstatfs fstatfs freebsd11_getfsstat getfsstat Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/freebsd/os-syscall.c | 24 1 file changed, 24 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c

Re: [PATCH v4 01/11] target/loongarch: Add macro to check current arch

2023-08-08 Thread Jiajie Chen
On 2023/8/9 01:01, Richard Henderson wrote: On 8/7/23 18:54, Jiajie Chen wrote: Add macro to check if the current cpucfg[1].arch equals to 1(LA32) or 2(LA64). Signed-off-by: Jiajie Chen ---   target/loongarch/cpu.h | 7 +++   1 file changed, 7 insertions(+) diff --git a/target/loongarch/

[PATCH 33/33] Add glue to call the following syscalls to the freebsd_syscall function:

2023-08-08 Thread Karim Taha
From: Warner Losh freebsd11_getdents getdirentries freebsd11_getdirentries fcntl Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/freebsd/os-syscall.c | 16 1 file changed, 16 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-sys

[PATCH 25/33] Implement freebsd11 stat related syscalls

2023-08-08 Thread Karim Taha
From: Michal Meloun Implement the freebsd11 variant of the following syscalls: statfs(2) fstatfs(2) getfsstat(2) Co-authored-by: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 75 ++

[PATCH 29/33] Add os-stat.c to the build

2023-08-08 Thread Karim Taha
Signed-off-by: Karim Taha --- bsd-user/freebsd/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/bsd-user/freebsd/meson.build b/bsd-user/freebsd/meson.build index f87c788e84..f2f047cca3 100644 --- a/bsd-user/freebsd/meson.build +++ b/bsd-user/freebsd/meson.build @@ -1,4 +1,5 @@ bsd

[PATCH 02/33] Disable clang warnings arising from bsd-user/qemu.h

2023-08-08 Thread Karim Taha
From: Kyle Evans Implement PRAGMA_DISABLE_PACKED_WARNING and PRAGMA_REENABLE_PACKED_WARNING macros in bsd-user/qemu.h. Signed-off-by: Kyle Evans Signed-off-by: Karim Taha --- bsd-user/qemu.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/bsd-user/qemu.h

[PATCH 08/33] Add structs target_freebsd11_nstat and target_freebsd11_statfs to bsd-user/syscall_defs.h

2023-08-08 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/syscall_defs.h | 65 + 1 file changed, 65 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index e796e7e13d..06be8244de 100644 --- a/bsd-user/s

[PATCH 07/33] Add struct target_stat to bsd-user/syscall_defs.h

2023-08-08 Thread Karim Taha
From: Michal Meloun Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/syscall_defs.h | 38 ++ 1 file changed, 38 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index 5ef76ffa52..e796e7e13d 100644 --- a/bsd-use

[PATCH 26/33] Implement freebsd11 stat related syscalls

2023-08-08 Thread Karim Taha
From: Michal Meloun Implement the freebsd11 variant of the following syscalls: getdirecentries(2) Co-authored-by: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 44 ++ 1 file ch

[PATCH 09/33] Add struct target_statfs to bsd-user/syscall_defs.h

2023-08-08 Thread Karim Taha
From: Michal Meloun Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/syscall_defs.h | 25 + 1 file changed, 25 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index 06be8244de..ab59d00a47 100644 --- a/bsd-user/syscall_def

[PATCH 31/33] Add glue to call the following syscalls to the freebsd_syscall function:

2023-08-08 Thread Karim Taha
From: Warner Losh getfh lgetfh fhopen freebsd11_fhstat freebsd11_fhstatfs fhstat fhstatfs Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/freebsd/os-syscall.c | 28 1 file changed, 28 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c b/bs

[PATCH 01/33] Move _WANT_FREEBSD macros to include/qemu/osdep.h

2023-08-08 Thread Karim Taha
From: Warner Losh move _WANT_FREEBSD macros from bsd-user/freebsd/os-syscall.c to include/qemu/osdep.h in order to pull some struct defintions needed later in the build. Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/freebsd/os-syscall.c | 11 --- include/qemu/osdep

[PATCH 19/33] Implement stat related syscalls

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the following syscalls: getfh(2) lgetfh(2) fhopen(2) fhstat(2) fhstatfs(2) Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 83 ++ 1 file changed, 83 insertions(+) diff --git a/bsd-user/freebsd

[PATCH 28/33] Implement do_freebsd_realpathat syscall

2023-08-08 Thread Karim Taha
From: Mikaël Urankar Signed-off-by: Mikaël Urankar Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/bsd-user/freebsd/os-stat.h b/bsd-user/freebsd/os-stat.h index e31b2aab9e..cf56c778ae 100644 --- a/bsd-user

[PATCH 20/33] Implement stat related syscalls

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the following syscalls: statfs(2) fstatfs(2) getfsstat(2) Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 69 ++ 1 file changed, 69 insertions(+) diff --git a/bsd-user/freebsd/os-stat.h b/bsd-

[PATCH 06/33] Add struct target_freebsd11_stat to bsd-user/syscall_defs

2023-08-08 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/syscall_defs.h | 33 + 1 file changed, 33 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index b6d113d24a..5ef76ffa52 100644 --- a/bsd-user/syscall_d

[PATCH 03/33] Update the definitions of __put_user and __get_user macros

2023-08-08 Thread Karim Taha
From: Warner Losh Use __builtin_choose_expr to avoid type promotion from ?: in __put_user_e and __get_user_e macros. Copied from linux-user/qemu.h, originally by Blue Swirl. Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/qemu.h | 81 ---

[PATCH 17/33] Implement h2t_freebsd_stat and h2t_freebsd_statfs functions

2023-08-08 Thread Karim Taha
From: Michal Meloun They are the 64-bit variants of h2t_freebsd11_stat and h2t_freebsd11_statfs, respectively Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.c | 82 ++ 1 file changed, 82 insertions(+) diff --git a/bsd-u

[PATCH 18/33] Implement stat related syscalls

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the following syscalls: stat(2) lstat(2) fstat(2) fstatat(2) nstat nfstat nlstat Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 130 + 1 file changed, 130 insertions(+) create mode 100644 bsd

[PATCH 23/33] Implement freebsd11 stat related syscalls

2023-08-08 Thread Karim Taha
From: Michal Meloun Rename the following syscalls to the freebsd11 variant: do_freebsd_lstat -> do_freebsd11_lstat do_freebsd_stat -> do_freebsd11_stat Co-authored-by: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h

[PATCH 04/33] Declarations of h2t and t2h conversion functions.

2023-08-08 Thread Karim Taha
From: Stacey Son Declarations of functions that convert between host and target structs. Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/qemu-os.h | 35 +++ bsd-user/qemu.h| 1 + 2 files changed, 36 insertions(+) create mo

[PATCH 12/33] Rename target_freebsd_time_t to target_time_t

2023-08-08 Thread Karim Taha
From: Warner Losh This is necessary for future code using target_time_t, in bsd-user/syscall_defs. Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/syscall_defs.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bsd-user/syscall_defs.h b/bsd-user/sy

[PATCH 24/33] Implement freebsd11 stat related syscalls

2023-08-08 Thread Karim Taha
From: Michal Meloun Implement the freebsd11 variant of the following syscalls: fstat(2) fstatat(2) fhstat(2) fhstatfs(2) Co-authored-by: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 78 ++

[PATCH 11/33] Define safe_fcntl macro in bsd-user/syscall_defs.h

2023-08-08 Thread Karim Taha
From: Kyle Evans Signed-off-by: Kyle Evans Signed-off-by: Karim Taha --- bsd-user/syscall_defs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index 608731f0ac..52ebadbe2c 100644 --- a/bsd-user/syscall_defs.h +++ b/bsd-user/syscall_defs

[PATCH 30/33] Add glue to call the following syscalls to the freebsd_syscall function:

2023-08-08 Thread Karim Taha
From: Warner Losh freebsd11_stat freebsd11_lstat freebsd11_fstat freebsd11_fstatat freebsd11_nstat, freebsd11_nfstat, freebsd11_nlstat fstatat fstat Signed-off-by: Warner Losh Signed-off-by: Karim Taha --- bsd-user/freebsd/os-syscall.c | 42 +++ 1 file changed,

[PATCH 27/33] Implement freebsd11 stat related syscalls

2023-08-08 Thread Karim Taha
From: Michal Meloun Forward declaration of the nstat syscalls: nstat nlstat nfstat Co-authored-by: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bsd-user/f

[PATCH 10/33] Add struct target_freebsd_fhandle and fcntl flags to bsd-user/syscall_defs.h

2023-08-08 Thread Karim Taha
From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/syscall_defs.h | 51 + 1 file changed, 51 insertions(+) diff --git a/bsd-user/syscall_defs.h b/bsd-user/syscall_defs.h index ab59d00a47..608731f0ac 100644 --- a/bsd-user/s

[PATCH 21/33] Implement stat related syscalls

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the following syscalls: getdents(2) getdirecentries(2) Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 72 ++ 1 file changed, 72 insertions(+) diff --git a/bsd-user/freebsd/os-stat.h b/bsd-use

[PATCH 22/33] Implement stat related syscalls

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the following syscalls: fcntl(2) Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.h | 74 ++ 1 file changed, 74 insertions(+) diff --git a/bsd-user/freebsd/os-stat.h b/bsd-user/freebsd/os-stat.h in

[PATCH 16/33] Implement host-target convertion functions

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the stat converstion functions: target_to_host_fcntl_cmd Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.c | 71 ++ 1 file changed, 71 insertions(+) diff --git a/bsd-user/freebsd/os-stat.c b/bsd-u

[PATCH 13/33] Implement host-target convertion functions

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the stat converstion functions: h2t_freebsd11_stat h2t_freebsd_nstat Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.c | 94 ++ 1 file changed, 94 insertions(+) create mode 100644 bsd-user/freebsd

[PATCH 00/33] Implement the stat system calls for FreeBSD.

2023-08-08 Thread Karim Taha
Upstream the implementation of the stat system calls from the qemu-bsd-user fork, the following system calls are implemented: stat(2), lstat(2), fstat(2), fstatat(2), nstat, nfstat, nlstat getfh(2), lgetfh(2), fhopen(2), fhstat(2), fhstatfs(2), statfs(2) fstatfs(2), getfsstat(2), getdents(2), getdi

[PATCH 14/33] Implement host-target convertion functions

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the stat converstion functions: h2t_freebsd_fhandle t2h_freebsd_fhandle Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.c | 37 + 1 file changed, 37 insertions(+) diff --git a/bsd-user/freebsd/os-

[PATCH 05/33] Forward declare functions defined in os-stat.c

2023-08-08 Thread Karim Taha
From: Michal Meloun Add to bsd-user/freebsd/qemu-os.h the forward declarations of conversion functions related to stat syscalls. Signed-off-by: Michal Meloun Signed-off-by: Karim Taha --- bsd-user/freebsd/qemu-os.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/bsd-user/

[PATCH 15/33] Implement host-target convertion functions

2023-08-08 Thread Karim Taha
From: Stacey Son Implement the stat converstion functions: h2t_freebds11_statfs Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/freebsd/os-stat.c | 41 ++ 1 file changed, 41 insertions(+) diff --git a/bsd-user/freebsd/os-stat.c b/bsd-user/

[PATCH 2/2] block: change reqs_lock to QemuMutex

2023-08-08 Thread Stefan Hajnoczi
CoMutex has poor performance when lock contention is high. The tracked requests list is accessed frequently and performance suffers in QEMU multi-queue block layer scenarios. It is not necessary to use CoMutex for the requests lock. The lock is always released across coroutine yield operations. It

Re: [PATCH] block-migration: Ensure we don't crash during migration cleanup

2023-08-08 Thread Stefan Hajnoczi
On Mon, Jul 31, 2023 at 05:33:38PM -0300, Fabiano Rosas wrote: > We can fail the blk_insert_bs() at init_blk_migration(), leaving the > BlkMigDevState without a dirty_bitmap and BlockDriverState. Account > for the possibly missing elements when doing cleanup. > > Fix the following crashes: > > Th

[PATCH] i386/xen: Don't advertise XENFEAT_supervisor_mode_kernel

2023-08-08 Thread David Woodhouse
From: David Woodhouse XENFEAT_supervisor_mode_kernel shouldn't be set for HVM guests. It confuses lscpu into thinking it's running in PVH mode. No non-cosmetic effects have been observed so far. Signed-off-by: David Woodhouse --- Only really cosmetic. Don't feel strongly about whether it makes

Re: [PATCH for-8.1 v10 00/14] linux-user: image mapping fixes

2023-08-08 Thread Alex Bennée
Richard Henderson writes: > This is the second half of > > https://patchew.org/QEMU/20230804220032.295411-1-richard.hender...@linaro.org/ > > which I held back because of regressions with s390x testing. > > It turns out that patch 4, "Use MAP_FIXED_NOREPLACE for initial image mmap" > actually t

Re: [PATCH v4 01/11] target/loongarch: Add macro to check current arch

2023-08-08 Thread Richard Henderson
On 8/7/23 18:54, Jiajie Chen wrote: Add macro to check if the current cpucfg[1].arch equals to 1(LA32) or 2(LA64). Signed-off-by: Jiajie Chen --- target/loongarch/cpu.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index fa371ca8ba

Re: [PATCH for-8.1 v10 01/14] linux-user: Adjust task_unmapped_base for reserved_va

2023-08-08 Thread Alex Bennée
Richard Henderson writes: > On 8/8/23 02:10, Alex Bennée wrote: >> One thing I'm slightly confused by is the ELF_ET_DYN_BASE can be above >> this (or sometimes the same). Should the mapping of ELF segments be >> handled with mmap_next_start? I assume once mmap_next_start meets the >> mappings f

Re: [PATCH for-8.1 v10 14/14] linux-user: Rewrite non-fixed probe_guest_base

2023-08-08 Thread Alex Bennée
Richard Henderson writes: > Use pgb_addr_set to probe for all of the guest addresses, > not just the main executable. Handle the identity map > specially and separately from the search. > > If /proc/self/maps is available, utilize the full power > of the interval tree search, rather than a lin

Re: [PATCH 11/24] tcg/ppc: Use the Set Boolean Extension

2023-08-08 Thread Daniel Henrique Barboza
On 8/8/23 00:11, Richard Henderson wrote: The SETBC family of instructions requires exactly two insns for all comparisions, saving 0-3 insns per (neg)setcond. Nice. Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/ppc/tcg-target.c.inc | 22 +++

Re: [PATCH 10/24] tcg/ppc: Implement negsetcond_*

2023-08-08 Thread Daniel Henrique Barboza
On 8/8/23 00:11, Richard Henderson wrote: In the general case we simply negate. However with isel we may load -1 instead of 1 with no extra effort. Consolidate EQ0 and NE0 logic. Replace the NE0 zero-extension with inversion+negation of EQ0, which is never worse and may eliminate one insn.

Re: [PATCH 07/24] target/ppc: Use tcg_gen_negsetcond_*

2023-08-08 Thread Daniel Henrique Barboza
On 8/8/23 00:11, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza target/ppc/translate/fixedpoint-impl.c.inc | 6 -- target/ppc/translate/vmx-impl.c.inc| 8 +++- 2 files changed, 7 insertions(+), 7 deletions(-) diff

Re: [PATCH 14/24] tcg/riscv: Implement negsetcond_*

2023-08-08 Thread Daniel Henrique Barboza
On 8/8/23 00:11, Richard Henderson wrote: Signed-off-by: Richard Henderson --- Reviewed-by: Daniel Henrique Barboza tcg/riscv/tcg-target.h | 4 ++-- tcg/riscv/tcg-target.c.inc | 45 ++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --

[PATCH] qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE

2023-08-08 Thread Richard Henderson
In order for our emulation of MAP_FIXED_NOREPLACE to succeed within linux-user target_mmap, we require a non-zero value. This does not require host kernel support, merely the bit being defined. MAP_FIXED_NOREPLACE was added with glibc 2.28. From repology.org: Fedora 36: 2.35

Re: [PATCH for-8.1 v10 13/14] linux-user: Rewrite fixed probe_guest_base

2023-08-08 Thread Alex Bennée
Richard Henderson writes: > Create a set of subroutines to collect a set of guest addresses, > all of which must be mappable on the host. Use this within the > renamed pgb_fixed subroutine to validate the user's choice of > guest_base specified by the -B command-line option. > > Signed-off-by:

Re: [PATCH for-8.1] linux-user: Define real MAP_FIXED_NOREPLACE value

2023-08-08 Thread Richard Henderson
On 8/8/23 08:16, Akihiko Odaki wrote: Which supported hosts do not define this value?  Can we simply remove the fallback? glibc didn't have this defined until 2.28. The older releases still maintained are 2.26, and 2.27, according to: https://sourceware.org/glibc/wiki/Release Thanks for di

[PATCH 0/2] block: change reqs_lock to QemuMutex

2023-08-08 Thread Stefan Hajnoczi
As part of the ongoing multi-queue QEMU block layer work, I found that CoMutex reqs_lock scales poorly when more IOThreads are added. These patches double IOPS in the 4 IOThreads randread benchmark that I have been running with my out-of-tree virtio-blk-iothread-vq-mapping branch (https://gitlab.co

Re: [PATCH 02/24] tcg: Use tcg_gen_negsetcond_*

2023-08-08 Thread Richard Henderson
On 8/8/23 08:55, Peter Maydell wrote: On Tue, 8 Aug 2023 at 04:13, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 6 ++ tcg/tcg-op.c | 6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c

cpu/i386: update xsave components after CPUID filtering

2023-08-08 Thread Huanyu Zhai
From: NikoZHAI On i386 platform, CPUID data are setup through three consecutive steps: CPU model definition, expansion and filtering. XSAVE components are enabled during the expansion stage, by checking if they are enabled in CPUID. However, it is still probable that some XSAVE features will be

[PATCH 1/2] block: minimize bs->reqs_lock section in tracked_request_end()

2023-08-08 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- block/io.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 055fcf7438..85d5176256 100644 --- a/block/io.c +++ b/block/io.c @@ -593,8 +593,14 @@ static void coroutine_fn tracked_request_end(BdrvTrackedRequ

Re: [PATCH for-8.1 v10 08/14] linux-user: Do not adjust zero_bss for host page size

2023-08-08 Thread Richard Henderson
On 8/8/23 04:38, Alex Bennée wrote: -if (host_start < host_map_start) { -memset((void *)host_start, 0, host_map_start - host_start); +if (align_bss < end_bss) { +abi_long err = target_mmap(align_bss, end_bss - align_bss, prot, + MAP_FIXED

Re: [PATCH 02/24] tcg: Use tcg_gen_negsetcond_*

2023-08-08 Thread Peter Maydell
On Tue, 8 Aug 2023 at 04:13, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > tcg/tcg-op-gvec.c | 6 ++ > tcg/tcg-op.c | 6 ++ > 2 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c > index a062239804..e260a07c6

[RFC v1 1/3] subprojects: libspdm: Initial support

2023-08-08 Thread Alistair Francis
Signed-off-by: Alistair Francis --- meson.build | 78 +++ .gitmodules | 3 ++ meson_options.txt | 3 ++ scripts/meson-buildoptions.sh | 3 ++ subprojects/.gitignore| 1 + subprojects/libspdm.wrap | 5

[RFC v1 2/3] hw: nvme: ctrl: Initial support for DOE

2023-08-08 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/nvme/nvme.h| 4 include/hw/pci/pcie_doe.h | 1 + hw/nvme/ctrl.c| 20 3 files changed, 25 insertions(+) diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h index 209e8f5b4c..e0918516e3 100644 --- a/hw/nvme/nvme.h

[RFC v1 3/3] hw: nvme: ctrl: Process SPDM requests

2023-08-08 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/nvme/ctrl.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index ec3d5d3c29..a299dc7175 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -206,6 +206,11 @@ #include "hw/pci/pcie_sriov.h" #include "mig

[RFC v1 0/3] Initial support for SPDM

2023-08-08 Thread Alistair Francis
The Security Protocol and Data Model (SPDM) Specification defines messages, data objects, and sequences for performing message exchanges over a variety of transport and physical media. - https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.3.0.pdf This series is a very initial

RE: [PATCH] Add support of callbacks after instructions to plugin api

2023-08-08 Thread Mikhail Tyutin
> On 8/8/23 06:44, Mikhail Tyutin wrote: > > Initially, we can only call the callback BEFORE instructions. This commit > > adds the ability to insert the callback AFTER instructions. > > > > No callback call for control-flow instructions. > > You're going to miss whole categories of instructions,

Re: [PATCH 09/24] target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl

2023-08-08 Thread Bastian Koppelmann
On Mon, Aug 07, 2023 at 08:11:28PM -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/tricore/translate.c | 16 ++-- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/target/tricore/translate.c b/target/tricore/translate.c > index 1947

Re: [PATCH] vfio/pci: hide ROM BAR on SFC9220 10/40G Ethernet Controller PF

2023-08-08 Thread Alex Williamson
On Tue, 8 Aug 2023 16:59:16 +0200 Laszlo Ersek wrote: > The Solarflare Communications SFC9220 NIC's physical function (PF) appears > to expose an expansion ROM with the following characteristics: > > (1) Single-image ROM, with only a legacy BIOS image (no UEFI driver). > Alex's rom-parser utili

Re: [PATCH for-8.1 v10 01/14] linux-user: Adjust task_unmapped_base for reserved_va

2023-08-08 Thread Helge Deller
Hi Richard, On 8/7/23 18:36, Richard Henderson wrote: Ensure that the chosen values for mmap_next_start and task_unmapped_base are within the guest address space. Tested-by: Helge Deller Reviewed-by: Akihiko Odaki Signed-off-by: Richard Henderson I've tested this whole series for quite som

Re: [PATCH] thunk: Delete checks for old host definitions

2023-08-08 Thread Peter Maydell
On Tue, 8 Aug 2023 at 16:23, Akihiko Odaki wrote: > > Alpha, IA-64, and PA-RISC hosts are no longer supported. > > Signed-off-by: Akihiko Odaki > --- > include/exec/user/thunk.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/include/exec/user/thunk.h b/include/exec/us

Re: [PATCH] util: Delete a check for IA-64

2023-08-08 Thread Peter Maydell
On Tue, 8 Aug 2023 at 16:21, Akihiko Odaki wrote: > > HOST_IA64 will never be defined since IA-64 host is no longer supported. > > Signed-off-by: Akihiko Odaki > --- > util/oslib-posix.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/util/oslib-posix.c b/util/oslib-

[PATCH] thunk: Delete checks for old host definitions

2023-08-08 Thread Akihiko Odaki
Alpha, IA-64, and PA-RISC hosts are no longer supported. Signed-off-by: Akihiko Odaki --- include/exec/user/thunk.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h index 300a840d58..d9c131ec80 100644 --- a/include/exec/u

[PATCH] util: Delete a check for IA-64

2023-08-08 Thread Akihiko Odaki
HOST_IA64 will never be defined since IA-64 host is no longer supported. Signed-off-by: Akihiko Odaki --- util/oslib-posix.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 760390b31e..f7adb36dfb 100644 --- a/util/oslib-posix.

Re: [PATCH for-8.1] linux-user: Define real MAP_FIXED_NOREPLACE value

2023-08-08 Thread Akihiko Odaki
On 2023/08/08 23:42, Richard Henderson wrote: On 8/8/23 04:52, Akihiko Odaki wrote: do_brk() assumes target_mmap() emulates MAP_FIXED_NOREPLACE even when the host does not support it. However, such emulation is not possible if MAP_FIXED_NOREPLACE is defined as zero. Define MAP_FIXED_NOREPLACE w

Re: [PATCH for-8.1 v10 01/14] linux-user: Adjust task_unmapped_base for reserved_va

2023-08-08 Thread Richard Henderson
On 8/8/23 02:10, Alex Bennée wrote: One thing I'm slightly confused by is the ELF_ET_DYN_BASE can be above this (or sometimes the same). Should the mapping of ELF segments be handled with mmap_next_start? I assume once mmap_next_start meets the mappings for the ELF segments we skip over until we

Re: [PATCH] Add support of callbacks after instructions to plugin api

2023-08-08 Thread Alex Bennée
Mikhail Tyutin writes: > Initially, we can only call the callback BEFORE instructions. This > commit adds the ability to insert the callback AFTER instructions. What is the use case for this? Because: > > + > +/* Stop translation if translate_insn so indicated. */ > +if (d

[PATCH 0/2] hw/nvme: two fixes

2023-08-08 Thread Klaus Jensen
From: Klaus Jensen Fix two potential accesses to null pointers. Klaus Jensen (2): hw/nvme: fix null pointer access in directive receive hw/nvme: fix null pointer access in ruh update hw/nvme/ctrl.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.41.0

[PATCH 2/2] hw/nvme: fix null pointer access in ruh update

2023-08-08 Thread Klaus Jensen
From: Klaus Jensen The Reclaim Unit Update operation in I/O Management Receive does not verify the presence of a configured endurance group prior to accessing it. Fix this. Cc: qemu-sta...@nongnu.org Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation") Signed-off-by: Klaus Jensen

<    1   2   3   >