Add support for qemu virtual machines using KVM#423
Add support for qemu virtual machines using KVM#423IkerGalardi wants to merge 7 commits intoseL4:mainfrom
Conversation
This board differs from the standard qemu_virt_aarch64 board in that the entry point is in EL2 instead of EL1. This is necessary due to the lack of nested virtualization support on the KVM subsystem. Signed-off-by: IkerGalardi <contacto.ikergalardi@gmail.com>
Previously the defaults where applied ALWAYS, meaning that if some board tried to specialize a kernel building parameter that the default configuration did, it would get overwriten by the default configuration. This patch applies the specialization to the default configuration instead of doing it the other way around. Signed-off-by: IkerGalardi <contacto.ikergalardi@gmail.com>
Signed-off-by: IkerGalardi <contacto.ikergalardi@gmail.com>
EL1 software can not access interrupt group registers on the GIC distributor. Signed-off-by: IkerGalardi <contacto.ikergalardi@gmail.com>
a6c4c36 to
fe30316
Compare
The el1_mmu_disable function at the start pushed both x29 and x30 (frame pointer and link register) into the stack. But when ending the function, before the RET instruction, it poped 4 values instead of just the pushed 2, eating the stack frame of the parent scope. Probably copy-pasted from the el2_mmu_disable, which pushes x27, x28, x29 and x30 and pops all of them. Both functions are identical, but el1 version for some reason does not push x27 and x28. Signed-off-by: IkerGalardi <contacto.ikergalardi@gmail.com>
There was a missing ldp instruction poping the x27 and x28 values from the stack. Signed-off-by: IkerGalardi <contacto.ikergalardi@gmail.com>
|
@IkerGalardi you should include the full logs for the loader, it's not clear to me that the loader is working properly. There is most likely an issue with the initial virtual address space that is setup by the loader. I also would imagine that the |
|
Here are the full logs: The issue could be the page tables, but still, the kernel entry being at About the |
On non-HYP, the kernel uses the upper address range for its page table configured by |
This PR adds support for running microkit based operating systems using qemu with KVM enabled.
The main issue with the qemu platform with KVM enabled is that it drops the kernel in EL1 instead of the expected EL2. This PR builds a custom kernel for this platform with hypervisor support disabled.
The loader seems to work fine, but jumping to the kernel causes a instruction abort exception. The next is the log: