>>> On 29.10.16 at 10:59, <roger....@citrix.com> wrote: > --- a/xen/arch/x86/domain_build.c > +++ b/xen/arch/x86/domain_build.c > @@ -191,10 +191,8 @@ struct vcpu *__init alloc_dom0_vcpu0(struct domain *dom0) > } > > #ifdef CONFIG_SHADOW_PAGING > -static bool_t __initdata opt_dom0_shadow; > +bool __initdata opt_dom0_shadow; > boolean_param("dom0_shadow", opt_dom0_shadow); > -#else > -#define opt_dom0_shadow 0 > #endif
I think the new option parsing would better go here, avoiding the need for this change. Making dom0_hvm visible globally is the less intrusive variant. > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -67,6 +67,16 @@ unsigned long __read_mostly cr4_pv32_mask; > static bool_t __initdata opt_dom0pvh; > boolean_param("dom0pvh", opt_dom0pvh); > > +/* > + * List of parameters that affect Dom0 creation: > + * > + * - hvm Create a PVHv2 Dom0. > + * - shadow Use shadow paging for Dom0. > + */ > +static void parse_dom0_param(char *s); Please try to avoid such forward declarations. > @@ -1543,6 +1574,14 @@ void __init noreturn __start_xen(unsigned long mbi_p) > if ( opt_dom0pvh ) > domcr_flags |= DOMCRF_pvh | DOMCRF_hap; > > + if ( dom0_hvm ) > + { > + domcr_flags |= DOMCRF_hvm | > + ((hvm_funcs.hap_supported && !opt_dom0_shadow) ? > + DOMCRF_hap : 0); > + config.emulation_flags = XEN_X86_EMU_LAPIC|XEN_X86_EMU_IOAPIC; > + } If you wire this up here already, instead of later in the series, what's the effect of someone using this option? Crash? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel