>
> +static uint32_t get_inst_len_at(uint64_t pc)
> +{
> +    bfd_byte packet[2];
> +    uint16_t opcode;
> +    MemTxResult status;
> +
> +    status = dma_memory_read(&address_space_memory, pc, packet, 2,
> +                             MEMTXATTRS_UNSPECIFIED);
>

 Could this be an issue when the hart is executing in S/U-mode with paging
enabled? env->pc may be a guest virtual address, but
dma_memory_read(&address_space_memory, ...) does not appear to apply the
CPU's MMU translation.

Thanks
Jay Chang

Reply via email to