-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Platforms] Add support for CPUID customization #998
Comments
I am much in favour of this approach. Although I do have to say that we will probably not have the time to work on this any time soon. If you want to pick this up I can help along the way. Do you have any design in mind?
Anyway, I find this a interesting problem to solve! |
Does this limit Firecracker to EC2 instances? If so, why such a limitation–is the emulated |
Thank you! I'd like to have a try.
Yes, I have got some ideas. First, I want to start from refining FC's cpuid module to provide generic framework to handle x86 cpu model related resources, cpuid/msr/etc. (Other architectures are not considered yet.) Per my observation, I think FC's current cpuid module can be refined for below things. So I plan to do below things. Second, I want to extend above CPU model to handle CPU states, address space, interrupts, etc. The goal is also generic and hypervisor agnostic. Last, I'd like to implement cpu hotplug, live migration capabilities.
Personally, I like a configuration file or a template in code. For template in code, I expect the template codes should be very simple to just add a few codes, e.g. a model string, the CPUID settings.
I think there may be different ways. So far, I have two ideas.
Yes, I see. There will be CPUID filter. We can compare user settings with host enabled features. Only the common features are reported to Guest.
|
Current FC's cpuid can only support EC2 C3 and EC2 T2 instance types. My plan is to remove such limitation. I guess the reason of this limitation is that FC should support AWS first. :) |
Firecracker can be run on any bare metal instance and even with nested virtualization. We only implemented two templates that are indeed specific to EC2 instances, but this doesn't mean that there is any limitation in running Firecracker on any machine that has access to The purpose of this issue as I see it is to enhance the Firecracker cpuid crate to support other custom templates. Ideally these templates are not hardcoded in the code, but rather can be passed as configuration files through Firecracker API. |
To make cpu-model be hypervisor agnostic, we need do some works to make Firecracker be hypervisor agnostic. So, I proposed a hypervisor agnostic solution on rust-vmm as below. After this is done, we can implement other cpu-model functions described above. |
Added this to the roadmap, under the "Researching" column. |
Removing it from the roadmap because we do not have any task related to it in a foreseeable future. |
Since 1.4, firecracker has support for CPUID customization. See https://github.com/firecracker-microvm/firecracker/blob/main/docs/cpu_templates/cpu-templates.md#custom-cpu-templates for documentation. |
Although Firecracker has supported CPUID and provided templates, it only supports EC2 C3 and EC2 T2 instance types. Per discussion with Andreea, it seems not easy to add more templates especially customized templates.
But customized CPU model is important because of below reasons.
So I propose to provide a generic framework which has standard interfaces and flexible mechanism to support customized CPU models.
The text was updated successfully, but these errors were encountered: