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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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/lo

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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/loo

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:42, Song Gao wrote: 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 7de996

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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 chan

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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 +++

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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 fil

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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 conf

Re: [RFC PATCH v4 11/30] target/loongarch: Add LoongArch interrupt and exception handle

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:14, Xiaojuan Yang wrote: 1.This patch Add loongarch interrupt and exception handle. 2.Rename the user excp to the exccode from the csr defintions. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- linux-user/loongarch64/cpu_loop.c | 8 +- target/loongarch/c

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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/s

Re: [RFC PATCH v4 01/30] target/loongarch: Update README

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: Mainly introduce how to run the softmmu This sentence serves little purpose and is broken English, so it is better removed. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/README | 25 + 1 file changed,

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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/lo

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: This patch adds build loongarch-linux-user target support. Chinglish... You may just say "target: Add the loongarch target_arch" and remove this sentence. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Phil

Re: [RFC PATCH v4 12/30] target/loongarch: Add timer related instructions support.

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:14, Xiaojuan Yang wrote: This includes: -RDTIME{L/H}.W -RDTIME.D Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/helper.h | 1 + target/loongarch/insn_trans/trans_extra.c.inc | 32 +++ target/loongarch/op_helper.c

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

2022-01-09 Thread WANG Xuerui
On 1/6/22 17:41, Song Gao wrote: 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/con

Re: [RFC PATCH v4 10/30] target/loongarch: Add other core instructions support

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: This includes: -CACOP -LDDIR -LDPTE -ERTN -DBCL -IDLE Okay, now I got that the word "core" actually meant "privileged"... so please adjust all occurrences of that word. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.h

Re: [RFC PATCH v4 02/30] target/loongarch: Add CSR registers definition

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: 1.Define All the CSR registers and its field. 2.Set some default csr values. Unnecessary explanation; the code addition itself should be obvious enough as to its intention. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu-cs

Re: [RFC PATCH v4 06/30] target/loongarch: Add MMU support for LoongArch CPU.

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: This patch introduces basic TLB interfaces. Same comment regarding commit messages adding little information. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu-param.h | 2 +- target/loongarch/cpu.c| 32 ta

Re: [RFC PATCH v4 07/30] target/loongarch: Add LoongArch CSR instruction

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: This includes: - CSRRD - CSRWR - CSRXCHG Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.h | 88 + target/loongarch/csr_helper.c| 112 + target/loongarch/d

Re: [RFC PATCH v4 04/30] target/loongarch: Implement qmp_query_cpu_definitions()

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: This patch introduce qmp_query_cpu_definitions interface. "implments"; however the whole sentence becomes nearly identical to the title, so it's better to remove this sentence after all. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by

Re: [RFC PATCH v4 05/30] target/loongarch: Add constant timer support

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/constant_timer.c | 63 +++ target/loongarch/cpu.c| 9 + target/loongarch/cpu.h| 10 + target/loongarch/meson.build

Re: [RFC PATCH v4 13/30] target/loongarch: Add gdb support.

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:14, Xiaojuan Yang wrote: Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- configs/targets/loongarch64-softmmu.mak | 1 + gdb-xml/loongarch-base64.xml| 43 +++ gdb-xml/loongarch-fpu64.xml | 57 +++ target/loongarch/cpu.c

Re: [RFC PATCH v4 09/30] target/loongarch: Add TLB instruction support

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: This includes: - TLBSRCH - TLBRD - TLBWR - TLBFILL - TLBCLR - TLBFLUSH - INVTLB Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 17 + target/loongarch/helper.h| 12 + target/

Re: [RFC PATCH v4 03/30] target/loongarch: Add basic vmstate description of CPU.

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: This patch introduce vmstate_loongarch_cpu Again, pointless commit message. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu.c | 3 ++ target/loongarch/internals.h | 4 ++ target/loon

Re: [RFC PATCH v4 00/30] Add LoongArch softmmu support.

2022-01-09 Thread WANG Xuerui
Hi Xiaojuan, I've just finished reviewing the first part (target modifications) as I'm not familiar with QEMU device emulation. You may have to revise the target part carefully, and re-organize at the series level to accelerate upstreaming though, as Richard pointed out in the other patch seri

Re: [RFC PATCH v4 08/30] target/loongarch: Add LoongArch IOCSR instruction

2022-01-09 Thread WANG Xuerui
On 1/8/22 17:13, Xiaojuan Yang wrote: This includes: - IOCSR{RD/WR}.{B/H/W/D} Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.c | 8 ++ target/loongarch/cpu.h | 4 + target/loongarch/disas.c |

[PULL 0/4] M68k for 7.0 patches

2022-01-09 Thread Laurent Vivier
ll-request for you to fetch changes up to 31144eb6393b66b06a13e8a6ad0e730f9e82d4c6: target/m68k: don't word align SP in stack frame if M68K_FEATURE_UNALIGNED_DATA feature enabled (2022-01-09 12:05:02 +0100) M68k pull reques

[PULL 3/4] macfb: fix VRAM dirty memory region logging

2022-01-09 Thread Laurent Vivier
From: Mark Cave-Ayland The macfb VRAM memory region was configured with coalescing rather than dirty memory logging enabled, causing some areas of the screen not to redraw after a full screen update. Signed-off-by: Mark Cave-Ayland Fixes: 8ac919a065 ("hw/m68k: add Nubus macfb video card") Revie

[PULL 1/4] hw: m68k: Add virt compat machine type for 7.0

2022-01-09 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Message-Id: <20211218114340.1856757-1-laur...@vivier.eu> --- hw/m68k/virt.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index 0efa4a45c7f4..78e926a55

[PULL 4/4] target/m68k: don't word align SP in stack frame if M68K_FEATURE_UNALIGNED_DATA feature enabled

2022-01-09 Thread Laurent Vivier
From: Mark Cave-Ayland Commit a9431a03f7 ("target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature") added a new feature for processors from the 68020 onwards which do not require data accesses to be word aligned. Unfortunately the original commit missed an additional case whereby the SP is still w

[PULL 2/4] q800: fix segfault with invalid MacROM

2022-01-09 Thread Laurent Vivier
"qemu-system-m68k -M q800 -bios /dev/null" crashes with a segfault in q800_init(). This happens because the code doesn't check that rom_ptr() returned a non-NULL pointer . To avoid NULL pointer, don't allow 0 sized file and use bios_size with rom_ptr(). Resolves: https://gitlab.com/qemu-project/q

Re: [PULL v2 00/55] virtio,pci,pc: features,fixes,cleanups

2022-01-09 Thread David Hildenbrand
On 08.01.22 01:34, Michael S. Tsirkin wrote: > On Fri, Jan 07, 2022 at 11:38:21AM -0800, Richard Henderson wrote: >> On 1/7/22 3:03 AM, Michael S. Tsirkin wrote: >>> Changes from v1: >>> - mingw build fixes >>> - added TPM patches which got acks meanwhile >>> >>> Big changes that were tagged origin

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Cédric Le Goater
Hello Cindy, On 1/8/22 02:04, Michael S. Tsirkin wrote: From: Cindy Lu Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will inject a msix interrupt to guest Signed-off-by: Cindy Lu Messag

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

2022-01-09 Thread Christian Schoenebeck
On Donnerstag, 6. Januar 2022 10:21:47 CET Volker Rümelin wrote: > 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

[PATCH 0/2] GitHub workflow fixes

2022-01-09 Thread Josh Soref
The current workflow fails to provide a comment explaining why it has closed a PR. This is not friendly. Also, while it's perfectly reasonable to close PRs to the qemu organization, it's a bit much to close them in forks. These patches address both of these issues. Josh Soref (2): Fix lockdown

[PATCH 1/2] Fix lockdown comment argument

2022-01-09 Thread Josh Soref
Signed-off-by: Josh Soref --- .github/workflows/lockdown.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lockdown.yml b/.github/workflows/lockdown.yml index ad8b8f7..37c6065 100644 --- a/.github/workflows/lockdown.yml +++ b/.github/workflows/lockdown.yml

[PATCH 2/2] Limit lockdown to qemu

2022-01-09 Thread Josh Soref
Signed-off-by: Josh Soref --- .github/workflows/lockdown.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lockdown.yml b/.github/workflows/lockdown.yml index 37c6065..b924b25 100644 --- a/.github/workflows/lockdown.yml +++ b/.github/workflows/lockdown.yml @@ -12,6 +12,7 @

Re: [PATCH 2/2] Limit lockdown to qemu

2022-01-09 Thread Philippe Mathieu-Daudé
On 1/9/22 07:17, Josh Soref wrote: > Signed-off-by: Josh Soref > --- > .github/workflows/lockdown.yml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.github/workflows/lockdown.yml b/.github/workflows/lockdown.yml > index 37c6065..b924b25 100644 > --- a/.github/workflows/lockdown.yml >

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Michael S. Tsirkin
On Sun, Jan 09, 2022 at 02:33:43PM +0100, Cédric Le Goater wrote: > Hello Cindy, > > On 1/8/22 02:04, Michael S. Tsirkin wrote: > > From: Cindy Lu > > > > Add support for configure interrupt, The process is used kvm_irqfd_assign > > to set the gsi to kernel. When the configure notifier was signa

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Michael S. Tsirkin
On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: > Hi, > > > From: Cindy Lu > > > > Add support for configure interrupt, The process is used kvm_irqfd_assign > > to set the gsi to kernel. When the configure notifier was signal by > > host, qemu will inject a msix interrupt to gues

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

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

[PATCH 01/30] bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user

2022-01-09 Thread Warner Losh
Move the EXCP_ATOMIC case to match linux-user/arm/cpu_loop.c:cpu_loop ordering. Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index c675419c30

[PATCH 02/30] bsd-user/signal.c: implement force_sig_fault

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

[PATCH 03/30] bsd-user/signal.c: Implement cpu_loop_exit_sigsegv

2022-01-09 Thread Warner Losh
First attempt at implementing cpu_loop_exit_sigsegv, mostly copied from linux-user version of this function. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[PATCH 06/30] bsd-user/arm/target_arch_cpu.h: Correct code pointer

2022-01-09 Thread Warner Losh
The code has moved in FreeBSD since the emulator was started, update the comment to reflect that change. Remove now-redundant comment saying the same thing (but incorrectly). Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 04/30] bsd-user/signal.c: implement cpu_loop_exit_sigbus

2022-01-09 Thread Warner Losh
First attempt at implementing cpu_loop_exit_sigbus, mostly copied from linux-user version of this function. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bsd-

[PATCH 07/30] bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF

2022-01-09 Thread Warner Losh
Use force_sig_fault to implement unknown opcode. This just uninlines that function, so simplify things by using it. Fold in EXCP_NOCP and EXCP_INVSTATE, as is done in linux-user. Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 18 ++ 1 file changed, 6 insertions(+

[PATCH 05/30] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together

2022-01-09 Thread Warner Losh
Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in linux-user. The prior adjustment of register 15 isn't needed, so remove that. Remove a redunant comment (that code in FreeBSD never handled break points). Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 23 +++

[PATCH 09/30] bsd-user/signal.c: implement abstract target / host signal translation

2022-01-09 Thread Warner Losh
Implement host_to_target_signal and target_to_host_signal. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 2 ++ bsd-user/signal.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 1

[PATCH 12/30] bsd-user/host/i386/host-signal.h: Implement host_signal_*

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

[PATCH 08/30] bsd-user/arm/target_arch_cpu.h: Implement data faults

2022-01-09 Thread Warner Losh
Update for the richer set of data faults that are now possible. Copied largely from linux-user/arm/cpu_loop.c Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 44 ++ 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/bsd-user/arm/target

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

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

[PATCH 29/30] bsd-user/signal.c: implement do_sigaction

2022-01-09 Thread Warner Losh
Implement the meat of the sigaction(2) system call with do_sigaction and helper routiner block_signals (which is also used to implemement signal masking so it's global). Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 21 + bsd

[PATCH 17/30] bsd-user/signal.c: Implement rewind_if_in_safe_syscall

2022-01-09 Thread Warner Losh
Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 2 ++ bsd-user/signal.c | 12 2 files changed, 14 insertions(+) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 0e0b8db708b..e5e97632c82 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -454,4 +

[PATCH 11/30] bsd-user/host/arm/host-signal.h: Implement host_signal_*

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

[PATCH 14/30] bsd-user: Add host signals to the build

2022-01-09 Thread Warner Losh
Start to add the host signal functionality to the build. Signed-off-by: Warner Losh --- bsd-user/meson.build | 1 + bsd-user/signal.c| 1 + meson.build | 1 + 3 files changed, 3 insertions(+) diff --git a/bsd-user/meson.build b/bsd-user/meson.build index 9fcb80c3fa8..a768e65d35e 10

[PATCH 24/30] bsd-user/signal.c: setup_frame

2022-01-09 Thread Warner Losh
setup_frame sets up a signalled stack frame. Associated routines to extract the pointer to the stack frame and to support alternate stacks. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 166 --

[PATCH 15/30] bsd-user: Add trace events for bsd-usr

2022-01-09 Thread Warner Losh
Add the bsd-user specific events and infrastructure. Only include the linux-user trace events for linux-user, not bsd-user. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 1 + bsd-user/trace-events | 11 +++ bsd-user/trace.h

[PATCH 13/30] bsd-user/host/x86_64/host-signal.h: Implement host_signal_*

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

[PATCH 18/30] bsd-user/signal.c: Implement host_signal_handler

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

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

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

[PATCH 21/30] bsd-user/signal.c: force_sig

2022-01-09 Thread Warner Losh
Force delivering a signal and generating a core file. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 1 + bsd-user/signal.c | 59 + bsd-user/syscall_defs.h | 1 + 3 files changed, 61 i

[PATCH 19/30] bsd-user/strace.c: print_taken_signal

2022-01-09 Thread Warner Losh
print_taken_signal() prints signals when we're tracing signals. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 10 + bsd-user/strace.c | 97 +++ 2 files changed, 107 insertions(+) diff --gi

[PATCH 20/30] bsd-user/signal.c: core_dump_signal

2022-01-09 Thread Warner Losh
Returns 1 for signals that cause core files. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal.c | 17 + 1 file changed, 17 insertions(+) diff --git a/bsd-user/signal.c b/bsd-user/signal.c index a6e07277fb2..824535be8b8 100644 -

[PATCH 25/30] bsd-user/signal.c: handle_pending_signal

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

[PATCH 22/30] bsd-user/signal.c: Fill in queue_signal

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

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

2022-01-09 Thread Warner Losh
target_sigemptyset: resets a set to having no bits set qemu_sigorset: computes the or of two sets target_sigaddset: adds a signal to a set target_sigismember: returns true when signal is a member host_to_target_sigset_internal: convert host sigset to target host_to_target_sigset: convert hos

[PATCH 26/30] bsd-user/signal.c: tswap_siginfo

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

[PATCH 27/30] bsd-user/signal.c: process_pending_signals

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

[PATCH 28/30] bsd-user/signal.c: implement do_sigreturn

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

[PATCH 30/30] bsd-user/signal.c: do_sigaltstack

2022-01-09 Thread Warner Losh
Implement the meat of the sigaltstack(2) system call with do_sigaltstack. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 1 + bsd-user/signal.c | 66 +++ 2 files changed, 67 insertions(+) diff

[PATCH v2 6/6] gitlab-ci: Support macOS 12 via cirrus-run

2022-01-09 Thread Philippe Mathieu-Daudé
Add support for macOS 12 build on Cirrus-CI, similarly to commit 0e103a65ba1 ("gitlab: support for ... macOS 11 via cirrus-run"). Disable deprecation warnings on Objective C to avoid: [2789/6622] Compiling Objective-C object libcommon.fa.p/ui_cocoa.m.o ui/cocoa.m:1411:16: error: 'setAllowedFi

[RFC PATCH v2 5/6] hvf: Remove deprecated hv_vcpu_flush() calls

2022-01-09 Thread Philippe Mathieu-Daudé
When building on macOS 12, we get: In file included from ../target/i386/hvf/hvf.c:59: ../target/i386/hvf/vmx.h:174:5: error: 'hv_vcpu_flush' is deprecated: first deprecated in macOS 11.0 - This API has no effect and always returns HV_UNSUPPORTED [-Werror,-Wdeprecated-declarations] hv_v

[PATCH v2 1/6] configure: Allow passing extra Objective C compiler flags

2022-01-09 Thread Philippe Mathieu-Daudé
We can pass C/CPP/LD flags via CFLAGS/CXXFLAGS/LDFLAGS environment variables, or via configure --extra-cflags / --extra-cxxflags / --extra-ldflags options. Provide similar behavior for Objective C: use existing flags from $OBJCFLAGS, or passed via --extra-objcflags. Signed-off-by: Philippe Mathieu

[RFC PATCH v2 2/6] audio/coreaudio: Remove a deprecation warning on macOS 12

2022-01-09 Thread Philippe Mathieu-Daudé
When building on macOS 12 we get: audio/coreaudio.c:50:5: error: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Werror,-Wdeprecated-declarations] kAudioObjectPropertyElementMaster ^ kAudioObjectPropertyElemen

[RFC PATCH v2 3/6] block/file-posix: Remove a deprecation warning on macOS 12

2022-01-09 Thread Philippe Mathieu-Daudé
When building on macOS 12 we get: block/file-posix.c:3335:18: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations] kernResult = IOMasterPort( MACH_PORT_NULL, &masterPort ); ^~~~ IOMainPort Use IOMa

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

2022-01-09 Thread Volker Rümelin
On Donnerstag, 6. Januar 2022 10:21:47 CET Volker Rümelin wrote: 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 P

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

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

[RFC PATCH v2 0/6] host: Support macOS 12

2022-01-09 Thread Philippe Mathieu-Daudé
Few patches to be able to build QEMU on macOS 12 (Monterey). This basically consists of adapting deprecated APIs. I am not sure about these APIs, so tagging as RFC. I couldn't succeed to adapt the Cocoa code. CI job added to avoid bitrotting (ignoring the Objective C deprecation warning). Phili

[RFC PATCH v2 4/6] hvf: Make hvf_get_segments() / hvf_put_segments() local

2022-01-09 Thread Philippe Mathieu-Daudé
Both hvf_get_segments/hvf_put_segments() functions are only used within x86hvf.c: do not declare them as public API. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86hvf.h | 2 -- target/i386/hvf/x86hvf.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target

[PATCH] virtio-pci: fix up config interrupt handling

2022-01-09 Thread Michael S. Tsirkin
Fixes a couple of issues with irqfd use by config interrupt: - Rearrange initialization so cleanup happens in the reverse order - Don't use irqfd for config when not in use for data path I am not sure this is a complete fix though: I think we are better off limiting the effect to vdpa devices with

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Volker Rümelin
Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: Hi, From: Cindy Lu Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will in

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

2022-01-09 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: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Michael S. Tsirkin
On Sun, Jan 09, 2022 at 06:52:28PM +0100, Volker Rümelin wrote: > Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: > > On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: > > > Hi, > > > > > > > From: Cindy Lu > > > > > > > > Add support for configure interrupt, The process is used

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

2022-01-09 Thread Richard Henderson
On 1/9/22 1:25 AM, WANG Xuerui wrote: +#define TARGET_PAGE_BITS 14 Aren't we capable of page sizes up to 64KiB? Minimal feasible page size is indeed 16KiB though (due to cache aliasing, although 4KiB pages are supported in hardware, they don't work in practice). You must use the minimal page

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

2022-01-09 Thread Richard Henderson
On 1/9/22 1:25 AM, WANG Xuerui wrote: +static inline int shl_2(DisasContext *ctx, int x) +{ +    return x * 4; Although "<< 2" has the same effect as "* 4" here, isn't "<< 2" better in matching the function name? Yes, good point. r~

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Volker Rümelin
Am 09.01.22 um 19:01 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 06:52:28PM +0100, Volker Rümelin wrote: Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: Hi, From: Cindy Lu Add support for configure interrupt, The proc

Re: [PULL v3 12/55] virtio-pci: add support for configure interrupt

2022-01-09 Thread Volker Rümelin
Am 09.01.22 um 19:54 schrieb Volker Rümelin: Am 09.01.22 um 19:01 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 06:52:28PM +0100, Volker Rümelin wrote: Am 09.01.22 um 17:11 schrieb Michael S. Tsirkin: On Sun, Jan 09, 2022 at 07:17:30AM +0100, Volker Rümelin wrote: Hi, From: Cindy Lu

Re: New arm alignment issue with 6.2.0 - bisected to single revision

2022-01-09 Thread Mark Watson
On Thu, 6 Jan 2022 at 18:09, Peter Maydell wrote: > On Wed, 29 Dec 2021 at 20:15, Mark Watson wrote: > > I'm seeing a repeatable alignment exception running m68k system mode on > armv7l (arm cortex a9) following this commit: > > "fa947a667fceab02f9f85fc99f54aebcc9ae6b51 is the first bad commit >

[PATCH v1 2/2] target/riscv: Add XVentanaCondOps custom extension

2022-01-09 Thread Philipp Tomsich
This adds support for the XVentanaCondOps custom extension (vendor-defined by Ventana Micro Systems), which is documented at https://github.com/ventanamicro/ventana-custom-extensions/releases/download/v1.0.0/ventana-custom-extensions-v1.0.0.pdf Given that the CUSTOM-3 opcode space is shared betwee

[PATCH v1 1/2] decodetree: Add an optional predicate-function for decoding

2022-01-09 Thread Philipp Tomsich
This adds the possibility to specify a predicate-function that is called as part of decoding in multi-patterns; it is intended for use-cases (such as vendor-defined instructions in RISC-V) where the same bitpattern may decode into different functions depending on the overall configuration of the em

[PATCH] net/dump.c: Suppress spurious compiler warning

2022-01-09 Thread Philipp Tomsich
Compiling with gcc version 11.2.0 (Ubuntu 11.2.0-13ubuntu1) results in a (spurious) warning: In function ‘dump_receive_iov’, inlined from ‘filter_dump_receive_iov’ at ../net/dump.c:157:5: ../net/dump.c:89:9: error: ‘writev’ specified size 18446744073709551600 exceeds maximum object size

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

2022-01-09 Thread Alistair Francis
On Fri, Jan 7, 2022 at 7:02 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 for the reviews and advices. > > v8: > - rebase on riscv-to-apply.next > > v7: > - code mo

Re: [PATCH v4 11/11] hw/riscv: virt: Add PMU DT node to the device tree

2022-01-09 Thread Atish Patra
On Fri, Jan 7, 2022 at 6:46 AM Philippe Mathieu-Daudé wrote: > > On 7/1/22 01:48, Atish Patra wrote: > > Qemu virt machine can support few cache events and cycle/instret counters. > > It also supports counter overflow for these events. > > > > Add a DT node so that OpenSBI/Linux kernel is aware of

RE: [PATCH v3 06/12] target/riscv: Support start kernel directly by KVM

2022-01-09 Thread Jiangyifei via
> -Original Message- > From: Anup Patel [mailto:a...@brainfault.org] > Sent: Thursday, December 23, 2021 2:04 PM > To: Jiangyifei > Cc: QEMU Developers ; open list:RISC-V > ; kvm-ri...@lists.infradead.org; KVM General > ; libvir-l...@redhat.com; Anup Patel > ; Palmer Dabbelt ; Alistair >

RE: [PATCH v3 08/12] target/riscv: Handle KVM_EXIT_RISCV_SBI exit

2022-01-09 Thread Jiangyifei via
> -Original Message- > From: Alistair Francis [mailto:alistai...@gmail.com] > Sent: Thursday, January 6, 2022 6:04 AM > To: Jiangyifei > Cc: qemu-devel@nongnu.org Developers ; open > list:RISC-V ; kvm-ri...@lists.infradead.org; open > list:Overall ; libvir-l...@redhat.com; Anup Patel > ;

[PATCH v4 04/12] target/riscv: Implement kvm_arch_get_registers

2022-01-09 Thread Yifei Jiang via
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 112 - 1 file changed, 111 insertions(+), 1 deletion

[PATCH v4 00/12] Add riscv kvm accel support

2022-01-09 Thread Yifei Jiang via
This series adds both riscv32 and riscv64 kvm support, and implements migration based on riscv. Because of RISC-V KVM has been merged into the Linux master, so this series are changed from RFC to patch. Several steps to use this: 1. Build emulation $ ./configure --target-list=riscv64-softmmu $ ma

[PATCH v4 03/12] target/riscv: Implement function kvm_arch_init_vcpu

2022-01-09 Thread Yifei Jiang via
Get isa info from kvm while kvm init. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis Reviewed-by: Anup Patel --- target/riscv/kvm.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/ta

[PATCH v4 01/12] update-linux-headers: Add asm-riscv/kvm.h

2022-01-09 Thread Yifei Jiang via
Add asm-riscv/kvm.h for RISC-V KVM. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Acked-by: Alistair Francis Reviewed-by: Anup Patel --- linux-headers/asm-riscv/kvm.h | 128 ++ 1 file changed, 128 insertions(+) create mode 100644 linux-headers/asm-risc

  1   2   >