-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple IMSICs with multiple VS interrupt files for a hart may bring huge resource overhead #114
Comments
If your hardware has multiple physical IMSIC instances, there is no requirement that they have the same features, as long as each instance is described accurately in the DT/ACPI. For example, you could have one IMSIC for the primary SD with 5 VS-mode interrupt files, and 3 IMSICs for the other SDs each with 0 or 1 VS-mode interrupt file. Each SD sees its own IMSIC in the DT/ACPI, and does not know anything about the IMSICs of other SDs. If your hardware can move VS-mode interrupt files between S-mode IMSIC groups, then a static allocation of the VS-mode interrupt files would look just like what I described above. You would use some platform-specific method (e.g. custom CSR) to configure the IMSICs at boot to match what is described in each SD's DT/ACPI, and the RDSM would be otherwise unaware of this configurability. So this could be implemented without any changes to the spec, though there may be some benefit to standardizing this IMSIC configuration interface. If you want to dynamically allocate VS-mode interrupt files to SDs, then the software/hardware is more complicated. You would pretend that each IMSIC instance has the maximum number of VS-mode interrupt files in the DT/ACPI. Then, you would need to trap writes to Do you have any suggestions for what the interface for configuring the IMSIC would look like? Should this be developed in conjunction with the AIA spec? |
Thanks for your reply! Combined with your description, please let me summarize the current several implementation ideas. Implementation 1: Using multiple physical IMSIC instances, without hardware support static allocation of the VS interrupt files
But there are two suspicious points that need to be clarified first.
Please help explain the above doubts before determining the feasibility of this Implementation. Implementation 2: Using multiple physical IMSIC instances, with hardware support static allocation of the VS interrupt files once
This implementation still needs to solve the above two suspicious points first. And I personally think that the hardware may not consider implementing the function of statically allocating VS interrupt files between multiple physical IMSIC instances. Implementation 3: Using single physical IMSIC but multiple sets of S/VS interrupt files, with support dynamic allocation of S/VS interrupt files to SDs
My understanding here is a little different from yours. Use a single physical IMSIC instead of multiple physical IMSIC instances. I don't have any more ideas about the specific implementation details of dynamic allocation. However, from the previous discussions on this topic in the smmtt community, I think there is already a good implementation direction. Please let me quote some key descriptions. We can continue to discuss based on this. https://lists.riscv.org/g/tech-smmtt/topic/multiple_imsic_for_a_hart/106345304
|
Background: There are discussions on this topic in the smmtt community:
https://lists.riscv.org/g/tech-smmtt/topic/multiple_imsic_for_a_hart/106345304
As described by Vedvyas Shanbhogue on the floor 91:
Currently, the smmtt spec only describes the first implementation, which is to instantiate multiple IMSICs physically.
This implementation may bring a problem. In RISCV-V Server SoC specification it is required that "IMSIC MUST support at least 5 VS-mode interrupt files".
1 IMSIC implements at least 5 VS int files; 2 supervisor domains, i.e. 2 IMSICs, need to implement 10 VS int files; And 4 supervisor domains, i.e. 4 IMSICs, need to implement 20 VS int files. If there are more SDs, the number of VS files instantiated in a hart will be greater. And for Server SoC, the number of harts will also be very large. If this is implemented, the logic resources and area overhead will be very exaggerated.
But generally, the number of virtual harts (in VMs or TVMs) running on per physical hart is only 4~5. The number of virtual harts that a physical hart can carry is very limited. In the multiple SDs implementation of SERVER-level SOC, each physical hart has so many VS interrupt files (by instantiating IMSIC for each SD), but only a small number of VS interrupt files are actually used, resulting in a large waste of logic resources and area.
This may be a big problem in actual implementation. Therefore, the second implementation scheme, that is, sharing IMSIC logic with multiple sets of S/VS files for multiple SDs, seems more feasible. In this scheme, we can configure which VS files are exposed to active SD or deactive SD in RDSM. In this way, some VS files can be shared among multiple SDs to reduce the defects of excessive resource and area overhead brought by the first implementation scheme.
Is it possible to add description and supplement to the second implementation option in smmtt spec to guide the actual development? It seems that new register functions need to be introduced.
Please refer to the content of the floor 85, 91, 92, 93, 94, 95 of the discussion page linked above.
Please also help correct me if my understanding is wrong in any way, thanks!
The text was updated successfully, but these errors were encountered: