gdbstub and TCG plugin improvements
v5 cover gdbstub and TCG plugin improvements
This series extracts fixes and refactorings that can be applied independently from "[PATCH v9 00/23] plugins: Allow to read registers".
The patch "target/riscv: Move MISA limits to class" was replaced with patch "target/riscv: Move misa_mxl_max to class" since I found instances may have different misa_ext_mask.
V4 -> V5:
Added patch "hw/riscv: Use misa_mxl instead of misa_mxl_max".
V3 -> V4:
Added patch "gdbstub: Check if gdb_regs is NULL".
V2 -> V3:
Restored patch sets from the previous version. Rebased to commit 800485762e6564e04e2ab315132d477069562d91.
V1 -> V2:
Added patch "target/riscv: Do not allow MXL_RV32 for TARGET_RISCV64". Added patch "target/riscv: Initialize gdb_core_xml_file only once". Dropped patch "target/riscv: Remove misa_mxl validation". Dropped patch "target/riscv: Move misa_mxl_max to class". Dropped patch "target/riscv: Validate misa_mxl_max only once".
Akihiko Odaki (6):
gdbstub: Check if gdb_regs is NULL
hw/riscv: Use misa_mxl instead of misa_mxl_max
target/riscv: Remove misa_mxl validation
target/riscv: Move misa_mxl_max to class
target/riscv: Validate misa_mxl_max only once
plugins: Remove an extra parameter
target/riscv/cpu-qom.h | 1 + target/riscv/cpu.h | 3 +- accel/tcg/plugin-gen.c | 9 +-- gdbstub/gdbstub.c | 34 +++++---- hw/riscv/boot.c | 2 +- target/riscv/cpu.c | 139 ++++++++++++++++++++++--------------- target/riscv/gdbstub.c | 12 ++-- target/riscv/kvm/kvm-cpu.c | 10 +-- target/riscv/machine.c | 7 +- target/riscv/tcg/tcg-cpu.c | 42 ++--------- target/riscv/translate.c | 3 +- 11 files changed, 131 insertions(+), 131 deletions(-)
Signature · 1 line
2.42.0
PATCH v5 1/6 gdbstub: Check if gdb_regs is NULL
cpu->gdb_regs may be NULL if no coprocessor is registered.
--- gdbstub/gdbstub.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-)
gdbstub/gdbstub.c +20 -14
@@ -385,12 +385,14 @@ static const char *get_feature_xml(const char *p, const char **newp, xml,g_markup_printf_escaped ("<xi:include href=\"%s\"/>" , cc->gdb_core_xml_file)); -for (guint i =0 ; i < cpu->gdb_regs->len; i++) { - r = &g_array_index (cpu->gdb_regs, GDBRegisterState, i); -g_ptr_array_add ( - xml, -g_markup_printf_escaped ("<xi:include href=\"%s\"/>" , - r->xml)); +if (cpu->gdb_regs) { +for (guint i =0 ; i < cpu->gdb_regs->len; i++) { + r = &g_array_index (cpu->gdb_regs, GDBRegisterState, i); +g_ptr_array_add ( + xml, +g_markup_printf_escaped ("<xi:include href=\"%s\"/>" , + r->xml)); + } }g_ptr_array_add (xml,g_strdup ("</target>" ));g_ptr_array_add (xml,NULL );
@@ -430,10 +432,12 @@ static int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg)return cc->gdb_read_register (cpu, buf, reg); } -for (guint i =0 ; i < cpu->gdb_regs->len; i++) { - r = &g_array_index (cpu->gdb_regs, GDBRegisterState, i); -if (r->base_reg <= reg && reg < r->base_reg + r->num_regs) { -return r->get_reg (env, buf, reg - r->base_reg); +if (cpu->gdb_regs) { +for (guint i =0 ; i < cpu->gdb_regs->len; i++) { + r = &g_array_index (cpu->gdb_regs, GDBRegisterState, i); +if (r->base_reg <= reg && reg < r->base_reg + r->num_regs) { +return r->get_reg (env, buf, reg - r->base_reg); + } } }return 0 ;
@@ -449,10 +453,12 @@ static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg)return cc->gdb_write_register (cpu, mem_buf, reg); } -for (guint i =0 ; i < cpu->gdb_regs->len; i++) { - r = &g_array_index (cpu->gdb_regs, GDBRegisterState, i); -if (r->base_reg <= reg && reg < r->base_reg + r->num_regs) { -return r->set_reg (env, mem_buf, reg - r->base_reg); +if (cpu->gdb_regs) { +for (guint i =0 ; i < cpu->gdb_regs->len; i++) { + r = &g_array_index (cpu->gdb_regs, GDBRegisterState, i); +if (r->base_reg <= reg && reg < r->base_reg + r->num_regs) { +return r->set_reg (env, mem_buf, reg - r->base_reg); + } } }return 0 ;
Signature · 1 line
2.42.0
Re: [PATCH v5 1/6] gdbstub: Check if gdb_regs is NULL
Quoted 4 lines · Akihiko Odaki
cpu->gdb_regsmay be NULL if no coprocessor is registered.Fixes 73c392c26b ("gdbstub: Replace gdb_regs with an array")Signed-off-by Akihiko Odaki <[email protected]>
Alex Bennée
AppliedRe: [PATCH v5 1/6] gdbstub: Check if gdb_regs is NULL
In reply to Akihiko OdakiQuoted 4 lines · Akihiko Odaki
cpu->gdb_regsmay be NULL if no coprocessor is registered.Fixes 73c392c26b ("gdbstub: Replace gdb_regs with an array")Signed-off-by Akihiko Odaki <[email protected]>
Queued to gdbstub/next, thanks. I'll leave the riscv stuff for the maintainers of the arch.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
PATCH v5 2/6 hw/riscv: Use misa_mxl instead of misa_mxl_max
In reply to Akihiko OdakiThe effective MXL value matters when booting.
--- hw/riscv/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/riscv/boot.c +1 -1
@@ -36,7 +36,7 @@bool riscv_is_32bit (RISCVHartArrayState *harts) { -return harts->harts[0 ].env.misa_mxl_max ==MXL_RV32 ; +return harts->harts[0 ].env.misa_mxl ==MXL_RV32 ; }/*
Signature · 1 line
2.42.0
PATCH v5 3/6 target/riscv: Remove misa_mxl validation
In reply to Akihiko OdakiIt is initialized with a simple assignment and there is little room for error. In fact, the validation is even more complex.
--- target/riscv/tcg/tcg-cpu.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
target/riscv/tcg/tcg-cpu.c +2 -11
@@ -148,7 +148,7 @@ static void riscv_cpu_validate_misa_priv(CPURISCVState *env, Error **errp) } } -static void riscv_cpu_validate_misa_mxl (RISCVCPU *cpu,Error **errp) +static void riscv_cpu_validate_misa_mxl (RISCVCPU *cpu) {RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cpu);CPUClass *cc =CPU_CLASS (mcc);
@@ -168,11 +168,6 @@ static void riscv_cpu_validate_misa_mxl(RISCVCPU *cpu, Error **errp)default :g_assert_not_reached (); } - -if (env->misa_mxl_max != env->misa_mxl) { -error_setg (errp,"misa_mxl_max must be equal to misa_mxl" ); -return ; - } }static void riscv_cpu_validate_priv_spec (RISCVCPU *cpu,Error **errp)
@@ -573,11 +568,7 @@ static bool tcg_cpu_realize(CPUState *cs, Error **errp)return false; } -riscv_cpu_validate_misa_mxl (cpu, &local_err); -if (local_err !=NULL ) { -error_propagate (errp, local_err); -return false; - } +riscv_cpu_validate_misa_mxl (cpu);riscv_cpu_validate_priv_spec (cpu, &local_err);if (local_err !=NULL ) {
Signature · 1 line
2.42.0
PATCH v5 4/6 target/riscv: Move misa_mxl_max to class
In reply to Akihiko Odakimisa_mxl_max is common for all instances of a RISC-V CPU class so they are better put into class.
--- target/riscv/cpu-qom.h | 1 + target/riscv/cpu.h | 3 +- target/riscv/cpu.c | 118 +++++++++++++++++++------------------ target/riscv/gdbstub.c | 12 ++-- target/riscv/kvm/kvm-cpu.c | 10 ++-- target/riscv/machine.c | 7 +-- target/riscv/tcg/tcg-cpu.c | 12 ++-- target/riscv/translate.c | 3 +- 8 files changed, 87 insertions(+), 79 deletions(-)
target/riscv/cpu-qom.h +1 -0
@@ -68,5 +68,6 @@ struct RISCVCPUClass {/*< public >*/ DeviceRealize parent_realize;ResettablePhases parent_phases; + uint32_t misa_mxl_max; /* max mxl for this cpu */ };#endif /* RISCV_CPU_QOM_H */
target/riscv/cpu.h +1 -2
@@ -159,7 +159,6 @@ struct CPUArchState {/* RISCVMXL, but uint32_t for vmstate migration */ uint32_t misa_mxl;/* current mxl */ -uint32_t misa_mxl_max;/* max mxl for this cpu */ uint32_t misa_ext;/* current extensions */ uint32_t misa_ext_mask;/* max ext for this cpu */ uint32_t xl;/* current xlen */
@@ -711,7 +710,7 @@ enum riscv_pmu_event_idx {/* used by tcg/tcg-cpu.c*/ void isa_ext_update_enabled (RISCVCPU *cpu,uint32_t ext_offset,bool en);bool isa_ext_is_enabled (RISCVCPU *cpu,uint32_t ext_offset); -void riscv_cpu_set_misa (CPURISCVState *env,RISCVMXL mxl,uint32_t ext); +void riscv_cpu_set_misa_ext (CPURISCVState *env,uint32_t ext); typedef struct RISCVCPUMultiExtConfig { const char *name;
target/riscv/cpu.c +61 -57
252 lines not on this page · raw message
target/riscv/gdbstub.c +8 -4
@@ -49,6 +49,7 @@ static const struct TypeSize vec_lanes[] = {int riscv_cpu_gdb_read_register (CPUState *cs,GByteArray *mem_buf,int n) { +RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cs);RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env;target_ulong tmp;
@@ -61,7 +62,7 @@ int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)return 0 ; } -switch (env->misa_mxl_max) { +switch (mcc->misa_mxl_max) {case MXL_RV32 :return gdb_get_reg32 (mem_buf, tmp);case MXL_RV64 :
@@ -75,12 +76,13 @@ int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)int riscv_cpu_gdb_write_register (CPUState *cs,uint8_t *mem_buf,int n) { +RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cs);RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env;int length =0 ;target_ulong tmp; -switch (env->misa_mxl_max) { +switch (mcc->misa_mxl_max) {case MXL_RV32 : tmp = (int32_t )ldl_p (mem_buf); length =4 ;
@@ -214,11 +216,12 @@ static int riscv_gdb_set_virtual(CPURISCVState *cs, uint8_t *mem_buf, int n)static int riscv_gen_dynamic_csr_xml (CPUState *cs,int base_reg) { +RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cs);RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env;GString *s =g_string_new (NULL );riscv_csr_predicate_fn predicate; -int bitsize =16 << env->misa_mxl_max; +int bitsize =16 << mcc->misa_mxl_max;int i;#if !defined(CONFIG_USER_ONLY )
@@ -310,6 +313,7 @@ static int ricsv_gen_dynamic_vector_xml(CPUState *cs, int base_reg)void riscv_cpu_register_gdb_regs_for_features (CPUState *cs) { +RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cs);RISCVCPU *cpu =RISCV_CPU (cs);CPURISCVState *env = &cpu->env;if (env->misa_ext &RVD ) {
@@ -326,7 +330,7 @@ void riscv_cpu_register_gdb_regs_for_features(CPUState *cs)ricsv_gen_dynamic_vector_xml (cs, base_reg), "riscv-vector.xml", 0); } -switch (env->misa_mxl_max) { +switch (mcc->misa_mxl_max) {case MXL_RV32 : gdb_register_coprocessor(cs, riscv_gdb_get_virtual, riscv_gdb_set_virtual,
target/riscv/kvm/kvm-cpu.c +5 -5
@@ -1461,14 +1461,14 @@ static void kvm_cpu_accel_register_types(void) }type_init (kvm_cpu_accel_register_types); -static void riscv_host_cpu_init (Object *obj) +static void riscv_host_cpu_class_init (ObjectClass *c,void *data) { -CPURISCVState *env = &RISCV_CPU (obj)->env; +RISCVCPUClass *mcc =RISCV_CPU_CLASS (c);#if defined(TARGET_RISCV32 ) - env->misa_mxl_max = env->misa_mxl =MXL_RV32 ; + mcc->misa_mxl_max =MXL_RV32 ;#elif defined(TARGET_RISCV64 ) - env->misa_mxl_max = env->misa_mxl =MXL_RV64 ; + mcc->misa_mxl_max =MXL_RV64 ;#endif }
@@ -1476,7 +1476,7 @@ static const TypeInfo riscv_kvm_cpu_type_infos[] = { { .name = TYPE_RISCV_CPU_HOST, .parent = TYPE_RISCV_CPU, - .instance_init = riscv_host_cpu_init, + .class_init = riscv_host_cpu_class_init, } };
target/riscv/machine.c +3 -4
@@ -175,10 +175,9 @@ static const VMStateDescription vmstate_pointermasking = {static bool rv128_needed (void *opaque) { -RISCVCPU *cpu = opaque; -CPURISCVState *env = &cpu->env; +RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (opaque); -return env->misa_mxl_max ==MXL_RV128 ; +return mcc->misa_mxl_max ==MXL_RV128 ; }static const VMStateDescription vmstate_rv128 = {
@@ -369,7 +368,7 @@ const VMStateDescription vmstate_riscv_cpu = {VMSTATE_UINTTL (env.vext_ver,RISCVCPU ),VMSTATE_UINT32 (env.misa_mxl,RISCVCPU ),VMSTATE_UINT32 (env.misa_ext,RISCVCPU ), -VMSTATE_UINT32 (env.misa_mxl_max,RISCVCPU ), +VMSTATE_UNUSED (4 ),VMSTATE_UINT32 (env.misa_ext_mask,RISCVCPU ),VMSTATE_UINTTL (env.priv,RISCVCPU ), VMSTATE_BOOL(env.virt_enabled, RISCVCPU),
target/riscv/tcg/tcg-cpu.c +6 -6
@@ -152,10 +152,9 @@ static void riscv_cpu_validate_misa_mxl(RISCVCPU *cpu) {RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cpu);CPUClass *cc =CPU_CLASS (mcc); -CPURISCVState *env = &cpu->env;/* Validate that MISA_MXL is set properly. */ -switch (env->misa_mxl_max) { +switch (mcc->misa_mxl_max) {#ifdef TARGET_RISCV64 case MXL_RV64 :case MXL_RV128 :
@@ -265,6 +264,7 @@ static void riscv_cpu_disable_priv_spec_isa_exts(RISCVCPU *cpu)*/ void riscv_cpu_validate_set_extensions (RISCVCPU *cpu,Error **errp) { +RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cpu);CPURISCVState *env = &cpu->env;Error *local_err =NULL ;
@@ -445,7 +445,7 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp)cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zcb), true);cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zcmp), true);cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zcmt), true); -if (riscv_has_ext (env,RVF ) && env->misa_mxl_max ==MXL_RV32 ) { +if (riscv_has_ext (env,RVF ) && mcc->misa_mxl_max ==MXL_RV32 ) {cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zcf), true); } }
@@ -453,7 +453,7 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp)/* zca, zcd and zcf has a PRIV 1.12.0 restriction */ if (riscv_has_ext (env,RVC ) && env->priv_ver >=PRIV_VERSION_1_12_0 ) {cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zca), true); -if (riscv_has_ext (env,RVF ) && env->misa_mxl_max ==MXL_RV32 ) { +if (riscv_has_ext (env,RVF ) && mcc->misa_mxl_max ==MXL_RV32 ) {cpu_cfg_ext_auto_update (cpu,CPU_CFG_OFFSET (ext_zcf), true); }if (riscv_has_ext (env,RVD )) {
@@ -461,7 +461,7 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp) } } -if (env->misa_mxl_max !=MXL_RV32 && cpu->cfg.ext_zcf) { +if (mcc->misa_mxl_max !=MXL_RV32 && cpu->cfg.ext_zcf) {error_setg (errp,"Zcf extension is only relevant to RV32" );return ; }
@@ -861,7 +861,7 @@ static void riscv_init_max_cpu_extensions(Object *obj)const RISCVCPUMultiExtConfig *prop;/* Enable RVG, RVJ and RVV that are disabled by default */ -riscv_cpu_set_misa (env, env->misa_mxl, env->misa_ext |RVG |RVJ |RVV ); +riscv_cpu_set_misa_ext (env, env->misa_ext |RVG |RVJ |RVV );for (prop = riscv_cpu_extensions; prop && prop->name; prop++) {isa_ext_update_enabled (cpu, prop->offset, true);
target/riscv/translate.c +2 -1
@@ -1167,6 +1167,7 @@ static void riscv_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) {DisasContext *ctx =container_of (dcbase, DisasContext, base);CPURISCVState *env =cpu_env (cs); +RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cs);RISCVCPU *cpu =RISCV_CPU (cs);uint32_t tb_flags = ctx->base.tb->flags;
@@ -1188,7 +1189,7 @@ static void riscv_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) ctx->cfg_vta_all_1s = cpu->cfg.rvv_ta_all_1s; ctx->vstart_eq_zero =FIELD_EX32 (tb_flags,TB_FLAGS ,VSTART_EQ_ZERO ); ctx->vl_eq_vlmax =FIELD_EX32 (tb_flags,TB_FLAGS ,VL_EQ_VLMAX ); - ctx->misa_mxl_max = env->misa_mxl_max; + ctx->misa_mxl_max = mcc->misa_mxl_max; ctx->xl =FIELD_EX32 (tb_flags,TB_FLAGS ,XL ); ctx->address_xl =FIELD_EX32 (tb_flags,TB_FLAGS ,AXL ); ctx->cs = cs;
Signature · 1 line
2.42.0
PATCH v5 5/6 target/riscv: Validate misa_mxl_max only once
In reply to Akihiko Odakimisa_mxl_max is now a class member and initialized only once for each class. This also moves the initialization of gdb_core_xml_file which will be referenced before realization in the future.
--- target/riscv/cpu.c | 21 +++++++++++++++++++++ target/riscv/tcg/tcg-cpu.c | 23 ----------------------- 2 files changed, 21 insertions(+), 23 deletions(-)
target/riscv/cpu.c +21 -0
@@ -1193,6 +1193,26 @@ static const MISAExtInfo misa_ext_info_arr[] = { MISA_EXT_INFO(RVG, "g", "General purpose (IMAFD_Zicsr_Zifencei)"), }; +static void riscv_cpu_validate_misa_mxl (RISCVCPUClass *mcc) +{ +CPUClass *cc =CPU_CLASS (mcc); + +/* Validate that MISA_MXL is set properly. */ +switch (mcc->misa_mxl_max) { +#ifdef TARGET_RISCV64 +case MXL_RV64 : +case MXL_RV128 : + cc->gdb_core_xml_file ="riscv-64bit-cpu.xml" ; +break ; +#endif +case MXL_RV32 : + cc->gdb_core_xml_file ="riscv-32bit-cpu.xml" ; +break ; +default : +g_assert_not_reached (); + } +} +static int riscv_validate_misa_info_idx (uint32_t bit) {int idx;
@@ -1593,6 +1613,7 @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)RISCVCPUClass *mcc =RISCV_CPU_CLASS (c); mcc->misa_mxl_max = (uint32_t )(uintptr_t )data; +riscv_cpu_validate_misa_mxl (mcc); } static void riscv_isa_string_ext(RISCVCPU *cpu, char **isa_str,
target/riscv/tcg/tcg-cpu.c +0 -23
@@ -148,27 +148,6 @@ static void riscv_cpu_validate_misa_priv(CPURISCVState *env, Error **errp) } } -static void riscv_cpu_validate_misa_mxl (RISCVCPU *cpu) -{ -RISCVCPUClass *mcc =RISCV_CPU_GET_CLASS (cpu); -CPUClass *cc =CPU_CLASS (mcc); - -/* Validate that MISA_MXL is set properly. */ -switch (mcc->misa_mxl_max) { -#ifdef TARGET_RISCV64 -case MXL_RV64 : -case MXL_RV128 : - cc->gdb_core_xml_file ="riscv-64bit-cpu.xml" ; -break ; -#endif -case MXL_RV32 : - cc->gdb_core_xml_file ="riscv-32bit-cpu.xml" ; -break ; -default : -g_assert_not_reached (); - } -} -static void riscv_cpu_validate_priv_spec (RISCVCPU *cpu,Error **errp) {CPURISCVState *env = &cpu->env;
@@ -568,8 +547,6 @@ static bool tcg_cpu_realize(CPUState *cs, Error **errp)return false; } -riscv_cpu_validate_misa_mxl (cpu); -riscv_cpu_validate_priv_spec (cpu, &local_err);if (local_err !=NULL ) {error_propagate (errp, local_err);
Signature · 1 line
2.42.0
PATCH v5 6/6 plugins: Remove an extra parameter
In reply to Akihiko Odakicopy_call() has an unused parameter so remove it.
--- accel/tcg/plugin-gen.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
accel/tcg/plugin-gen.c +3 -6
@@ -327,8 +327,7 @@ static TCGOp *copy_st_ptr(TCGOp **begin_op, TCGOp *op)return op; } -static TCGOp *copy_call (TCGOp **begin_op,TCGOp *op,void *empty_func, -void *func,int *cb_idx) +static TCGOp *copy_call (TCGOp **begin_op,TCGOp *op,void *func,int *cb_idx) {TCGOp *old_op;int func_idx;
@@ -372,8 +371,7 @@ static TCGOp *append_udata_cb(const struct qemu_plugin_dyn_cb *cb, }/* call */ - op =copy_call (&begin_op, op,HELPER (plugin_vcpu_udata_cb), - cb->f.vcpu_udata, cb_idx); + op =copy_call (&begin_op, op, cb->f.vcpu_udata, cb_idx);return op; }
@@ -420,8 +418,7 @@ static TCGOp *append_mem_cb(const struct qemu_plugin_dyn_cb *cb,if (type ==PLUGIN_GEN_CB_MEM ) {/* call */ - op =copy_call (&begin_op, op,HELPER (plugin_vcpu_mem_cb), - cb->f.vcpu_udata, cb_idx); + op =copy_call (&begin_op, op, cb->f.vcpu_udata, cb_idx); }return op;
Signature · 1 line
2.42.0
Alex Bennée
AppliedRe: [PATCH v5 6/6] plugins: Remove an extra parameter
Quoted 3 lines · Akihiko Odaki
copy_call()has an unused parameter so remove it.Signed-off-by Akihiko Odaki <[email protected]>
Queued to plugins/next, thanks.
Quoted 38 lines
--- accel/tcg/plugin-gen.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)accel/tcg/plugin-gen.c +3
-6@@ -327,8 +327,7 @@ static TCGOp *copy_st_ptr(TCGOp **begin_op, TCGOp *op)return op; } -static TCGOp *copy_call (TCGOp **begin_op,TCGOp *op,void *empty_func, -void *func,int *cb_idx) +static TCGOp *copy_call (TCGOp **begin_op,TCGOp *op,void *func,int *cb_idx) {TCGOp *old_op;int func_idx;@@ -372,8 +371,7 @@ static TCGOp *append_udata_cb(const struct qemu_plugin_dyn_cb *cb, }/* call */ - op =copy_call (&begin_op, op,HELPER (plugin_vcpu_udata_cb), - cb->f.vcpu_udata, cb_idx); + op =copy_call (&begin_op, op, cb->f.vcpu_udata, cb_idx);return op; }@@ -420,8 +418,7 @@ static TCGOp *append_mem_cb(const struct qemu_plugin_dyn_cb *cb,if (type ==PLUGIN_GEN_CB_MEM ) {/* call */ - op =copy_call (&begin_op, op,HELPER (plugin_vcpu_mem_cb), - cb->f.vcpu_udata, cb_idx); + op =copy_call (&begin_op, op, cb->f.vcpu_udata, cb_idx); }return op;
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro