-
Notifications
You must be signed in to change notification settings - Fork 0
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
Xen is booting very slowly after Dynamic Launch #16
Comments
|
Can you run with |
Does it make sense to call @andyhhp ? |
Lol, who you gonna call?
Please always use debug builds of Xen. Also, boot with Which platform is this? Something Intel, but once again I'm missing an expected In that period of time is when we're physically relocating the multiboot modules, and in particular putting dom0/initrd at the very top of memory. If that's ending up being uncached, then yes it will proceed slowly. This ought to make it obvious, if it's this. diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index dd51e68dbe5b..4299641e8a71 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1457,6 +1457,7 @@ void asmlinkage __init noreturn __start_xen(unsigned long mbi_p)
(headroom ||
((end - size) >> PAGE_SHIFT) > mod[j].mod_start) )
{
+ printk("*** Relocating mod[%d]\n", j);
move_memory(end - size + headroom,
(uint64_t)mod[j].mod_start << PAGE_SHIFT,
mod[j].mod_end); but there are various other things we're doing during this period, including building pagetables, setting up the physical memory manager, etc. |
That does sound like MTRRs not being restored. The entire world is UC except for the ACM area on SENTER. |
Isn't this the platform on which coreboot complains about lack of free MTRRs for ROM? If it gives up in the middle of writing those and doesn't set something sane for >4GB, perhaps wrong settings are properly restored. |
I have commented out the part where a temporary MTRR is placed, so MTRRs should be alright.
Intel Comet Lake U
Okay, but on the non-Dynamic Launch path, it is not taking that long (I get dom0 systemd messages/LUKS key prompt on the serial console in a matter of seconds compared to over 60 seconds on Dynamic Launch). |
I'm trying to tacke this issue. Found some small problems around MTRR code and fixed them: However, I still observe serious delays in the boot process. MTRRs are now the same as when coreboot was setting them up. I no longer have any clue what is wrong and how to debug further. I have also dumped the registers state on BSP (used WARN() right after init_e820 where MTRRs are restored), there there are almost no differences in the state. Attaching some logs from slaunch boot and non-slaunch boot for reference (log from minicom with timestamps, one can see that hashing takes significantly long, and some RAM region walks). At this point I think only the page tables/mapping may be causing the ranges to be non-cacheable. xen_non_tb_boot.log @andyhhp any pointers appreciated. |
@miczyg1 are you invalidating the cache between GRUB and Xen to get apples to apples comparison? After restoring MTRRs the cache is invalid, so it must get read at least once. Ideally this should be done after relocator, but as long as all the big parts are loaded to their final addresses doing it in late C code should be enough. Time difference between SHA1 and SHA256 for dom0 initramfs is significantly bigger than the rest, which may point to cache trashing. This is expected when size of measured data is bigger than cache size. You may try commenting out the hashing too see if it impacts execution times of next steps. |
Not sure if there is any invalidation in between.
I may try it. |
Right after the memory map is printed (quite early), Xen doesn't print anything on serial console for 1 minute or longer. I suspect it might be related to the MTRRs not yet being set up on BSP after Dynamic Launch.
The text was updated successfully, but these errors were encountered: