Why qemu with kvm enabled can boot kernel even if identity page map is not set correctly?

Viewed 130

In the early stages of boot process, kernel need identity mapped page setup when switching gdt as code here implies. That's why the first few entries of early_dynamic_pgts are set to map the kernel text range [_text, _end]. But as we discussed about the role of the first few entries of early_dynamic_pgts, we delete them and recompile the kernel, then test it on qemu. Without '--enable-kvm' option the kernel won't boot as we expected, but with '--enable-kvm' option on, the kernel boot and everything runs well, really to our surprise.

So I guess there are something under the hood done by kvm, which doesn't obey the rules of how a real physical machine behaves. Can anyone confirm what we've observed? Any details or explanation would be really appreciated!

0 Answers
Related