Re: [PATCH 0/9] QEMU file cleanups

2023-05-04 Thread Peter Xu
On Thu, May 04, 2023 at 04:56:46PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Thu, May 04, 2023 at 01:38:32PM +0200, Juan Quintela wrote: > >> - convince and review code to see that everything is uint64_t. > > > > One general question to patches regarding this - what's the major benefit

Re: [PATCH 1/3] target/arm: Use CONFIG_SEMIHOSTING instead of TCG for semihosting

2023-05-04 Thread Paolo Bonzini
Il gio 4 mag 2023, 10:59 Peter Maydell ha scritto: > On Thu, 4 May 2023 at 08:33, Paolo Bonzini wrote: > > > > On 5/3/23 21:38, Fabiano Rosas wrote: > > > When building --without-default-devices, the semihosting code will not > > > be available, so check the proper config. > > I think the

Re: [PATCH 9/9] qemu-file: Account for rate_limit usage on qemu_fflush()

2023-05-04 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Thu, May 04, 2023 at 01:38:41PM +0200, Juan Quintela wrote: >> That is the moment we know we have transferred something. >> >> Signed-off-by: Juan Quintela >> --- >> migration/qemu-file.c | 7 +++ >> 1 file changed, 3 insertions(+), 4 deletions(-) >> >> diff

Re: [PATCH 8/9] qemu-file: Make ram_control_save_page() use accessors for rate_limit

2023-05-04 Thread Peter Xu
On Thu, May 04, 2023 at 01:38:40PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v4 5/5] igb: packet-split descriptors support

2023-05-04 Thread Akihiko Odaki
On 2023/05/04 22:10, Tomasz Dzieciol wrote: Packet-split descriptors are used by Linux VF driver for MTU values from 2048 Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 368 ++-- hw/net/igb_regs.h | 8 + hw/net/trace-events | 2 +- 3

[PATCH v2 1/2] target/arm: Don't allow stage 2 page table walks to downgrade to NS

2023-05-04 Thread Peter Maydell
Bit 63 in a Table descriptor is only the NSTable bit for stage 1 translations; in stage 2 it is RES0. We were incorrectly looking at it all the time. This causes problems if: * the stage 2 table descriptor was incorrectly setting the RES0 bit * we are doing a stage 2 translation in Secure

Re: [PATCH v3 02/57] accel/tcg: Add cpu_in_serial_context

2023-05-04 Thread Peter Maydell
On Tue, 25 Apr 2023 at 20:33, Richard Henderson wrote: > > Like cpu_in_exclusive_context, but also true if > there is no other cpu against which we could race. > > Use it in tb_flush as a direct replacement. > Use it in cpu_loop_exit_atomic to ensure that there > is no loop against

Re: [PATCH v2 12/20] mirror: Require GRAPH_RDLOCK for accessing a node's parent list

2023-05-04 Thread Kevin Wolf
Am 04.05.2023 um 15:17 hat Eric Blake geschrieben: > On Thu, May 04, 2023 at 01:57:42PM +0200, Kevin Wolf wrote: > > This adds GRAPH_RDLOCK annotations to declare that functions accessing > > the parent list of a node need to hold a reader lock for the graph. As > > it happens, they already do. >

Re: [PATCH 2/2] target/arm: Move helper-{a64,mve,sme,sve}.h to tcg/

2023-05-04 Thread Fabiano Rosas
Richard Henderson writes: > While we cannot move the main "helper.h" out of target/arm/, > due to usage by generic code, we can move the sub-includes. > > Signed-off-by: Richard Henderson Reviewed-by: Fabiano Rosas

Re: [PATCH] migration: Rename xbzrle_enabled xbzrle_started

2023-05-04 Thread Peter Xu
On Thu, May 04, 2023 at 01:53:23PM +0200, Juan Quintela wrote: > Otherwise it is confusing with the function xbzrle_enabled(). > > Suggested-by: Daniel P. Berrangé > Signed-off-by: Juan Quintela > --- > migration/ram.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > >

Re: [PATCH 3/9] qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t

2023-05-04 Thread Daniel P . Berrangé
On Thu, May 04, 2023 at 01:38:35PM +0200, Juan Quintela wrote: > It is really size_t. Everything else uses uint64_t, so move this to > uint64_t as well. A size can't be negative anyways. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 6 +++--- > migration/qemu-file.c | 8

Re: [PATCH] 9pfs/xen: Fix segfault on shutdown

2023-05-04 Thread Michael Tokarev
02.05.2023 17:37, Jason Andryuk wrote: xen_9pfs_free can't use gnttabdev since it is already closed and NULL-ed out when free is called. Do the teardown in _disconnect(). This matches the setup done in _connect(). Ping? /mjt

[PATCH v4 3/5] igb: RX descriptors handling cleanup

2023-05-04 Thread Tomasz Dzieciol
Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes. Signed-off-by: Tomasz Dzieciol --- hw/net/e1000e_core.c | 18 +- hw/net/igb_core.c| 410 ++- hw/net/igb_regs.h| 12

Re: [PATCH 4/9] qemu-file: Make rate_limit_used an uint64_t

2023-05-04 Thread Daniel P . Berrangé
On Thu, May 04, 2023 at 01:38:36PM +0200, Juan Quintela wrote: > Change all the functions that use it. It was already passed as > uint64_t. > > Signed-off-by: Juan Quintela > --- > migration/qemu-file.c | 4 ++-- > migration/qemu-file.h | 2 +- > 2 files changed, 3 insertions(+), 3

Re: [PATCH 0/9] QEMU file cleanups

2023-05-04 Thread Juan Quintela
Peter Xu wrote: > On Thu, May 04, 2023 at 04:56:46PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Thu, May 04, 2023 at 01:38:32PM +0200, Juan Quintela wrote: >> >> - convince and review code to see that everything is uint64_t. >> > >> > One general question to patches regarding this -

Re: [PATCH 0/4] vhost-user-fs: Internal migration

2023-05-04 Thread Hanna Czenczek
On 11.04.23 17:05, Hanna Czenczek wrote: [...] Hanna Czenczek (4): vhost: Re-enable vrings after setting features vhost-user: Interface for migration state transfer vhost: Add high-level state save/load functions vhost-user-fs: Implement internal migration I’m trying to write v2,

Re: [PATCH 5/5] migration/rdma: Check for postcopy sooner

2023-05-04 Thread Daniel P . Berrangé
On Thu, May 04, 2023 at 01:44:43PM +0200, Juan Quintela wrote: > It makes no sense first try to see if there is an rdma error and then > do nothing on postcopy stage. Change it so we check we are in > postcopy before doing anything. > > Signed-off-by: Juan Quintela > --- > migration/rdma.c |

[PATCH v5 13/44] target/loongarch: Implement vmax/vmin

2023-05-04 Thread Song Gao
This patch includes: - VMAX[I].{B/H/W/D}[U]; - VMIN[I].{B/H/W/D}[U]. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 33 target/loongarch/helper.h | 18 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 200

[PATCH v5 42/44] target/loongarch: Implement vldi

2023-05-04 Thread Song Gao
This patch includes: - VLDI. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 7 + target/loongarch/insn_trans/trans_lsx.c.inc | 137 target/loongarch/insns.decode | 4 + 3 files changed, 148

[PATCH v5 23/44] target/loongarch: Implement vsllwil vextl

2023-05-04 Thread Song Gao
This patch includes: - VSLLWIL.{H.B/W.H/D.W}; - VSLLWIL.{HU.BU/WU.HU/DU.WU}; - VEXTL.Q.D, VEXTL.QU.DU. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 9 + target/loongarch/helper.h | 9 +

[PATCH v5 09/44] target/loongarch: Implement vaddw/vsubw

2023-05-04 Thread Song Gao
This patch includes: - VADDW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - VSUBW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - VADDW{EV/OD}.{H.BU.B/W.HU.H/D.WU.W/Q.DU.D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 43 ++ target/loongarch/helper.h

[PATCH v5 15/44] target/loongarch: Implement vmadd/vmsub/vmaddw{ev/od}

2023-05-04 Thread Song Gao
This patch includes: - VMADD.{B/H/W/D}; - VMSUB.{B/H/W/D}; - VMADDW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - VMADDW{EV/OD}.{H.BU.B/W.HU.H/D.WU.W/Q.DU.D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 34 ++ target/loongarch/helper.h

[PATCH v5 26/44] target/loongarch: Implement vsrlrn vsrarn

2023-05-04 Thread Song Gao
This patch includes: - VSRLRN.{B.H/H.W/W.D}; - VSRARN.{B.H/H.W/W.D}; - VSRLRNI.{B.H/H.W/W.D/D.Q}; - VSRARNI.{B.H/H.W/W.D/D.Q}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 16 +++ target/loongarch/helper.h | 16 +++

[PATCH v5 05/44] target/loongarch: Implement vaddi/vsubi

2023-05-04 Thread Song Gao
This patch includes: - VADDI.{B/H/W/D}U; - VSUBI.{B/H/W/D}U. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 14 target/loongarch/insn_trans/trans_lsx.c.inc | 37 + target/loongarch/insns.decode

[PATCH v5 24/44] target/loongarch: Implement vsrlr vsrar

2023-05-04 Thread Song Gao
This patch includes: - VSRLR[I].{B/H/W/D}; - VSRAR[I].{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 18 target/loongarch/helper.h | 18 target/loongarch/insn_trans/trans_lsx.c.inc | 18

[PATCH v5 31/44] target/loongarch: Implement vbitclr vbitset vbitrev

2023-05-04 Thread Song Gao
This patch includes: - VBITCLR[I].{B/H/W/D}; - VBITSET[I].{B/H/W/D}; - VBITREV[I].{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 25 ++ target/loongarch/helper.h | 27 ++

[PATCH v5 41/44] target/loongarch: Implement vld vst

2023-05-04 Thread Song Gao
This patch includes: - VLD[X], VST[X]; - VLDREPL.{B/H/W/D}; - VSTELM.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 34 + target/loongarch/insn_trans/trans_lsx.c.inc | 159

[PATCH v5 43/44] target/loongarch: Use {set/get}_gpr replace to cpu_fpr

2023-05-04 Thread Song Gao
Introduce set_fpr() and get_fpr() and remove cpu_fpr. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- .../loongarch/insn_trans/trans_farith.c.inc | 72 +++ target/loongarch/insn_trans/trans_fcmp.c.inc | 12 ++-- .../loongarch/insn_trans/trans_fmemory.c.inc | 37

[PATCH v5 11/44] target/loongarch: Implement vabsd

2023-05-04 Thread Song Gao
This patch includes: - VABSD.{B/H/W/D}[U]. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 9 ++ target/loongarch/helper.h | 9 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 95 +

[PATCH v5 37/44] target/loongarch: Implement vbitsel vset

2023-05-04 Thread Song Gao
This patch includes: - VBITSEL.V; - VBITSELI.B; - VSET{EQZ/NEZ}.V; - VSETANYEQZ.{B/H/W/D}; - VSETALLNEZ.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 20 ++ target/loongarch/helper.h | 11 +++

[PATCH v5 28/44] target/loongarch: Implement vssrlrn vssrarn

2023-05-04 Thread Song Gao
This patch includes: - VSSRLRN.{B.H/H.W/W.D}; - VSSRARN.{B.H/H.W/W.D}; - VSSRLRN.{BU.H/HU.W/WU.D}; - VSSRARN.{BU.H/HU.W/WU.D}; - VSSRLRNI.{B.H/H.W/W.D/D.Q}; - VSSRARNI.{B.H/H.W/W.D/D.Q}; - VSSRLRNI.{BU.H/HU.W/WU.D/DU.Q}; - VSSRARNI.{BU.H/HU.W/WU.D/DU.Q}. Reviewed-by: Richard Henderson

[PATCH v5 14/44] target/loongarch: Implement vmul/vmuh/vmulw{ev/od}

2023-05-04 Thread Song Gao
This patch includes: - VMUL.{B/H/W/D}; - VMUH.{B/H/W/D}[U]; - VMULW{EV/OD}.{H.B/W.H/D.W/Q.D}[U]; - VMULW{EV/OD}.{H.BU.B/W.HU.H/D.WU.W/Q.DU.D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 38 ++ target/loongarch/helper.h

[PATCH v5 07/44] target/loongarch: Implement vsadd/vssub

2023-05-04 Thread Song Gao
This patch includes: - VSADD.{B/H/W/D}[U]; - VSSUB.{B/H/W/D}[U]. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 17 + target/loongarch/insn_trans/trans_lsx.c.inc | 17 + target/loongarch/insns.decode

[PATCH v5 35/44] target/loongarch: Implement vseq vsle vslt

2023-05-04 Thread Song Gao
This patch includes: - VSEQ[I].{B/H/W/D}; - VSLE[I].{B/H/W/D}[U]; - VSLT[I].{B/H/W/D/}[U]. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 43 + target/loongarch/helper.h | 23 +++

[PATCH v5 19/44] target/loongarch: Implement vsigncov

2023-05-04 Thread Song Gao
This patch includes: - VSIGNCOV.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 5 ++ target/loongarch/helper.h | 5 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 53 +

[PATCH v5 33/44] target/loongarch: Implement LSX fpu arith instructions

2023-05-04 Thread Song Gao
This patch includes: - VF{ADD/SUB/MUL/DIV}.{S/D}; - VF{MADD/MSUB/NMADD/NMSUB}.{S/D}; - VF{MAX/MIN}.{S/D}; - VF{MAXA/MINA}.{S/D}; - VFLOGB.{S/D}; - VFCLASS.{S/D}; - VF{SQRT/RECIP/RSQRT}.{S/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/cpu.h

[PATCH v5 25/44] target/loongarch: Implement vsrln vsran

2023-05-04 Thread Song Gao
This patch includes: - VSRLN.{B.H/H.W/W.D}; - VSRAN.{B.H/H.W/W.D}; - VSRLNI.{B.H/H.W/W.D/D.Q}; - VSRANI.{B.H/H.W/W.D/D.Q}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 16 +++ target/loongarch/helper.h | 16 +++

[PATCH v5 02/44] target/loongarch: meson.build support build LSX

2023-05-04 Thread Song Gao
Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_lsx.c.inc | 5 + target/loongarch/lsx_helper.c | 6 ++ target/loongarch/meson.build| 1 + target/loongarch/translate.c| 1 + 4 files changed, 13

[PATCH v5 27/44] target/loongarch: Implement vssrln vssran

2023-05-04 Thread Song Gao
This patch includes: - VSSRLN.{B.H/H.W/W.D}; - VSSRAN.{B.H/H.W/W.D}; - VSSRLN.{BU.H/HU.W/WU.D}; - VSSRAN.{BU.H/HU.W/WU.D}; - VSSRLNI.{B.H/H.W/W.D/D.Q}; - VSSRANI.{B.H/H.W/W.D/D.Q}; - VSSRLNI.{BU.H/HU.W/WU.D/DU.Q}; - VSSRANI.{BU.H/HU.W/WU.D/DU.Q}. Reviewed-by: Richard Henderson Signed-off-by:

[PATCH v5 34/44] target/loongarch: Implement LSX fpu fcvt instructions

2023-05-04 Thread Song Gao
This patch includes: - VFCVT{L/H}.{S.H/D.S}; - VFCVT.{H.S/S.D}; - VFRINT[{RNE/RZ/RP/RM}].{S/D}; - VFTINT[{RNE/RZ/RP/RM}].{W.S/L.D}; - VFTINT[RZ].{WU.S/LU.D}; - VFTINT[{RNE/RZ/RP/RM}].W.D; - VFTINT[{RNE/RZ/RP/RM}]{L/H}.L.S; - VFFINT.{S.W/D.L}[U]; - VFFINT.S.L, VFFINT{L/H}.D.W. Reviewed-by: Richard

[PATCH v5 29/44] target/loongarch: Implement vclo vclz

2023-05-04 Thread Song Gao
This patch includes: - VCLO.{B/H/W/D}; - VCLZ.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 9 ++ target/loongarch/helper.h | 9 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 9 ++

Re: [PATCH 6/9] target/s390x: Finish conversion to tcg_gen_qemu_{ld,st}_*

2023-05-04 Thread Ilya Leoshkevich
On Tue, 2023-05-02 at 14:57 +0100, Richard Henderson wrote: > Convert away from the old interface with the implicit > MemOp argument. > > Signed-off-by: Richard Henderson > --- >  target/s390x/tcg/translate.c | 152 - > -- >  1 file changed, 71 insertions(+), 81

[PATCH v5 00/44] Add LoongArch LSX instructions

2023-05-04 Thread Song Gao
Hi, This series adds LoongArch LSX instructions. About test: V2 we use RISU test the LoongArch LSX instructions. QEMU: https://github.com/loongson/qemu/tree/tcg-old-abi-support-lsx RISU: https://github.com/loongson/risu/tree/loongarch-suport-lsx Build test: make

[PATCH v5 04/44] target/loongarch: Implement vadd/vsub

2023-05-04 Thread Song Gao
This patch includes: - VADD.{B/H/W/D/Q}; - VSUB.{B/H/W/D/Q}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 23 +++ target/loongarch/insn_trans/trans_lsx.c.inc | 69 + target/loongarch/insns.decode

[PATCH v5 01/44] target/loongarch: Add LSX data type VReg

2023-05-04 Thread Song Gao
Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- linux-user/loongarch64/signal.c | 4 +- target/loongarch/cpu.c | 2 +- target/loongarch/cpu.h | 21 - target/loongarch/gdbstub.c | 4 +- target/loongarch/internals.h| 22 +

[PATCH v5 21/44] target/loongarch: Implement LSX logic instructions

2023-05-04 Thread Song Gao
This patch includes: - V{AND/OR/XOR/NOR/ANDN/ORN}.V; - V{AND/OR/XOR/NOR}I.B. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 12 + target/loongarch/helper.h | 2 + target/loongarch/insn_trans/trans_lsx.c.inc | 56

[PATCH v5 06/44] target/loongarch: Implement vneg

2023-05-04 Thread Song Gao
This patch includes; - VNEG.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 10 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 20 target/loongarch/insns.decode | 7 +++ 3

[PATCH v5 18/44] target/loongarch: Implement vexth

2023-05-04 Thread Song Gao
This patch includes: - VEXTH.{H.B/W.H/D.W/Q.D}; - VEXTH.{HU.BU/WU.HU/DU.WU/QU.DU}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 9 ++ target/loongarch/helper.h | 9 ++

[PATCH v5 03/44] target/loongarch: Add CHECK_SXE maccro for check LSX enable

2023-05-04 Thread Song Gao
Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/cpu.c | 2 ++ target/loongarch/cpu.h | 2 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 11 +++ 3 files changed, 15 insertions(+) diff --git

[PATCH v5 32/44] target/loongarch: Implement vfrstp

2023-05-04 Thread Song Gao
This patch includes: - VFRSTP[I].{B/H}. Acked-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 5 +++ target/loongarch/helper.h | 5 +++ target/loongarch/insn_trans/trans_lsx.c.inc | 5 +++ target/loongarch/insns.decode

[PATCH v5 40/44] target/loongarch: Implement vilvl vilvh vextrins vshuf

2023-05-04 Thread Song Gao
This patch includes: - VILV{L/H}.{B/H/W/D}; - VSHUF.{B/H/W/D}; - VSHUF4I.{B/H/W/D}; - VPERMI.W; - VEXTRINS.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 25 target/loongarch/helper.h | 25

[PATCH v5 39/44] target/loongarch: Implement vreplve vpack vpick

2023-05-04 Thread Song Gao
This patch includes: - VREPLVE[I].{B/H/W/D}; - VBSLL.V, VBSRL.V; - VPACK{EV/OD}.{B/H/W/D}; - VPICK{EV/OD}.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 35 + target/loongarch/helper.h | 18 +++

[PATCH v5 22/44] target/loongarch: Implement vsll vsrl vsra vrotr

2023-05-04 Thread Song Gao
This patch includes: - VSLL[I].{B/H/W/D}; - VSRL[I].{B/H/W/D}; - VSRA[I].{B/H/W/D}; - VROTR[I].{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 36 + target/loongarch/insn_trans/trans_lsx.c.inc | 36

[PATCH v5 20/44] target/loongarch: Implement vmskltz/vmskgez/vmsknz

2023-05-04 Thread Song Gao
This patch includes: - VMSKLTZ.{B/H/W/D}; - VMSKGEZ.B; - VMSKNZ.B. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 7 ++ target/loongarch/helper.h | 7 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 7 ++

[PATCH v5 30/44] target/loongarch: Implement vpcnt

2023-05-04 Thread Song Gao
This patch includes: - VPCNT.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 5 + target/loongarch/helper.h | 5 + target/loongarch/insn_trans/trans_lsx.c.inc | 5 +

[PATCH v5 17/44] target/loongarch: Implement vsat

2023-05-04 Thread Song Gao
This patch includes: - VSAT.{B/H/W/D}[U]. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 9 ++ target/loongarch/helper.h | 9 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 101

[PATCH v5 12/44] target/loongarch: Implement vadda

2023-05-04 Thread Song Gao
This patch includes: - VADDA.{B/H/W/D}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 5 ++ target/loongarch/helper.h | 5 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 53 +

[PATCH v5 44/44] target/loongarch: CPUCFG support LSX

2023-05-04 Thread Song Gao
Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 55d7f9255e..c0afc21b2f 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -388,6 +388,7 @@

[PATCH v5 08/44] target/loongarch: Implement vhaddw/vhsubw

2023-05-04 Thread Song Gao
This patch includes: - VHADDW.{H.B/W.H/D.W/Q.D/HU.BU/WU.HU/DU.WU/QU.DU}; - VHSUBW.{H.B/W.H/D.W/Q.D/HU.BU/WU.HU/DU.WU/QU.DU}. Reviewed-by: Richard Henderson Signed-off-by: Song Gao --- target/loongarch/disas.c| 17 + target/loongarch/helper.h | 18 +

Re: [PULL 11/35] arm/Kconfig: Do not build TCG-only boards on a KVM-only build

2023-05-04 Thread Fabiano Rosas
Thomas Huth writes: > On 02/05/2023 14.14, Peter Maydell wrote: >> From: Fabiano Rosas >> >> Move all the CONFIG_FOO=y from default.mak into "default y if TCG" >> statements in Kconfig. That way they won't be selected when >> CONFIG_TCG=n. >> >> I'm leaving CONFIG_ARM_VIRT in default.mak

Re: [PATCH v4 2/2] meson: Deserialize the man pages and html builds

2023-05-04 Thread Fabiano Rosas
Peter Maydell writes: > On Wed, 3 May 2023 at 21:39, Fabiano Rosas wrote: >> >> For the documentation builds (man pages & manual), we let Sphinx >> decide when to rebuild and use a depfile to know when to trigger the >> make target. >> >> We currently use a trick of having the man pages

Re: [PATCH v10 7/8] raven: disable reentrancy detection for iomem

2023-05-04 Thread Darren Kenny
On Thursday, 2023-04-27 at 17:10:12 -04, Alexander Bulekov wrote: > As the code is designed for re-entrant calls from raven_io_ops to > pci-conf, mark raven_io_ops as reentrancy-safe. > > Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny > --- > hw/pci-host/raven.c | 7 +++ > 1

[PATCH v2 16/20] block: Mark BlockDriver callbacks for amend job GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito This adds GRAPH_RDLOCK annotations to declare that callers of amend callbacks in BlockDriver need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi

[PATCH v2 13/20] block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_get_allocated_file_size() need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/block/block-io.h

[PATCH v2 07/20] graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock

2023-05-04 Thread Kevin Wolf
GRAPH_RDLOCK_GUARD() and GRAPH_RDLOCK_GUARD_MAINLOOP() only take a reader lock for the graph, so the correct annotation for them to use is TSA_ASSERT_SHARED rather than TSA_ASSERT. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/block/graph-lock.h | 16 1 file

[PATCH v2 09/20] nbd: Remove nbd_co_flush() wrapper function

2023-05-04 Thread Kevin Wolf
The only thing nbd_co_flush() does is call nbd_client_co_flush(). Just use that function directly in the BlockDriver definitions and remove the wrapper. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/nbd.c | 11 +++ 1 file changed, 3

[PATCH v2 15/20] block: Mark bdrv_co_debug_event() GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_debug_event() need to hold a reader lock for the graph. Unfortunately we cannot use a co_wrapper_bdrv_rdlock (i.e. make the coroutine wrapper a no_coroutine_fn), because the function is called

[PATCH v2 18/20] block: Mark bdrv_query_block_graph_info() and callers GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_query_block_graph_info() need to hold a reader lock for the graph because it accesses the children list of a node. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- include/block/qapi.h | 7

[PATCH v2 12/20] mirror: Require GRAPH_RDLOCK for accessing a node's parent list

2023-05-04 Thread Kevin Wolf
This adds GRAPH_RDLOCK annotations to declare that functions accessing the parent list of a node need to hold a reader lock for the graph. As it happens, they already do. Signed-off-by: Kevin Wolf --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 08/20] block: .bdrv_open is non-coroutine and unlocked

2023-05-04 Thread Kevin Wolf
Drivers were a bit confused about whether .bdrv_open can run in a coroutine and whether or not it holds a graph lock. It cannot keep a graph lock from the caller across the whole function because it both changes the graph (requires a writer lock) and does I/O (requires a reader lock). Therefore,

[PATCH v2 05/20] test-bdrv-drain: Don't modify the graph in coroutines

2023-05-04 Thread Kevin Wolf
test-bdrv-drain contains a few test cases that are run both in coroutine and non-coroutine context. Running the entire code including the setup and shutdown in coroutines is incorrect because graph modifications can generally not happen in coroutines. Change the test so that creating and

[PATCH v2 11/20] vhdx: Require GRAPH_RDLOCK for accessing a node's parent list

2023-05-04 Thread Kevin Wolf
This adds GRAPH_RDLOCK annotations to declare that functions accessing the parent list of a node need to hold a reader lock for the graph. As it happens, they already do. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/vhdx.c | 9 + 1 file

[PATCH v2 04/20] block: Don't call no_coroutine_fns in qmp_block_resize()

2023-05-04 Thread Kevin Wolf
This QMP handler runs in a coroutine, so it must use the corresponding no_co_wrappers instead. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- blockdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index

[PATCH v2 20/20] block: Mark bdrv_refresh_limits() and callers GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_refresh_limits() need to hold a reader lock for the graph because it accesses the children list of a node. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- include/block/block-global-state.h |

[PATCH v2 19/20] block: Mark bdrv_recurse_can_replace() and callers GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_recurse_can_replace() need to hold a reader lock for the graph because it accesses the children list of a node. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi ---

[PATCH v2 02/20] block: Consistently call bdrv_activate() outside coroutine

2023-05-04 Thread Kevin Wolf
Migration code can call bdrv_activate() in coroutine context, whereas other callers call it outside of coroutines. As it calls other code that is not supposed to run in coroutines, standardise on running outside of coroutines. This adds a no_co_wrapper to switch to the main loop before calling

[PATCH v2 10/20] nbd: Mark nbd_co_do_establish_connection() and callers GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito This adds GRAPH_RDLOCK annotations to declare that callers of nbd_co_do_establish_connection() need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi

[PATCH v2 01/20] qcow2: Don't call bdrv_getlength() in coroutine_fns

2023-05-04 Thread Kevin Wolf
There is a bdrv_co_getlength() now, which should be used in coroutine context. This requires adding GRAPH_RDLOCK to some functions so that this still compiles with TSA because bdrv_co_getlength() is GRAPH_RDLOCK. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi

[PATCH v2 06/20] graph-lock: Add GRAPH_UNLOCKED(_PTR)

2023-05-04 Thread Kevin Wolf
For some functions, it is part of their interface to be called without holding the graph lock. Add a new macro to document this. The macro expands to TSA_EXCLUDES(), which is a relatively weak check because it passes in cases where the compiler just doesn't know if the lock is held. Function

[PATCH v2 14/20] block: Mark bdrv_co_get_info() and callers GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_co_get_info() need to hold a reader lock for the graph. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi ---

[PATCH v2 17/20] block: Mark bdrv_query_bds_stats() and callers GRAPH_RDLOCK

2023-05-04 Thread Kevin Wolf
This adds GRAPH_RDLOCK annotations to declare that callers of bdrv_query_bds_stats() need to hold a reader lock for the graph because it accesses the children list of a node. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qapi.c | 6 -- 1 file

[PATCH v2 00/20] Graph locking, part 3 (more block drivers)

2023-05-04 Thread Kevin Wolf
The first few patches in this series fix coroutine correctness problems that have existed for a while, but only actually start to make things fail in practice with stricter checks that we're going to introduce with the graph locking work. The rest of the series makes sure that the graph lock is

[PATCH v2 03/20] block: bdrv/blk_co_unref() for calls in coroutine context

2023-05-04 Thread Kevin Wolf
These functions must not be called in coroutine context, because they need write access to the graph. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- include/block/block-global-state.h | 3 ++- include/sysemu/block-backend-global-state.h | 5 -

[PATCH] migration: Rename xbzrle_enabled xbzrle_started

2023-05-04 Thread Juan Quintela
Otherwise it is confusing with the function xbzrle_enabled(). Suggested-by: Daniel P. Berrangé Signed-off-by: Juan Quintela --- migration/ram.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 43338e1f5b..06015eeb0b

[PATCH 5/5] migration/rdma: Check for postcopy sooner

2023-05-04 Thread Juan Quintela
It makes no sense first try to see if there is an rdma error and then do nothing on postcopy stage. Change it so we check we are in postcopy before doing anything. Signed-off-by: Juan Quintela --- migration/rdma.c | 34 +- 1 file changed, 17 insertions(+), 17

[PATCH 3/5] migration/rdma: We can calculate the rioc from the QEMUFile

2023-05-04 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/rdma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 5b82085bd7..17c4b9206f 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3811,9 +3811,10 @@ out: * the source. */

[PATCH 2/5] migration/rdma: simplify ram_control_load_hook()

2023-05-04 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/qemu-file.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 309b4c56f4..112ba742fd 100644 --- a/migration/qemu-file.c +++ b/migration/qemu-file.c @@ -338,10 +338,8 @@ void

[PATCH 4/5] migration/rdma: It makes no sense to recive that flag without RDMA

2023-05-04 Thread Juan Quintela
This could only happen if the source send RAM_SAVE_FLAG_HOOK (i.e. rdma) and destination don't have CONFIG_RDMA. Signed-off-by: Juan Quintela --- migration/qemu-file.c | 8 1 file changed, 8 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index

[PATCH 0/5] Migration RDMA cleanup

2023-05-04 Thread Juan Quintela
Hi This is the part of the series in QEMUFileHook removal that are just RDMA cleanup. Please, review. Based on my previous series of qemu-file cleanups. Subject: [PATCH 0/9] QEMU file cleanups Based-on: Message-Id: <20230504113841.23130-1-quint...@redhat.com> Juan Quintela (5): migration:

[PATCH 1/5] migration: Make RAM_SAVE_FLAG_HOOK a normal case entry

2023-05-04 Thread Juan Quintela
Fixes this commit, clearly a bad merge after a rebase or similar, it should have been its own case since that point. commit 5b0e9dd46fbda5152566a4a26fd96bc0d0452bf7 Author: Peter Lieven Date: Tue Jun 24 11:32:36 2014 +0200 migration: catch unknown flag combinations in ram_load

[PATCH 3/9] qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t

2023-05-04 Thread Juan Quintela
It is really size_t. Everything else uses uint64_t, so move this to uint64_t as well. A size can't be negative anyways. Signed-off-by: Juan Quintela --- migration/migration.c | 6 +++--- migration/qemu-file.c | 8 migration/qemu-file.h | 4 ++-- 3 files changed, 9 insertions(+), 9

[PATCH 9/9] qemu-file: Account for rate_limit usage on qemu_fflush()

2023-05-04 Thread Juan Quintela
That is the moment we know we have transferred something. Signed-off-by: Juan Quintela --- migration/qemu-file.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index ddebfac847..309b4c56f4 100644 ---

[PATCH 5/9] qemu-file: No need to check for shutdown in qemu_file_rate_limit

2023-05-04 Thread Juan Quintela
After calling qemu_file_shutdown() we set the error as -EIO if there is no another previous error, so no need to check it here. Signed-off-by: Juan Quintela --- migration/qemu-file.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index

[PATCH 7/9] qemu-file: Make total_transferred an uint64_t

2023-05-04 Thread Juan Quintela
Change all the functions that use it. It was already passed as uint64_t. Signed-off-by: Juan Quintela --- migration/block.c | 5 ++--- migration/qemu-file.c | 8 migration/qemu-file.h | 4 ++-- migration/savevm.c| 6 ++ migration/vmstate.c | 2 +- 5 files changed, 11

[PATCH 4/9] qemu-file: Make rate_limit_used an uint64_t

2023-05-04 Thread Juan Quintela
Change all the functions that use it. It was already passed as uint64_t. Signed-off-by: Juan Quintela --- migration/qemu-file.c | 4 ++-- migration/qemu-file.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index

[PATCH 8/9] qemu-file: Make ram_control_save_page() use accessors for rate_limit

2023-05-04 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/qemu-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index e97d180f17..ddebfac847 100644 --- a/migration/qemu-file.c +++ b/migration/qemu-file.c @@ -362,7 +362,7 @@ size_t

[PATCH 1/9] migration: max_postcopy_bandwidth is a size parameter

2023-05-04 Thread Juan Quintela
So make everything that uses it uint64_t no int64_t. Signed-off-by: Juan Quintela --- migration/migration.c | 4 ++-- migration/options.c | 2 +- migration/options.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index

[PATCH 0/9] QEMU file cleanups

2023-05-04 Thread Juan Quintela
Hi While I am trying to put order in the atomic counters, I made in this series: - convince and review code to see that everything is uint64_t. - f->shutdown is not needed. When we shutdown the file we put an error there if there is none. So remove it. - Make more clear how we use

[PATCH 6/9] qemu-file: remove shutdown member

2023-05-04 Thread Juan Quintela
The first thing that we do after setting the shutdown value is set the error as -EIO if there is not a previous error. So this value is reduntant. Just remove it and use qemu_file_get_error() in the places that it was tested. Signed-off-by: Juan Quintela --- migration/qemu-file.c | 10

[PATCH 2/9] migration: qemu_file_total_transferred() function is monotonic

2023-05-04 Thread Juan Quintela
So delta_bytes can only be greater or equal to zero. Never negative. Signed-off-by: Juan Quintela --- migration/block.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/migration/block.c b/migration/block.c index 6d532ac7a2..3499f75e37 100644 --- a/migration/block.c

<    1   2   3   4   5   >