x86/setup: lift dom0 creation out into create_dom0() function
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 20 May 2020 10:47:48 +0000 (12:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 20 May 2020 10:47:48 +0000 (12:47 +0200)
commitf546619ce1c5d4de694597c28358cd8e23eea231
treec5e844714490665e29f223c14dd343c126bfcf9b
parente235fa2794c95365519eac714d6ea82f8e64752e
x86/setup: lift dom0 creation out into create_dom0() function

The creation of dom0 can be relatively self-contained. Shift it into
a separate function and simplify __start_xen() a little bit.

This is a cleanup in its own right, but will be even more desireable
when live update provides an alternative path through __start_xen()
that doesn't involve creating a new dom0 at all.

Move the calculation of the 'initrd' parameter for create_dom0()
down past the cosmetic printk about NX support, because in the fullness
of time the whole initrd and create_dom0() part will be under the same
"not live update" conditional. And in the meantime it's just neater.

Also drop the explicit check for initrd to be module #0 since that would
be the dom0 kernel and the corresponding bit is always clear in
module_map.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/setup.c