xvisor / xvisor

Xvisor: eXtensible Versatile hypervISOR
http://xhypervisor.org
GNU General Public License v2.0
518 stars 242 forks source link

cpu_init never called in xvisor-next #136

Open llabadie opened 3 years ago

llabadie commented 3 years ago

Hi,

In xvisor-next cpu_entry.S, the only way to call cpu_init is by triggering an exception. Exception vectors are all initialized to call cpu_init during early boot here.

Unfortunately, when I try to boot xvisor no exception is ever triggered, thus cpu_init is never called. In order to boot, I added a short hvc #0 right before the comment We should never reach here.

Did I do something wrong?

avpatel commented 3 years ago

The "msr sctlr_el2, x0" instruction will turn on MMU and we get trap immediately after this instruction so we jump to init_vectors which will call cpu_init

Regards, Anup

llabadie commented 3 years ago

I tested on my raspberry pi 4 with working mmu, but it still does not call cpu_init.

In ARM documentation, I did not find anything about MMU enabling getting trapped.

apupu12 commented 3 months ago

I tested on my raspberry pi 4 with working mmu, but it still does not call cpu_init.

In ARM documentation, I did not find anything about MMU enabling getting trapped.

it seems to have the same situation on my raspberry pi 4. The serial output is stuck in the "starting kernel". xvisor can not boot successfully.

Is there any way to solve or avoid this problem?thanks a lot. @avpatel @llabadie