graphic: 0.734 device: 0.725 files: 0.687 risc-v: 0.648 register: 0.512 debug: 0.503 architecture: 0.492 permissions: 0.483 semantic: 0.472 performance: 0.452 network: 0.448 vnc: 0.436 socket: 0.412 PID: 0.336 arm: 0.322 boot: 0.320 ppc: 0.318 mistranslation: 0.309 virtual: 0.296 i386: 0.295 peripherals: 0.246 TCG: 0.214 VMM: 0.199 x86: 0.195 user-level: 0.194 kernel: 0.184 hypervisor: 0.164 KVM: 0.084 assembly: 0.052 The cause code of a trap changes when qemu is nested in another qemu Description of problem: I am studying the feasibility of doing some practical work on RISCV plates. Since I don't have these boards yet, I'm emulating it with qemu. The practice in turn consists of launching with qemu a very small operating system with two tasks that make a series of system calls. When I run this practice on my host it works correctly, but when I run it on an Ubuntu emulated in riscv with qemu, the cause code for the trap changes (the first bit of the code). The demo can be found in this repository: https://github.com/Sft570/qemu-bug-report Steps to reproduce: 1. Clone the repository on the host and run the demo with "make qemu" 2. Emulate with qemu ubuntu in riscv, clone the repository and run the demo with "make qemu". The error displayed shows the change of the cause code bit. You can analyze its behavior in the trap.c file in the src folder. Additional information: