[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3.1 10/15] xen/x86: split Dom0 build into PV and PVHv2



On Thu, Nov 17, 2016 at 03:49:22AM -0700, Jan Beulich wrote:
> >>> On 16.11.16 at 19:02, <roger.pau@xxxxxxxxxx> wrote:
> > On Fri, Nov 11, 2016 at 09:53:49AM -0700, Jan Beulich wrote:
> >> >>> On 29.10.16 at 10:59, <roger.pau@xxxxxxxxxx> wrote:
> >> > --- 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.

OK, so would you prefer to place the custom_param call after the function 
definition? I've done it that way (with the forward declaration) because it's 
the way other options are already implemented.
 
> >> > @@ -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?
> > 
> > Most certainly. The BSP IP points to 0 at this point. I can wire this up 
> > later, 
> > but it's going to be strange IMHO.
> 
> Not any more "strange" than someone trying the option and getting
> some random and perhaps not immediately understandable crash.

I will add a panic here then, which I will then remove once this is finished.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.