[Qemu-devel] [PATCH 2/2] tests: fw_cfg: add reboot_timeout test case

2019-01-19 Thread Li Qiang
Signed-off-by: Li Qiang --- tests/fw_cfg-test.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/fw_cfg-test.c b/tests/fw_cfg-test.c index 1c5103fe1c..c28e6c3fb5 100644 --- a/tests/fw_cfg-test.c +++ b/tests/fw_cfg-test.c @@ -99,6 +99,15 @@ static void test_f

[Qemu-devel] [PATCH 1/2] tests: fw_cfg: add a function to get the fw_cfg file entry

2019-01-19 Thread Li Qiang
This is useful to write qtest about fw_cfg file entry. Signed-off-by: Li Qiang --- tests/libqos/fw_cfg.c | 33 + tests/libqos/fw_cfg.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/tests/libqos/fw_cfg.c b/tests/libqos/fw_cfg.c index d0889d1e22..e2b0cae7

[Qemu-devel] [PATCH 0/2] tests: fw_cfg: add reboot-timeout test case

2019-01-19 Thread Li Qiang
The first patch adds a util function to get the fw_cfg file entry. And second adds a reboot-timeout test case. Li Qiang (2): tests: fw_cfg: add a function to get the fw_cfg file entry tests: fw_cfg: add reboot_timeout test case tests/fw_cfg-test.c | 13 - tests/libqos/fw_cfg.c

Re: [Qemu-devel] Implementing Memory Tag Extention - ARM

2019-01-19 Thread Alexander Graf
> Am 19.01.2019 um 21:50 schrieb Richard Henderson > : > >> On 1/19/19 4:58 AM, Vishnu Dev wrote: >> Hello, >> I am a undergraduate Binary Exploitation enthusiast who would like to >> participate in GSoC with qemu on some security related project . While >> enquiring on IRC @agraf suggested a

Re: [Qemu-devel] [PATCH PULL 00/10] RDMA queue

2019-01-19 Thread 李强
Hi Marcel, Seems you lost another: hw: pvrdma: fix memory leak in error path -->http://lists.gnu.org/archive/html/qemu-devel/2019-01/msg01217.html At 2019-01-19 18:03:05, "Marcel Apfelbaum" wrote: >The following changes since commit a8d2b0685681e2f291faaa501efbbd76875f8ec8: > > Merge remot

Re: [Qemu-devel] [PATCH PULL 00/10] RDMA queue

2019-01-19 Thread Marcel Apfelbaum
On 1/20/19 8:16 AM, 李强 wrote: At 2019-01-20 14:08:57, "Marcel Apfelbaum" wrote: >Hi, > >On 1/20/19 8:04 AM, 李强 wrote: >> >> Hi Marcel, >> Seems you lost another: >> > >No,  I did not, please see below. Yes, I just read the patch. >> hw: pvrdma: fix memory leak in error path >> -->http://lists

Re: [Qemu-devel] [PATCH PULL 00/10] RDMA queue

2019-01-19 Thread Marcel Apfelbaum
Hi, On 1/20/19 8:04 AM, 李强 wrote: Hi Marcel, Seems you lost another: No,  I did not, please see below. hw: pvrdma: fix memory leak in error path -->http://lists.gnu.org/archive/html/qemu-devel/2019-01/msg01217.html Please see this mail thread, you were cc--ed: https://www.mail-archive.c

[Qemu-devel] [PATCH 2/3] nvme: ensure the num_queues is not zero

2019-01-19 Thread Li Qiang
When it is zero, it causes segv. Using following command: "-drive file=//home/test/test1.img,if=none,id=id0 -device nvme,drive=id0,serial=test,num_queues=0" causes following Backtrack: Thread 4 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe9735700 (LWP

[Qemu-devel] [PATCH 3/3] nvme: use pci_dev directly in nvme_realize

2019-01-19 Thread Li Qiang
There is no need to make another reference. Signed-off-by: Li Qiang Reviewed-by: Max Reitz Reviewed-by: Philippe Mathieu-Daud?? --- hw/block/nvme.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 0b77b49b36..8325b5e88a 100644

[Qemu-devel] [PATCH 0/3] nvme small fix

2019-01-19 Thread Li Qiang
This patchset contains small fix. Change since v2: For patch 2: 1. add nvme command 2. check num_queues first Change since v1: 1. drop the patch of checking return value of msix_init_exclusive_bar 2. return when nvme's num_queues configuration is 0 Li Qiang (3): nvme: use TYPE_NVME instead o

[Qemu-devel] [PATCH 1/3] nvme: use TYPE_NVME instead of constant string

2019-01-19 Thread Li Qiang
Signed-off-by: Li Qiang Reviewed-by: Max Reitz Reviewed-by: Philippe Mathieu-Daud?? --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 7c8c63e8f5..f206391e8e 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1381,

Re: [Qemu-devel] [PATCH v4 28/35] target/riscv: Rename trans_arith to gen_arith

2019-01-19 Thread Richard Henderson
On 1/19/19 12:14 AM, Bastian Koppelmann wrote: > Signed-off-by: Bastian Koppelmann > --- > v3 -> v4: > - trans_sltu/slt added to conversion > > target/riscv/insn_trans/trans_rvi.inc.c | 18 +- > target/riscv/insn_trans/trans_rvm.inc.c | 14 +++--- > target/riscv/trans

Re: [Qemu-devel] [PATCH v4 26/35] target/riscv: Remove shift and slt insn manual decoding

2019-01-19 Thread Richard Henderson
On 1/19/19 12:14 AM, Bastian Koppelmann wrote: > Signed-off-by: Bastian Koppelmann > Signed-off-by: Peer Adelt > --- > v3 -> v4: > - refactor tcg_gen_set_cond_tl(TCG_COND_LT,..) into gen_slt function > and reuse gen_arith(..., &gen_slt) for all trans_slt functions. > - Add missing s

Re: [Qemu-devel] [PATCH v4 24/35] target/riscv: Move gen_arith_imm() decoding into trans_* functions

2019-01-19 Thread Richard Henderson
On 1/19/19 12:14 AM, Bastian Koppelmann wrote: > static bool trans_slli(DisasContext *ctx, arg_slli *a) > { > -gen_arith_imm(ctx, OPC_RISC_SLLI, a->rd, a->rs1, a->shamt); > +if (a->rd != 0) { > +TCGv t = tcg_temp_new(); > +gen_get_gpr(t, a->rs1); > + > +if (a->sham

Re: [Qemu-devel] [PATCH v4 16/35] target/riscv: Convert RV priv insns to decodetree

2019-01-19 Thread Richard Henderson
On 1/19/19 12:14 AM, Bastian Koppelmann wrote: > Signed-off-by: Bastian Koppelmann > Signed-off-by: Peer Adelt > --- > v3 -> v4: > - current_cpu->env_ptr -> ctx-env Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v4 12/35] target/riscv: Convert RV32F insns to decodetree

2019-01-19 Thread Richard Henderson
On 1/19/19 12:14 AM, Bastian Koppelmann wrote: > +static bool trans_fsgnjn_s(DisasContext *ctx, arg_fsgnjn_s *a) > +{ > +REQUIRE_FPU; > +if (a->rs1 == a->rs2) { /* FNEG */ > +tcg_gen_xori_i64(cpu_fpr[a->rd], cpu_fpr[a->rs1], INT32_MIN); > +} else { > +TCGv_i64 t0 = tcg_t

Re: [Qemu-devel] [PATCH v4 07/35] target/riscv: Convert RVXI fence insns to decodetree

2019-01-19 Thread Richard Henderson
On 1/19/19 12:14 AM, Bastian Koppelmann wrote: > Acked-by: Alistair Francis > Reviewed-by: Richard Henderson > Signed-off-by: Bastian Koppelmann > Signed-off-by: Peer Adelt > --- > target/riscv/insn32.decode | 2 ++ > target/riscv/insn_trans/trans_rvi.inc.c | 23 +

Re: [Qemu-devel] [PATCH v4 04/35] target/riscv: Convert RV32I load/store insns to decodetree

2019-01-19 Thread Richard Henderson
On 1/19/19 12:14 AM, Bastian Koppelmann wrote: > Signed-off-by: Bastian Koppelmann > Signed-off-by: Peer Adelt > --- > v3 -> v4: > - removed accidental argument removal > > target/riscv/insn32.decode | 10 ++ > target/riscv/insn_trans/trans_rvi.inc.c | 48 ++

Re: [Qemu-devel] Implementing Memory Tag Extention - ARM

2019-01-19 Thread Richard Henderson
On 1/19/19 4:58 AM, Vishnu Dev wrote: > Hello, > I am a undergraduate Binary Exploitation enthusiast who would like to > participate in GSoC with qemu on some security related project . While > enquiring on IRC @agraf suggested a idea of implementing memory tag extension > on ARM, this seems to be

Re: [Qemu-devel] [PATCH] accel/tcg/user-exec: Don't parse aarch64 insns to test for read vs write

2019-01-19 Thread Richard Henderson
On 1/9/19 5:00 AM, Peter Maydell wrote: > In cpu_signal_handler() for aarch64 hosts, currently we parse > the faulting instruction to see if it is a load or a store. > Since the 3.16 kernel (~2014), the kernel has provided us with > the syndrome register for a fault, which includes the WnR bit. > U

Re: [Qemu-devel] [RFC PATCH] gdbstub: Avoid NULL dereference in gdb_handle_packet()

2019-01-19 Thread Luc Michel
On 1/18/19 12:22 PM, Philippe Mathieu-Daudé wrote: > The "Hg" GDB packet is used to select the current thread, and can fail. > GDB doesn't not check for failure and emits further packets that can > access and dereference s->c_cpu or s->g_cpu. > > Add a check that returns "E22" (EINVAL) when those

[Qemu-devel] [PATCH] gdbstub: fix gdb_get_cpu(s, pid, tid) when pid and/or tid are 0

2019-01-19 Thread Luc Michel
a TID or PID value means "any thread" (resp. "any process"). This commit fixes the different combinations when at least one value is 0. When both are 0, the function now returns the first attached CPU, instead of the CPU with TID 1, which is not necessarily attached or even existent. When PID is

Re: [Qemu-devel] [PATCH v4 for-4.0 4/7] libvhost-user: Support tracking inflight I/O in shared memory

2019-01-19 Thread Yongji Xie
On Fri, 18 Jan 2019 at 17:27, Jason Wang wrote: > > > On 2019/1/18 下午3:01, Yongji Xie wrote: > > On Fri, 18 Jan 2019 at 12:00, Jason Wang wrote: > >> > >> On 2019/1/18 上午11:32, Yongji Xie wrote: > >>> On Thu, 17 Jan 2019 at 17:57, Jason Wang wrote: > On 2019/1/15 下午10:51, Yongji Xie wrote:

Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list

2019-01-19 Thread Richard W.M. Jones
Attached is a NON-working patch to nbdkit-partitioning-plugin which adds logical partition support. I don't think I've fully understood how the EBR fields are supposed to be initialized (or else they don't work how is described in online documentation). This actually causes parted to print an in

[Qemu-devel] [PATCH PULL 03/10] hw/rdma: Delete unused struct member

2019-01-19 Thread Marcel Apfelbaum
From: Yuval Shaia This member is used only in init_device_caps function, make it local. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 26 ++ hw/rdma/rdma_b

[Qemu-devel] [PATCH PULL 04/10] hw/pvrdma: Post CQE when receive invalid gid index

2019-01-19 Thread Marcel Apfelbaum
From: Yuval Shaia This error should propagate back to guest. Spotted by Coverity: CID 1398595 Fixes: 2b05705dc8 Reported-by: Li Qiang Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Signed-off-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.h | 1 + hw/rdma/vmw/pvrdma_qp_ops.c

[Qemu-devel] [PATCH PULL 02/10] hw/pvrdma: Remove max-sge command-line param

2019-01-19 Thread Marcel Apfelbaum
From: Yuval Shaia This parameter has no effect, fix it. The function init_dev_caps sets the front-end's max-sge to MAX_SGE. Then it checks backend's max-sge and adjust it accordingly (we can't send more than what the device supports). On send and recv we need to make sure the num_sge in the WQE

[Qemu-devel] [PATCH PULL 07/10] hw: rdma: fix an off-by-one issue

2019-01-19 Thread Marcel Apfelbaum
From: Li Qiang In rdma_rm_get_backend_gid_index(), the 'sgid_idx' is used to index the array 'dev_res->port.gid_tbl' which size is MAX_PORT_GIDS. Current the 'sgid_idx' may be MAX_PORT_GIDS thus cause an off-by-one issue. Spotted by Coverity: CID 1398594 Signed-off-by: Li Qiang Message-Id: <20

[Qemu-devel] [PATCH PULL 05/10] hw/pvrdma: Make function pvrdma_qp_send/recv return void.

2019-01-19 Thread Marcel Apfelbaum
From: Yuval Shaia The functions handles errors internaly, callers have nothing to do with the return value. Signed-off-by: Yuval Shaia Message-Id: <20190109202140.4051-1-yuval.sh...@oracle.com> Reviewed-by: Marcel Apfelbaum Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Marcel Apfelbaum -

[Qemu-devel] [PATCH PULL 06/10] hw/rdma: Verify that ptr is not NULL before freeing

2019-01-19 Thread Marcel Apfelbaum
From: Yuval Shaia To cover the case where fini() was called even when init() fails make sure objects are not NULL before calling to non-null-safe destructors. Signed-off-by: Yuval Shaia Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190116151538.14088-1-yuval.sh...@oracle.com> Signed-off-b

[Qemu-devel] [PATCH PULL 10/10] contrib/rdmacm-mux: fix clang compilation

2019-01-19 Thread Marcel Apfelbaum
Fix Commit a5d2f6f877 (contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer). The above commit introduces a new contrib target, adding a global dependency to libumad library in case pvrdma configuration option is enabled. Clang forbids it: clang-6.0: error

[Qemu-devel] [PATCH PULL 09/10] hw/rdma: modify struct initialization

2019-01-19 Thread Marcel Apfelbaum
Do not initialize structs with {0} since some CLANG versions do not support it. Use {} construct instead. Reviewed-by: Yuval Shaia Tested-by: Cornelia Huck Message-Id: <20190118124614.24548-3-marcel.apfelb...@gmail.com> Reviewed-by: Cornelia Huck Signed-off-by: Marcel Apfelbaum --- contrib/r

[Qemu-devel] [PATCH PULL 08/10] contrib/rdmacm-mux: remove Wno-format-truncation flag

2019-01-19 Thread Marcel Apfelbaum
The flag is not recognized by some CLANG versions. Add proper constraints in code instead. Reviewed-by: Yuval Shaia Tested-by: Cornelia Huck Message-Id: <20190118124614.24548-2-marcel.apfelb...@gmail.com> Signed-off-by: Marcel Apfelbaum --- contrib/rdmacm-mux/Makefile.objs | 2 +- contrib/rdma

[Qemu-devel] [PATCH PULL 01/10] docs/pvrdma: Update rdmacm-mux documentation

2019-01-19 Thread Marcel Apfelbaum
From: Kamal Heib Before running the rdmacm-mux need to make sure that both the ib_cm and rdma_cm kernel modules are unloaded. Reviewed-by: Yuval Shaia Signed-off-by: Kamal Heib Message-Id: <20190109132829.19164-1-kamalhe...@gmail.com> Signed-off-by: Marcel Apfelbaum --- docs/pvrdma.txt | 3 +

[Qemu-devel] [PATCH PULL 00/10] RDMA queue

2019-01-19 Thread Marcel Apfelbaum
The following changes since commit a8d2b0685681e2f291faaa501efbbd76875f8ec8: Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190118' into staging (2019-01-18 16:56:15 +) are available in the Git repository at: https://github.com/marcel-apf/qemu tags/rdma-pull-request for you

Re: [Qemu-devel] [PATCH] hw/pvrdma: Post CQE when receive invalid gid index

2019-01-19 Thread Marcel Apfelbaum
On 1/18/19 6:23 PM, Yuval Shaia wrote: On Fri, Jan 18, 2019 at 03:55:36PM +0200, Marcel Apfelbaum wrote: Hi Yuval, On 1/9/19 10:15 PM, Yuval Shaia wrote: This error should propagate back to guest. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.h | 1 + hw/rdma/vmw/pvrdma_qp

Re: [Qemu-devel] [PATCH v4 00/21] nbd: add qemu-nbd --list

2019-01-19 Thread Richard W.M. Jones
On Fri, Jan 18, 2019 at 04:47:42PM -0600, Eric Blake wrote: > It matches the code, but I just learned the code is buggy for anything > larger than 5. According to > http://tldp.org/HOWTO/Large-Disk-HOWTO-13.html, MBR Extended/Logical > partitions form a linked-list, something like: > > MBR: