Re: [PATCH v1 00/12] virtio-mem: Expose device memory via multiple memslots

2021-11-07 Thread Michael S. Tsirkin
On Tue, Nov 02, 2021 at 06:10:13PM +0100, David Hildenbrand wrote: > On 02.11.21 18:06, Michael S. Tsirkin wrote: > > On Tue, Nov 02, 2021 at 12:55:17PM +0100, David Hildenbrand wrote: > >> On 02.11.21 12:35, Michael S. Tsirkin wrote: > >>> On Tue, Nov 02, 2021 at 09:33:55AM +0100, David Hildenbran

Re: [PATCH v2] failover: specify an alternate MAC address

2021-11-07 Thread Michael S. Tsirkin
On Tue, Nov 02, 2021 at 09:14:51AM +0100, Laurent Vivier wrote: > On 01/11/2021 10:39, Michael S. Tsirkin wrote: > > On Wed, Oct 27, 2021 at 11:59:45AM +0200, Laurent Vivier wrote: > > > If the guest driver doesn't support the STANDBY feature, by default > > > we keep the virtio-net device and don'

Re: [PATCH v10 00/10]vhost-vdpa: add support for configure interrupt

2021-11-07 Thread Michael S. Tsirkin
On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > these patches add the support for configure interrupt > > These codes are all tested in vp-vdpa (support configure interrupt) > vdpa_sim (not support configure interrupt), virtio tap device > > test in virtio-pci bus and virtio-mmio bus

Re: [PATCH] trace-events,pci: unify trace events format

2021-11-07 Thread Michael S. Tsirkin
On Fri, Nov 05, 2021 at 08:25:41PM +0100, Laurent Vivier wrote: > Unify format used by trace_pci_update_mappings_del(), > trace_pci_update_mappings_add(), trace_pci_cfg_write() and > trace_pci_cfg_read() to print the device name and bus number, > slot number and function number. > > For instance:

Re: [PATCH v1 00/12] virtio-mem: Expose device memory via multiple memslots

2021-11-07 Thread David Hildenbrand
On 07.11.21 09:14, Michael S. Tsirkin wrote: > On Tue, Nov 02, 2021 at 06:10:13PM +0100, David Hildenbrand wrote: >> On 02.11.21 18:06, Michael S. Tsirkin wrote: >>> On Tue, Nov 02, 2021 at 12:55:17PM +0100, David Hildenbrand wrote: On 02.11.21 12:35, Michael S. Tsirkin wrote: > On Tue, No

Re: [PATCH v1 00/12] virtio-mem: Expose device memory via multiple memslots

2021-11-07 Thread Michael S. Tsirkin
On Sun, Nov 07, 2021 at 10:21:33AM +0100, David Hildenbrand wrote: > Let's not focus on b), a) is the primary goal of this series: > > " > a) Reduce the metadata overhead, including bitmap sizes inside KVM but > also inside QEMU KVM code where possible. > " > > Because: > > " > For example, when

Re: [PATCH v1 00/12] virtio-mem: Expose device memory via multiple memslots

2021-11-07 Thread David Hildenbrand
On 07.11.21 11:21, Michael S. Tsirkin wrote: > On Sun, Nov 07, 2021 at 10:21:33AM +0100, David Hildenbrand wrote: >> Let's not focus on b), a) is the primary goal of this series: >> >> " >> a) Reduce the metadata overhead, including bitmap sizes inside KVM but >> also inside QEMU KVM code where pos

Bus 'pcie.0' does not support hotplugging

2021-11-07 Thread yue
Hi, all: in my case it is kata that manage qemu directly via qmp. (QEMU emulator version 5.2.0 (kata-static)). i have tested via virsh command and make sure that qemu-system-x86_64 supports hotplug. but if qemu was started by kata, attach-disk failed. 1. it is which option that p

[PATCH 0/4] linux-user: Fix getdents alignment issues (#704)

2021-11-07 Thread Richard Henderson
There are a number of alignement issues flagged up by clang, this attempts to fix only one of them: getdents. r~ Richard Henderson (4): linux-user: Split out do_getdents, do_getdents64 linux-user: Always use flexible arrays for dirent d_name linux-user: Fix member types of target_dirent64

[PATCH 4/4] linux-user: Rewrite do_getdents, do_getdents64

2021-11-07 Thread Richard Henderson
Always allocate host storage; this ensures that the struct is sufficiently aligned for the host. Merge the three host implementations of getdents via a few ifdefs. Utilize the same method for do_getdents64. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/704 Signed-off-by: Richard Hender

[PATCH 1/4] linux-user: Split out do_getdents, do_getdents64

2021-11-07 Thread Richard Henderson
Retain all 3 implementations of getdents for now. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 325 +++ 1 file changed, 172 insertions(+), 153 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 544f5b662f..a2f605dec

[PATCH 2/4] linux-user: Always use flexible arrays for dirent d_name

2021-11-07 Thread Richard Henderson
We currently use a flexible array member for target_dirent, but use incorrectly fixed length arrays for target_dirent64, linux_dirent and linux_dirent64. This requires that we adjust the definition of the VFAT READDIR ioctls which hard-code the 256 namelen size into the ioctl constant. Signed-off

[PATCH 3/4] linux-user: Fix member types of target_dirent64

2021-11-07 Thread Richard Henderson
The host uint64_t (etc) does not have the correct alignment constraint as the guest: use abi_* types. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h ind

Patch: Support QEMU Guest Agent on macOS

2021-11-07 Thread Markus Reiter
Add support for the `guest-shutdown` and `guest-network-get-interfaces` commands on macOS. Markus 0001-Fix-default-QGA-device-path-on-macOS.patch Description: Binary data 0002-Fix-shutdown-args-on-macOS.patch Description: Binary data 0003-Enable-guest-network-get-interfaces-command-on-macO

Re: [PATCH] target/ppc, hw/ppc: Change maintainers

2021-11-07 Thread Greg Kurz
On Sat, 6 Nov 2021 19:53:04 +1100 David Gibson wrote: > On Sat, Nov 06, 2021 at 09:28:54AM +0100, Cédric Le Goater wrote: > > > > > > Thank you and Greg and Red Hat for all the years of service > > > > > > supporting > > > > > > qemu-ppc in the community. IBM will shoulder this responsibility >

Re: [PATCH V5 1/3] net/filter: Optimize transfer protocol for filter-mirror/redirector

2021-11-07 Thread Jason Wang
On Fri, Nov 5, 2021 at 4:43 PM Zhang, Chen wrote: > > > > > -Original Message- > > From: Jason Wang > > Sent: Friday, November 5, 2021 4:30 PM > > To: Zhang, Chen > > Cc: Markus Armbruster ; qemu-dev > de...@nongnu.org>; Li Zhijian > > Subject: Re: [PATCH V5 1/3] net/filter: Optimize t

[RFC 0/4] linux-user: simplify safe signal handling

2021-11-07 Thread Warner Losh
This is a quick RFC to see if something like this is worth doing. I've created a new interface host_signal_set_pc. This allows us to move all the nearly identical copies of rewind_if_in_safe_syscall into signal.c. This reduces the amount of code that needs to be rewritten for bsd-user's adaptatio

[RFC 3/4] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-07 Thread Warner Losh
Move all the safe_syscall.inc.S files to common-user. They are almost identical between linux-user and bsd-user to re-use. Signed-off-by: Warner Losh --- {linux-user => common-user}/host/aarch64/safe-syscall.inc.S | 0 {linux-user => common-user}/host/arm/safe-syscall.inc.S | 0 {linux-user

[RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-07 Thread Warner Losh
All instances of rewind_if_in_safe_syscall are the same, differing only in how the instruction point is fetched from the ucontext and the size of the registers. Use host_signal_pc and new host_signal_set_pc interfaces to fetch the pointer to the PC and adjust if needed. Delete all the old copies of

[RFC 1/4] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-07 Thread Warner Losh
Add a new function host_signal_set_pc to set the next pc in an mcontext. The caller should ensure this is a valid PC for execution. Signed-off-by: Warner Losh --- linux-user/host/aarch64/host-signal.h | 5 + linux-user/host/alpha/host-signal.h | 5 + linux-user/host/arm/host-signal.h

[RFC 4/4] common-user: Allow return codes to be adjusted after sytsem call

2021-11-07 Thread Warner Losh
All the *-users generally use the Linux style of negative return codes for errno. However, other systems, like FreeBSD, have a different convention. Allow those systems to insert code after the syscall that adjusts the return value of the system call to match the native linux format. Signed-off-by

RE: [PATCH V5 1/3] net/filter: Optimize transfer protocol for filter-mirror/redirector

2021-11-07 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Monday, November 8, 2021 10:42 AM > To: Zhang, Chen > Cc: Markus Armbruster ; qemu-dev de...@nongnu.org>; Li Zhijian > Subject: Re: [PATCH V5 1/3] net/filter: Optimize transfer protocol for filter- > mirror/redirector > > On Fri, Nov 5,

[RESEND PATCH v9 00/28] Add LoongArch linux-user emulation support

2021-11-07 Thread Song Gao
Hi all, This series only support linux-user emulation. More about LoongArch at: https://github.com/loongson/ The latest kernel: * https://github.com/loongson/linux/tree/loongarch-next Patches need review: * 0002-target-loongarch-Add-core-definition.patch * 0016-target-loongarch-Add-disass

[RESEND PATCH v9 04/28] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-07 Thread Song Gao
This includes: - ADD.{W/D}, SUB.{W/D} - ADDI.{W/D}, ADDU16ID - ALSL.{W[U]/D} - LU12I.W, LU32I.D LU52I.D - SLT[U], SLT[U]I - PCADDI, PCADDU12I, PCADDU18I, PCALAU12I - AND, OR, NOR, XOR, ANDN, ORN - MUL.{W/D}, MULH.{W[U]/D[U]} - MULW.D.W[U] - DIV.{W[U]/D[U]}, MOD.{W[U]/D[U]} - ANDI, ORI, XORI Signed

[RESEND PATCH v9 12/28] target/loongarch: Add floating point conversion instruction translation

2021-11-07 Thread Song Gao
This includes: - FCVT.S.D, FCVT.D.S - FFINT.{S/D}.{W/L}, FTINT.{W/L}.{S/D} - FTINT{RM/RP/RZ/RNE}.{W/L}.{S/D} - FRINT.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 393 +++ tar

[RESEND PATCH v9 03/28] target/loongarch: Add main translation routines

2021-11-07 Thread Song Gao
This patch adds main translation routines and basic functions for translation. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h| 6 ++ target/loongarch/op_helper.c | 21 ++ target/loongarch/translate.c | 159 ++

[RESEND PATCH v9 02/28] target/loongarch: Add core definition

2021-11-07 Thread Song Gao
This patch adds target state header, target definitions and initialization routines. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/cpu-param.h | 18 +++ target/loongarch/cpu.c | 314 +++ t

[RESEND PATCH v9 07/28] target/loongarch: Add fixed point load/store instruction translation

2021-11-07 Thread Song Gao
This includes: - LD.{B[U]/H[U]/W[U]/D}, ST.{B/H/W/D} - LDX.{B[U]/H[U]/W[U]/D}, STX.{B/H/W/D} - LDPTR.{W/D}, STPTR.{W/D} - PRELD - LD{GT/LE}.{B/H/W/D}, ST{GT/LE}.{B/H/W/D} - DBAR, IBAR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helpe

[RESEND PATCH v9 20/28] linux-user: Add LoongArch elf support

2021-11-07 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- include/elf.h | 2 ++ linux-user/elfload.c| 58 + linux-user/loongarch64/target_elf.h | 12 3 files changed, 72 insertions(+) create mode 100644 linux-use

[RESEND PATCH v9 05/28] target/loongarch: Add fixed point shift instruction translation

2021-11-07 Thread Song Gao
This includes: - SLL.W, SRL.W, SRA.W, ROTR.W - SLLI.W, SRLI.W, SRAI.W, ROTRI.W - SLL.D, SRL.D, SRA.D, ROTR.D - SLLI.D, SRLI.D, SRAI.D, ROTRI.D Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_shift.c.inc | 128 +++

[RESEND PATCH v9 01/28] target/loongarch: Add README

2021-11-07 Thread Song Gao
This patch gives an introduction to the LoongArch target. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- MAINTAINERS | 5 target/loongarch/README | 76 + 2 files changed, 81 insertions(+)

[RESEND PATCH v9 06/28] target/loongarch: Add fixed point bit instruction translation

2021-11-07 Thread Song Gao
This includes: - EXT.W.{B/H} - CL{O/Z}.{W/D}, CT{O/Z}.{W/D} - BYTEPICK.{W/D} - REVB.{2H/4H/2W/D} - REVH.{2W/D} - BITREV.{4B/8B}, BITREV.{W/D} - BSTRINS.{W/D}, BSTRPICK.{W/D} - MASKEQZ, MASKNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loonga

[RESEND PATCH v9 09/28] target/loongarch: Add fixed point extra instruction translation

2021-11-07 Thread Song Gao
This includes: - CRC[C].W.{B/H/W/D}.W - SYSCALL - BREAK - ASRT{LE/GT}.D - RDTIME{L/H}.W, RDTIME.D - CPUCFG Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 4 ++ target/loongarch/insn_trans/trans_extra.c.in

[RESEND PATCH v9 18/28] linux-user: Add LoongArch specific structures

2021-11-07 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/target_structs.h | 48 + 1 file changed, 48 insertions(+) create mode 100644 linux-user/loongarch64/target_structs.h diff --git a/linux-user/loongarch64/target_structs.h b/linux-use

[RESEND PATCH v9 11/28] target/loongarch: Add floating point comparison instruction translation

2021-11-07 Thread Song Gao
This includes: - FCMP.cond.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 60 target/loongarch/helper.h| 9 + target/loongarch/insn_trans/trans_fc

[RESEND PATCH v9 22/28] linux-user: Add LoongArch cpu_loop support

2021-11-07 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- configure | 5 ++ linux-user/loongarch64/cpu_loop.c | 97 + linux-user/loongarch64/target_cpu.h | 34 + 3 files changed, 136 insertions(+) create mode 100644 lin

[RESEND PATCH v9 08/28] target/loongarch: Add fixed point atomic instruction translation

2021-11-07 Thread Song Gao
This includes: - LL.{W/D}, SC.{W/D} - AM{SWAP/ADD/AND/OR/XOR/MAX/MIN}[_DB].{W/D} - AM{MAX/MIN}[_DB].{WU/DU} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_atomic.c.inc | 130 + target/loongarch/i

[RESEND PATCH v9 10/28] target/loongarch: Add floating point arithmetic instruction translation

2021-11-07 Thread Song Gao
This includes: - F{ADD/SUB/MUL/DIV}.{S/D} - F{MADD/MSUB/NMADD/NMSUB}.{S/D} - F{MAX/MIN}.{S/D} - F{MAXA/MINA}.{S/D} - F{ABS/NEG}.{S/D} - F{SQRT/RECIP/RSQRT}.{S/D} - F{SCALEB/LOGB/COPYSIGN}.{S/D} - FCLASS.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --

[RESEND PATCH v9 14/28] target/loongarch: Add floating point load/store instruction translation

2021-11-07 Thread Song Gao
This includes: - FLD.{S/D}, FST.{S/D} - FLDX.{S/D}, FSTX.{S/D} - FLD{GT/LE}.{S/D}, FST{GT/LE}.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_fmemory.c.inc | 184 target/loongarch/insns.dec

[RESEND PATCH v9 16/28] target/loongarch: Add disassembler

2021-11-07 Thread Song Gao
This patch adds support for disassembling via option '-d in_asm'. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Acked-by: Richard Henderson --- include/disas/dis-asm.h | 2 + meson.build | 1 + target/loongarch/disas.c | 918

[RESEND PATCH v9 23/28] default-configs: Add loongarch linux-user support

2021-11-07 Thread Song Gao
This patch adds loongarch64 linux-user default configs file. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- configs/targets/loongarch64-linux-user.mak | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configs/targets/loongarch64-linux-user.ma

[RESEND PATCH v9 13/28] target/loongarch: Add floating point move instruction translation

2021-11-07 Thread Song Gao
This includes: - FMOV.{S/D} - FSEL - MOVGR2FR.{W/D}, MOVGR2FRH.W - MOVFR2GR.{S/D}, MOVFRH2GR.S - MOVGR2FCSR, MOVFCSR2GR - MOVFR2CF, MOVCF2FR - MOVGR2CF, MOVCF2GR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c

[RESEND PATCH v9 19/28] linux-user: Add LoongArch signal support

2021-11-07 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/signal.c| 162 + linux-user/loongarch64/target_signal.h | 29 ++ 2 files changed, 191 insertions(+) create mode 100644 linux-user/loongarch64/signal.c create mode 100644

[RESEND PATCH v9 21/28] linux-user: Add LoongArch syscall support

2021-11-07 Thread Song Gao
We should disable '__BITS_PER_LONG' at [1] before run gensyscalls.sh [1] arch/loongarch/include/uapi/asm/bitsperlong.h Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/syscall_nr.h | 312 linux-user/loongarch64/target_syscall

[RESEND PATCH v9 17/28] linux-user: Add LoongArch generic header files

2021-11-07 Thread Song Gao
This includes: - sockbits.h - target_errno_defs.h - target_fcntl.h - termbits.h Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/sockbits.h | 1 + linux-user/loongarch64/target_errno_defs.h | 7 +++ linux-user/loongarch64/target_fcntl.h | 6 +

[RESEND PATCH v9 25/28] target/loongarch: 'make check-tcg' support

2021-11-07 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Acked-by: Alex Bennée --- tests/tcg/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 9b76f58..49a05ec 100755 --- a/tests/tcg/configure.sh ++

[RESEND PATCH v9 26/28] scripts: add loongarch64 binfmt config

2021-11-07 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 7de996d..da6a937 100755 --- a/scripts/qemu

[RESEND PATCH v9 15/28] target/loongarch: Add branch instruction translation

2021-11-07 Thread Song Gao
This includes: - BEQ, BNE, BLT[U], BGE[U] - BEQZ, BNEZ - B - BL - JIRL - BCEQZ, BCNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_branch.c.inc | 82 ++ target/loongarch/insns.decode

[RESEND PATCH v9 24/28] target/loongarch: Add target build suport

2021-11-07 Thread Song Gao
This patch adds build loongarch-linux-user target support. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- meson.build | 2 +- target/loongarch/meson.build | 19 +++ target/meson.build | 1 + 3 files changed,

[RESEND PATCH v9 28/28] linux-user/host/loongarch64: Populate host_signal.h

2021-11-07 Thread Song Gao
From: WANG Xuerui Split host_signal_pc and host_signal_write out of user-exec.c Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210925173032.2434906-30-...@xen0n.name> Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linu

[RESEND PATCH v9 27/28] linux-user: Add safe syscall handling for loongarch64 hosts

2021-11-07 Thread Song Gao
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20210925173032.2434906-29-...@xen0n.name> Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/host/loongarch64/hostdep.h | 32 +++ linux-user/host/loongarch64/safe-syscal

[PATCH v5 00/37] bsd-user: arm (32-bit) support

2021-11-07 Thread Warner Losh
This series of patches brings in 32-bit arm support for bsd-user. It implements all the bits needed to do image activation, signal handling, stack management and threading. This allows us to get to the "Hello World" level. The arm and x86 code are now the same as in the bsd-user fork. For full con

[PATCH v5 01/37] bsd-user/mips*: Remove mips support

2021-11-07 Thread Warner Losh
FreeBSD is dropping support for mips starting with FreeBSD 14. mips support has been removed from the bsd-user fork because updating it for new signal requirements will take too much time. Remove it here since it is a distraction. Signed-off-by: Warner Losh Acked-by: Richard Henderson --- bsd-u

[PATCH v5 04/37] bsd-user/i386/target_arch_signal.h: Remove target_sigcontext

2021-11-07 Thread Warner Losh
In FreeBSD, sigcontext was retired in favor of ucontext/mcontext. Remove vestigial target_sigcontext. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch_signal.h | 4 1 file changed, 4 deletions(-) diff --git a/bsd-user/i386/target_arch_signal.h b/bsd

[PATCH v5 03/37] bsd-user: create a per-arch signal.c file

2021-11-07 Thread Warner Losh
Create a place-holder signal.c file for each of the architectures that are currently built. In the future, some code that's currently inlined in target_arch_signal.h will live here. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/signal.c | 1 + bsd-user/x86_64/sig

[PATCH v5 06/37] bsd-user/i386/target_arch_signal.h: Update mcontext_t to match FreeBSD

2021-11-07 Thread Warner Losh
Fill in target_mcontext_t to match the FreeBSD mcontex_t. Also tag the current size of mcontext and ucontext to enable size checking for i386. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch_signal.h | 46 ++ 1 file changed, 46

[PATCH v5 07/37] bsd-user/i386: Move the inlines into signal.c

2021-11-07 Thread Warner Losh
Move the (now stubbed out) inlines into bsd-user/i386/signal.c. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/signal.c | 56 +- bsd-user/i386/target_arch_signal.h | 43 +-- 2 files changed, 63 insertions(+

[PATCH v5 02/37] bsd-user/freebsd: Create common target_os_ucontext.h file

2021-11-07 Thread Warner Losh
FreeBSD has a MI ucontext structure that contains the MD mcontext machine state and other things that are machine independent. Create an include file for all the ucontext stuff. It needs to be included in the arch specific files after target_mcontext is defined. This is largely copied from sys/_uco

[PATCH v5 10/37] bsd-user/x86_64/target_arch_signal.h: Fill in mcontext_t

2021-11-07 Thread Warner Losh
Fill in target_mcontext match the FreeBSD mcontext_t structure. Also define the size correctly. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/x86_64/target_arch_signal.h | 54 1 file changed, 54 insertions(+) diff --git a/bsd-user/x86_64/ta

[PATCH v5 08/37] bsd-user/x86_64/target_arch_signal.h: Remove target_sigcontext

2021-11-07 Thread Warner Losh
In FreeBSD, sigcontext was retired in favor of ucontext/mcontext. Remove vestigial target_sigcontext. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/x86_64/target_arch_signal.h | 4 1 file changed, 4 deletions(-) diff --git a/bsd-user/x86_64/target_arch_signal.h b

[PATCH v5 05/37] bsd-user/i386/target_arch_signal.h: use new target_os_ucontext.h

2021-11-07 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/i386/target_arch_signal.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bsd-user/i386/target_arch_signal.h b/bsd-user/i386/target_arch_signal.h index e262667bda..bf7263c4f8 100644 --- a/bsd-user

[PATCH v5 09/37] bsd-user/x86_64/target_arch_signal.h: use new target_os_ucontext.h

2021-11-07 Thread Warner Losh
Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/x86_64/target_arch_signal.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bsd-user/x86_64/target_arch_signal.h b/bsd-user/x86_64/target_arch_signal.h index 55f742b0a8..e84aff948c 100644 --- a/bs

[PATCH v5 11/37] bsd-user/x86_64: Move functions into signal.c

2021-11-07 Thread Warner Losh
Move the current inline functions into sigal.c. This will increate the flexibility of implementation in the future. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/x86_64/signal.c | 56 +++- bsd-user/x86_64/target_arch_signal.h | 43 +++

[PATCH v5 12/37] bsd-user/target_os_signal.h: Move signal prototypes to target_os_ucontext.h

2021-11-07 Thread Warner Losh
Switch to the CPUArchState typedef and move target-provided prototypes to target_os_ucontext.h. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/target_os_ucontext.h | 11 +++ bsd-user/i386/target_arch_signal.h| 9 - bsd-user/x86_64/target_arch

[PATCH v5 16/37] bsd-user/arm/target_arch_cpu.h: CPU Loop definitions

2021-11-07 Thread Warner Losh
target_arch_cpu.h is for CPU loop definitions. Create the file and define target_cpu_init and target_cpu_reset for arm. Signed-off-by: Olivier Houchard Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu

[PATCH v5 26/37] bsd-user/arm/target_arch_elf.h: arm defines for ELF

2021-11-07 Thread Warner Losh
Basic set of defines needed for arm ELF file activation. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_elf.h | 36 ++ 1 file changed, 36 insertions(+) create mode 100644

[PATCH v5 21/37] bsd-user/arm/target_arch_cpu.h: Implement system call dispatch

2021-11-07 Thread Warner Losh
Implement the system call dispatch. This implements all three kinds of system call: direct and the two indirect variants. It handles all the special cases for thumb as well. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Rich

[PATCH v5 22/37] bsd-user/arm/target_arch_reg.h: Implement core dump register copying

2021-11-07 Thread Warner Losh
Implement the register copying routines to extract registers from the cpu for core dump generation. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_reg.h | 60 ++ 1 file ch

[PATCH v5 14/37] bsd-user/arm/target_syscall.h: Add copyright and update name

2021-11-07 Thread Warner Losh
The preferred name for the 32-bit arm is now armv7. Update the name to reflect that. In addition, add Stacey's copyright to this file and update the include guards to the new convention. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson

[PATCH v5 37/37] bsd-user: add arm target build

2021-11-07 Thread Warner Losh
CC: Paolo Bonzini Signed-off-by: Warner Losh Acked-by: Kyle Evans Reviewed-by: Richard Henderson --- configs/targets/arm-bsd-user.mak | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 configs/targets/arm-bsd-user.mak diff --git a/configs/targets/arm-bsd-user.mak b/configs/targets/ar

[PATCH v5 19/37] bsd-user/arm/target_arch_cpu.h: Implement trivial EXCP exceptions

2021-11-07 Thread Warner Losh
Implement EXCP_UDEF, EXCP_DEBUG, EXCP_INTERRUPT, EXCP_ATOMIC and EXCP_YIELD. The first two generate a signal to the emulated binary. EXCP_ATOMIC handles atomic operations. The remainder are fancy nops. Signed-off-by: Stacey Son Signed-off-by: Mikaël Urankar Signed-off-by: Kyle Evans Signed-off-

[PATCH v5 17/37] bsd-user/arm/target_arch_cpu.h: Implement target_cpu_clone_regs

2021-11-07 Thread Warner Losh
Implement target_cpu_clone_regs to clone the resister state on a fork. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 8 1 file changed, 8 insertions(+) diff --git a/bsd-user/arm/target

[PATCH v5 24/37] bsd-user/arm/target_arch_sigtramp.h: Signal Trampoline for arm

2021-11-07 Thread Warner Losh
Copy of the signal trampoline code for arm, as well as setup_sigtramp to write it to the stack. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_sigtramp.h | 49 + 1 file change

[PATCH v5 13/37] bsd-user/arm/target_arch_sysarch.h: Use consistent include guards

2021-11-07 Thread Warner Losh
As part of upstreaming, the include guards have been made more consistent. Update this file to use the new guards. Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_sysarch.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-

[PATCH v5 33/37] bsd-user/arm/signal.c: arm get_mcontext

2021-11-07 Thread Warner Losh
Get the machine context from the CPU state. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/arm/signal.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/bsd-user/arm/sig

[PATCH v5 15/37] bsd-user/arm/target_arch_cpu.c: Target specific TLS routines

2021-11-07 Thread Warner Losh
Target specific TLS routines to get and set the TLS values. Signed-off-by: Kyle Evans Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch.h | 28 bsd-user/arm/target_arch_cpu.c |

[PATCH v5 25/37] bsd-user/arm/target_arch_thread.h: Routines to create and switch to a thread

2021-11-07 Thread Warner Losh
Implement target_thread_init (to create a thread) and target_set_upcall (to switch to a thread) for arm. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Kyle Evans --- bsd-user/arm/target_arch_thread.h | 82 +++ 1 file ch

[PATCH v5 36/37] bsd-user/freebsd/target_os_ucontext.h: Require TARGET_*CONTEXT_SIZE

2021-11-07 Thread Warner Losh
Now that all architecutres define TARGET_[MU]CONTEXT_SIZE, enforce requiring them and always check the sizeof target_{u,m}context_t sizes. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/target_os_ucontext.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/bsd

[PATCH v5 18/37] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation

2021-11-07 Thread Warner Losh
Add a boiler plate CPU loop that does nothing except return an error for all traps. Signed-off-by: Sean Bruno Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_cpu.h | 22 ++ 1 file cha

[PATCH v5 28/37] bsd-user/arm/target_arch_elf.h: arm get_hwcap2 impl

2021-11-07 Thread Warner Losh
Implement the extended HW capabilities for HWCAP2. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_elf.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/bsd-user/arm/target_arc

[PATCH v5 20/37] bsd-user/arm/target_arch_cpu.h: Implement data abort exceptions

2021-11-07 Thread Warner Losh
Implement EXCP_PREFETCH_ABORT AND EXCP_DATA_ABORT. Both of these data exceptions cause a SIGSEGV. Signed-off-by: Kyle Evans Signed-off-by: Olivier Houchard Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arc

[PATCH v5 27/37] bsd-user/arm/target_arch_elf.h: arm get hwcap

2021-11-07 Thread Warner Losh
Implement get_elf_hwcap to get the first word of hardware capabilities. Signed-off-by: Kyle Evans Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_elf.h | 72 +- 1 file cha

[PATCH v5 23/37] bsd-user/arm/target_arch_vmparam.h: Parameters for arm address space

2021-11-07 Thread Warner Losh
Various parameters describing the layout of the ARM address space. In addition, define routines to get the stack pointer and to set the second return value. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --

[PATCH v5 31/37] bsd-user/arm/target_arch_signal.h: Define size of *context_t

2021-11-07 Thread Warner Losh
Define the native sizes of mcontext_t and ucontext_t so that the tests in target_os_ucontext.h ensure the size of arm's version of these structures is correct. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_signal.h | 3 +++ 1 file changed, 3 insertions(+

[PATCH v5 29/37] bsd-user/arm/target_arch_signal.h: arm specific signal registers and stack

2021-11-07 Thread Warner Losh
Defines for registers and stack layout related to signals. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Kyle Evans Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_signal.h | 57 +++ 1 file changed, 57 insertions(+) create mode 1006

[PATCH v5 30/37] bsd-user/arm/target_arch_signal.h: arm machine context and trapframe for signals

2021-11-07 Thread Warner Losh
Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/arm/target_arch_signal.h | 28 1 file changed, 28 insertions(+) diff --git a/bsd-user/arm/target_arch_signal.h b/bsd-user/arm/target_arch_si

[PATCH v5 32/37] bsd-user/arm/signal.c: arm set_sigtramp_args

2021-11-07 Thread Warner Losh
Implement set_sigtramp_args to setup the arguments to the sigtramp calls. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/arm/signal.c | 60 +++ 1 file changed, 60 insertions(+) create mode 100644 bsd-use

[PATCH v5 34/37] bsd-user/arm/signal.c: arm set_mcontext

2021-11-07 Thread Warner Losh
Move the machine context to the CPU state. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/arm/signal.c | 76 +++ 1 file changed, 76 insertions(+) diff --git a/bsd-user/arm/signal.c b/bsd-user/arm/signal.c ind

[PATCH v5 35/37] bsd-user/arm/signal.c: arm get_ucontext_sigreturn

2021-11-07 Thread Warner Losh
Update ucontext to implement sigreturn. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/arm/signal.c | 9 + 1 file changed, 9 insertions(+) diff --git a/bsd-user/arm/signal.c b/bsd-user/arm/signal.c index fb6228db6c..1478f008d1 100644 -

Re: [PATCH] spapr_numa.c: FORM2 table handle nodes with no distance info

2021-11-07 Thread Aneesh Kumar K.V
Daniel Henrique Barboza writes: > On 11/5/21 10:51, Nicholas Piggin wrote: >> A configuration that specifies multiple nodes without distance info >> results in the non-local points in the FORM2 matrix having a distance of >> 0. This causes Linux to complain "Invalid distance value range" because

Re: [PATCH] spapr_numa.c: FORM2 table handle nodes with no distance info

2021-11-07 Thread David Gibson
On Fri, Nov 05, 2021 at 03:52:13PM -0300, Daniel Henrique Barboza wrote: > > > On 11/5/21 10:51, Nicholas Piggin wrote: > > A configuration that specifies multiple nodes without distance info > > results in the non-local points in the FORM2 matrix having a distance of > > 0. This causes Linux to

Re: [PULL 2/2] docs: fix qemu incorrect tag

2021-11-07 Thread Markus Armbruster
Juan Quintela writes: > From: Hyman Huang(黄勇) > > The patchset merged in 71864eadd9a ("migration/dirtyrate: > introduce struct and adjust DirtyRateStat") was targeting > QEMU 6.1 but got merged later, so correct the tag for 6.2. > > Signed-off-by: Hyman Huang(黄勇) > Reviewed-by: Philippe Mathieu

[PATCH] docs: fix 'sample-pages' option tag

2021-11-07 Thread huangy81
From: Hyman Huang(黄勇) commit f78d4ed701 has fixed qemu tag, making 'sample-pages' option tag involved by accident, which introduced since 6.1 in commit 7afa08cd8fd. revert this line. Signed-off-by: Hyman Huang(黄勇) --- qapi/migration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [PATCH] docs: fix 'sample-pages' option tag

2021-11-07 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > commit f78d4ed701 has fixed qemu tag, making 'sample-pages' option tag > involved by accident, which introduced since 6.1 in commit 7afa08cd8fd. > revert this line. > > Signed-off-by: Hyman Huang(黄勇) > --- > qapi/migration.json | 2 +-

Re: [PATCH v4 0/1] hw/hyperv/vmbus: Is it maintained?

2021-11-07 Thread Philippe Mathieu-Daudé
On 11/6/21 20:28, Maciej S. Szmigiero wrote: > On 06.11.2021 14:41, Philippe Mathieu-Daudé wrote: >> This is the 4th time I send this patch. Is the VMBus infrastructure >> used / maintained? Should we deprecate & remove? >> >>    $ ./scripts/get_maintainer.pl -f hw/hyperv/vmbus.c -f >> include/hw/h

Re: [PATCH 1/4] linux-user: Split out do_getdents, do_getdents64

2021-11-07 Thread Philippe Mathieu-Daudé
On 11/7/21 13:48, Richard Henderson wrote: > Retain all 3 implementations of getdents for now. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall.c | 325 +++ > 1 file changed, 172 insertions(+), 153 deletions(-) Reviewed-by: Philippe Mathieu

Re: [PATCH v2] linux-user: Mark cpu_loop() with noreturn attribute

2021-11-07 Thread Philippe Mathieu-Daudé
On 11/7/21 01:39, Warner Losh wrote: > > > On Sat, Nov 6, 2021, 5:39 AM Philippe Mathieu-Daudé > wrote: > > cpu_loop() never exits, so mark it with QEMU_NORETURN. > > Reviewed-by: Richard Henderson > > Reviewed-By: W

Re: [PATCH 3/4] linux-user: Fix member types of target_dirent64

2021-11-07 Thread Philippe Mathieu-Daudé
On 11/7/21 13:48, Richard Henderson wrote: > The host uint64_t (etc) does not have the correct > alignment constraint as the guest: use abi_* types. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall_defs.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by:

Re: [PATCH 2/4] linux-user: Always use flexible arrays for dirent d_name

2021-11-07 Thread Philippe Mathieu-Daudé
On 11/7/21 13:48, Richard Henderson wrote: > We currently use a flexible array member for target_dirent, > but use incorrectly fixed length arrays for target_dirent64, > linux_dirent and linux_dirent64. > > This requires that we adjust the definition of the VFAT READDIR > ioctls which hard-code th

Re: Emulation of solo key

2021-11-07 Thread Philippe Mathieu-Daudé
Hi Niraj, On 11/6/21 11:17, Niraj Sorathiya wrote: > Hello Team, > > I really need your suggestions on how I should proceed to build a > Solo key emulator ?  Since I am new to QEMU  , I would like to know how > I should do planing before getting into technical of QEMU > > Please find all informa

  1   2   >