On Fri, 17 Nov 2023 at 07:35, 方 <1584389...@qq.com> wrote: > > Hello everyone! I am working on implementing a tool to assess the complexity > of CPU architecture porting. It primarily focuses on RISC-V architecture > porting. In fact, the tool may have an average estimate of various > architecture porting efforts.My focus is on the overall workload and > difficulty of transplantation in the past and future,even if a project has > already been ported.As part of my dataset, I have collected the **qemu** > project. **I would like to gather community opinions to support my > assessment. I appreciate your help and response!** Based on scanning tools, > the porting complexity is determined to be high, with a significant amount of > code related to the CPU architecture in the project.
You should be careful here to distinguish the code in QEMU which is related to handling RISC-V as a *guest* architecture (i.e. one which QEMU emulates) from the code which is related to handling RISC-V as a *host* architecture. For purposes of "porting QEMU to a RISC-V host", only the latter complexity counts. The former we would have to do anyway, even if QEMU only ever ran on x86-64 machines. You should check whether your scanner has correctly figured this out. -- PMM