[PATCH v3 3/3] linux-user: Remove TARGET_SIGSTKSZ

2022-01-06 Thread Song Gao
TARGET_SIGSTKSZ is not used, we should remove it. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- linux-user/alpha/target_signal.h | 1 - linux-user/generic/signal.h | 1 - linux-user/hppa/target_signal.h | 1 - linux-user/mips/target_signal.h | 1 - linux-user/mips64/targ

RE: [RFC 02/10] vhost: add 3 commands for vhost-vdpa

2022-01-06 Thread longpeng2--- via
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Thursday, January 6, 2022 10:34 AM > To: Michael S. Tsirkin > Cc: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > ; Stefan Hajnoczi ; Stefano > Garzarella ; Cornelia Huck ; pbonzini > ; Gonglei (Ar

Re: [PATCH v2 00/18] user creatable pnv-phb3/pnv-phb4 devices

2022-01-06 Thread Cédric Le Goater
On 1/5/22 22:23, Daniel Henrique Barboza wrote: Hi, This second version was rebased with upstream and includes fixed/amended versions of relevant patches that were sent to the mailing list and aren't upstream yet. In this process 4 patches from v1 were discarded, becoming either irrelevant or sq

Re: [PATCH for-7.0] hw/i386/pc: Add missing property descriptions

2022-01-06 Thread Igor Mammedov
On Mon, 6 Dec 2021 14:42:55 +0100 Thomas Huth wrote: > When running "qemu-system-x86_64 -M pc,help" I noticed that some > properties were still missing their description. Add them now so > that users get at least a slightly better idea what they are all > about. > > Signed-off-by: Thomas Huth

[PATCH 0/1] Patch to adjust coroutine pool size adaptively

2022-01-06 Thread Hiroki Narukawa
We encountered random disk IO performance drop since qemu-5.0.0, and this patch fixes it. Commit message in c740ad92 implied to adjust coroutine pool size adaptively, so I tried to implement this. Could you review this patch? Hiroki Narukawa (1): util: adjust coroutine pool size to virtio bl

[PATCH 1/1] util: adjust coroutine pool size to virtio block queue

2022-01-06 Thread Hiroki Narukawa
Coroutine pool size was 64 from long ago, and the basis was organized in the commit message in c740ad92. At that time, virtio-blk queue-size and num-queue were not configuable, and equivalent values were 128 and 1. Coroutine pool size 64 was fine then. Later queue-size and num-queue got config

Re: [PATCH v7 00/18] Adding partial support for 128-bit riscv target

2022-01-06 Thread Alistair Francis
On Tue, Dec 14, 2021 at 2:39 AM Frédéric Pétrot wrote: > > This series of patches provides partial 128-bit support for the riscv > target architecture, namely RVI and RVM, with minimal csr support. > > Thanks again for the reviews and advices. I think this is all reviewed now. I was getting an er

Re: [PATCH v5 2/3] acpi: tpm: Add missing device identification objects

2022-01-06 Thread Igor Mammedov
On Tue, 4 Jan 2022 12:58:05 -0500 Stefan Berger wrote: > Add missing TPM device identification objects _STR and _UID. They will > appear as files 'description' and 'uid' under Linux sysfs. > > Following inspection of sysfs entries for hardware TPMs we chose > uid '1'. My guess would be that bu

[PATCH v2 0/2] Introduce camera subsystem

2022-01-06 Thread zhenwei pi
v1 -> v2: [missing CC qemu-devel@nongnu.org, resend] Separate v1 patch set into 2 parts: Introduce camera subsystem (this one). USB desc fix and UVC. Add maintainer infomation. v1: 1, The full picture of this patch set: +-+ ++ +---+ |UV

[PATCH v2 1/2] camera: Introduce camera subsystem and builtin driver

2022-01-06 Thread zhenwei pi
Web camera is an important port of a desktop instance, QEMU supports USB passthrough and USB redirect to support for general cases. Several problems we have hit: 1, the heavy bandwidth of network. a 1080*720@30FPS(MJPEG) uses ~5MB/s. 2, Issues of USB passthrough, Ex USB reset from guest si

[PATCH v2 2/2] camera: v4l2: Introduce v4l2 camera driver

2022-01-06 Thread zhenwei pi
On a Linux platform, user process could accesses /dev/videoX to capture video frames. We can run QEMU like this: qemu-system-x86_64 ... -cameradev v4l2,path=/dev/video0,id=camera0 To test a /dev/videoX device support video capture, install v4l-utils package and run command: ~# v4l2-ctl --info

Re: [PATCH V7 19/29] vfio-pci: cpr part 1 (fd and dma)

2022-01-06 Thread Michael S. Tsirkin
On Wed, Jan 05, 2022 at 06:24:25PM -0500, Steven Sistare wrote: > On 1/5/2022 6:09 PM, Michael S. Tsirkin wrote: > > On Wed, Jan 05, 2022 at 04:40:43PM -0500, Steven Sistare wrote: > >> On 1/5/2022 4:14 PM, Michael S. Tsirkin wrote: > >>> On Wed, Jan 05, 2022 at 12:24:21PM -0500, Steven Sistare wro

Re: [PATCH v2] hw/arm/virt: KVM: Enable PAuth when supported by the host

2022-01-06 Thread Marc Zyngier
Hi Richard, On Wed, 05 Jan 2022 21:36:55 +, Richard Henderson wrote: > > On 1/3/22 10:05 AM, Marc Zyngier wrote: > > -/* > > - * KVM does not support modifications to this feature. > > - * We have not registered the cpu properties when KVM > > - * is in use, s

Re: Rational behind partial AVX support in Qemu

2022-01-06 Thread Stevie Lavern
Hello, Thanks for you answer! I may put together a patch to crash if VEX.L is 1 (shouldn't be hard) and submit it to the patch list. Do you think it qualifies as "trivial patch" or should i go on with the full patch submission process? On Thu, Jan 6, 2022 at 3:45 AM Richard Henderson < richard.h

[PATCH 00/15] reduce audio playback latency

2022-01-06 Thread Volker Rümelin
This patch series reduces the playback latency for audio backends, in some cases significantly. For PulseAudio, the audio buffer is also moved from the QEMU side to the PulseAudio server side. This improves the drop-out safety for PulseAudio. I actually measured the latency reduction with the Pul

Re: [PATCH v3 3/3] linux-user: Remove TARGET_SIGSTKSZ

2022-01-06 Thread Philippe Mathieu-Daudé
On 6/1/22 08:47, Song Gao wrote: TARGET_SIGSTKSZ is not used, we should remove it. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- linux-user/alpha/target_signal.h | 1 - linux-user/generic/signal.h | 1 - linux-user/hppa/target_signal.h | 1 - linux-user/mips/target_s

Re: [PATCH 1/1] util: adjust coroutine pool size to virtio block queue

2022-01-06 Thread Philippe Mathieu-Daudé
Cc'ing Stefan / Paolo. On 6/1/22 09:20, Hiroki Narukawa wrote: Coroutine pool size was 64 from long ago, and the basis was organized in the commit message in c740ad92. At that time, virtio-blk queue-size and num-queue were not configuable, and equivalent values were 128 and 1. Coroutine pool

Re: [PATCH] MAINTAINERS: Add entry for QEMU Guest Agent Windows components

2022-01-06 Thread Philippe Mathieu-Daudé
On 5/1/22 10:50, Kostiantyn Kostiuk wrote: Signed-off-by: Kostiantyn Kostiuk --- MAINTAINERS | 8 1 file changed, 8 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 1/2] virtio-gpu: hostmem

2022-01-06 Thread Michael S. Tsirkin
On Wed, Nov 10, 2021 at 05:42:19PM +0100, Antonio Caggiano wrote: > From: Gerd Hoffmann > > Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. > > Signed-off-by: Antonio Caggiano I guess Gerd can apply this as appropriate. Acked-by: Michael S. Tsirkin > --- > hw/display/virtio-gpu-pc

[PATCH v14 00/26] Add LoongArch linux-user emulation support

2022-01-06 Thread Song Gao
Based-on: <20220106074740.1754661-1-gaos...@loongson.cn> 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: * 0018-linux-user-Add-LoongAr

[PATCH v14 03/26] target/loongarch: Add main translation routines

2022-01-06 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 +++

[PATCH v14 12/26] target/loongarch: Add floating point conversion instruction translation

2022-01-06 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 +++ target/loon

[PATCH v14 10/26] target/loongarch: Add floating point arithmetic instruction translation

2022-01-06 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 --

[PATCH v14 09/26] target/loongarch: Add fixed point extra instruction translation

2022-01-06 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.inc

[PATCH v14 21/26] linux-user: Add LoongArch syscall support

2022-01-06 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 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/loongarch64/syscall_nr.h | 313 ++

[PATCH v14 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2022-01-06 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

[PATCH v14 22/26] linux-user: Add LoongArch cpu_loop support

2022-01-06 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- configure | 3 + linux-user/loongarch64/cpu_loop.c | 94 + linux-user/loongarch64/target_cpu.h | 34 +++ 3 files changed, 131 insertions(+) c

[PATCH v14 15/26] target/loongarch: Add branch instruction translation

2022-01-06 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 --- .../loongarch/insn_trans/trans_branch.c.inc | 83 +++ target/loongarch/insns.decode |

[PATCH v14 05/26] target/loongarch: Add fixed point shift instruction translation

2022-01-06 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 | 106 +++

[PATCH v14 01/26] target/loongarch: Add README

2022-01-06 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 | 77 + 2 files changed, 82 insertions(+) create

[PATCH v14 23/26] default-configs: Add loongarch linux-user support

2022-01-06 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

[PATCH v14 16/26] target/loongarch: Add disassembler

2022-01-06 Thread Song Gao
This patch adds support for disassembling via option '-d in_asm'. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- include/disas/dis-asm.h | 2 + meson.build | 1 + target/loongarch/disas.c | 612 +++

[PATCH v14 06/26] target/loongarch: Add fixed point bit instruction translation

2022-01-06 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

[PATCH v14 20/26] linux-user: Add LoongArch elf support

2022-01-06 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/elfload.c| 53 + linux-user/loongarch64/target_elf.h | 12 +++ 2 files changed, 65 insertions(+) create mode 1

[PATCH v14 07/26] target/loongarch: Add fixed point load/store instruction translation

2022-01-06 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

[PATCH v14 02/26] target/loongarch: Add core definition

2022-01-06 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 Reviewed-by: Philippe Mathieu-Daudé --- target/loongarch/cpu-param.h | 18 ++ target/loongarch/cpu.c | 314 ++

[PATCH v14 19/26] linux-user: Add LoongArch signal support

2022-01-06 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/signal.c| 198 + linux-user/loongarch64/target_signal.h | 13 ++ 2 files changed, 211 insertions(+) create mode 100644 linux-user/loongarch64/signal.c create mode 100644 linux-user/

[PATCH v14 17/26] linux-user: Add LoongArch generic header files

2022-01-06 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 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/loongarch64/sockbits.h | 11 +++ linux-user/loongarch64/targe

[PATCH v14 11/26] target/loongarch: Add floating point comparison instruction translation

2022-01-06 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_fcmp.c.inc |

[PATCH v14 08/26] target/loongarch: Add fixed point atomic instruction translation

2022-01-06 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 --- .../loongarch/insn_trans/trans_atomic.c.inc | 114 ++ .../loongarch/insn_trans/t

Re: [PATCH 2/2] virtio: Add shared memory capability

2022-01-06 Thread Michael S. Tsirkin
On Wed, Nov 10, 2021 at 05:42:20PM +0100, Antonio Caggiano wrote: > From: "Dr. David Alan Gilbert" > > Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' > and the data structure 'virtio_pci_shm_cap' to go with it. > They allow defining shared memory regions with sizes and offsets >

Re: How to get started with contribution for GSOC'22

2022-01-06 Thread Alex Bennée
Aakarshit Agarwal writes: > Hello Sir/Ma'am, > > I am Aakarshit Agarwal, final year student pursuing B.Tech in computer > science with a specialization in DevOps from UPES Dehradun. I > love the topic and technologies you used for GSoC'21. I would love to > contribute to your organization for

[PATCH v14 14/26] target/loongarch: Add floating point load/store instruction translation

2022-01-06 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 --- .../loongarch/insn_trans/trans_fmemory.c.inc | 153 ++ target/loongarch/insns.decode

Re: [PATCH 00/10] vhost: stick to -errno error return convention

2022-01-06 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 06:33:44PM +0300, Roman Kagan wrote: > Error propagation between the generic vhost code and the specific backends is > not quite consistent: some places follow "return -1 and set errno" convention, > while others assume "return negated errno". Furthermore, not enough care i

[PATCH v14 18/26] linux-user: Add LoongArch specific structures

2022-01-06 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/target_structs.h | 47 + 1 file changed, 47 insertions(+) create mode 100644 linux-user/loongarch64/target_structs.h diff --git a/linux-user/loongarch64/target_structs.h b/linux-user/loonga

Re: [PATCH 2/2] multifd: cleanup the function multifd_send_thread

2022-01-06 Thread Li Zhang
ping On 12/22/21 12:30 PM, Li Zhang wrote: Cleanup multifd_send_thread Signed-off-by: Li Zhang --- migration/multifd.c | 82 ++--- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 4ec407

[PATCH v14 26/26] scripts: add loongarch64 binfmt config

2022-01-06 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 7de996d536..da6a937be8 100755 --- a/script

[PATCH v14 24/26] target/loongarch: Add target build suport

2022-01-06 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 Reviewed-by: Philippe Mathieu-Daudé --- target/loongarch/meson.build | 19 +++ target/meson.build | 1 + 2 files changed, 2

Re: [PATCH v2 1/1] multifd: Remove some redundant code

2022-01-06 Thread Li Zhang
ping Any comments? Thanks Li On 12/17/21 11:12 AM, Li Zhang wrote: Clean up some unnecessary code Signed-off-by: Li Zhang --- migration/multifd.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 3242f688e5..

Re: [PATCH v3 01/15] pcie: Add support for Single Root I/O Virtualization (SR/IOV)

2022-01-06 Thread Michael S. Tsirkin
On Tue, Dec 21, 2021 at 03:32:32PM +0100, Lukasz Maniak wrote: > From: Knut Omang > > This patch provides the building blocks for creating an SR/IOV > PCIe Extended Capability header and register/unregister > SR/IOV Virtual Functions. > > Signed-off-by: Knut Omang > --- > hw/pci/meson.build

[PATCH v14 13/26] target/loongarch: Add floating point move instruction translation

2022-01-06 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

Re: [PATCH 01/15] audio: replace open-coded buffer arithmetic

2022-01-06 Thread Thomas Huth
Am Thu, 6 Jan 2022 10:23:18 +0100 schrieb Volker Rümelin : > From: Volker Rümelin > > Replace open-coded buffer arithmetic with the available function > audio_ring_dist(). Because the name audio_ring_dist implies it > calculates the distance between two points, define the alias > function name

[PATCH v14 25/26] target/loongarch: 'make check-tcg' support

2022-01-06 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Acked-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/tcg/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 8eb4287c84..c3d7e4

Re: [PATCH 00/15] reduce audio playback latency

2022-01-06 Thread Volker Rümelin
This patch series reduces the playback latency for audio backends, in some cases significantly. For PulseAudio, the audio buffer is also moved from the QEMU side to the PulseAudio server side. This improves the drop-out safety for PulseAudio. Volker Rümelin (15):   audio: replace open-coded b

Re: QOM

2022-01-06 Thread Peter Maydell
On Tue, 21 Dec 2021 at 16:23, abhijeet inamdar wrote: > How did we decide the NUM_IRQ_LINES 64 for stellaris? Either: (a) we looked at the documentation for the hardware, which told us that this SoC is built with its Cortex-M core configured with that many interrupt lines Or: (b) this is for leg

Re: [PATCH 1/2] multifd: cleanup the function multifd_channel_connect

2022-01-06 Thread Li Zhang
ping On 12/22/21 12:30 PM, Li Zhang wrote: Cleanup multifd_channel_connect Signed-off-by: Li Zhang --- migration/multifd.c | 49 ++--- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 21

[PATCH] i386/tcg: generate an illegal op when translating AVX instructions

2022-01-06 Thread Stevie Lavern
The AVX instruction set is not supported by Qemu. However, some AVX instructions are properly decoded and emulated as their legacy SSE version. This patch prevent this by generating an illegal_op instead of a bogus SSE instruction. Signed-off-by: Stevie Lavern --- target/i386/tcg/translate.c | 5

Re: [PATCH v2 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-01-06 Thread Michael S. Tsirkin
On Thu, Dec 09, 2021 at 10:08:37PM +, David Woodhouse wrote: > The check on x86ms->apic_id_limit in pc_machine_done() had two problems. > > Firstly, we need KVM to support the X2APIC API in order to allow IRQ > delivery to APICs >= 255. So we need to call/check kvm_enable_x2apic(), > which was

Re: Building QEMU as a shared library

2022-01-06 Thread Peter Maydell
On Thu, 23 Dec 2021 at 09:49, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 12/15/21 11:10, Peter Maydell wrote: > > On Wed, 15 Dec 2021 at 08:18, Amir Gonnen wrote: > >> My goal is to simulate a mixed architecture system. > >> > >> Today QEMU strongly assumes that the simulated system is a

[PULL 03/27] linux-user: Mark cpu_loop() with noreturn attribute

2022-01-06 Thread Laurent Vivier
From: Philippe Mathieu-Daudé cpu_loop() never exits, so mark it with QEMU_NORETURN. Reviewed-by: Richard Henderson Reviewed-By: Warner Losh Reviewed-by: Bin Meng Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Warner Losh Message-Id: <20211106113916.544587-1-f4...@amsat.org> Signed-off-b

[PULL 06/27] linux-user: Remove TARGET_SIGSTKSZ

2022-01-06 Thread Laurent Vivier
From: Song Gao TARGET_SIGSTKSZ is not used, we should remove it. Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-Id: <1637893388-10282-4-git-send-email-gaos...@loongson.cn> Signed-off-by: Laurent Vivier --- linux-user/alpha/target_signal.h | 1 - linux-user/generic/signal.h

[PULL 13/27] linux-user/signal: Map exit signals in SIGCHLD siginfo_t

2022-01-06 Thread Laurent Vivier
From: Matthias Schiffer When converting a siginfo_t from waitid(), the interpretation of si_status depends on the value of si_code: For CLD_EXITED, it is an exit code and should be copied verbatim. For other codes, it is a signal number (possibly with additional high bits from ptrace) that should

[PULL 01/27] qemu-binfmt-conf.sh: fix -F option

2022-01-06 Thread Laurent Vivier
From: Martin Wilck qemu-binfmt-conf.sh should use "-F" as short option for "--qemu-suffix". Fix the getopt call to make this work. Fixes: 7155be7cda5c ("qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name") Signed-off-by: Martin Wilck Reviewed-by: Laurent Vivier Message-Id:

[PULL 04/27] linux-user: Move target_signal.h generic definitions to generic/signal.h

2022-01-06 Thread Laurent Vivier
From: Song Gao No code change Suggested-by: Richard Henderson Signed-off-by: Song Gao Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <1637893388-10282-2-git-send-email-gaos...@loongson.cn> Signed-off-by: Laurent Vivier --- linux-user/aarch64/target_signal.h| 18

[PULL 12/27] target/sh4: Implement prctl_unalign_sigbus

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Leave TARGET_ALIGNED_ONLY set, but use the new CPUState flag to set MO_UNALN for the instructions that the kernel handles in the unaligned trap. The Linux kernel does not handle all memory operations: no floating-point and no MAC. Signed-off-by: Richard Henderson Review

[PULL 14/27] linux-user: add sched_getattr support

2022-01-06 Thread Laurent Vivier
From: Tonis Tiigi These syscalls are not exposed by glibc. The struct type need to be redefined as it can't be included directly before https://lkml.org/lkml/2020/5/28/810 . sched_attr type can grow in future kernel versions. When client sends values that QEMU does not understand it will return

[PULL 09/27] linux-user: Add code for PR_GET/SET_UNALIGN

2022-01-06 Thread Laurent Vivier
From: Richard Henderson This requires extra work for each target, but adds the common syscall code, and the necessary flag in CPUState. Reviewed-by: Warner Losh Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id: <20211227150127.265929

[PULL 17/27] linux-user/nios2: Properly emulate EXCP_TRAP

2022-01-06 Thread Laurent Vivier
From: Richard Henderson The real kernel has to load the instruction and extract the imm5 field; for qemu, modify the translator to do this. The use of R_AT for this in cpu_loop was a bug. Handle the other trap numbers as per the kernel's trap_table. Reviewed-by: Alex Bennée Signed-off-by: Ric

[PULL 08/27] linux-user: Disable more prctl subcodes

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Create a list of subcodes that we want to pass on, a list of subcodes that should not be passed on because they would affect the running qemu itself, and a list that probably could be implemented but require extra work. Do not pass on unknown subcodes. Reviewed-by: Lauren

[PULL 10/27] target/alpha: Implement prctl_unalign_sigbus

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Leave TARGET_ALIGNED_ONLY set, but use the new CPUState flag to set MO_UNALN for the instructions that the kernel handles in the unaligned trap. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20211227150127.2659293-5-richard.hender...@linaro.o

[PULL 15/27] linux-user: call set/getscheduler set/getparam directly

2022-01-06 Thread Laurent Vivier
From: Tonis Tiigi There seems to be difference in syscall and libc definition of these methods and therefore musl does not implement them (1e21e78bf7). Call syscall directly to ensure the behavior of the libc of user application, not the libc that was used to build QEMU. Signed-off-by: Tonis Tii

[PULL 11/27] target/hppa: Implement prctl_unalign_sigbus

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Leave TARGET_ALIGNED_ONLY set, but use the new CPUState flag to set MO_UNALN for the instructions that the kernel handles in the unaligned trap. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20211227150127.2659293-6-richard.hender...@linaro.o

[PULL 02/27] linux-user/hexagon: Use generic target_stat64 structure

2022-01-06 Thread Laurent Vivier
From: Philippe Mathieu-Daudé Linux Hexagon port doesn't define a specific 'struct stat' but uses the generic one (see Linux commit 6103ec56c65c [*] "asm-generic: add generic ABI headers" which predates the introduction of the Hexagon port). Remove the target specific target_stat (which in fact i

[PULL 23/27] linux-user/nios2: Use set_sigmask in do_rt_sigreturn

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Using do_sigprocmask directly was incorrect, as it will leave the signal blocked by the outer layers of linux-user. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20211221025012.1057923-8-richard.hender...@linaro.org> Signed-off-by: Laurent Vi

[PULL 00/27] Linux user for 7.0 patches

2022-01-06 Thread Laurent Vivier
-request for you to fetch changes up to f0effdbc2a5b43422bc4c9c22641ef9dafa0c7ae: linux-user: netlink: update IFLA_BRPORT entries (2022-01-06 11:40:53 +0100) linux-user pull request 20220106 update netlink entries nios2 fixes /proc/self

[PULL 16/27] linux-user/syscall.c: fix missed flag for shared memory in open_self_maps

2022-01-06 Thread Laurent Vivier
From: Andrey Kazmin The possible variants for region type in /proc/self/maps are either private "p" or shared "s". In the current implementation, we mark shared regions as "-". It could break memory mapping parsers such as included into ASan/HWASan sanitizers. Fixes: 01ef6b9e4e4e ("linux-user: f

[PULL 25/27] linux-user: netlink: update IFLA entries

2022-01-06 Thread Laurent Vivier
Add IFLA_PHYS_PORT_ID, IFLA_PARENT_DEV_NAME, IFLA_PARENT_DEV_BUS_NAME # QEMU_LOG=unimp ip a Unknown host QEMU_IFLA type: 56 Unknown host QEMU_IFLA type: 57 Unknown host QEMU_IFLA type: 34 Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20211219154514.2165728-1-

[PULL 22/27] linux-user/nios2: Fix sigmask in setup_rt_frame

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Do not cast the signal mask elements; trust __put_user. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20211221025012.1057923-7-richard.hender...@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/nios2/signal.c | 3 +-- 1 file changed

[PULL 05/27] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ

2022-01-06 Thread Laurent Vivier
From: Song Gao TARGET_MINSIGSTKSZ has been defined in generic/signal.h or target_signal.h, We don't need to define it again. Signed-off-by: Song Gao Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <1637893388-10282-3-git-send-email-g

[PULL 18/27] linux-user/nios2: Fixes for signal frame setup

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Do not confuse host and guest addresses. Lock and unlock the target_rt_sigframe structure in setup_rt_sigframe. Since rt_setup_ucontext always returns 0, drop the return value entirely. This eliminates the only write to the err variable in setup_rt_sigframe. Always cop

[PULL 27/27] linux-user: netlink: update IFLA_BRPORT entries

2022-01-06 Thread Laurent Vivier
add IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT and IFLA_BRPORT_MCAST_EHT_HOSTS_CNT # QEMU_LOG=unimp ip a Unknown QEMU_IFLA_BRPORT type 37 Unknown QEMU_IFLA_BRPORT type 38 Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20211219154514.2165728-3-laur...@vivier.eu> Signed-of

Re: [PATCH] linux-user: Remove the deprecated ppc64abi32 target

2022-01-06 Thread Laurent Vivier
Le 20/12/2021 à 17:01, Laurent Vivier a écrit : Le 15/12/2021 à 09:49, Thomas Huth a écrit : It's likely broken, and nobody cared for picking it up again during the deprecation phase, so let's remove this now. Since this is the last entry in deprecated_targets_list, remove the related code in t

[PULL 24/27] linux-user/syscall.c: malloc to g_try_malloc

2022-01-06 Thread Laurent Vivier
From: Ahmed Abouzied Use g_try_malloc instead of malloc to alocate the target ifconfig. Also replace the corresponding free with g_free. Signed-off-by: Ahmed Abouzied Message-Id: <20220104143841.25116-1-em...@aabouzied.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 4 ++-- 1 fi

[PULL 20/27] linux-user/nios2: Map a real kuser page

2022-01-06 Thread Laurent Vivier
From: Richard Henderson The first word of page1 is data, so the whole thing can't be implemented with emulation of addresses. Use init_guest_commpage for the allocation. Hijack trap number 16 to implement cmpxchg. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20211

[PULL 21/27] linux-user/nios2: Fix EA vs PC confusion

2022-01-06 Thread Laurent Vivier
From: Richard Henderson The real kernel will talk about the user PC as EA, because that's where the hardware will have copied it, and where it expects to put it to then use ERET. But qemu does not emulate all of the exception stuff while emulating user-only. Manipulate PC directly. This fixes s

[PULL 19/27] linux-user/elfload: Rename ARM_COMMPAGE to HI_COMMPAGE

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Arm will no longer be the only target requiring a commpage, but it will continue to be the only target placing the page at the high end of the address space. Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson Message-Id: <20211221025012.1057923-4-richard.hende

[PULL 26/27] linux-user: netlink: Add IFLA_VFINFO_LIST

2022-01-06 Thread Laurent Vivier
# QEMU_LOG=unimp ip a Unknown host QEMU_IFLA type: 22 Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20211219154514.2165728-2-laur...@vivier.eu> Signed-off-by: Laurent Vivier --- linux-user/fd-trans.c | 174 ++ 1 file changed

Re: [PATCH v11 06/10] ACPI ERST: build the ACPI ERST table

2022-01-06 Thread Michael S. Tsirkin
On Wed, Dec 15, 2021 at 10:38:11AM -0500, Eric DeVolder wrote: > This builds the ACPI ERST table to inform OSPM how to communicate > with the acpi-erst device. > > Signed-off-by: Eric DeVolder > --- > hw/acpi/erst.c | 188 > + > 1 file cha

[PULL 07/27] linux-user: Split out do_prctl and subroutines

2022-01-06 Thread Laurent Vivier
From: Richard Henderson Since the prctl constants are supposed to be generic, supply any that are not provided by the host. Split out subroutines for PR_GET_FP_MODE, PR_SET_FP_MODE, PR_GET_VL, PR_SET_VL, PR_RESET_KEYS, PR_SET_TAGGED_ADDR_CTRL, PR_GET_TAGGED_ADDR_CTRL. Return EINVAL for guests t

Re: [PATCH 0/6] linux-user: prctl improvements

2022-01-06 Thread Laurent Vivier
Le 20/12/2021 à 22:41, Richard Henderson a écrit : This is split out from a larger patch set for unaligned accesses. The changes in target/ have no effect without the changes in tcg/, but this allows the syscall to be handled separately. r~ Hi Richard, while I was testing the series for the

Re: [RFC v2 1/2] hw/pci-host/gpex: Allow to generate preserve boot config DSM #5

2022-01-06 Thread Eric Auger
Hi CHenxiangn On 12/29/21 8:13 AM, chenxiang (M) via wrote: > Hi Eric, > > > 在 2021/10/5 16:53, Eric Auger 写道: >> Add a 'preserve_config' field in struct GPEXConfig and >> if set generate the DSM #5 for preserving PCI boot configurations. >> The DSM presence is needed to expose RMRs. >> >> At the

Re: [PATCH v2 0/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-06 Thread Michael S. Tsirkin
On Tue, Jan 04, 2022 at 09:54:22AM +0100, Philippe Mathieu-Daudé wrote: > Since v1: > - Addressed David review comment (stick to dma_addr_t type) > - Addressed Peter review comment (incorrect doc string) PCI things: Reviewed-by: Michael S. Tsirkin who's merging all this? Yourself? > Hi, > >

Re: Trying to understand QOM object creation and property linking

2022-01-06 Thread Peter Maydell
On Wed, 5 Jan 2022 at 21:05, Alex Bennée wrote: > Can't be added as a subregion to the container... > > qemu-system-arm: ../../softmmu/memory.c:2538: > memory_region_add_subregion_common: Assertion `!subregion->container' failed. This assert means you tried to add the same MemoryRegion as a su

Re: [RFC v2 1/2] hw/pci-host/gpex: Allow to generate preserve boot config DSM #5

2022-01-06 Thread chenxiang (M)
在 2022/1/6 19:00, Eric Auger 写道: Hi CHenxiangn On 12/29/21 8:13 AM, chenxiang (M) via wrote: Hi Eric, 在 2021/10/5 16:53, Eric Auger 写道: Add a 'preserve_config' field in struct GPEXConfig and if set generate the DSM #5 for preserving PCI boot configurations. The DSM presence is needed to e

"Startup" meeting (was Re: Meeting today?)

2022-01-06 Thread Mark Burton
Can we confirm the 11th for this meeting? Cheers Mark. > On 4 Jan 2022, at 10:29, Edgar E. Iglesias wrote: > > > > On Tue, Dec 14, 2021 at 3:49 PM Markus Armbruster > wrote: > Daniel P. Berrangé mailto:berra...@redhat.com>> writes: > > > On Tue, Dec 14, 2021 at 12

Re: "Startup" meeting (was Re: Meeting today?)

2022-01-06 Thread Daniel P . Berrangé
No one objected, so I think we can go for the 11th. On Thu, Jan 06, 2022 at 12:21:56PM +0100, Mark Burton wrote: > Can we confirm the 11th for this meeting? > > Cheers > Mark. > > > > On 4 Jan 2022, at 10:29, Edgar E. Iglesias wrote: > > > > > > > > On Tue, Dec 14, 2021 at 3:49 PM Markus Ar

Re: [RFC 03/10] vdpa: add the infrastructure of vdpa-dev

2022-01-06 Thread Stefan Hajnoczi
On Thu, Jan 06, 2022 at 01:22:19AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > > -Original Message- > > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > Sent: Wednesday, January 5, 2022 5:49 PM > > To: Longpeng (Mike, Cloud Infrastructure Service

[RFC PATCH] target/ppc: Remove xscmpnedp instruction

2022-01-06 Thread Víctor Colombo
xscmpnedp was added in ISA v3.0 but removed in v3.0B. This patch removes this instruction as it was not in the final version of v3.0. RFC to know if you think this is the correct approach. Signed-off-by: Víctor Colombo --- target/ppc/fpu_helper.c | 1 - target/ppc/helper.h

Re: [RFC 05/10] vdpa-dev: implement the realize interface

2022-01-06 Thread Stefan Hajnoczi
On Thu, Jan 06, 2022 at 03:02:37AM +, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > > -Original Message- > > From: Stefan Hajnoczi [mailto:stefa...@redhat.com] > > Sent: Wednesday, January 5, 2022 6:18 PM > > To: Longpeng (Mike, Cloud Infrastructure Service

Re: [PATCH v5 2/3] acpi: tpm: Add missing device identification objects

2022-01-06 Thread Michael S. Tsirkin
On Thu, Jan 06, 2022 at 09:36:36AM +0100, Igor Mammedov wrote: > On Tue, 4 Jan 2022 12:58:05 -0500 > Stefan Berger wrote: > > > Add missing TPM device identification objects _STR and _UID. They will > > appear as files 'description' and 'uid' under Linux sysfs. > > > > Following inspection of s

  1   2   3   4   >