On 26.07.25 01:58, Jason Andryuk wrote:
Replace dom0_init() with init_domains() which uses libxenmanage to iterate through all existing domains, storing them in a list. The xenstore domain is introduced first, and then all the other domains are introduced. The xenstore domain needs to be introduced first to setup structures needed for firing watches.dom0_domid is updated with the xenstore domain, since it really indicates the local domain. priv_domid is set to the control domain. This makes it limited to a single domain. These features let xenstore automatically connect any existing domains, which means it doesn't need to be done manually from init-dom0less. For a legacy dom0, the result should be unchanged. For a late xenstore stubdom it should also be the same, but priv_domid would be set automatically to control domain (which default to 0 normally). Always signal the event channel for initial domains. This gets dom0 (a local xenstored domain) to connect. Also always write XENSTORE_CONNECTED since we know we are connected at this point. To support ARM dom0less domains with xen,enhanced = "no-xenstore" a failed introduce_domain() becomes non-fatal. Normally, HVM_PARAM_STORE_EVTCHN is used to identify . priv_domid from the command line is used, or the first control domain is used. dom0_domid will set to the last xenstore found. This will handle dom0 or dom0less, where only 1 xenstore domain can exist, or stubdom, where dom0 and dom1 exist, and we want to take the stubdom. Signed-off-by: Jason Andryuk <jason.andr...@amd.com>
Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature