Message ID | 1558347494-21640-5-git-send-email-andrew.cooper3@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/boot: Misc improvements to dom0 construction | expand |
>>> On 20.05.19 at 12:18, <andrew.cooper3@citrix.com> wrote: > We currently have an asymmetric setup where CONFIG_VERBOSE_DEBUG controls > extra diagnostics for a PV dom0, and opt_dom0_verbose controls extra > diagnostics for a PVH dom0. > > Default opt_dom0_verbose to CONFIG_VERBOSE_DEBUG and use opt_dom0_verbose > consistently. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index e6d241e..51dc8ae 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -687,7 +687,8 @@ Controls for how dom0 is constructed on x86 systems. guests do no require any paging support by default. * The `verbose` boolean is intended for diagnostics, and prints out extra - information during the dom0 build. It defaults to false. + information during the dom0 build. It defaults to the compile time choice + of `CONFIG_VERBOSE_DEBUG`. ### dom0-iommu = List of [ passthrough=<bool>, strict=<bool>, map-inclusive=<bool>, diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 93e5531..9b06363 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -281,7 +281,7 @@ struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0) bool __initdata opt_dom0_shadow; #endif bool __initdata opt_dom0_pvh = !IS_ENABLED(CONFIG_PV); -bool __initdata opt_dom0_verbose; +bool __initdata opt_dom0_verbose = IS_ENABLED(CONFIG_VERBOSE_DEBUG); static int __init parse_dom0_param(const char *s) { diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index 4a1526a..903611f 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -345,9 +345,10 @@ int __init dom0_construct_pv(struct domain *d, if ( (rc = elf_init(&elf, image_start, image_len)) != 0 ) return rc; -#ifdef CONFIG_VERBOSE_DEBUG - elf_set_verbose(&elf); -#endif + + if ( opt_dom0_verbose ) + elf_set_verbose(&elf); + elf_parse_binary(&elf); if ( (rc = elf_xen_parse(&elf, &parms)) != 0 ) goto out;
We currently have an asymmetric setup where CONFIG_VERBOSE_DEBUG controls extra diagnostics for a PV dom0, and opt_dom0_verbose controls extra diagnostics for a PVH dom0. Default opt_dom0_verbose to CONFIG_VERBOSE_DEBUG and use opt_dom0_verbose consistently. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Jan Beulich <JBeulich@suse.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Roger Pau Monné <roger.pau@citrix.com> --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/dom0_build.c | 2 +- xen/arch/x86/pv/dom0_build.c | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-)