[PATCH v7 5/5] ebpf: Updated eBPF program and skeleton.

2023-08-30 Thread Andrew Melnychenko
Updated section name, so libbpf should init/gues proper program type without specifications during open/load. Also, added map_flags with explicitly declared BPF_F_MMAPABLE. Added check for BPF_F_MMAPABLE flag to meson script and requirements to libbpf version. Signed-off-by: Andrew Melnychenko --

[PATCH v7 2/5] ebpf: Added eBPF initialization by fds.

2023-08-30 Thread Andrew Melnychenko
It allows using file descriptors of eBPF provided outside of QEMU. QEMU may be run without capabilities for eBPF and run RSS program provided by management tool(g.e. libvirt). Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss-stub.c | 6 ++ ebpf/ebpf_rss.c | 27 ++

[PATCH v7 3/5] virtio-net: Added property to load eBPF RSS with fds.

2023-08-30 Thread Andrew Melnychenko
eBPF RSS program and maps may now be passed during initialization. Initially was implemented for libvirt to launch qemu without permissions, and initialized eBPF program through the helper. Signed-off-by: Andrew Melnychenko --- hw/net/virtio-net.c| 55 ++--

[PATCH v7 0/5] eBPF RSS through QMP support.

2023-08-30 Thread Andrew Melnychenko
This series of patches provides the ability to retrieve eBPF program through qmp, so management application may load bpf blob with proper capabilities. Now, virtio-net devices can accept eBPF programs and maps through properties as external file descriptors. Access to the eBPF map is direct throug

[PATCH v7 1/5] ebpf: Added eBPF map update through mmap.

2023-08-30 Thread Andrew Melnychenko
Changed eBPF map updates through mmaped array. Mmaped arrays provide direct access to map data. It should omit using bpf_map_update_elem() call, which may require capabilities that are not present. Signed-off-by: Andrew Melnychenko --- ebpf/ebpf_rss.c | 117 ++

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

2023-08-30 Thread Andrew Melnychenko
Now, the binary objects may be retrieved by id. It would require for future qmp commands that may require specific eBPF blob. Added command "request-ebpf". This command returns eBPF program encoded base64. The program taken from the skeleton and essentially is an ELF object that can be loaded in t

Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL

2023-08-30 Thread Xiaoyao Li
On 8/30/2023 3:48 PM, Daniel P. Berrangé wrote: On Wed, Aug 30, 2023 at 01:57:59PM +0800, Xiaoyao Li wrote: On 8/30/2023 1:18 PM, Chenyi Qiang wrote: On 8/29/2023 6:25 PM, Daniel P. Berrangé wrote: On Tue, Aug 29, 2023 at 01:31:37PM +0800, Chenyi Qiang wrote: On 8/22/2023 4:24 PM, Daniel

Re: [PATCH] pci: SLT must be RO

2023-08-30 Thread Michael S. Tsirkin
On Thu, Aug 31, 2023 at 08:22:34AM +0200, Philippe Mathieu-Daudé wrote: > Hi Michael, > > On 30/8/23 23:48, Michael S. Tsirkin wrote: > > current code sets PCI_SEC_LATENCY_TIMER to WO, but for > > pcie to pcie bridges it must be RO 0 according to > > pci express spec which says: > > This regi

Re: [PATCH] pci: SLT must be RO

2023-08-30 Thread Philippe Mathieu-Daudé
Hi Michael, On 30/8/23 23:48, Michael S. Tsirkin wrote: current code sets PCI_SEC_LATENCY_TIMER to WO, but for pcie to pcie bridges it must be RO 0 according to pci express spec which says: This register does not apply to PCI Express. It must be read-only and hardwired to 00h. For PCI

Re: About "PC_MACHINE_CLASS" definition.

2023-08-30 Thread Philippe Mathieu-Daudé
Hi, On 31/8/23 05:15, Liu Jaloo wrote: Where actually defined the "PC_MACHINE_CLASS", I can't find it in source code, please help to point out the file. It is defined in include/hw/i386/pc.h: OBJECT_DECLARE_TYPE(PCMachineState, PCMachineClass, PC_MACHINE) The macro itself is defined in inclu

About "PC_MACHINE_CLASS" definition.

2023-08-30 Thread Liu Jaloo
Where actually defined the "PC_MACHINE_CLASS", I can't find it in source code, please help to point out the file. Thanks.

[PATCH 2/2] target/arm: Use tcg_gen_gvec_cmpi for compare vs 0

2023-08-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/tcg/translate.c | 56 ++ 1 file changed, 9 insertions(+), 47 deletions(-) diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index 38ad8dd4bd..89a7392ed3 100644 --- a/target/arm/tcg/translate.c

[PATCH 1/2] tcg: Add gvec compare with immediate and scalar operand

2023-08-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime.h | 25 ++ include/tcg/tcg-op-gvec-common.h | 6 ++ accel/tcg/tcg-runtime-gvec.c | 26 ++ tcg/tcg-op-gvec.c| 150 +++ 4 files changed, 207 insertions(+) diff --git a/ac

[PATCH 0/2] tcg: Add gvec compare with immediate and scalar operand

2023-08-30 Thread Richard Henderson
This should be usable for loongarch64 as well, rather than rolling a local copy there. r~ Richard Henderson (2): tcg: Add gvec compare with immediate and scalar operand target/arm: Use tcg_gen_gvec_cmpi for compare vs 0 accel/tcg/tcg-runtime.h | 25 ++ include/tcg/tcg-op-gvec-

[PATCH 2/2] target/i386: Use i128 for 128 and 256-bit loads and stores

2023-08-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 61 - 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 90c7b32f36..bbcb81e908 100644 --- a/target/i386/tcg/translat

[PATCH 0/2] tcg: Streamline vector load/store

2023-08-30 Thread Richard Henderson
We have tcg_gen_qemu_{ld,st}_i128, which can be used to implement load/store of vectors to guest memory. But at present we have to split into, or concatenated from, two i64 to reference the guest vector register backing store within env. Provide tcg_gen_{ld,st}_i128, which can avoid the trip thro

[PATCH 1/2] tcg: Add tcg_gen_{ld,st}_i128

2023-08-30 Thread Richard Henderson
Do not require the translators to jump through concat and extract of i64 in order to move values to and from env. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-common.h | 3 +++ tcg/tcg-op.c| 22 ++ 2 files changed, 25 insertions(+) diff --git a/i

[PATCH 4/4] tcg: Eliminate duplicate env store operations

2023-08-30 Thread Richard Henderson
Notice when a constant is stored to the same location twice. Signed-off-by: Richard Henderson --- tcg/optimize.c | 13 + 1 file changed, 13 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index 51c4c61b9f..6efc08f593 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -22

[PATCH 0/4] tcg: Optimize loads and stores to env

2023-08-30 Thread Richard Henderson
This is aimed at improving gvec generated code, which involves large numbers of loads and stores to the env slots of the guest cpu vector registers. The final patch helps eliminate redundant zero-extensions that can appear with e.g. avx2 and sve. >From the small amount of timing that I have done,

[PATCH 1/4] tcg: Don't free vector results

2023-08-30 Thread Richard Henderson
Avoid reusing vector temporaries so that we may re-use them when propagating stores to loads. Signed-off-by: Richard Henderson --- tcg/tcg-op-gvec.c | 39 ++- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c

[PATCH 2/4] tcg/optimize: Pipe OptContext into reset_ts

2023-08-30 Thread Richard Henderson
Will be needed in the next patch. Signed-off-by: Richard Henderson --- tcg/optimize.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 3013eb04e6..f00db3aa38 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -123,7 +123,7

[PATCH 3/4] tcg: Optimize env memory operations

2023-08-30 Thread Richard Henderson
Propagate stores to loads, loads to loads. Signed-off-by: Richard Henderson --- tcg/optimize.c | 199 + 1 file changed, 199 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index f00db3aa38..51c4c61b9f 100644 --- a/tcg/optimize.c +++ b/t

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

2023-08-30 Thread Huang Rui
On Tue, Aug 29, 2023 at 08:36:20AM +0800, Gurchetan Singh wrote: > From: Gurchetan Singh > > Changes since v12: > - Added r-b tags from Antonio Caggiano and Akihiko Odaki > - Removed review version from commit messages > - I think we're good to merge since we've had multiple people test and revie

Re: [PATCH v3] arm/kvm: Enable support for KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE

2023-08-30 Thread Gavin Shan
Hi Shameer, On 8/30/23 21:48, Shameer Kolothum wrote: Now that we have Eager Page Split support added for ARM in the kernel, enable it in Qemu. This adds, -eager-split-size to -accel sub-options to set the eager page split chunk size. -enable KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE. The chunk s

[PULL v2 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-08-30 Thread Stefano Stabellini
From: Oleksandr Tyshchenko In order to use virtio backends we need to initialize RAM for the xen-mapcache (which is responsible for mapping guest memory using foreign mapping) to work. Calculate and add hi/low memory regions based on machine->ram_size. Use the constants defined in public header

[PULL v2 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-08-30 Thread Stefano Stabellini
From: Oleksandr Tyshchenko In order to use virtio backends we need to allocate virtio-mmio parameters (irq and base) and register corresponding buses. Use the constants defined in public header arch-arm.h to be aligned with the toolstack. So the number of current supported virtio-mmio devices is

[PULL v2 0/2] xen-virtio-2-tag

2023-08-30 Thread Stefano Stabellini
The following changes since commit 156618d9ea67f2f2e31d9dedd97f2dcccbe6808c: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-08-30 09:20:27 -0400) are available in the Git repository at: https://gitlab.com/sstabellini/qemu.git xen-virtio-2-tag for you

Re: [QEMU][PATCH v4 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-08-30 Thread Stefano Stabellini
On Tue, 29 Aug 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to allocate virtio-mmio > parameters (irq and base) and register corresponding buses. > > Use the constants defined in public header arch-arm.h to be > aligned with the toolstack.

Re: [QEMU][PATCH v4 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-08-30 Thread Stefano Stabellini
On Tue, 29 Aug 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to initialize RAM for the > xen-mapcache (which is responsible for mapping guest memory using foreign > mapping) to work. Calculate and add hi/low memory regions based on > machine-

Re: [PULL 1/3] softmmu: Fix dirtylimit memory leak

2023-08-30 Thread Yong Huang
On Thu, Aug 31, 2023 at 12:55 AM Michael Tokarev wrote: > 29.08.2023 18:29, Hyman Huang wrote: > > From: "alloc.young" > > > > Fix memory leak in hmp_info_vcpu_dirty_limit,use g_autoptr > > to handle memory deallocation. > > It does not feel like -stable-worthy, or am I wrong and it should be >

Re: QEMU features useful for Xen development?

2023-08-30 Thread Stefano Stabellini
Hi Alex, Thanks for reaching out. QEMU is an important development tool for the Xen community and we are using QEMU as part of our upstream gitlab-ci testing, see automation/scripts/qemu-*. As Xen is gaining R52 and R82 support, it would be great to be able to use QEMU for development and testing

Re: [PATCH v4 48/48] target/loongarch: CPUCFG support LASX

2023-08-30 Thread Richard Henderson
On 8/30/23 01:49, Song Gao wrote: Signed-off-by: Song Gao --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v4 45/48] target/loongarch: Implement xvpack xvpick xvilv{l/h}

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVPACK{EV/OD}.{B/H/W/D}; - XVPICK{EV/OD}.{B/H/W/D}; - XVILV{L/H}.{B/H/W/D}. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 27 target/loongarch/disas.c | 27 target/loongarch/

Re: [PATCH v4 42/48] target/loongarch: Implement xvbitsel xvset

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/helper.h| 16 +++ target/loongarch/insns.decode| 15 ++

Re: [PATCH v4 41/48] target/loongarch: Implement xvfcmp

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVFCMP.cond.{S/D}. Signed-off-by: Song Gao --- target/loongarch/helper.h| 8 +- target/loongarch/insns.decode| 3 + target/loongarch/disas.c | 94 target/l

Re: [PATCH v4 40/48] target/loongarch: Implement xvseq xvsle xvslt

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/vec.h | 4 + target/loongarch/insns.decode| 43 +++ target/loongarch/disas.c

Re: [PATCH v4 39/48] target/loongarch: Implement LASX fpu fcvt instructions

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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[CVFFI

Re: [PATCH v4 38/48] target/loongarch: Implement LASX fpu arith instructions

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/insns.decode

Re: [PATCH v4 37/48] target/loongarch: Implement xvfrstp

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVFRSTP[I].{B/H}. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 5 ++ target/loongarch/disas.c | 5 ++ target/loongarch/vec_helper.c| 48 target/l

Re: [PATCH v4 36/48] target/loongarch: Implement xvbitclr xvbitset xvbitrev

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/vec.h | 4 ++ target/loongarch/insns.decode| 27 +++ target/loongarch/

Re: [PATCH v4 35/48] target/loongarch: Implement xvpcnt

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - VPCNT.{B/H/W/D}. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 5 + target/loongarch/disas.c | 5 + target/loongarch/vec_helper.c| 4 ++-- target/loongarch/insn_

Re: [PATCH v4 34/48] target/loongarch: Implement xvclo xvclz

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVCLO.{B/H/W/D}; - XVCLZ.{B/H/W/D}. Signed-off-by: Song Gao --- target/loongarch/vec.h | 9 + target/loongarch/insns.decode| 9 + target/loongarch/disas.c | 9

Re: [PATCH v4 33/48] target/loongarch: Implement xvssrlrn xvssrarn

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: void HELPER(vssrarni_du_q)(void *vd, void *vj, uint64_t imm, uint32_t desc) { -Int128 shft_res1, shft_res2, mask1, mask2, r1, r2; +int i, j; +Int128 shft_res[4], mask1, mask2, r[4]; Likewise for the arrays. r~

Re: [PATCH v4 32/48] target/loongarch: Implement xvssrln xvssran

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: void HELPER(vssrlni_d_q)(void *vd, void *vj, uint64_t imm, uint32_t desc) { -Int128 shft_res1, shft_res2, mask; +int i, j; +Int128 shft_res[4], mask; VReg *Vd = (VReg *)vd; VReg *Vj = (VReg *)vj; +int oprsz = simd_oprsz(desc); -

Announcing Subprovisioner, a qsd-powered k8s storage provider

2023-08-30 Thread Alberto Faria
Hi all, FYI, I recently released Subprovisioner [1], a qemu-storage-daemon-powered Kubernetes storage provider that enables users to provision block volumes backed by a single underlying shared file system. It works by storing those volumes as qcow2 images and exposing them as block devices using

Re: [PATCH v4 31/48] target/loongarch: Implement xvsrlrn xvsrarn

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/insns.decode| 16 ++ target/loongarch/disas.c

Re: [PATCH v4 30/48] target/loongarch: Implement xvsrln xvsran

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/vec.h | 2 + target/loongarch/insns.decode| 16

Re: [PATCH v4 29/48] target/loongarch: Implement xvsrlr xvsrar

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVSRLR[I].{B/H/W/D}; - XVSRAR[I].{B/H/W/D}. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 17 + target/loongarch/disas.c | 18 ++ target/loongarch/vec_hel

Re: [PATCH v4 28/48] target/loongarch: Implement xvsllwil xvextl

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/insns.decode| 9 target/loongarch/disas.c | 9 target/loong

[PATCH v3 4/4] io: follow coroutine AioContext in qio_channel_yield()

2023-08-30 Thread Stefan Hajnoczi
The ongoing QEMU multi-queue block layer effort makes it possible for multiple threads to process I/O in parallel. The nbd block driver is not compatible with the multi-queue block layer yet because QIOChannel cannot be used easily from coroutines running in multiple threads. This series changes th

[PATCH v3 3/4] io: check there are no qio_channel_yield() coroutines during ->finalize()

2023-08-30 Thread Stefan Hajnoczi
Callers must clean up their coroutines before calling object_unref(OBJECT(ioc)) to prevent an fd handler leak. Add an assertion to check this. This patch is preparation for the fd handler changes that follow. Signed-off-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé Reviewed-by: Eric Blake

[PATCH v3 1/4] nbd: drop unused nbd_receive_negotiate() aio_context argument

2023-08-30 Thread Stefan Hajnoczi
aio_context is always NULL, so drop it. Suggested-by: Fabiano Rosas Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- include/block/nbd.h | 3 +-- nbd/client-connection.c | 3 +-- nbd/client.c| 5 ++--- qemu-nbd.c | 4 +

[PATCH v3 2/4] nbd: drop unused nbd_start_negotiate() aio_context argument

2023-08-30 Thread Stefan Hajnoczi
aio_context is always NULL, so drop it. Suggested-by: Fabiano Rosas Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- nbd/client.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nbd/client.c b/nbd/client.c index 16e

[PATCH v3 0/4] io: follow coroutine AioContext in qio_channel_yield()

2023-08-30 Thread Stefan Hajnoczi
v3: - Fix wrong copy-pasted function name in doc comment [Eric] - Fix "match" -> "matches" in comment [Eric] v2: - Add Patch 1 & 2 to remove unused NBD aio_context arguments and dead code [Fabiano] - Remove attach/detach prototypes from "io/channel.h" [Daniel] - Add utility function to set fd hand

Re: [PATCH v4 26/48] target/loongarch: Implement LASX logic instructions

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XV{AND/OR/XOR/NOR/ANDN/ORN}.V; - XV{AND/OR/XOR/NOR}I.B. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 12 target/loongarch/disas.c | 12 target/loongarch/vec_he

Re: [PATCH v4 24/48] target/loongarch: Implement xvmskltz/xvmskgez/xvmsknz

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVMSKLTZ.{B/H/W/D}; - XVMSKGEZ.B; - XVMSKNZ.B. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 7 ++ target/loongarch/disas.c | 7 ++ target/loongarch/vec_helper.c| 80 ++

Re: [PATCH v4 22/48] target/loongarch: Implement vext2xv

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/helper.h| 13 + target/loongarch/insns.decode

Re: [PATCH v4 21/48] target/loongarch: Implement xvexth

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVEXTH.{H.B/W.H/D.W/Q.D}; - XVEXTH.{HU.BU/WU.HU/DU.WU/QU.DU}. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 9 + target/loongarch/disas.c | 9 + target/loongarch/vec_helper.c

Re: [PATCH v4 20/48] target/loongarch: Implement xvsat

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVSAT.{B/H/W/D}[U]. Signed-off-by: Song Gao --- target/loongarch/insns.decode| 9 target/loongarch/disas.c | 9 target/loongarch/vec_helper.c| 48 ++-- ta

Re: [PATCH v4 19/48] target/loongarch; Implement xvdiv/xvmod

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVDIV.{B/H/W/D}[U]; - XVMOD.{B/H/W/D}[U]. Signed-off-by: Song Gao --- target/loongarch/vec.h | 7 +++ target/loongarch/insns.decode| 17 + target/loongarch/disas.c

Re: [PATCH v5 08/20] linux-user: Load vdso image if available

2023-08-30 Thread Richard Henderson
On 8/30/23 13:56, Philippe Mathieu-Daudé wrote: +    for (unsigned i = 0, n = vdso->reloc_count; i < n; i++) { Do we really need 'n'? You should always have an loop invariant condition if possible. vdso->reloc_count doesn't seem updated, but I get your point. But the compiler doesn't know

[PATCH] pci: SLT must be RO

2023-08-30 Thread Michael S. Tsirkin
current code sets PCI_SEC_LATENCY_TIMER to WO, but for pcie to pcie bridges it must be RO 0 according to pci express spec which says: This register does not apply to PCI Express. It must be read-only and hardwired to 00h. For PCI Express to PCI/PCI-X Bridges, refer to the [PCIe-to-PCI-P

Re: [PATCH 07/10] accel/tcg: Merge io_readx into do_ld_mmio_beN

2023-08-30 Thread Philippe Mathieu-Daudé
On 28/8/23 20:55, Richard Henderson wrote: Avoid multiple calls to io_prepare for unaligned acceses. One call to do_ld_mmio_beN will never cross pages. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 84 +- 1 file changed, 30 insertions(+

Re: [PATCH v4 18/48] target/loongarch: Implement xvmadd/xvmsub/xvmaddw{ev/od}

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/vec.h | 3 + target/loongarch/insns.decode

Re: [PATCH 03/10] accel/tcg: Use CPUTLBEntryFull.phys_addr in io_failed

2023-08-30 Thread Philippe Mathieu-Daudé
On 28/8/23 20:55, Richard Henderson wrote: Since the introduction of CPUTLBEntryFull, we can recover the full cpu address space physical address without having to examine the MemoryRegionSection. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 12 1 file changed, 4 ins

Re: [PATCH 45/67] ui/vc: remove kby_put_keysym() and update function calls

2023-08-30 Thread Akihiko Odaki
On 2023/08/30 18:38, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The function calls to `kbd_put_keysym` have been updated to now call `kbd_put_keysym_console` with a NULL console parameter. Like most console functions, NULL argument is now for the active console. This will allo

Re: [PATCH v5 08/20] linux-user: Load vdso image if available

2023-08-30 Thread Philippe Mathieu-Daudé
On 30/8/23 18:17, Richard Henderson wrote: On 8/30/23 07:22, Philippe Mathieu-Daudé wrote: Hi Richard, On 30/8/23 00:02, Richard Henderson wrote: The vdso image will be pre-processed into a C data array, with a simple list of relocations to perform, and identifying the location of signal tramp

Re: [PATCH 12/20] target/riscv: move KVM only files to kvm subdir

2023-08-30 Thread Philippe Mathieu-Daudé
On 30/8/23 20:21, Daniel Henrique Barboza wrote: On 8/28/23 13:47, Philippe Mathieu-Daudé wrote: On 25/8/23 15:08, Daniel Henrique Barboza wrote: Move the files to a 'kvm' dir to promote more code separation between accelerators and making our lives easier supporting build options such as --d

Re: [PATCH RESEND v5 24/26] contrib/plugins: Allow to log registers

2023-08-30 Thread Akihiko Odaki
On 2023/08/31 0:08, Alex Bennée wrote: Akihiko Odaki writes: This demonstrates how a register can be read from a plugin. Signed-off-by: Akihiko Odaki --- docs/devel/tcg-plugins.rst | 10 ++- contrib/plugins/execlog.c | 140 - 2 files changed, 117 in

Re: [PATCH] linux-user: Fixes for zero_bss

2023-08-30 Thread Philippe Mathieu-Daudé
On 30/8/23 22:34, Richard Henderson wrote: The previous change, 2d385be6152, assumed !PAGE_VALID meant that the page would be unmapped by the elf image. However, since we reserved the entire image space via mmap, PAGE_VALID will always be set. Instead, assume PROT_NONE for the same condition.

Re: [PATCH v4 16/48] target/loongarch: Implement xvmax/xvmin

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: This patch includes: - XVMAX[I].{B/H/W/D}[U]; - XVMIN[I].{B/H/W/D}[U]. Signed-off-by: Song Gao --- target/loongarch/vec.h | 3 ++ target/loongarch/insns.decode| 36 target/loongarch/disas.c

Re: [PATCH v4 15/48] target/loongarch: Implement xvadda

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: -#define DO_VABS(a) ((a < 0) ? (-a) : (a)) - -#define DO_VADDA(NAME, BIT, E, DO_OP) \ -void HELPER(NAME)(void *vd, void *vj, void *vk, uint32_t v) \ -{ \ -int i;

Re: [PATCH] accel/tcg: Fix typo in translator_io_start() description

2023-08-30 Thread Richard Henderson
On 8/30/23 09:08, Philippe Mathieu-Daudé wrote: Missed while reviewing commit dfd1b81274 ("accel/tcg: Introduce translator_io_start"). Signed-off-by: Philippe Mathieu-Daudé --- include/exec/translator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/translat

[PATCH] linux-user: Fixes for zero_bss

2023-08-30 Thread Richard Henderson
The previous change, 2d385be6152, assumed !PAGE_VALID meant that the page would be unmapped by the elf image. However, since we reserved the entire image space via mmap, PAGE_VALID will always be set. Instead, assume PROT_NONE for the same condition. Furthermore, assume bss is only ever present

Re: [PATCH RESEND v5 20/26] gdbstub: Remove gdb_has_xml variable

2023-08-30 Thread Akihiko Odaki
On 2023/08/31 0:02, Alex Bennée wrote: Akihiko Odaki writes: GDB has XML support since 6.7 which was released in 2007. It's time to remove support for old GDB versions without XML support. Signed-off-by: Akihiko Odaki In principle I'm fine with this but should we not catch GDB's which don

[RFC PATCH] hw/timer/hpet: fix IRQ routing in legacy support mode

2023-08-30 Thread David Woodhouse
From: David Woodhouse The interrupt from timer 0 in legacy mode is supposed to go to IRQ 0 on the i8259 and IRQ 2 on the I/O APIC. The generic x86 GSI handling can't cope with IRQ numbers differing between the two chips (despite it also being the case for PCI INTx routing), so add a special case

[PATCH] hw/isa/ich9: Add comment on imperfect emulation of PIC vs. I/O APIC routing

2023-08-30 Thread David Woodhouse
From: David Woodhouse As noted in the comment, the PCI INTx lines are supposed to be routed to *both* the PIC and the I/O APIC. It's just that we don't cope with the concept of an IRQ being asserted to two *different* pins on the two irqchips. So we have this hack of routing to I/O APIC only if

Re: [PATCH v2] plugins: Set final instruction count in plugin_gen_tb_end

2023-08-30 Thread Matt Borgerson
Thanks Alex On Wed, Aug 30, 2023, 14:47 Alex Bennée wrote: > > Matt Borgerson writes: > > > Translation logic may partially decode an instruction, then abort and > > remove the instruction from the TB. This can happen for example when an > > instruction spans two pages. In this case, plugins ma

Re: [PATCH v2] plugins: Set final instruction count in plugin_gen_tb_end

2023-08-30 Thread Alex Bennée
Matt Borgerson writes: > Translation logic may partially decode an instruction, then abort and > remove the instruction from the TB. This can happen for example when an > instruction spans two pages. In this case, plugins may get an incorrect > result when calling qemu_plugin_tb_n_insns to quer

Re: [RFC PATCH 0/2] target/sh4: Disable decode_gusa when plugins enabled

2023-08-30 Thread Alex Bennée
Richard Henderson writes: > Alex, perhaps this will DTRT for your plugin test case. It does thanks, queued to plugins/next. > > r~ > > Richard Henderson (2): > accel/tcg: Add plugin_enabled to DisasContextBase > target/sh4: Disable decode_gusa when plugins enabled > > include/exec/transl

Re: [PATCH v4 17/48] target/loongarch: Implement xvmul/xvmuh/xvmulw{ev/od}

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: 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 --- target/loongarch/vec.h | 2 + target/loongarch/insns.decode

Re: [PATCH 12/20] target/riscv: move KVM only files to kvm subdir

2023-08-30 Thread Daniel Henrique Barboza
On 8/28/23 13:47, Philippe Mathieu-Daudé wrote: On 25/8/23 15:08, Daniel Henrique Barboza wrote: Move the files to a 'kvm' dir to promote more code separation between accelerators and making our lives easier supporting build options such as --disable-tcg. Rename kvm.c to kvm-cpu.c to keep it

Re: [PATCH v4 13/48] target/loongarch: Implement xavg/xvagr

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: --- a/target/loongarch/vec.h +++ b/target/loongarch/vec.h @@ -50,4 +50,7 @@ #define DO_ADD(a, b) (a + b) #define DO_SUB(a, b) (a - b) +#define DO_VAVG(a, b) ((a >> 1) + (b >> 1) + (a & b & 1)) +#define DO_VAVGR(a, b) ((a >> 1) + (b >> 1) + ((a | b) & 1

Re: [PATCH v4 11/48] target/loongarch: Implement xvhaddw/xvhsubw

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: --- a/target/loongarch/vec.h +++ b/target/loongarch/vec.h @@ -47,4 +47,7 @@ #define Q(x) Q[x] #endif /* HOST_BIG_ENDIAN */ +#define DO_ADD(a, b) (a + b) +#define DO_SUB(a, b) (a - b) + Why are these moved? r~

Re: [PATCH v4 10/48] target/loongarch: rename lsx_helper.c to vec_helper.c

2023-08-30 Thread Richard Henderson
On 8/30/23 01:48, Song Gao wrote: Use gen_helper_gvec_* series function. and rename lsx_helper.c to vec_helper.c. Signed-off-by: Song Gao --- target/loongarch/helper.h | 642 .../loongarch/{lsx_helper.c => vec_helper.c} | 1297 - These changes

Re: [PATCH v8 12/12] docs/system: add basic virtio-snd documentation

2023-08-30 Thread Alex Bennée
Emmanouil Pitsidianakis writes: > This commit adds basic documentation for using virtio-snd. > > Signed-off-by: Emmanouil Pitsidianakis > --- > docs/system/device-emulation.rst | 1 + > docs/system/devices/virtio-snd.rst | 49 ++ > 2 files changed, 50 insertions

Re: [PULL v3 1/5] block-migration: Ensure we don't crash during migration cleanup

2023-08-30 Thread Fabiano Rosas
Michael Tokarev writes: > 30.08.2023 14:49, Stefan Hajnoczi wrote: >> From: Fabiano Rosas >> >> We can fail the blk_insert_bs() at init_blk_migration(), leaving the >> BlkMigDevState without a dirty_bitmap and BlockDriverState. Account >> for the possibly missing elements when doing cleanup. >>

Re: [PATCH V4 08/11] tests/qtest: option to suspend during migration

2023-08-30 Thread Peter Xu
On Tue, Aug 29, 2023 at 11:18:03AM -0700, Steve Sistare wrote: > Add an option to suspend the src in a-b-bootblock.S, which puts the guest > in S3 state after one round of writing to memory. The option is enabled by > poking a 1 into the suspend_me word in the boot block prior to starting the > sr

Re: [PATCH V4 07/11] tests/qtest: migration events

2023-08-30 Thread Peter Xu
On Tue, Aug 29, 2023 at 11:18:02AM -0700, Steve Sistare wrote: > Define a state object to capture events seen by migration tests, to allow > more events to be captured in a subsequent patch, and simplify event > checking in wait_for_migration_pass. No functional change. > > Signed-off-by: Steve S

QEMU features useful for Xen development?

2023-08-30 Thread Alex Bennée
Dear Xen community, Linaro is significantly invested in QEMU development, with a special focus on Arm-related aspects. We recognize the value of QEMU as a readily available software reference platform for projects that need to test their software well before the availability of real hardware. T

Re: [PULL 1/3] softmmu: Fix dirtylimit memory leak

2023-08-30 Thread Michael Tokarev
29.08.2023 18:29, Hyman Huang wrote: From: "alloc.young" Fix memory leak in hmp_info_vcpu_dirty_limit,use g_autoptr to handle memory deallocation. It does not feel like -stable-worthy, or am I wrong and it should be picked up for -stable? Thanks, /mjt

Re: [PATCH v2 13/58] kvm: Introduce kvm_arch_pre_create_vcpu()

2023-08-30 Thread Isaku Yamahata
On Wed, Aug 30, 2023 at 09:45:58AM +0800, Xiaoyao Li wrote: > On 8/29/2023 10:40 PM, Philippe Mathieu-Daudé wrote: > > On 18/8/23 11:49, Xiaoyao Li wrote: > > > Introduce kvm_arch_pre_create_vcpu(), to perform arch-dependent > > > work prior to create any vcpu. This is for i386 TDX because it nee

Re: [PULL v3 1/5] block-migration: Ensure we don't crash during migration cleanup

2023-08-30 Thread Michael Tokarev
30.08.2023 14:49, Stefan Hajnoczi wrote: From: Fabiano Rosas We can fail the blk_insert_bs() at init_blk_migration(), leaving the BlkMigDevState without a dirty_bitmap and BlockDriverState. Account for the possibly missing elements when doing cleanup. Fix the following crashes: Thread 1 "qemu

Re: [PATCH V4 06/11] migration: preserve cpu ticks if suspended

2023-08-30 Thread Peter Xu
On Tue, Aug 29, 2023 at 11:18:01AM -0700, Steve Sistare wrote: > During RUN_STATE_SUSPENDED, the cpu clock remains enabled, so the > timers_state saved to the migration stream is stale, causing time errors > in the guest when it wakes from suspend. Instead of having this, I'm wondering whether we

Re: [PATCH v2 0/5] tcg patch queue

2023-08-30 Thread Michael Tokarev
29.08.2023 21:54, Richard Henderson wrote: .. Richard Henderson (5): softmmu: Assert data in bounds in iotlb_to_section softmmu: Use async_run_on_cpu in tcg_commit tcg: Remove vecop_list check from tcg_gen_not_vec tcg/sparc64: Disable TCG_TARGET_HAS_extr_i64_i32

Re: [PATCH V4 05/11] migration: preserve suspended for bg_migration

2023-08-30 Thread Peter Xu
On Tue, Aug 29, 2023 at 11:18:00AM -0700, Steve Sistare wrote: > Do not wake a suspended guest during bg_migration. > > Signed-off-by: Steve Sistare > --- > migration/migration.c | 12 +--- > softmmu/runstate.c| 1 + > 2 files changed, 6 insertions(+), 7 deletions(-) > > diff --git

Re: [PATCH 17/21] virtio-gpu-virgl: teach it to get the QEMU EGL display

2023-08-30 Thread Antonio Caggiano
Thanks for your answer, that'll help. On 30/08/2023 13:49, Marc-André Lureau wrote: Hi Antonio On Wed, Aug 30, 2023 at 3:14 PM Antonio Caggiano wrote: Hi Marc-André, I've been testing this, but I can't find where qemu_egl_display is set when using sdl. Whil ui/gtk.c sets that in gl_area_re

Re: [PULL v3 0/5] Block patches

2023-08-30 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 v2 0/5] tcg patch queue

2023-08-30 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/3] Dirty page rate and dirty page limit 20230829 patches

2023-08-30 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

  1   2   3   4   5   >