Re: [PATCH v9 1/2] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-07-03 Thread dramforever
12. >> >> Reviewed-by: Alistair Francis >> Signed-off-by: Anup Patel > @dramforever do you want to give an Ack or Reviewed-by? > > Alistair Acked-By: dramforever dramforever

Re: [PATCH v8 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-06-29 Thread dramforever
xinsn_access_size = 1 << GET_FUNCT3(xinsn); > +xinsn = SET_I_IMM(xinsn, 0); > +break; > +case OPC_RISC_STORE: > +case OPC_RISC_FP_STORE: > +xinsn = insn; > +xinsn_access_rs1 = GET_RS1(xinsn); > + xins

Re: [PATCH v6 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-06-27 Thread dramforever
se == RISCV_EXCP_STORE_AMO_ACCESS_FAULT) { >> +tinst = riscv_transformed_insn(env, env->bins, true, >> tval); >> +} else { >> + tinst = riscv_transformed_insn(env, env->bins, false, >> tval); >> +

Re: [PATCH v5 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-06-10 Thread dramforever
ion guest-page faults should set [m|h]tinst to one of the pseudoinstructions if env->two_stage_lookup is true. Otherwise it should set [m|h]tinst to zero. In any case, as this seems to be one of the first implementations of [m|h]tinst, it might be worthwhile to confirm with the spec authors and clarify any unclear bits before this gets released. dramforever

Re: [PATCH v5 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-06-10 Thread dramforever
> [m|h]tinst to zero. >> >> In any case, as this seems to be one of the first implementations of >> [m|h]tinst, it might be worthwhile to confirm with the spec authors and >> clarify >> any unclear bits before this gets released. > This is already handled because tinst is initialized to zero. If an instruction guest-page fault occurs due to a G-stage fault while doing VS-stage page table walk, i.e. env->two_stage_indirect_lookup is true (I had mistakenly wrote env->two_stage_lookup earlier), and the faulting guest physical address (env->guest_phys_fault_addr) is written to mtval2/htval, [m|h]tinst must be a pseudoinstruction and not zero. This case is not handled in the v5 patch. dramforever