Re: [PATCH 05/10] vhost-backend: avoid overflow on memslots_limit

2021-11-11 Thread Roman Kagan
On Thu, Nov 11, 2021 at 06:59:43PM +0100, Philippe Mathieu-Daudé wrote: > On 11/11/21 16:33, Roman Kagan wrote: > > Fix the (hypothetical) potential problem when the value parsed out of > > the vhost module parameter in sysfs overflows the return value from > > vhost_kernel_memslots_limit. > > > >

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

2021-11-11 Thread Richard Henderson
On 11/12/21 7:53 AM, Song Gao wrote: +const char * const fccregnames[8] = { + "$fcc0", "$fcc1", "$fcc2", "$fcc3", "$fcc4", "$fcc5", "$fcc6", "$fcc7", +}; static. +static void output_fcsrdrj(DisasContext *ctx, arg_fmt_fcsrdrj *a, + const char *mnemonic) +{ +outpu

Re: [PATCH 01/10] vhost-user-blk: reconnect on any error during realize

2021-11-11 Thread Roman Kagan
On Thu, Nov 11, 2021 at 06:52:30PM +0100, Kevin Wolf wrote: > Am 11.11.2021 um 16:33 hat Roman Kagan geschrieben: > > vhost-user-blk realize only attempts to reconnect if the previous > > connection attempt failed on "a problem with the connection and not an > > error related to the content (which

[PATCH] Revert "device-crash-test: Ignore errors about a bus not being available"

2021-11-11 Thread Thomas Huth
This reverts commit ca89d15f8e42f2e5eac5bd200af38fdbfb32e875. There is already an entry for this kind of messages earlier in the ERROR_RULE_LIST - when I added this patch, I just got fooled by the other errors that occur due to a race between QMP connection and QEMU terminating early (which still

Re: [PATCH 0/5] python/aqmp: improve support for device-crash-test

2021-11-11 Thread Thomas Huth
On 11/11/2021 15.37, John Snow wrote: When I switched machine.py over to using AQMP, I caused a regression in device-crash-test that caused many spurious errors to be printed during the test, obscuring real test failure cases. This series fixes the vast majority of false positives, though there

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

2021-11-11 Thread Richard Henderson
On 11/12/21 3:14 AM, yangxiaojuan wrote: +#define EXCODE_IP 64 What's this? The manual 6.1.3 says the exception number of an interrupt is the exception number plus an offset of 64. This defines the offset, sorry, the name is bad, maybe change a name or just use 64 dire

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

2021-11-11 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 7de996d..da6a937 100755 --- a/scripts/qemu

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

2021-11-11 Thread Song Gao
This patch adds loongarch64 linux-user default configs file. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- configs/targets/loongarch64-linux-user.mak | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configs/targets/loongarch64-linux-user.ma

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

2021-11-11 Thread Song Gao
This patch adds build loongarch-linux-user target support. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- meson.build | 2 +- target/loongarch/meson.build | 19 +++ target/meson.build | 1 + 3 files changed,

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

2021-11-11 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- configure | 5 ++ linux-user/loongarch64/cpu_loop.c | 97 + linux-user/loongarch64/target_cpu.h | 34 + 3 files changed, 136 insertions(+) create mode 100644 lin

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

2021-11-11 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/target_structs.h | 48 + 1 file changed, 48 insertions(+) create mode 100644 linux-user/loongarch64/target_structs.h diff --git a/linux-user/loongarch64/target_structs.h b/linux-use

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

2021-11-11 Thread Song Gao
This includes: - sockbits.h - target_errno_defs.h - target_fcntl.h - termbits.h Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/sockbits.h | 1 + linux-user/loongarch64/target_errno_defs.h | 7 +++ linux-user/loongarch64/target_fcntl.h | 6 +

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

2021-11-11 Thread Song Gao
We should disable '__BITS_PER_LONG' at [1] before run gensyscalls.sh [1] arch/loongarch/include/uapi/asm/bitsperlong.h Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/syscall_nr.h | 312 linux-user/loongarch64/target_syscall

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

2021-11-11 Thread Song Gao
This includes: - BEQ, BNE, BLT[U], BGE[U] - BEQZ, BNEZ - B - BL - JIRL - BCEQZ, BCNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_branch.c.inc | 82 ++ target/loongarch/insns.decode

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

2021-11-11 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- include/elf.h | 2 ++ linux-user/elfload.c| 58 + linux-user/loongarch64/target_elf.h | 12 3 files changed, 72 insertions(+) create mode 100644 linux-use

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

2021-11-11 Thread Song Gao
This patch adds target state header, target definitions and initialization routines. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/cpu-param.h | 18 +++ target/loongarch/cpu.c | 314 +++ t

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

2021-11-11 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Acked-by: Alex Bennée --- tests/tcg/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 9b76f58..49a05ec 100755 --- a/tests/tcg/configure.sh ++

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

2021-11-11 Thread Song Gao
This patch adds support for disassembling via option '-d in_asm'. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- include/disas/dis-asm.h | 2 + meson.build | 1 + target/loongarch/disas.c | 696 +++ 3 files changed, 699 ins

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

2021-11-11 Thread Song Gao
Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/signal.c| 162 + linux-user/loongarch64/target_signal.h | 29 ++ 2 files changed, 191 insertions(+) create mode 100644 linux-user/loongarch64/signal.c create mode 100644

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

2021-11-11 Thread Song Gao
This includes: - FMOV.{S/D} - FSEL - MOVGR2FR.{W/D}, MOVGR2FRH.W - MOVFR2GR.{S/D}, MOVFRH2GR.S - MOVGR2FCSR, MOVFCSR2GR - MOVFR2CF, MOVCF2FR - MOVGR2CF, MOVCF2GR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c

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

2021-11-11 Thread Song Gao
This includes: - F{ADD/SUB/MUL/DIV}.{S/D} - F{MADD/MSUB/NMADD/NMSUB}.{S/D} - F{MAX/MIN}.{S/D} - F{MAXA/MINA}.{S/D} - F{ABS/NEG}.{S/D} - F{SQRT/RECIP/RSQRT}.{S/D} - F{SCALEB/LOGB/COPYSIGN}.{S/D} - FCLASS.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --

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

2021-11-11 Thread Song Gao
This includes: - CRC[C].W.{B/H/W/D}.W - SYSCALL - BREAK - ASRT{LE/GT}.D - RDTIME{L/H}.W, RDTIME.D - CPUCFG Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 4 ++ target/loongarch/insn_trans/trans_extra.c.in

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

2021-11-11 Thread Song Gao
This includes: - FLD.{S/D}, FST.{S/D} - FLDX.{S/D}, FSTX.{S/D} - FLD{GT/LE}.{S/D}, FST{GT/LE}.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_fmemory.c.inc | 184 target/loongarch/insns.dec

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

2021-11-11 Thread Song Gao
This includes: - EXT.W.{B/H} - CL{O/Z}.{W/D}, CT{O/Z}.{W/D} - BYTEPICK.{W/D} - REVB.{2H/4H/2W/D} - REVH.{2W/D} - BITREV.{4B/8B}, BITREV.{W/D} - BSTRINS.{W/D}, BSTRPICK.{W/D} - MASKEQZ, MASKNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loonga

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

2021-11-11 Thread Song Gao
This includes: - ADD.{W/D}, SUB.{W/D} - ADDI.{W/D}, ADDU16ID - ALSL.{W[U]/D} - LU12I.W, LU32I.D LU52I.D - SLT[U], SLT[U]I - PCADDI, PCADDU12I, PCADDU18I, PCALAU12I - AND, OR, NOR, XOR, ANDN, ORN - MUL.{W/D}, MULH.{W[U]/D[U]} - MULW.D.W[U] - DIV.{W[U]/D[U]}, MOD.{W[U]/D[U]} - ANDI, ORI, XORI Signed

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

2021-11-11 Thread Song Gao
This includes: - LL.{W/D}, SC.{W/D} - AM{SWAP/ADD/AND/OR/XOR/MAX/MIN}[_DB].{W/D} - AM{MAX/MIN}[_DB].{WU/DU} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_atomic.c.inc | 130 + target/loongarch/i

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

2021-11-11 Thread Song Gao
This includes: - LD.{B[U]/H[U]/W[U]/D}, ST.{B/H/W/D} - LDX.{B[U]/H[U]/W[U]/D}, STX.{B/H/W/D} - LDPTR.{W/D}, STPTR.{W/D} - PRELD - LD{GT/LE}.{B/H/W/D}, ST{GT/LE}.{B/H/W/D} - DBAR, IBAR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helpe

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

2021-11-11 Thread Song Gao
This includes: - FCMP.cond.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 60 target/loongarch/helper.h| 9 + target/loongarch/insn_trans/trans_fc

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

2021-11-11 Thread Song Gao
This includes: - SLL.W, SRL.W, SRA.W, ROTR.W - SLLI.W, SRLI.W, SRAI.W, ROTRI.W - SLL.D, SRL.D, SRA.D, ROTR.D - SLLI.D, SRLI.D, SRAI.D, ROTRI.D Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_shift.c.inc | 128 +++

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

2021-11-11 Thread Song Gao
This includes: - FCVT.S.D, FCVT.D.S - FFINT.{S/D}.{W/L}, FTINT.{W/L}.{S/D} - FTINT{RM/RP/RZ/RNE}.{W/L}.{S/D} - FRINT.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 393 +++ tar

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

2021-11-11 Thread Song Gao
This patch adds main translation routines and basic functions for translation. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h| 6 ++ target/loongarch/op_helper.c | 21 ++ target/loongarch/translate.c | 159 ++

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

2021-11-11 Thread Song Gao
This patch gives an introduction to the LoongArch target. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- MAINTAINERS | 5 target/loongarch/README | 76 + 2 files changed, 81 insertions(+)

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

2021-11-11 Thread Song Gao
Hi all, This series only support linux-user emulation. More about LoongArch at: https://github.com/loongson/ The latest kernel: * https://github.com/loongson/linux/tree/loongarch-next Patches need review: * 0016-target-loongarch-Add-disassembler.patch * 0017-linux-user-Add-LoongArch-generi

Re: [RFC PATCH 5/6] kvm: x86: add KVM_EXIT_MEMORY_ERROR exit

2021-11-11 Thread Chao Peng
On Thu, Nov 11, 2021 at 05:08:47PM +0200, Mika Penttilä wrote: > > > On 11.11.2021 16.13, Chao Peng wrote: > > Currently support to exit to userspace for private/shared memory > > conversion. > > > > Signed-off-by: Sean Christopherson > > Signed-off-by: Yu Zhang > > Signed-off-by: Chao Peng >

[PATCH v5 5/6] migration: Add migrate_use_tls() helper

2021-11-11 Thread Leonardo Bras
A lot of places check parameters.tls_creds in order to evaluate if TLS is in use, and sometimes call migrate_get_current() just for that test. Add new helper function migrate_use_tls() in order to simplify testing for TLS usage. Signed-off-by: Leonardo Bras --- migration/migration.h | 1 + migr

[PATCH v5 4/6] migration: Add zerocopy parameter for QMP/HMP for Linux

2021-11-11 Thread Leonardo Bras
Add property that allows zerocopy migration of memory pages, and also includes a helper function migrate_use_zerocopy() to check if it's enabled. No code is introduced to actually do the migration, but it allow future implementations to enable/disable this feature. On non-Linux builds this parame

[PATCH v5 3/6] QIOChannelSocket: Implement io_writev_zerocopy & io_flush_zerocopy for CONFIG_LINUX

2021-11-11 Thread Leonardo Bras
For CONFIG_LINUX, implement the new optional callbacks io_write_zerocopy and io_flush_zerocopy on QIOChannelSocket, but enables it only when MSG_ZEROCOPY feature is available in the host kernel, which is checked on qio_channel_socket_connect_sync() qio_channel_socket_flush_zerocopy() was implement

[PATCH v5 6/6] multifd: Implement zerocopy write in multifd migration (multifd-zerocopy)

2021-11-11 Thread Leonardo Bras
Implement zerocopy on nocomp_send_write(), by making use of QIOChannel zerocopy interface. Change multifd_send_sync_main() so it can distinguish each iteration sync from the setup and the completion, so a flush_zerocopy() can be called at the after each iteration in order to make sure all dirty pa

[PATCH v5 2/6] QIOChannelSocket: Add flags parameter for writing

2021-11-11 Thread Leonardo Bras
Change qio_channel_socket_writev() in order to accept flags, so its possible to selectively make use of sendmsg() flags. qio_channel_socket_writev() contents were moved to a helper function qio_channel_socket_writev_flags() which accepts an extra argument for flags. (This argument is passed direct

[PATCH v5 1/6] QIOChannel: Add io_writev_zerocopy & io_flush_zerocopy callbacks

2021-11-11 Thread Leonardo Bras
Adds io_writev_zerocopy and io_flush_zerocopy as optional callback to QIOChannelClass, allowing the implementation of zerocopy writes by subclasses. How to use them: - Write data using qio_channel_writev_zerocopy(), - Wait write completion with qio_channel_flush_zerocopy(). Notes: As some zeroco

[PATCH v5 0/6] MSG_ZEROCOPY + multifd

2021-11-11 Thread Leonardo Bras
This patch series intends to enable MSG_ZEROCOPY in QIOChannel, and make use of it for multifd migration performance improvement. Patch #1 creates new callbacks for QIOChannel, allowing the implementation of zerocopy writing. Patch #2 reworks qio_channel_socket_writev() so it accepts flags for

Re: [PATCH v6 01/10] target/ppc: introduce PMUEventType and PMU overflow timers

2021-11-11 Thread David Gibson
On Mon, Nov 08, 2021 at 07:50:38PM -0300, Daniel Henrique Barboza wrote: > This patch starts an IBM Power8+ compatible PMU implementation by adding > the representation of PMU events that we are going to sample, > PMUEventType. This enum represents a Perf event that is being sampled by > a specific

RE: [PATCH v5 4/6] kvm: irqchip: extract kvm_irqchip_add_deferred_msi_route

2021-11-11 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
Hi Paolo, Ping... Do you have any suggestions about this change ? It seems Alex has no objection on this series now, but we need your ACK, thanks. > -Original Message- > From: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > Sent: Wednesday, November 3, 2021 4:17 PM > To: a

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

2021-11-11 Thread Jason Wang
On Thu, Nov 11, 2021 at 5:22 PM Stefan Hajnoczi wrote: > > On Thu, Nov 11, 2021 at 12:41:02PM +0800, Jason Wang wrote: > > > > 在 2021/11/8 下午6:53, Stefan Hajnoczi 写道: > > > On Fri, Nov 05, 2021 at 12:48:17AM +0800, Cindy Lu wrote: > > > > these patches add the support for configure interrupt > > >

Re: [PATCH-for-6.2 v3 6/6] hw/core: Rename smp_parse() -> machine_parse_smp_config()

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 18:03, Philippe Mathieu-Daudé wrote: All methods related to MachineState are prefixed with "machine_". smp_parse() does not need to be an exception. Rename it and const'ify the SMPConfiguration argument, since it doesn't need to be modified. Signed-off-by: Philippe Mathieu-Daudé

RE: [PATCH] net/filter: Enable the vnet_hdr_support by default

2021-11-11 Thread Zhang, Chen
> -Original Message- > From: Markus Armbruster > Sent: Wednesday, November 10, 2021 4:36 PM > To: Zhang, Chen > Cc: Jason Wang ; qemu-dev de...@nongnu.org>; Li Zhijian > Subject: Re: [PATCH] net/filter: Enable the vnet_hdr_support by default > > "Zhang, Chen" writes: > > >> -O

[PATCH for 7.0 V10 5/6] net/colo-compare: Add passthrough list to CompareState

2021-11-11 Thread Zhang Chen
Add passthrough list for each CompareState. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 net/colo-compare.h | 12 2 files changed, 40 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index 9114b687de..df8bc5acce 100644 --- a/

[PATCH for 7.0 V10 4/6] net/colo-compare: Move data structure and define to .h file.

2021-11-11 Thread Zhang Chen
Rename structure with COLO index and move it to .h file, It make other modules can reuse COLO code. Signed-off-by: Zhang Chen --- net/colo-compare.c | 132 - net/colo-compare.h | 86 + 2 files changed, 109 insertions(+), 10

[PATCH for 7.0 V10 2/6] util/qemu-sockets.c: Add inet_parse_base to handle InetSocketAddressBase

2021-11-11 Thread Zhang Chen
No need to carry the flag all the time in many scenarios. Signed-off-by: Zhang Chen --- include/qemu/sockets.h | 1 + util/qemu-sockets.c| 14 ++ 2 files changed, 15 insertions(+) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 0c34bf2398..3a0f8fa8f2 100644 -

[PATCH for 7.0 V10 6/6] net/net.c: Add handler for passthrough filter command

2021-11-11 Thread Zhang Chen
Use the connection protocol,src port,dst port,src ip,dst ip as the key to passthrough certain network traffic in object with network packet processing function. Signed-off-by: Zhang Chen --- net/net.c | 199 +- 1 file changed, 197 insertions(+)

[PATCH for 7.0 V10 3/6] hmp-commands: Add new HMP command for filter passthrough

2021-11-11 Thread Zhang Chen
Add hmp_passthrough_filter_add and hmp_passthrough_filter_del make user can maintain object network passthrough list in human monitor Signed-off-by: Zhang Chen --- hmp-commands.hx | 26 ++ include/monitor/hmp.h | 2 ++ monitor/hmp-cmds.c| 63 +++

[PATCH for 7.0 V10 0/6] Add passthrough support to object with network processing function

2021-11-11 Thread Zhang Chen
This series add passthrough support frame to object with network processing function. The first object is colo-compare. Current colo-compare and net-filters attached on chardev or netdev. It still need more fine-grained network control based on IPFlowSpec. Due to some real user scenarios don't need

[PATCH for 7.0 V10 1/6] qapi/net: Add IPFlowSpec and QMP command for filter passthrough

2021-11-11 Thread Zhang Chen
Since the real user scenario does not need to monitor all traffic. Add passthrough-filter-add and passthrough-filter-del to maintain a network passthrough list in object with network packet processing function. Add IPFlowSpec struct for all QMP commands. Most the fields of IPFlowSpec are optional,e

Re: [PATCH-for-6.2 v3 5/6] tests/unit/test-smp-parse: Constify some pointer/struct

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 18:03, Philippe Mathieu-Daudé wrote: Declare structures const when we don't need to modify them at runtime. Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Yanan Wang Teste

Re: [PATCH-for-6.2 v3 4/6] tests/unit/test-smp-parse: Simplify pointer to compound literal use

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 18:03, Philippe Mathieu-Daudé wrote: We can simply use a local variable (and pass its pointer) instead of a pointer to a compound literal. Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-smp-parse.c | 64 ++--- 1 file changed, 32 inse

Re: [PATCH 1/2] target/ppc: Fixed call to deferred exception

2021-11-11 Thread Yonggang Luo
On Thu, Nov 11, 2021 at 4:42 AM BALATON Zoltan wrote: > > On Wed, 10 Nov 2021, Lucas Mateus Martins Araujo e Castro wrote: > > On 10/11/2021 05:19, Mark Cave-Ayland wrote: > >> On 20/10/2021 13:57, Lucas Mateus Castro (alqotel) wrote: > >>> From: "Lucas Mateus Castro (alqotel)" > >>> > >>> mtfsf,

Re: [PATCH 2/2] virtio: use virtio accessor to access packed event

2021-11-11 Thread Jason Wang
On Thu, Nov 11, 2021 at 3:51 PM Philippe Mathieu-Daudé wrote: > > On 11/11/21 07:38, Jason Wang wrote: > > We used to access packed descriptor event and off_wrap via > > address_space_{write|read}_cached(). When we hit the cache, memcpy() > > is used which is not atomic which may lead a wrong valu

Re: [PATCH-for-6.2 v3 3/6] tests/unit/test-smp-parse: Explicit MachineClass name

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 18:03, Philippe Mathieu-Daudé wrote: If the MachineClass::name pointer is not explicitly set, it is NULL. Per the C standard, passing a NULL pointer to printf "%s" format is undefined. Some implementations display it as 'NULL', other as 'null'. Since we are comparing the formatted

Re: [RFC PATCH v2 04/30] target/loongarch: Define exceptions for LoongArch.

2021-11-11 Thread yangxiaojuan
Hi Richard, On 11/11/2021 09:36 PM, Richard Henderson wrote: > On 11/11/21 2:35 AM, Xiaojuan Yang wrote: >> +++ b/target/loongarch/cpu.h >> @@ -369,8 +369,21 @@ enum { >> EXCP_BREAK, >> EXCP_INE, >> EXCP_FPE, >> - >> -EXCP_LAST = EXCP_FPE, >> +EXCP_IPE, >> +EXCP_TLBL,

Re: [PATCH 1/2] virtio: use virtio accessor to access packed descriptor flags

2021-11-11 Thread Jason Wang
On Thu, Nov 11, 2021 at 4:27 PM Michael S. Tsirkin wrote: > > On Thu, Nov 11, 2021 at 02:38:53PM +0800, Jason Wang wrote: > > We used to access packed descriptor flags via > > address_space_{write|read}_cached(). When we hit the cache, memcpy() > > is used which is not an atomic operation which ma

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

2021-11-11 Thread yangxiaojuan
Hi, Richard, On 11/11/2021 09:29 PM, Richard Henderson wrote: > On 11/11/21 2:35 AM, Xiaojuan Yang wrote: >> +#define LOONGARCH_CSR_MISC 0x3 /* Misc config */ >> + > > Missing bitfield definitions for misc. > At present, there is no read/write to each field of misc register so it is

Re: [PATCH-for-6.2 v3 2/6] tests/unit/test-smp-parse: QOM'ify smp_machine_class_init()

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 18:03, Philippe Mathieu-Daudé wrote: smp_machine_class_init() is the actual TypeInfo::class_init(). Declare it as such in smp_machine_info, and avoid to call it manually in each test. Move smp_machine_info definition just before we register the type to avoid a forward declaration.

Re: [PATCH-for-6.2 v3 1/6] tests/unit/test-smp-parse: Restore MachineClass fields after modifying

2021-11-11 Thread wangyanan (Y)
On 2021/11/11 18:03, Philippe Mathieu-Daudé wrote: There is a single MachineClass object, registered with type_register_static(&smp_machine_info). Since the same object is used multiple times (an MachineState object is instantiated in both test_generic and test_with_dies), we should restore its

Re: [RFC PATCH v2 00/30] Add Loongarch softmmu support.

2021-11-11 Thread yangxiaojuan
Hi, Mark, On 11/11/2021 10:58 PM, Mark Cave-Ayland wrote: > On 11/11/2021 01:34, Xiaojuan Yang wrote: > >> Sorry only part of the v2 patch succeed. I consulted GNU sysadmin, >> He said our mail server was getting temporarily banned by fail2ban. Now the >> ban >> was removed. I resend the v2 seri

Re: [PATCH] q35: flip acpi-pci-hotplug-with-bridge-support default back to off

2021-11-11 Thread Igor Mammedov
On Thu, 11 Nov 2021 10:52:03 +0100 Gerd Hoffmann wrote: > Switch qemu 6.2 back to 6.0 behavior (aka native pcie hotplug) because > acpi hotplug for pcie ports caused all kinds of regressions and a fix > for those is not in sight. > > Add compat property for 6.1 to keep it enabled there. Use a s

Re: [PATCH v4 2/6] net/vmnet: add vmnet backends to qapi/net

2021-11-11 Thread Eric Blake
On Thu, Nov 11, 2021 at 06:21:28PM +0300, Vladislav Yaroshchuk wrote: > > > +# > > > +# Since: 6.2 > > > > Missed 6.2, please adjust. More of the same below. > > > > > The next one is 6.3, isn't it? 7.0, actually, as it will be the first release in 2022. -- Eric Blake, Principal Software Engin

Re: [PATCH-for-6.2] hw/nvme/ctrl: Fix buffer overrun (CVE-2021-3947)

2021-11-11 Thread Klaus Jensen
On Nov 11 19:46, Philippe Mathieu-Daudé wrote: > On 11/11/21 19:08, Klaus Jensen wrote: > > On Nov 11 16:31, Philippe Mathieu-Daudé wrote: > >> Both 'buf_len' and 'off' arguments are under guest control. > >> Since nvme_c2h() doesn't check out of boundary access, the > >> caller must check for even

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

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

Re: [PATCH 3/5] gdbstub: reject unsupported flags in handle_set_qemu_sstep

2021-11-11 Thread Paolo Bonzini
On 11/11/21 18:08, Alex Bennée wrote: + +/* + * In replay mode all events written into the log should be replayed. + * That is why NOIRQ flag is removed in this mode. I guess if we were being complete we could say something like: In replay mode all events will come from the log a

Re: [PATCH] qmp: Stabilize preconfig

2021-11-11 Thread Paolo Bonzini
On 11/11/21 15:37, Markus Armbruster wrote: 1) PHASE_NO_MACHINE - backends can already be created here, but no machine exists yet 2) PHASE_MACHINE_CREATED - the machine object has been created. It's not initialized, but it's there. 3) PHASE_ACCEL_CREATED - the accelerator object has been creat

RE: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-11-11 Thread Shashi Mallela
From: Leif LindholmSent: November 11, 2021 1:21 PMTo: Peter MaydellCc: Shashi Mallela; Radoslaw Biernacki; Michael S. Tsirkin; Igor Mammedov; qemu-arm; QEMU Developers; Eric Auger; narmstr...@baylibre.com; Alex Bennée; Marcin JuszkiewiczSubject: Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support

Re: [PATCH] q35: flip acpi-pci-hotplug-with-bridge-support default back to off

2021-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 10:52:03AM +0100, Gerd Hoffmann wrote: > Switch qemu 6.2 back to 6.0 behavior (aka native pcie hotplug) because > acpi hotplug for pcie ports caused all kinds of regressions and a fix > for those is not in sight. > > Add compat property for 6.1 to keep it enabled there. Us

Re: [PATCH-for-6.2] hw/nvme/ctrl: Fix buffer overrun (CVE-2021-3947)

2021-11-11 Thread Philippe Mathieu-Daudé
On 11/11/21 19:08, Klaus Jensen wrote: > On Nov 11 16:31, Philippe Mathieu-Daudé wrote: >> Both 'buf_len' and 'off' arguments are under guest control. >> Since nvme_c2h() doesn't check out of boundary access, the >> caller must check for eventual buffer overrun on 'trans_len'. >> >> Cc: qemu-sta...

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 06:08:11PM +, Daniel P. Berrangé wrote: > On Thu, Nov 11, 2021 at 12:11:19PM -0500, Michael S. Tsirkin wrote: > > On Thu, Nov 11, 2021 at 09:35:37AM +, Daniel P. Berrangé wrote: > > > On Thu, Nov 11, 2021 at 03:20:07AM -0500, Michael S. Tsirkin wrote: > > > > On Thu,

Re: [PATCH v4 20/20] target/riscv: Enable uxl field write

2021-11-11 Thread Richard Henderson
On 11/11/21 4:51 PM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/cpu_bits.h | 2 ++ target/riscv/csr.c | 8 +--- 2 files changed, 7 insertions(+), 3 deletions(-) Works for me. Reviewed-by: Richard Henderson r~

Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-11-11 Thread Leif Lindholm
On Thu, Nov 11, 2021 at 16:55:09 +, Peter Maydell wrote: > On Tue, 9 Nov 2021 at 22:52, Leif Lindholm wrote: > > > > On Tue, Nov 09, 2021 at 21:21:46 +, Peter Maydell wrote: > > > The other thing we should nail down is how the user is going to > > > select which flavour of machine they wan

Re: [PATCH v3 20/20] target/riscv: Enable uxl field write

2021-11-11 Thread Richard Henderson
On 11/11/21 4:18 PM, Frédéric Pétrot wrote: Still missing the update for write_sstatus, which I think is simply an update to sstatus_v1_10_mask.   I take the liberty to jump in as I face the issue of updating that mask in the   128-bit patches: sstatus_v1_10_mask is a target_ulong, and when

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-11 Thread Daniel P . Berrangé
On Thu, Nov 11, 2021 at 12:11:19PM -0500, Michael S. Tsirkin wrote: > On Thu, Nov 11, 2021 at 09:35:37AM +, Daniel P. Berrangé wrote: > > On Thu, Nov 11, 2021 at 03:20:07AM -0500, Michael S. Tsirkin wrote: > > > On Thu, Nov 11, 2021 at 08:53:06AM +0100, Gerd Hoffmann wrote: > > > > Hi, > > >

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

2021-11-11 Thread Richard Henderson
On 11/11/21 2:35 AM, Xiaojuan Yang wrote: +static bool trans_tlbwr(DisasContext *ctx, arg_tlbwr *a) +{ +gen_helper_check_plv(cpu_env); +gen_helper_tlbwr(cpu_env); +tcg_gen_movi_tl(cpu_pc, ctx->base.pc_next + 4); +ctx->base.is_jmp = DISAS_EXIT; +return true; +} I think you ca

Re: [PATCH-for-7.0 0/2] hw/nvme/ctrl: Buffer types cleanups

2021-11-11 Thread Klaus Jensen
On Nov 11 16:45, Philippe Mathieu-Daudé wrote: > Some trivial notes I took while reviewing CVE-2021-3947: > https://lore.kernel.org/qemu-devel/2021153125.2258176-1-phi...@redhat.com/ > > Based-on: <2021153125.2258176-1-phi...@redhat.com> > > *** BLURB HERE *** > > Philippe Mathieu-Daudé

Re: [PATCH-for-6.2] hw/nvme/ctrl: Fix buffer overrun (CVE-2021-3947)

2021-11-11 Thread Klaus Jensen
On Nov 11 16:31, Philippe Mathieu-Daudé wrote: > Both 'buf_len' and 'off' arguments are under guest control. > Since nvme_c2h() doesn't check out of boundary access, the > caller must check for eventual buffer overrun on 'trans_len'. > > Cc: qemu-sta...@nongnu.org > Reported-by: Qiuhao Li > Fixes

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

2021-11-11 Thread Philippe Mathieu-Daudé
On 11/11/21 16:33, Roman Kagan wrote: > Almost all VhostOps methods in kernel_ops follow the convention of > returning negated errno on error. > > Adjust the only one that doesn't. > > Signed-off-by: Roman Kagan > --- > hw/virtio/vhost-backend.c | 2 +- > 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH 05/10] vhost-backend: avoid overflow on memslots_limit

2021-11-11 Thread Philippe Mathieu-Daudé
On 11/11/21 16:33, Roman Kagan wrote: > Fix the (hypothetical) potential problem when the value parsed out of > the vhost module parameter in sysfs overflows the return value from > vhost_kernel_memslots_limit. > > Signed-off-by: Roman Kagan > --- > hw/virtio/vhost-backend.c | 2 +- > 1 file cha

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-11 Thread Christian Schoenebeck
On Donnerstag, 11. November 2021 17:31:52 CET Stefan Hajnoczi wrote: > On Wed, Nov 10, 2021 at 04:53:33PM +0100, Christian Schoenebeck wrote: > > On Mittwoch, 10. November 2021 16:14:19 CET Stefan Hajnoczi wrote: > > > On Wed, Nov 10, 2021 at 02:14:43PM +0100, Christian Schoenebeck wrote: > > > > O

Re: [PATCH 01/10] vhost-user-blk: reconnect on any error during realize

2021-11-11 Thread Kevin Wolf
Am 11.11.2021 um 16:33 hat Roman Kagan geschrieben: > vhost-user-blk realize only attempts to reconnect if the previous > connection attempt failed on "a problem with the connection and not an > error related to the content (which would fail again the same way in the > next attempt)". > > However

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

2021-11-11 Thread Richard Henderson
On 11/11/21 2:35 AM, Xiaojuan Yang wrote: This includes: - CSRRD - CSRWR - CSRXCHG - IOCSR{RD/WR}.{B/H/W/D} I think IOCSR should be in a separate patch. It's completely unrelated to the other CSRs. +target_ulong helper_csr_rdq(CPULoongArchState *env, uint64_t csr) +{ +int64_t v; + +sw

Re: [PATCH] escc: update transmit status bits when switching to async mode

2021-11-11 Thread Mark Cave-Ayland
On 02/11/2021 14:46, Peter Maydell wrote: On Mon, 1 Nov 2021 at 20:31, Mark Cave-Ayland wrote: The recent ESCC reset changes cause a regression when attemping to use a real SS-5 Sun PROM instead of OpenBIOS. The Sun PROM doesn't send an explicit reset command to the ESCC but gets stuck in a l

Re: [PATCH v2 00/10] block: Attempt on fixing 030-reported errors

2021-11-11 Thread Kevin Wolf
Am 11.11.2021 um 13:08 hat Hanna Reitz geschrieben: > Hi, > > v1 cover letter: > https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg01287.html > > In v2 I’ve addressed the comments I’ve received from Kevin and Vladimir. > To this end, I’ve retained only the non-controversial part in patc

Re: [PATCH 5/5] kvm: add support for KVM_GUESTDBG_BLOCKIRQ

2021-11-11 Thread Alex Bennée
Paolo Bonzini writes: > From: Maxim Levitsky > > Use the KVM_GUESTDBG_BLOCKIRQ debug flag if supported. > > Signed-off-by: Maxim Levitsky > [Extracted from Maxim's patch into a separate commit. - Paolo] > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 3/5] gdbstub: reject unsupported flags in handle_set_qemu_sstep

2021-11-11 Thread Paolo Bonzini
On 11/11/21 12:38, Philippe Mathieu-Daudé wrote: Simpler: gdbserver_state.supported_sstep_flags = SSTEP_ENABLE; +/* + * In replay mode all events written into the log should be replayed. + * That is why NOIRQ flag is removed in this mode. + */ if (replay_mode == REPLAY_MOD

Re: [PATCH 4/5] gdbstub, kvm: let KVM report supported singlestep flags

2021-11-11 Thread Alex Bennée
Paolo Bonzini writes: > From: Maxim Levitsky > > Signed-off-by: Maxim Levitsky > [Extracted from Maxim's patch into a separate commit. - Paolo] > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 09:35:37AM +, Daniel P. Berrangé wrote: > On Thu, Nov 11, 2021 at 03:20:07AM -0500, Michael S. Tsirkin wrote: > > On Thu, Nov 11, 2021 at 08:53:06AM +0100, Gerd Hoffmann wrote: > > > Hi, > > > > > > > Given it's a bugfix, and given that I hear through internal channel

Re: [PATCH 3/5] gdbstub: reject unsupported flags in handle_set_qemu_sstep

2021-11-11 Thread Alex Bennée
Paolo Bonzini writes: > From: Maxim Levitsky > > handle_query_qemu_sstepbits is reporting NOIRQ and NOTIMER bits > even if they are not supported (as is the case with record/replay). > Instead, store the supported singlestep flags and reject > any unsupported bits in handle_set_qemu_sstep. Th

Re: [PATCH 2/5] linux-headers: update to 5.16-rc1

2021-11-11 Thread Alex Bennée
Paolo Bonzini writes: > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 1/5] virtio-gpu: do not byteswap padding

2021-11-11 Thread Alex Bennée
Paolo Bonzini writes: > In Linux 5.16, the padding of struct virtio_gpu_ctrl_hdr has become a > single-byte field followed by a uint8_t[3] array of padding bytes, > and virtio_gpu_ctrl_hdr_bswap does not compile anymore. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Ben

Re: [PATCH 2/2] hw/core/loader: workaround read() size limit.

2021-11-11 Thread Jamie Iles
On Thu, Nov 11, 2021 at 04:55:35PM +0100, Philippe Mathieu-Daudé wrote: > On 11/11/21 16:43, Philippe Mathieu-Daudé wrote: > > On 11/11/21 16:36, Jamie Iles wrote: > >> Hi Philippe, > >> > >> On Thu, Nov 11, 2021 at 03:55:48PM +0100, Philippe Mathieu-Daudé wrote: > >>> Hi Jamie, > >>> > >>> On 11/1

Re: [PATCH 1/5] virtio-gpu: do not byteswap padding

2021-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 12:06:00PM +0100, Paolo Bonzini wrote: > In Linux 5.16, the padding of struct virtio_gpu_ctrl_hdr has become a > single-byte field followed by a uint8_t[3] array of padding bytes, > and virtio_gpu_ctrl_hdr_bswap does not compile anymore. > > Signed-off-by: Paolo Bonzini R

Re: [PATCH v8 07/10] hw/arm/sbsa-ref: add ITS support in SBSA GIC

2021-11-11 Thread Peter Maydell
On Tue, 9 Nov 2021 at 22:52, Leif Lindholm wrote: > > On Tue, Nov 09, 2021 at 21:21:46 +, Peter Maydell wrote: > > The other thing we should nail down is how the user is going to > > select which flavour of machine they want to provide. Three > > options: > > (1) no control, QEMU just emulate

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-11 Thread Stefan Hajnoczi
On Wed, Nov 10, 2021 at 04:53:33PM +0100, Christian Schoenebeck wrote: > On Mittwoch, 10. November 2021 16:14:19 CET Stefan Hajnoczi wrote: > > On Wed, Nov 10, 2021 at 02:14:43PM +0100, Christian Schoenebeck wrote: > > > On Mittwoch, 10. November 2021 11:05:50 CET Stefan Hajnoczi wrote: > > > As yo

Re: [PATCH v4 03/25] assertions for block global state API

2021-11-11 Thread Hanna Reitz
On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by:

  1   2   3   4   >