Re: [PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-10 Thread Alistair Francis
On Mon, Oct 9, 2023 at 10:50 PM Richard W.M. Jones wrote: > > RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled > this adds about 5% total overhead when emulating RV64 on x86-64 host. > > Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk > disk. The guest

Re: [PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-10 Thread Alistair Francis
On Mon, Oct 9, 2023 at 10:50 PM Richard W.M. Jones wrote: > > RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled > this adds about 5% total overhead when emulating RV64 on x86-64 host. > > Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk > disk. The guest

Re: [PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-10 Thread Richard Henderson
On 10/9/23 05:48, Richard W.M. Jones wrote: RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of the qemu

Re: [PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Philippe Mathieu-Daudé
On 9/10/23 14:48, Richard W.M. Jones wrote: RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of the qemu

[PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Richard W.M. Jones
RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of the qemu source tree. The test involves compiling the

[PATCH v3] target/riscv: Use env_archcpu for better performance

2023-10-09 Thread Richard W.M. Jones
In v3: - Use env_archcpu - Rerun the benchmark to get new "after" figures Rich.