Re: [PULL 00/17] Net patches

2023-09-13 Thread Ilya Maximets
On 9/8/23 16:15, Daniel P. Berrangé wrote: > On Fri, Sep 08, 2023 at 04:06:35PM +0200, Ilya Maximets wrote: >> On 9/8/23 14:15, Daniel P. Berrangé wrote: >>> On Fri, Sep 08, 2023 at 02:00:47PM +0200, Ilya Maximets wrote: On 9/8/23 13:49, Daniel P. Berrangé wrote: > On Fri, Sep 08, 2023 at

Re: Assertion `dpy_ui_info_supported(con)' failed

2023-09-13 Thread Stefan Hajnoczi
Oops, I forgot to CC qemu-devel. On Wed, 13 Sept 2023 at 15:06, Stefan Hajnoczi wrote: > > I can't start a qemu.git build with a GTK UI but -display vnc=:0 works: > > $ ./configure --target-list=x86_64-softmmu > $ build/qemu-system-x86_64 > qemu-system-x86_64: ../ui/console.c:818: dpy_get_ui_info

Re: [PATCH 03/11] accel/tcg: Modify tlb_*() to use CPUState

2023-09-13 Thread Anton Johansson via
On 9/12/23 08:34, Anton Johansson wrote: Changes tlb_*() functions to take CPUState instead of CPUArchState, as they don't require the full CPUArchState. This makes it easier to decouple target-(in)dependent code. Signed-off-by: Anton Johansson ---   include/exec/cpu_ldst.h |   8 +-   accel/

Re: [PATCH v3 2/5] softmmu: Support concurrent bounce buffers

2023-09-13 Thread Peter Xu
On Thu, Sep 07, 2023 at 06:04:07AM -0700, Mattias Nissler wrote: > When DMA memory can't be directly accessed, as is the case when > running the device model in a separate process without shareable DMA > file descriptors, bounce buffering is used. > > It is not uncommon for device models to reques

Re: [PULL v3 0/1] Merge tpm 2023/09/12 v3

2023-09-13 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/4] Build fix patches for 2023-09-13

2023-09-13 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/2] hw/nvme: updates

2023-09-13 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-09-13 Thread Alex Williamson
Hi Gerd, Some consultation would be appreciated on this thread to get this patch out of limbo. Is there a better solution that what I've proposed? AFAICT, we don't have position fields to indicate the dmabuf plane is relative to some scanout, so I think it represents the entire display. Thanks,

QEMU migration-test CI intermittent failure

2023-09-13 Thread Stefan Hajnoczi
Hi, The following intermittent failure occurred in the CI and I have filed an Issue for it: https://gitlab.com/qemu-project/qemu/-/issues/1886 Output: >>> QTEST_QEMU_IMG=./qemu-img MALLOC_PERTURB_=116 QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/qemu-storage-daemon G_TEST_DBUS_DAEMON=/bu

Re: [PATCH v1 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-13 Thread Peter Xu
On Thu, Sep 07, 2023 at 10:30:49PM +0300, Daniil Tatianin wrote: > This series fixes an issue where the outcome of the migration qtest > relies on the initial memory contents all being the same across the > first 100MiB of RAM, which is a very fragile invariant. > > We fix this by making sure we z

Re: Assertion `dpy_ui_info_supported(con)' failed

2023-09-13 Thread Michael Tokarev
it fails on a92e7bb4cad57c ui: add precondition for dpy_get_ui_info() when initing gdk display. gtk_display_init => gtk_widget_show => ... => gd_configure => gd_set_ui_size => dpy_get_ui_info. fwiw. /mjt

Re: [PATCH v2 2/4] util/defer-call: move defer_call() to util/

2023-09-13 Thread Stefan Hajnoczi
On Fri, Aug 18, 2023 at 10:31:40AM +0200, Philippe Mathieu-Daudé wrote: > Hi Stefan, > > On 17/8/23 17:58, Stefan Hajnoczi wrote: > > The networking subsystem may wish to use defer_call(), so move the code > > to util/ where it can be reused. > > > > As a reminder of what defer_call() does: > >

Re: QEMU migration-test CI intermittent failure

2023-09-13 Thread Fabiano Rosas
Stefan Hajnoczi writes: > Hi, > The following intermittent failure occurred in the CI and I have filed > an Issue for it: > https://gitlab.com/qemu-project/qemu/-/issues/1886 > > Output: > > >>> QTEST_QEMU_IMG=./qemu-img MALLOC_PERTURB_=116 > QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/q

Re: QEMU migration-test CI intermittent failure

2023-09-13 Thread Stefan Hajnoczi
On Wed, 13 Sept 2023 at 15:44, Fabiano Rosas wrote: > > Stefan Hajnoczi writes: > > > Hi, > > The following intermittent failure occurred in the CI and I have filed > > an Issue for it: > > https://gitlab.com/qemu-project/qemu/-/issues/1886 > > > > Output: > > > > >>> QTEST_QEMU_IMG=./qemu-img

[PATCH v3 2/4] util/defer-call: move defer_call() to util/

2023-09-13 Thread Stefan Hajnoczi
The networking subsystem may wish to use defer_call(), so move the code to util/ where it can be reused. As a reminder of what defer_call() does: This API defers a function call within a defer_call_begin()/defer_call_end() section, allowing multiple calls to batch up. This is a performance optimi

[PATCH v3 4/4] virtio-blk: remove batch notification BH

2023-09-13 Thread Stefan Hajnoczi
There is a batching mechanism for virtio-blk Used Buffer Notifications that is no longer needed because the previous commit added batching to virtio_notify_irqfd(). Note that this mechanism was rarely used in practice because it is only enabled when EVENT_IDX is not negotiated by the driver. Moder

[PATCH v3 0/4] virtio-blk: use blk_io_plug_call() instead of notification BH

2023-09-13 Thread Stefan Hajnoczi
v3: - Add comment pointing to API documentation in .c file [Philippe] - Add virtio_notify_irqfd_deferred_fn trace event [Ilya] - Remove outdated #include [Ilya] v2: - Rename blk_io_plug() to defer_call() and move it to util/ so the net subsystem can use it [Ilya] - Add defer_call_begin()/end() to

[PATCH v3 3/4] virtio: use defer_call() in virtio_irqfd_notify()

2023-09-13 Thread Stefan Hajnoczi
virtio-blk and virtio-scsi invoke virtio_irqfd_notify() to send Used Buffer Notifications from an IOThread. This involves an eventfd write(2) syscall. Calling this repeatedly when completing multiple I/O requests in a row is wasteful. Use the defer_call() API to batch together virtio_irqfd_notify(

[PATCH v3 1/4] block: rename blk_io_plug_call() API to defer_call()

2023-09-13 Thread Stefan Hajnoczi
Prepare to move the blk_io_plug_call() API out of the block layer so that other subsystems call use this deferred call mechanism. Rename it to defer_call() but leave the code in block/plug.c. The next commit will move the code out of the block layer. Suggested-by: Ilya Maximets Reviewed-by: Phil

Re: [PATCH v6 08/10] migration/yank: Use channel features

2023-09-13 Thread Peter Xu
On Mon, Sep 11, 2023 at 02:13:18PM -0300, Fabiano Rosas wrote: > Stop using outside knowledge about the io channels when registering > yank functions. Query for features instead. > > The yank method for all channels used with migration code currently is > to call the qio_channel_shutdown() functio

Re: [PATCH v3 2/4] qcow2: add configurations for zoned format extension

2023-09-13 Thread Stefan Hajnoczi
On Mon, Aug 28, 2023 at 11:09:53PM +0800, Sam Li wrote: > To configure the zoned format feature on the qcow2 driver, it > requires following arguments: the device size, zoned profile, > zone model, zone size, zone capacity, number of conventional > zones, limits on zone resources (max append sector

Re: [PATCH v6 09/10] migration/yank: Keep track of registered yank instances

2023-09-13 Thread Peter Xu
On Mon, Sep 11, 2023 at 02:13:19PM -0300, Fabiano Rosas wrote: > The core yank code is strict about balanced registering and > unregistering of yank functions. > > This creates a difficulty because the migration code registers one > yank function per QIOChannel, but each QIOChannel can be referenc

Re: [PATCH v3 0/4] virtio-blk: use blk_io_plug_call() instead of notification BH

2023-09-13 Thread Michael S. Tsirkin
On Wed, Sep 13, 2023 at 04:00:41PM -0400, Stefan Hajnoczi wrote: > v3: > - Add comment pointing to API documentation in .c file [Philippe] > - Add virtio_notify_irqfd_deferred_fn trace event [Ilya] > - Remove outdated #include [Ilya] > v2: > - Rename blk_io_plug() to defer_call() and move it to uti

Re: [PATCH] target/hppa: Optimize ldcw/ldcd instruction translation

2023-09-13 Thread Richard Henderson
On 9/13/23 10:19, Helge Deller wrote: On 9/13/23 18:55, Richard Henderson wrote: On 9/13/23 07:47, Helge Deller wrote: +    haddr = (uint32_t *)((uintptr_t)vaddr); +    old = *haddr; This is horribly incorrect, both for user-only and system mode. Richard, thank you for the review! B

[PATCH 1/3] esp: use correct type for esp_dma_enable() in sysbus_esp_gpio_demux()

2023-09-13 Thread Mark Cave-Ayland
The call to esp_dma_enable() was being made with the SYSBUS_ESP type instead of the ESP type. This meant that when GPIO 1 was being used to trigger a DMA request from an external DMA controller, the setting of ESPState's dma_enabled field would clobber unknown memory whilst the dma_cb callback poin

[PATCH 0/3] esp/scsi: minor fixes

2023-09-13 Thread Mark Cave-Ayland
Here are a couple of ESP/SCSI fixes related to issue #1810, along with another patch that fixes a problem with the DMA enable signal I discovered whilst testing some future ESP changes. Signed-off-by: Mark Cave-Ayland Mark Cave-Ayland (3): esp: use correct type for esp_dma_enable() in sysbus_

[PATCH 2/3] esp: restrict non-DMA transfer length to that of available data

2023-09-13 Thread Mark Cave-Ayland
In the case where a SCSI layer transfer is incorrectly terminated, it is possible for a TI command to cause a SCSI buffer overflow due to the expected transfer data length being less than the available data in the FIFO. When this occurs the unsigned async_len variable underflows and becomes a large

[PATCH 3/3] scsi-disk: ensure that FORMAT UNIT commands are terminated

2023-09-13 Thread Mark Cave-Ayland
Otherwise when a FORMAT UNIT command is issued, the SCSI layer can become confused because it can find itself in the situation where it thinks there is still data to be transferred which can cause the next emulated SCSI command to fail. Signed-off-by: Mark Cave-Ayland Fixes: 6ab71761 ("scsi-disk:

Re: [PATCH v13 0/9] rutabaga_gfx + gfxstream

2023-09-13 Thread Bernhard Beschow
Am 6. September 2023 06:25:39 UTC schrieb "Marc-André Lureau" : >Hi > >On Wed, Sep 6, 2023 at 5:22 AM Gurchetan Singh > wrote: >> >> >> >> On Wed, Aug 30, 2023 at 7:26 PM Huang Rui wrote: >>> >>> On Tue, Aug 29, 2023 at 08:36:20AM +0800, Gurchetan Singh wrote: >>> > From: Gurchetan Singh >>>

Re: [PATCH v3 3/4] qcow2: add zoned emulation capability

2023-09-13 Thread Stefan Hajnoczi
On Mon, Aug 28, 2023 at 11:09:54PM +0800, Sam Li wrote: > By adding zone operations and zoned metadata, the zoned emulation > capability enables full emulation support of zoned device using > a qcow2 file. The zoned device metadata includes zone type, > zoned device state and write pointer of each

Re: [PATCH v6 09/10] migration/yank: Keep track of registered yank instances

2023-09-13 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Sep 11, 2023 at 02:13:19PM -0300, Fabiano Rosas wrote: >> The core yank code is strict about balanced registering and >> unregistering of yank functions. >> >> This creates a difficulty because the migration code registers one >> yank function per QIOChannel, but each

Re: [PATCH v3 17/23] bsd-user: Implement mincore(2)

2023-09-13 Thread Karim Taha
Richard Henderson wrote: > On 9/9/23 12:36, Karim Taha wrote: >> From: Stacey Son >> >> Signed-off-by: Stacey Son >> Signed-off-by: Karim Taha >> --- >> bsd-user/bsd-mem.h| 22 ++ >> bsd-user/freebsd/os-syscall.c | 4 >> 2 files changed, 26 insertions

Re: [PATCH v3 17/23] bsd-user: Implement mincore(2)

2023-09-13 Thread Richard Henderson
On 9/13/23 15:02, Karim Taha wrote: Richard Henderson wrote: On 9/9/23 12:36, Karim Taha wrote: From: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Karim Taha --- bsd-user/bsd-mem.h| 22 ++ bsd-user/freebsd/os-syscall.c | 4 2 files chang

Re: [RFC PATCH 0/3] target/ppc: Change CR registers from i32 to tl

2023-09-13 Thread Richard Henderson
On 9/12/23 17:58, Nicholas Piggin wrote: This is a bit of churn so I might leave it for later in the cycle (or defer if we get a lot of other changes) since it's a relatively mechanical change. So don't spend time reviewing details, I'm just wondering about concept and general approach. I'm not

[PATCH 0/5] elf2dmp: improve Win2022, Win11 and large dumps

2023-09-13 Thread Viktor Prutyanov
Windows Server 2022 and Windows 11 require more careful kernel PE image search and handling of PDB than previous Windows versions. Also, improve support of large ELF dump files, dumps with unaligned memory ranges and with big number of ranges. Viktor Prutyanov (5): elf2dmp: replace PE export nam

[PATCH 5/5] elf2dmp: rework PDB_STREAM_INDEXES::segments obtaining

2023-09-13 Thread Viktor Prutyanov
PDB for Windows 11 kernel has slightly different structure compared to previous versions. Since elf2dmp don't use the other fields, copy only 'segments' field from PDB_STREAM_INDEXES. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/pdb.c | 10 +++--- 1 file changed, 3 insertions(+), 7 de

[PATCH 1/5] elf2dmp: replace PE export name check with PDB name check

2023-09-13 Thread Viktor Prutyanov
PE export name check introduced in d399d6b179 isn't reliable enough, because a page with the export directory may be not present for some reason. On the other hand, elf2dmp retrieves the PDB name in any case. It can be also used to check that a PE image is the kernel image. So, check PDB name when

[PATCH 4/5] elf2dmp: use Linux mmap with MAP_NORESERVE when possible

2023-09-13 Thread Viktor Prutyanov
Glib's g_mapped_file_new maps file with PROT_READ|PROT_WRITE and MAP_PRIVATE. This leads to premature physical memory allocation of dump file size on Linux hosts and may fail. On Linux, mapping the file with MAP_NORESERVE limits the allocation by available memory. Signed-off-by: Viktor Prutyanov

[PATCH 3/5] elf2dmp: introduce merging of physical memory runs

2023-09-13 Thread Viktor Prutyanov
DMP supports 42 physical memory runs at most. So, merge adjacent physical memory ranges from QEMU ELF when possible to minimize total number of runs. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/main.c | 56 -- 1 file changed, 48 insertions(+), 8 de

[PATCH 2/5] elf2dmp: introduce physical block alignment

2023-09-13 Thread Viktor Prutyanov
Physical memory ranges may not be aligned to page size in QEMU ELF, but DMP can only contain page-aligned runs. So, align them. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/addrspace.c | 31 +-- contrib/elf2dmp/addrspace.h | 1 + contrib/elf2dmp/main.c |

Re: [PATCH v6 09/10] migration/yank: Keep track of registered yank instances

2023-09-13 Thread Peter Xu
On Wed, Sep 13, 2023 at 06:53:20PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Sep 11, 2023 at 02:13:19PM -0300, Fabiano Rosas wrote: > >> The core yank code is strict about balanced registering and > >> unregistering of yank functions. > >> > >> This creates a difficulty becaus

[PATCH v2 qemu 0/3] Allow dump-guest-memory to output standard kdump format

2023-09-13 Thread Stephen Brennan
Hello all, This is the second version of my patch series about the kdump format, you can see the first version here [1]. The current output format for dump-guest-memory's kdump compressed format is actually the "makedumpfile flattened" format. It was done intentionally to allow the flexibility to

[PATCH v2 qemu 3/3] dump: Add qmp argument "reassembled"

2023-09-13 Thread Stephen Brennan
This can be used from QMP command line as "-R" to mirror the corresponding flag for makedumpfile. This enables the kdump_reassembled flag introduced in the previous patch. Signed-off-by: Stephen Brennan --- dump/dump-hmp-cmds.c | 8 +++- dump/dump.c | 12 +++- hmp-commands.

[PATCH v2 qemu 1/3] dump: Pass DumpState to write_ functions

2023-09-13 Thread Stephen Brennan
For the next patch, we need a reference to DumpState when writing data. Signed-off-by: Stephen Brennan --- dump/dump.c | 40 include/sysemu/dump.h | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dump/dump.c b/dump/dump.

[PATCH v2 qemu 2/3] dump: Allow directly outputting reassembled kdumps

2023-09-13 Thread Stephen Brennan
The flattened format (currently output by qemu) is used by makedumpfile only when it is outputting a vmcore to a file which is not seekable. The flattened format functions essentially as a set of instructions of the form "seek to the given offset, then write the given bytes out". The flattened for

Re: qemu-riscv32 usermode still broken?

2023-09-13 Thread Andreas K. Huettel
> > https://lists.gnu.org/archive/html/bug-bash/2023-09/msg00119.html > > ^ Here I'm trying to find out more. > > > > Bash tests apparently indicate that argv[0] is overwritten, and that > > reading through a pipe or from /dev/tty fails or loses data. > > > > Apart from the bash testsuite failing,

[PATCH v6 15/57] target/loongarch: Implement xvreplgr2vr

2023-09-13 Thread Song Gao
This patch includes: - XVREPLGR2VR.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 5 + target/loongarch/disas.c| 10 + target/loongarch/insn_trans/trans_vec.c.inc | 25 +++-- 3

[PATCH v6 03/57] target/loongarch: Use gen_helper_gvec_4_ptr for 4OP + env vector instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 16 +- target/loongarch/vec_helper.c | 12 +++ target/loongarch/insn_trans/trans_vec.c.inc | 35 - 3 files changed, 41 insertions(+), 22 deletion

[PATCH v6 22/57] target/loongarch: Implement xvabsd

2023-09-13 Thread Song Gao
This patch includes: - XVABSD.{B/H/W/D}[U]. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 9 + target/loongarch/disas.c| 9 + target/loongarch/insn_trans/trans_vec.c.inc | 8 3 files changed,

[PATCH v6 36/57] target/loongarch: Implement xvsllwil xvextl

2023-09-13 Thread Song Gao
This patch includes: - XVSLLWIL.{H.B/W.H/D.W}; - XVSLLWIL.{HU.BU/WU.HU/DU.WU}; - XVEXTL.Q.D, VEXTL.QU.DU. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 9 + target/loongarch/disas.c| 9 + target/loongarch/v

[PATCH v6 39/57] target/loongarch: Implement xvsrlrn xvsrarn

2023-09-13 Thread Song Gao
This patch includes: - XVSRLRN.{B.H/H.W/W.D}; - XVSRARN.{B.H/H.W/W.D}; - XVSRLRNI.{B.H/H.W/W.D/D.Q}; - XVSRARNI.{B.H/H.W/W.D/D.Q}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 16 ++ target/loongarch/disas.c| 16 +

[PATCH v6 05/57] target/loongarch: Use gen_helper_gvec_3_ptr for 3OP + env vector instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 48 +++ target/loongarch/vec_helper.c | 50 target/loongarch/insn_trans/trans_vec.c.inc | 66 + 3 files changed, 91 insertions(+

[PATCH v6 28/57] target/loongarch: Implement xvsat

2023-09-13 Thread Song Gao
This patch includes: - XVSAT.{B/H/W/D}[U]. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 9 target/loongarch/disas.c| 9 target/loongarch/vec_helper.c | 48 +++-- target/loon

[PATCH v6 24/57] target/loongarch: Implement xvmax/xvmin

2023-09-13 Thread Song Gao
This patch includes: - XVMAX[I].{B/H/W/D}[U]; - XVMIN[I].{B/H/W/D}[U]. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 36 + target/loongarch/disas.c| 34 +++ target/loongarch/vec_he

[PATCH v6 31/57] target/loongarch: Implement xvsigncov

2023-09-13 Thread Song Gao
This patch includes: - XVSIGNCOV.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 5 + target/loongarch/disas.c| 5 + target/loongarch/insn_trans/trans_vec.c.inc | 4 3 files changed, 14 insertio

[PATCH v6 01/57] target/loongarch: Renamed lsx*.c to vec* .c

2023-09-13 Thread Song Gao
Renamed lsx_helper.c to vec_helper.c and trans_lsx.c.inc to trans_vec.c.inc So LASX can used them. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/translate.c| 2 +- target/loongarch/{lsx_helper.c => vec_helper.c} |

[PATCH v6 20/57] target/loongarch: Implement xvaddw/xvsubw

2023-09-13 Thread Song Gao
This patch includes: - XVADDW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - XVSUBW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - XVADDW{EV/OD}.{H.BU.B/W.HU.H/D.WU.W/Q.DU.D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 45 target/loongarch/disas.c

[PATCH v6 50/57] target/loongarch: Implement xvbitsel xvset

2023-09-13 Thread Song Gao
This patch includes: - XVBITSEL.V; - XVBITSELI.B; - XVSET{EQZ/NEZ}.V; - XVSETANYEQZ.{B/H/W/D}; - XVSETALLNEZ.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 16 ++-- target/loongarch/insns.decode | 15 target

[PATCH v6 48/57] target/loongarch: Implement xvseq xvsle xvslt

2023-09-13 Thread Song Gao
This patch includes: - XVSEQ[I].{B/H/W/D}; - XVSLE[I].{B/H/W/D}[U]; - XVSLT[I].{B/H/W/D/}[U]. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 43 target/loongarch/disas.c| 43 target/loongarch/vec_helper.c

[PATCH v6 56/57] target/loongarch: Move simply DO_XX marcos togther

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/vec.h| 42 ++ target/loongarch/vec_helper.c | 48 --- 2 files changed, 42 insertions(+), 48 deletions(-) diff --git a/target/loongarch/vec.h b/target/l

[PATCH v6 10/57] target/loongarch: Replace CHECK_SXE to check_vec(ctx, 16)

2023-09-13 Thread Song Gao
Introduce a new function check_vec to replace CHECK_SXE Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_vec.c.inc | 248 +++- 1 file changed, 192 insertions(+), 56 deletions(-) diff --git a/target/loongarch/insn_trans/trans_vec.c.inc

[PATCH v6 19/57] target/loongarch: Implement xvhaddw/xvhsubw

2023-09-13 Thread Song Gao
This patch includes: - XVHADDW.{H.B/W.H/D.W/Q.D/HU.BU/WU.HU/DU.WU/QU.DU}; - XVHSUBW.{H.B/W.H/D.W/Q.D/HU.BU/WU.HU/DU.WU/QU.DU}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 18 +++ target/loongarch/disas.c| 1

[PATCH v6 02/57] target/loongarch: Implement gvec_*_vl functions

2023-09-13 Thread Song Gao
Create gvec_*_vl functions in order to hide oprsz. This is used by gvec_v* functions for oprsz 16, and will be used by gvec_x* functions for oprsz 32. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_vec.c.inc | 68 + 1 file change

[PATCH v6 41/57] target/loongarch: Implement xvssrlrn xvssrarn

2023-09-13 Thread Song Gao
This patch includes: - XVSSRLRN.{B.H/H.W/W.D}; - XVSSRARN.{B.H/H.W/W.D}; - XVSSRLRN.{BU.H/HU.W/WU.D}; - XVSSRARN.{BU.H/HU.W/WU.D}; - XVSSRLRNI.{B.H/H.W/W.D/D.Q}; - XVSSRARNI.{B.H/H.W/W.D/D.Q}; - XVSSRLRNI.{BU.H/HU.W/WU.D/DU.Q}; - XVSSRARNI.{BU.H/HU.W/WU.D/DU.Q}. Signed-off-by: Song Gao Reviewed-b

[PATCH v6 30/57] target/loongarch: Implement vext2xv

2023-09-13 Thread Song Gao
This patch includes: - VEXT2XV.{H/W/D}.B, VEXT2XV.{HU/WU/DU}.BU; - VEXT2XV.{W/D}.B, VEXT2XV.{WU/DU}.HU; - VEXT2XV.D.W, VEXT2XV.DU.WU. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 13 ++ target/loongarch/insns.decode

[PATCH v6 25/57] target/loongarch: Implement xvmul/xvmuh/xvmulw{ev/od}

2023-09-13 Thread Song Gao
This patch includes: - XVMUL.{B/H/W/D}; - XVMUH.{B/H/W/D}[U]; - XVMULW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - XVMULW{EV/OD}.{H.BU.B/W.HU.H/D.WU.W/Q.DU.D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 38 +++ target/loongarch/disas.c

[PATCH v6 21/57] target/loongarch: Implement xavg/xvagr

2023-09-13 Thread Song Gao
This patch includes: - XVAVG.{B/H/W/D/}[U]; - XVAVGR.{B/H/W/D}[U]. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 17 target/loongarch/disas.c| 17 target/loongarch/vec_helper.c

[PATCH v6 40/57] target/loongarch: Implement xvssrln xvssran

2023-09-13 Thread Song Gao
This patch includes: - XVSSRLN.{B.H/H.W/W.D}; - XVSSRAN.{B.H/H.W/W.D}; - XVSSRLN.{BU.H/HU.W/WU.D}; - XVSSRAN.{BU.H/HU.W/WU.D}; - XVSSRLNI.{B.H/H.W/W.D/D.Q}; - XVSSRANI.{B.H/H.W/W.D/D.Q}; - XVSSRLNI.{BU.H/HU.W/WU.D/DU.Q}; - XVSSRANI.{BU.H/HU.W/WU.D/DU.Q}. Signed-off-by: Song Gao Reviewed-by: Richa

[PATCH v6 04/57] target/loongarch: Use gen_helper_gvec_4 for 4OP vector instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 2 +- target/loongarch/vec_helper.c | 11 +-- target/loongarch/insn_trans/trans_vec.c.inc | 22 - 3 files changed, 19 insertions(+), 16 deletions(-)

[PATCH v6 27/57] target/loongarch; Implement xvdiv/xvmod

2023-09-13 Thread Song Gao
This patch includes: - XVDIV.{B/H/W/D}[U]; - XVMOD.{B/H/W/D}[U]. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 17 + target/loongarch/disas.c| 17 + target/loongarch/vec_helper.c

[PATCH v6 18/57] target/loongarch: Implement xvsadd/xvssub

2023-09-13 Thread Song Gao
This patch includes: - XVSADD.{B/H/W/D}[U]; - XVSSUB.{B/H/W/D}[U]. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 18 ++ target/loongarch/disas.c| 17 + target/loongarch/insn_trans/tran

[PATCH v6 45/57] target/loongarch: Implement xvfrstp

2023-09-13 Thread Song Gao
This patch includes: - XVFRSTP[I].{B/H}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 5 target/loongarch/disas.c| 5 target/loongarch/vec_helper.c | 32 + target/loonga

[PATCH v6 42/57] target/loongarch: Implement xvclo xvclz

2023-09-13 Thread Song Gao
This patch includes: - XVCLO.{B/H/W/D}; - XVCLZ.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 9 + target/loongarch/disas.c| 9 + target/loongarch/vec_helper.c | 3 ++- target

[PATCH v6 47/57] target/loongarch: Implement LASX fpu fcvt instructions

2023-09-13 Thread Song Gao
This patch includes: - XVFCVT{L/H}.{S.H/D.S}; - XVFCVT.{H.S/S.D}; - XVFRINT[{RNE/RZ/RP/RM}].{S/D}; - XVFTINT[{RNE/RZ/RP/RM}].{W.S/L.D}; - XVFTINT[RZ].{WU.S/LU.D}; - XVFTINT[{RNE/RZ/RP/RM}].W.D; - XVFTINT[{RNE/RZ/RP/RM}]{L/H}.L.S; - XVFFINT.{S.W/D.L}[U]; - X[CVFFINT.S.L, VFFINT{L/H}.D.W. Signed-off

[PATCH v6 09/57] target/loongarch: Use gen_helper_gvec_2i for 2OP + imm vector instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 146 +++ target/loongarch/vec_helper.c | 445 +--- target/loongarch/insn_trans/trans_vec.c.inc | 18 +- 3 files changed, 291 insertions(+), 318 deletions(-)

[PATCH v6 35/57] target/loongarch: Implement xvsll xvsrl xvsra xvrotr

2023-09-13 Thread Song Gao
This patch includes: - XVSLL[I].{B/H/W/D}; - XVSRL[I].{B/H/W/D}; - XVSRA[I].{B/H/W/D}; - XVROTR[I].{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 33 +++ target/loongarch/disas.c| 36 +++

[PATCH v6 55/57] target/loongarch: Implement xvld xvst

2023-09-13 Thread Song Gao
This patch includes: - XVLD[X], XVST[X]; - XVLDREPL.{B/H/W/D}; - XVSTELM.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 18 ++ target/loongarch/disas.c| 24 +++ target/loongarch/insn_trans/trans_vec.c.inc

[PATCH v6 23/57] target/loongarch: Implement xvadda

2023-09-13 Thread Song Gao
This patch includes: - XVADDA.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 5 target/loongarch/disas.c| 5 target/loongarch/vec_helper.c | 30 +++-- target/loonga

[PATCH v6 52/57] target/loongarch: Implement xvreplve xvinsve0 xvpickve

2023-09-13 Thread Song Gao
This patch includes: - XVREPLVE.{B/H/W/D}; - XVREPL128VEI.{B/H/W/D}; - XVREPLVE0.{B/H/W/D/Q}; - XVINSVE0.{W/D}; - XVPICKVE.{W/D}; - XVBSLL.V, XVBSRL.V. Signed-off-by: Song Gao --- target/loongarch/helper.h | 5 + target/loongarch/insns.decode | 25 +++ target/l

[PATCH v6 32/57] target/loongarch: Implement xvmskltz/xvmskgez/xvmsknz

2023-09-13 Thread Song Gao
This patch includes: - XVMSKLTZ.{B/H/W/D}; - XVMSKGEZ.B; - XVMSKNZ.B. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 7 ++ target/loongarch/disas.c| 7 ++ target/loongarch/vec_helper.c | 78 +++

[PATCH v6 13/57] target/loongarch: Add avail_LASX to check LASX instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/translate.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/loongarch/translate.h b/target/loongarch/translate.h index 89b49a859e..195f53573a 100644 --- a/target/loongarch/translate.h +++ b/target/loongarch/tr

[PATCH v6 26/57] target/loongarch: Implement xvmadd/xvmsub/xvmaddw{ev/od}

2023-09-13 Thread Song Gao
This patch includes: - XVMADD.{B/H/W/D}; - XVMSUB.{B/H/W/D}; - XVMADDW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - XVMADDW{EV/OD}.{H.BU.B/W.HU.H/D.WU.W/Q.DU.D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 34 ++ target/loongarch/disas.c

[PATCH v6 57/57] target/loongarch: CPUCFG support LASX

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index a1d3f680d8..fc7f70fbe5 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -393,6 +393,7 @@

[PATCH v6 16/57] target/loongarch: Implement xvaddi/xvsubi

2023-09-13 Thread Song Gao
This patch includes: - XVADDI.{B/H/W/D}U; - XVSUBI.{B/H/W/D}U. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 9 ++ target/loongarch/disas.c| 14 target/loongarch/insn_trans/trans_vec.c.inc | 36

[PATCH v6 43/57] target/loongarch: Implement xvpcnt

2023-09-13 Thread Song Gao
This patch includes: - VPCNT.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 5 + target/loongarch/disas.c| 5 + target/loongarch/vec_helper.c | 3 ++- target/loongarch/insn_trans/trans

[PATCH v6 08/57] target/loongarch: Use gen_helper_gvec_2 for 2OP vector instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 58 - target/loongarch/vec_helper.c | 124 ++-- target/loongarch/insn_trans/trans_vec.c.inc | 16 ++- 3 files changed, 101 insertions(+), 97 deletions(

[PATCH v6 38/57] target/loongarch: Implement xvsrln xvsran

2023-09-13 Thread Song Gao
This patch includes: - XVSRLN.{B.H/H.W/W.D}; - XVSRAN.{B.H/H.W/W.D}; - XVSRLNI.{B.H/H.W/W.D/D.Q}; - XVSRANI.{B.H/H.W/W.D/D.Q}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 16 ++ target/loongarch/disas.c| 16 ++ t

[PATCH v6 49/57] target/loongarch: Implement xvfcmp

2023-09-13 Thread Song Gao
This patch includes: - XVFCMP.cond.{S/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 8 +- target/loongarch/insns.decode | 3 + target/loongarch/disas.c| 93 + target/loongarch/

[PATCH v6 17/57] target/loongarch: Implement xvneg

2023-09-13 Thread Song Gao
This patch includes: - XVNEG.{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 5 + target/loongarch/disas.c| 10 ++ target/loongarch/insn_trans/trans_vec.c.inc | 19 +++ 3 files c

[PATCH v6 34/57] target/loongarch: Implement LASX logic instructions

2023-09-13 Thread Song Gao
This patch includes: - XV{AND/OR/XOR/NOR/ANDN/ORN}.V; - XV{AND/OR/XOR/NOR}I.B. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 12 +++ target/loongarch/disas.c| 12 +++ target/loongarch/vec_helper.c

[PATCH v6 11/57] target/loongarch: Add LASX data support

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu.h | 24 -- target/loongarch/internals.h| 22 target/loongarch/vec.h | 33 ++ linux-user/loongarch64/signal.c | 1 + target/l

[PATCH v6 54/57] target/loongarch: Implement xvshuf xvperm{i} xvshuf4i

2023-09-13 Thread Song Gao
This patch includes: - XVSHUF.{B/H/W/D}; - XVPERM.W; - XVSHUF4i.{B/H/W/D}; - XVPERMI.{W/D/Q}; - XVEXTRINS.{B/H/W/D}. Signed-off-by: Song Gao --- target/loongarch/helper.h | 3 + target/loongarch/insns.decode | 21 +++ target/loongarch/disas.c

[PATCH v6 51/57] target/loongarch: Implement xvinsgr2vr xvpickve2gr

2023-09-13 Thread Song Gao
This patch includes: - XVINSGR2VR.{W/D}; - XVPICKVE2GR.{W/D}[U]. Signed-off-by: Song Gao --- target/loongarch/insns.decode | 7 + target/loongarch/disas.c| 17 ++ target/loongarch/translate.c| 13 ++ target/loongarch/insn_trans/trans_vec.c.in

[PATCH v6 46/57] target/loongarch: Implement LASX fpu arith instructions

2023-09-13 Thread Song Gao
This patch includes: - XVF{ADD/SUB/MUL/DIV}.{S/D}; - XVF{MADD/MSUB/NMADD/NMSUB}.{S/D}; - XVF{MAX/MIN}.{S/D}; - XVF{MAXA/MINA}.{S/D}; - XVFLOGB.{S/D}; - XVFCLASS.{S/D}; - XVF{SQRT/RECIP/RSQRT}.{S/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode

[PATCH v6 07/57] target/loongarch: Use gen_helper_gvec_2_ptr for 2OP + env vector instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 118 +++--- target/loongarch/vec_helper.c | 161 +++- target/loongarch/insn_trans/trans_vec.c.inc | 129 +--- 3 files changed, 219 insertions

[PATCH v6 06/57] target/loongarch: Use gen_helper_gvec_3 for 3OP vector instructions

2023-09-13 Thread Song Gao
Signed-off-by: Song Gao --- target/loongarch/helper.h | 214 +- target/loongarch/vec_helper.c | 444 +--- target/loongarch/insn_trans/trans_vec.c.inc | 19 +- 3 files changed, 326 insertions(+), 351 deletions(-) diff --git a/target/loongar

[PATCH v6 00/57] Add LoongArch LASX instructions

2023-09-13 Thread Song Gao
Based-on: https://patchew.org/QEMU/20230831030904.1194667-1-richard.hender...@linaro.org/ Hi, This series adds LoongArch LASX instructions. About test: We use RISU test the LoongArch LASX instructions. QEMU: https://github.com/loongson/qemu/tree/tcg-old-abi-support-lasx RISU: https://g

[PATCH v6 44/57] target/loongarch: Implement xvbitclr xvbitset xvbitrev

2023-09-13 Thread Song Gao
This patch includes: - XVBITCLR[I].{B/H/W/D}; - XVBITSET[I].{B/H/W/D}; - XVBITREV[I].{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 27 + target/loongarch/disas.c| 25 target/loonga

[PATCH v6 33/57] target/loognarch: Implement xvldi

2023-09-13 Thread Song Gao
This patch includes: - XVLDI. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 2 ++ target/loongarch/disas.c| 7 +++ target/loongarch/insn_trans/trans_vec.c.inc | 13 ++--- 3 files changed, 15 insertions(

[PATCH v6 37/57] target/loongarch: Implement xvsrlr xvsrar

2023-09-13 Thread Song Gao
This patch includes: - XVSRLR[I].{B/H/W/D}; - XVSRAR[I].{B/H/W/D}. Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/insns.decode | 17 + target/loongarch/disas.c| 18 ++ target/loongarch/vec_helper.c

  1   2   3   4   5   >