-
Notifications
You must be signed in to change notification settings - Fork 3
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
Intel LA57 Support #6
Comments
@Champ-Goblem Thanks for report, we are adding the support of it. We will report the progresses here as possible as we can. |
For a 4-level paging mode PVM guest, only the top 128TB is canonical. When KASLR is enabled for 5-level page tables, this range overlaps with the KASLR entropy range. Therefore, set the end address to -128TB to reserve a range for the PVM guest. Regarding the KASAN area, the size is sufficient. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Link: #6
…ld SP role The 'role.host_mmu_la57_top_p4d' bit is only allowed for L4 SP and should not be inherited when calculating the child SP role. Otherwise, wrong spte will be set in drop_parent_pte() and it will result in a broken SPT. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Link: #6
When 5-level paging mode is enabled on the host, the guest can be either in 4-level paging mode or 5-level paging mode. For 4-level paging mode, only the topmost 128TB is canonical. Therefore, the hypervisor needs to reserve two ranges: one in the vmalloc area for the 5-level paging mode guest, and another in the topmost 128TB for the 4-level paging mode guest. If the allocation of the range for the 5-level paging mode guest fails, then 5-level paging mode is disabled for the guest. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Link: #6
…l paging mode According to the PVM specification, a flag in the PVM_HC_LOAD_PGTBL hypercall is allowed to directly change the paging mode. Therefore, add the missing flags when the guest is in 5-level paging mode. This preparation is done to support 5-level paging mode guests. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Link: #6
Similar to the 4-level paging mode guest, the 5-level paging mode guest should lie within the allowed range provided by the hypervisor. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Link: #6
The 5-level paging mode is enabled in compressed kernel booting and it uses the CPUID instruction to detect 5-level paging support. For PVM guest, pvm_cpuid() should be used instead of the CPUID instruction, so detect PVM hypervisor support early in configure_5level_paging(). Additionally, relocation for PVM guest during booting should be avoided. This is because there is only the first 4G identity mapping, and if physical address randomization is enabled, a #PF exception will occur if the chosen output address is over the first 4G range. Therefore, for simplification, physical address randomization should be avoided. As for virtual address randomization, it should occur after entering the kernel entry. Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com> Link: #6
Hi @Champ-Goblem , We have provided basic support for 5-level paging mode hosts and 5-level paging mode guests. I have tested booting 4-level paging mode guests and 5-level paging mode guests on a 5-level paging mode host, but it's not fully tested, as we don't have CI/CD now. Please note that migrating a 4-level paging mode guest from a 5-level paging mode host to 4-level paging mode host is currently not successful. If any problems occur, please feel free to report them. Thanks! |
We are attempting to test out PVM on GCP through their newer machine types (N4/C3) however when trying to load the PVM kernel module we see the following error in the kernel logs:
We managed to avoid this error by disabling 5-level paging support when compiling the kernel (
CONFIG_X86_5LEVEL=n
), however, it would be good to know if support for this will be added at some point, and ideally to have this as a way to track that support.Thanks
The text was updated successfully, but these errors were encountered: