Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread LIU Zhiwei
On 2023/10/9 20:53, Richard W.M. Jones wrote: On Mon, Oct 09, 2023 at 08:36:28PM +0800, LIU Zhiwei wrote: On 2023/10/9 5:50, 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.

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread Richard W.M. Jones
On Mon, Oct 09, 2023 at 08:36:28PM +0800, LIU Zhiwei wrote: > > On 2023/10/9 5:50, 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,

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread LIU Zhiwei
On 2023/10/9 5:50, 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 s

Re: [PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-09 Thread Philippe Mathieu-Daudé
Hi Richard, On 8/10/23 23:50, 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

[PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-08 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 qemu

[PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-08 Thread Richard W.M. Jones
v1 was here: https://lists.nongnu.org/archive/html/qemu-devel/2023-10/msg02021.html v2 is functionally exactly the same, except I changed s/qemu cast/QOM cast/ in the comment, and added the Reviewed-by tag received for the first version. Rich.