Re: [PATCH v3 6/8] migration: Dump sub-cmd name in loadvm_process_command tp

2021-12-24 Thread David Edmondson
On Friday, 2021-12-24 at 14:49:58 +08, Peter Xu wrote: > It'll be easier to read the name rather than index of sub-cmd when debugging. > > Signed-off-by: Peter Xu Reviewed-by: David Edmondson > --- > migration/savevm.c | 3 ++- > migration/trace-events | 2 +- > 2 files changed, 3

Re: [PATCH] tests/qtest/virtio-net-failover: Use g_file_open_tmp() to create temporary file

2021-12-24 Thread Philippe Mathieu-Daudé
On 12/22/21 09:36, Thomas Huth wrote: > g_test_rand_int() must not be called before g_test_init(), otherwise > the glib will show a "g_rand_int: assertion 'rand != NULL' failed" > message in the log. So we could change the order here, but actually, > it's safer to use g_file_open_tmp() anyway, so

Re: [PATCH v2 1/6] migration: All this fields are unsigned

2021-12-24 Thread Juan Quintela
Peter Xu wrote: > On Tue, Dec 21, 2021 at 01:52:30PM +0100, Juan Quintela wrote: >> So printing it as %d is wrong. Notice that for the channel id, that >> is an uint8_t, but I changed it anyways for consistency. > > Just curious: uint_8 can always correctly converted to a int, so the patch >

Re: [PATCH] net/filter: Optimize filter_send to coroutine

2021-12-24 Thread Rao, Lei
On 12/24/2021 6:07 PM, lizhij...@fujitsu.com wrote: On 24/12/2021 10:37, Rao, Lei wrote: This patch is to improve the logic of QEMU main thread sleep code in qemu_chr_write_buffer() where it can be blocked and can't run other coroutines during COLO IO stress test. Our approach is to put

Re: [PATCH 3/8] ppc/ppc405: Activate MMU logs

2021-12-24 Thread BALATON Zoltan
On Thu, 23 Dec 2021, Richard Henderson wrote: On 12/21/21 10:40 PM, Cédric Le Goater wrote: There is no need to deactivate MMU logging at compile time. Signed-off-by: Cédric Le Goater --- target/ppc/mmu_common.c | 4 ++-- target/ppc/mmu_helper.c | 2 +- 2 files changed, 3 insertions(+), 3

[PATCH v2 5/5] blockjob: drop BlockJob.blk field

2021-12-24 Thread Vladimir Sementsov-Ogievskiy
It's unused now (except for permission handling)[*]. The only reasonable user of it was block-stream job, recently updated to use own blk. And other block jobs prefer to use own source node related objects. So, the arguments of dropping the field are: - block jobs prefer not to use it - block

[PATCH v2 0/5] block-job: drop BlockJob.blk

2021-12-24 Thread Vladimir Sementsov-Ogievskiy
Hi all! v2: rebase on master, fix iostest 283 Block jobs usually operate with several block nodes, and better to handle them symmetrically, than use one from s->common.blk and one from s->target (or something like this). Moreover, generic blockjob layer has no use of BlockJob.blk. And

Re: [RFC PATCH 2/2] accel/tcg: replace phys_pc with asid in TB htable key

2021-12-24 Thread Richard Henderson
On 12/24/21 5:02 AM, Vasilev Oleg wrote: On 12/23/2021 7:31 PM, Richard Henderson wrote: On 12/22/21 8:50 AM, Oleg Vasilev wrote: From: Oleg Vasilev Using a physical pc requires to translate address every time next block needs to be found and executed. This also contaminates TLB with

Re: [PATCH 3/8] ppc/ppc405: Activate MMU logs

2021-12-24 Thread Richard Henderson
On 12/24/21 4:57 AM, BALATON Zoltan wrote: On Thu, 23 Dec 2021, Richard Henderson wrote: On 12/21/21 10:40 PM, Cédric Le Goater wrote: There is no need to deactivate MMU logging at compile time. Signed-off-by: Cédric Le Goater ---   target/ppc/mmu_common.c | 4 ++--   target/ppc/mmu_helper.c |

[PATCH v2 4/5] test-bdrv-drain: don't use BlockJob.blk

2021-12-24 Thread Vladimir Sementsov-Ogievskiy
We are going to drop BlockJob.blk in further commit. For tests it's enough to simply pass bs pointer. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/unit/test-bdrv-drain.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/unit/test-bdrv-drain.c

Re: [RFC PATCH 2/2] accel/tcg: replace phys_pc with asid in TB htable key

2021-12-24 Thread Vasilev Oleg via
On 12/23/2021 7:31 PM, Richard Henderson wrote: > On 12/22/21 8:50 AM, Oleg Vasilev wrote: >> From: Oleg Vasilev >> >> Using a physical pc requires to translate address every time next block >> needs to be found and executed. This also contaminates TLB with code-related >> records. >> >> Instead,

[PATCH 6/6] migration: Test for ram capabilities

2021-12-24 Thread Nikita Lapshin
Use scripts/analyze-migration.py to split migration stream into sections and analyze its output. Signed-off-by: Nikita Lapshin --- .../tests/migrate-ram-capabilities-test | 96 +++ .../tests/migrate-ram-capabilities-test.out | 5 + 2 files changed, 101 insertions(+)

Re: [PATCH for-7.0] hw: Add compat machines for 7.0

2021-12-24 Thread Andrew Jones
On Fri, Dec 17, 2021 at 03:29:13PM +0100, Cornelia Huck wrote: > On Fri, Dec 17 2021, Daniel P. Berrangé wrote: > > > On Fri, Dec 17, 2021 at 09:13:55AM +0100, Cornelia Huck wrote: > >> On Wed, Dec 08 2021, Cornelia Huck wrote: > >> > >> > Add 7.0 machine types for arm/i440fx/q35/s390x/spapr.

Re: [PATCH v2] hw: Add compat machines for 7.0

2021-12-24 Thread Andrew Jones
On Fri, Dec 17, 2021 at 03:39:48PM +0100, Cornelia Huck wrote: > Add 7.0 machine types for arm/i440fx/q35/s390x/spapr. > > Acked-by: Cédric Le Goater > Reviewed-by: Juan Quintela > Signed-off-by: Cornelia Huck > --- > > v1->v2: fix typo in i386 function chaining (thanks danpb!) > > --- >

Re: [PULL 10/28] export/fuse: Pass default_permissions for mount

2021-12-24 Thread Vladimir Sementsov-Ogievskiy
09.07.2021 15:50, Kevin Wolf wrote: From: Max Reitz We do not do any permission checks in fuse_open(), so let the kernel do them. We already let fuse_getattr() report the proper UNIX permissions, so this should work the way we want. This causes a change in 308's reference output, because now

[PATCH v2 3/5] block/stream: add own blk

2021-12-24 Thread Vladimir Sementsov-Ogievskiy
block-stream is the only block-job, that reasonably use BlockJob.blk. We are going to drop BlockJob.blk soon. So, let block-stream have own blk. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/stream.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff

[PATCH v2 2/5] test-blockjob-txn: don't abuse job->blk

2021-12-24 Thread Vladimir Sementsov-Ogievskiy
Here we use job->blk to drop our own reference in job cleanup. Let's do simpler: drop our reference immediately after job creation. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/unit/test-blockjob-txn.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git

[PATCH v2 1/5] blockjob: implement and use block_job_get_aio_context

2021-12-24 Thread Vladimir Sementsov-Ogievskiy
We are going to drop BlockJob.blk. So let's retrieve block job context from underlying job instead of main node. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/blockjob.h | 7 +++ blockdev.c | 6 +++--- blockjob.c | 5 + qemu-img.c

Re: [PATCH v3 7/8] migration: Finer grained tracepoints for POSTCOPY_LISTEN

2021-12-24 Thread David Edmondson
On Friday, 2021-12-24 at 14:49:59 +08, Peter Xu wrote: > The enablement of postcopy listening has a few steps, add a few tracepoints to > be there ready for some basic measurements for them. > > Signed-off-by: Peter Xu Reviewed-by: David Edmondson > --- > migration/savevm.c | 9 -

[PATCH 5/6] migration: analyze-migration script changed

2021-12-24 Thread Nikita Lapshin
This script is used for RAM capabilities test. But it cannot work in case of no vm description in migration stream. So new flag is added to allow work this script with ram-only migration stream. Signed-off-by: Nikita Lapshin --- scripts/analyze-migration.py | 19 --- 1 file

[PATCH 4/6] migration: Add ram-only capability

2021-12-24 Thread Nikita Lapshin
If this capability is enabled migration stream will have RAM section only. Signed-off-by: Nikita Lapshin --- migration/migration.c | 20 +++- migration/migration.h | 1 + migration/savevm.c| 11 ++- qapi/migration.json | 7 +-- 4 files changed, 35

[PATCH 0/6] migration: Add 'no-ram' and 'ram-only' cpabilities

2021-12-24 Thread Nikita Lapshin
We want to implement exteranl bg-snapshot tool for saving RAM. For this it is important to be able manage migration stream because tool has no idea about non-RAM part and its size. Possible solution is to send RAM separately. This can be done with implemented RAM capabilities. These capabilities

[PATCH 2/6] migration: should_skip() implemented

2021-12-24 Thread Nikita Lapshin
For next changes it is convenient to make all decisions about sections skipping in one function. Signed-off-by: Nikita Lapshin --- migration/savevm.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/migration/savevm.c

Re: [PATCH] net/filter: Optimize filter_send to coroutine

2021-12-24 Thread lizhij...@fujitsu.com
On 24/12/2021 10:37, Rao, Lei wrote: > This patch is to improve the logic of QEMU main thread sleep code in > qemu_chr_write_buffer() where it can be blocked and can't run other > coroutines during COLO IO stress test. > > Our approach is to put filter_send() in a coroutine. In this way, >

Re: [PATCH v3 8/8] migration: Tracepoint change in postcopy-run bottom half

2021-12-24 Thread David Edmondson
On Friday, 2021-12-24 at 14:50:00 +08, Peter Xu wrote: > Remove the old two tracepoints and they're even near each other: > > trace_loadvm_postcopy_handle_run_cpu_sync() > trace_loadvm_postcopy_handle_run_vmstart() > > Add trace_loadvm_postcopy_handle_run_bh() with a finer granule trace.

[PATCH 3/6] migration: Add no-ram capability

2021-12-24 Thread Nikita Lapshin
This capability disable RAM section in migration stream. Signed-off-by: Nikita Lapshin --- migration/migration.c | 9 + migration/migration.h | 1 + migration/ram.c | 6 ++ qapi/migration.json | 8 +--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git

[PATCH 1/6] migration: is_ram changed to is_iterable

2021-12-24 Thread Nikita Lapshin
For new migration capabilities upcoming we need to use something like is_ram for this purpose. This member of struction is true not only for RAM so it should be renamed. Signed-off-by: Nikita Lapshin --- migration/savevm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

QEMU CI failure of cross-i386-* targets (meson picks wrong glib for native target)

2021-12-24 Thread Alessandro Di Federico via
Hi Paolo, I'm trying to get the QEMU CI run successfully for the idef-parser patchset. However I'm facing an issue I haven't been able to work around with meson. Maybe you can help? The failing tests are cross-i386-* https://gitlab.com/carl.cudig/qemu/-/jobs/1437392669

Re: [PATCH v7] isa-applesmc: provide OSK forwarding on Apple hosts

2021-12-24 Thread Vladislav Yaroshchuk
ping: https://patchew.org/QEMU/20211216104621.85108-1-yaroshchuk2...@gmail.com/

Re: [RFC v2 02/12] target/ppc: powerpc_excp: Set vector earlier

2021-12-24 Thread Fabiano Rosas
Richard Henderson writes: > On 12/20/21 10:18 AM, Fabiano Rosas wrote: >> None of the interrupt setup code touches 'vector', so we can move it >> earlier in the function. This will allow us to later move the System >> Call Vectored setup that is on the top level into the >>

[PATCH] tests/tcg: Use $cpu in configure.sh

2021-12-24 Thread Richard Henderson
Use $cpu instead of $ARCH, which has been removed from the top-level configure. Fixes: 823eb013452e Signed-off-by: Richard Henderson --- configure | 2 +- tests/tcg/configure.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index

Re: [PATCH 3/6] target/riscv: add support for zfinx

2021-12-24 Thread liweiwei
在 2021/12/25 上午6:26, Richard Henderson 写道: On 12/23/21 7:49 PM, liweiwei wrote:   static bool trans_fsgnj_s(DisasContext *ctx, arg_fsgnj_s *a)   {   REQUIRE_FPU; -    REQUIRE_EXT(ctx, RVF); +    REQUIRE_ZFINX_OR_F(ctx);   +    TCGv_i64 dest = dest_fpr(ctx, a->rd);   if (a->rs1 ==

Re: [PATCH 1/6] target/riscv: add cfg properties for zfinx, zdinx and zhinx{min}

2021-12-24 Thread Richard Henderson
On 12/23/21 7:49 PM, liweiwei wrote: Co-authored-by: ardxwe Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- roms/SLOF| 2 +- target/riscv/cpu.c | 12 target/riscv/cpu.h | 4 target/riscv/translate.c | 8 4 files changed, 25

Re: [PATCH 2/6] target/riscv: add support for unique fpr read/write with support for zfinx

2021-12-24 Thread Richard Henderson
On 12/23/21 7:49 PM, liweiwei wrote: +static TCGv_i64 get_fpr_hs(DisasContext *ctx, int reg_num) +{ +if (ctx->ext_zfinx) { +switch (get_ol(ctx)) { +case MXL_RV32: +#ifdef TARGET_RISCV32 +if (reg_num == 0) { +tcg_gen_concat_i32_i64(t, ctx->zero,

Re: [PATCH 3/6] target/riscv: add support for zfinx

2021-12-24 Thread Richard Henderson
On 12/23/21 7:49 PM, liweiwei wrote: static bool trans_fsgnj_s(DisasContext *ctx, arg_fsgnj_s *a) { REQUIRE_FPU; -REQUIRE_EXT(ctx, RVF); +REQUIRE_ZFINX_OR_F(ctx); +TCGv_i64 dest = dest_fpr(ctx, a->rd); if (a->rs1 == a->rs2) { /* FMOV */ -

Re: [RFC v2 05/12] target/ppc: powerpc_excp: Standardize arguments to interrupt code

2021-12-24 Thread David Gibson
On Mon, Dec 20, 2021 at 03:18:56PM -0300, Fabiano Rosas wrote: > In preparation to moving the interrupt code into separate functions, > create a PPCIntrArgs structure to serve as a consistent API. The patch doesn't seem to match this description - I see no new structure here. > > No functional

Re: QEMU CI failure of cross-i386-* targets (meson picks wrong glib for native target)

2021-12-24 Thread Paolo Bonzini
Is the configure script setting $cross_compile to yes? That will decide whether meson getting a --cross-file or a --native-file option, and consequently whether it treats the host and build machines as equal or different. Paolo Il ven 24 dic 2021, 12:09 Alessandro Di Federico ha scritto: > Hi

Re: [PATCH 3/6] linux-user: Add code for PR_GET/SET_UNALIGN

2021-12-24 Thread Richard Henderson
On 12/20/21 2:31 PM, Philippe Mathieu-Daudé wrote: +/* Used for user-only emulation of prctl(PR_SET_UNALIGN). */ +bool prctl_unalign_sigbus; Could we forward-declare a UserEmuCPUState structure in this file, use it here: struct UserEmuCPUState *user_cpu; and declare it in

Re: [PATCH 5/6] target/riscv: add support for zhinx/zhinxmin

2021-12-24 Thread liweiwei
在 2021/12/25 上午6:32, Richard Henderson 写道: On 12/23/21 7:49 PM, liweiwei wrote: +static inline float16 check_nanbox_h(CPURISCVState *env, uint64_t f)   { +    /* Disable nanbox check when enable zfinx */ +    if (RISCV_CPU(env_cpu(env))->cfg.ext_zfinx) +    return (uint16_t)f; Braces.

Re: [PATCH 2/6] target/riscv: add support for unique fpr read/write with support for zfinx

2021-12-24 Thread liweiwei
Thanks for your comments. 在 2021/12/25 上午6:00, Richard Henderson 写道: On 12/23/21 7:49 PM, liweiwei wrote: +static TCGv_i64 get_fpr_hs(DisasContext *ctx, int reg_num) +{ +    if (ctx->ext_zfinx) { +    switch (get_ol(ctx)) { +    case MXL_RV32: +#ifdef TARGET_RISCV32 +    if

Re: [RFC v2 04/12] target/ppc: powerpc_excp: Stop passing excp_model around

2021-12-24 Thread David Gibson
On Mon, Dec 20, 2021 at 03:18:55PM -0300, Fabiano Rosas wrote: > We can just access it directly in powerpc_excp. > > Signed-off-by: Fabiano Rosas Reviewed-by: David Gibson > --- > target/ppc/excp_helper.c | 43 > 1 file changed, 21 insertions(+), 22

Re: [PATCH 4/6] target/riscv: add support for zdinx

2021-12-24 Thread Richard Henderson
On 12/23/21 7:49 PM, liweiwei wrote: static bool trans_fsgnj_d(DisasContext *ctx, arg_fsgnj_d *a) { +REQUIRE_FPU; +REQUIRE_ZDINX_OR_D(ctx); + +TCGv_i64 dest = dest_fpr(ctx, a->rd); +TCGv_i64 src1 = get_fpr_d(ctx, a->rs1); +TCGv_i64 src2 = get_fpr_d(ctx, a->rs2); +

Re: [PATCH] tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file

2021-12-24 Thread Richard Henderson
On 12/24/21 3:45 PM, Philippe Mathieu-Daudé wrote: Similarly to commit e63ed64c6d1 ("tests/qtest/virtio-net-failover: Use g_file_open_tmp() to create temporary file"), avoid calling g_test_rand_int() before g_test_init(): use g_file_open_tmp(). Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH 5/6] target/riscv: add support for zhinx/zhinxmin

2021-12-24 Thread Richard Henderson
On 12/23/21 7:49 PM, liweiwei wrote: +static inline float16 check_nanbox_h(CPURISCVState *env, uint64_t f) { +/* Disable nanbox check when enable zfinx */ +if (RISCV_CPU(env_cpu(env))->cfg.ext_zfinx) +return (uint16_t)f; Braces. r~

Re: [PATCH 6/6] target/riscv: expose zfinx, zdinx, zhinx{min} properties

2021-12-24 Thread Richard Henderson
On 12/23/21 7:49 PM, liweiwei wrote: Co-authored-by: ardxwe Signed-off-by: liweiwei Signed-off-by: wangjunqiang --- target/riscv/cpu.c | 4 1 file changed, 4 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index a5fa14f2ac..dbd15693be 100644 ---

[PATCH] tests/unit/test-util-sockets: Use g_file_open_tmp() to create temp file

2021-12-24 Thread Philippe Mathieu-Daudé
Similarly to commit e63ed64c6d1 ("tests/qtest/virtio-net-failover: Use g_file_open_tmp() to create temporary file"), avoid calling g_test_rand_int() before g_test_init(): use g_file_open_tmp(). Signed-off-by: Philippe Mathieu-Daudé --- tests/unit/test-util-sockets.c | 6 -- 1 file changed,

Re: [PATCH 4/6] target/riscv: add support for zdinx

2021-12-24 Thread liweiwei
在 2021/12/25 上午6:30, Richard Henderson 写道: On 12/23/21 7:49 PM, liweiwei wrote:   static bool trans_fsgnj_d(DisasContext *ctx, arg_fsgnj_d *a)   { +    REQUIRE_FPU; +    REQUIRE_ZDINX_OR_D(ctx); + +    TCGv_i64 dest = dest_fpr(ctx, a->rd); +    TCGv_i64 src1 = get_fpr_d(ctx, a->rs1); +