camkes-vm icon indicating copy to clipboard operation
camkes-vm copied to clipboard

CNode_Revoke failed when reset resources

Open Makebug opened this issue 3 years ago • 6 comments

I want to reboot vm0 component, but it was failed when reset resources. image image image

so i do some test. i direct revoke after untyped retype, it was also failed. image image Have u meet the same issue? BR

Makebug avatar Jun 22 '21 08:06 Makebug

@bennoleslie @stevebob @jashank @ajaysusarla @lsf37 can u help with this issue?

thanks!

Makebug avatar Jun 22 '21 08:06 Makebug

This reset_resources() implementation was made a while ago for a particular project requirement and may not still work. It's implemented by the component and not by CAmkES, so if the component has moved the untyped capabilities out of the initial slots, then the revoke operations would fail like you are seeing. The first thing I would try would be to call reset_resources early on during the component initialization to see if the function still works when the component is in a fresh state.

kent-mcleod avatar Jun 23 '21 04:06 kent-mcleod

@kent-mcleod thanks for the reply!!! I found the root cause that can not revoke image I specified the depth , it works well.

but i meet a new issue :

image

Makebug avatar Jun 23 '21 05:06 Makebug

hi @kent-mcleod I am developing a feature that can reboot vm linux, but i meet some issues. reference to the existing code , it does not work :( Is there a sample that can reboot vm component or vm linux successfully?

maybe I can refer it ! :)

thanks!!! BR

Makebug avatar Jun 23 '21 08:06 Makebug

hi @kent-mcleod I am developing a feature that can reboot vm linux, but i meet some issues. reference to the existing code , it does not work :( Is there a sample that can reboot vm component or vm linux successfully?

maybe I can refer it ! :)

thanks!!! BR

@Makebug

I did not follow the full thread; I recalled something that might be useful.

If you just want to reboot a VM without changing memory size, IRQ allocation, or other things, you could do the following steps while the VM is stopped:

0 Zero out the VM memory (optional). 1 Copy the Linux kernel image and DTB. 2 Reset the VM registers. 3 Set the kernel entry point and DTB address. 4 Set the SCTLR_EL1 to SCTLR_DEFAUT, with MMU disabled. 5 Set VBAR_EL1, TTBR0_EL1, TTBR1_El1, and TCR to 0.

The stage-2 mapping does not have to be destroyed if you do not want to change the memory mapping.

yyshen avatar Jun 23 '21 23:06 yyshen

hi @yyshen I tried it in your way, but it is halting . image

have u meet the same issue?

Makebug avatar Jun 28 '21 03:06 Makebug