In case of Xen dom0less boot the number of guest domains could be started already by Xen before Zephyr is started. In this case it's required to follow the same approach as Xen tool init-dom0less is doing, because guest domains do not have Xenstore initialized, but do have Xenstore event and memory preallocated.
This patch adds Xen dom0less boot support in the following way:
at init it checks for already started gest domains by using xen_domctl_getdomaininfo() for each Xen domid [1, CONFIG_DOM_MAX];
for each found domain the Xenstore is initialized:
use HVM_PARAM_STORE_EVTCHN to get Xenstore event
use HVM_PARAM_MAGIC_BASE_PFN to get GFN of XEN_MAGIC pages
setup Xenstore
use HVM_PARAM_STORE_PFN to set Xenstore for guest domain
trigger Xenstore event
The Xen dom0less boot support is optional and can be enabled by CONFIG_XEN_DOM0LESS_BOOT Kconfig option.
In case of Xen dom0less boot the number of guest domains could be started already by Xen before Zephyr is started. In this case it's required to follow the same approach as Xen tool init-dom0less is doing, because guest domains do not have Xenstore initialized, but do have Xenstore event and memory preallocated.
This patch adds Xen dom0less boot support in the following way:
The Xen dom0less boot support is optional and can be enabled by CONFIG_XEN_DOM0LESS_BOOT Kconfig option.
This depends on [1].
[1] https://patchew.org/Xen/20240426031455.579637-1-xin.wang2@amd.com/ [2] https://github.com/xen-troops/zephyr/pull/100 Signed-off-by: Grygorii Strashko grygorii_strashko@epam.com