Re: [Xen-devel] [v2 01/11] vmx: add new boot parameter to control PML enabling
On 15.04.15 at 15:20, kaih.li...@gmail.com wrote: On Wed, Apr 15, 2015 at 8:20 PM, Jan Beulich jbeul...@suse.com wrote: On 15.04.15 at 09:03, kai.hu...@linux.intel.com wrote: +static void __init parse_ept_param(char *s) +{ +char *ss; +int val; bool_t, and would better move ... + +do { +val = !!strncmp(s, no-, 3); ... here (making the right side expression its intializer). Thanks for review. Do you mean below? do { bool_t val = !!strncmp(s, no-, 3); ... Yes. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [v2 01/11] vmx: add new boot parameter to control PML enabling
On Wed, Apr 15, 2015 at 8:20 PM, Jan Beulich jbeul...@suse.com wrote: On 15.04.15 at 09:03, kai.hu...@linux.intel.com wrote: +static void __init parse_ept_param(char *s) +{ +char *ss; +int val; bool_t, and would better move ... + +do { +val = !!strncmp(s, no-, 3); ... here (making the right side expression its intializer). Hi Jan, Thanks for review. Do you mean below? do { bool_t val = !!strncmp(s, no-, 3); ... Thanks, -Kai Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel -- Thanks, -Kai ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [v2 01/11] vmx: add new boot parameter to control PML enabling
On 15.04.15 at 09:03, kai.hu...@linux.intel.com wrote: +static void __init parse_ept_param(char *s) +{ +char *ss; +int val; bool_t, and would better move ... + +do { +val = !!strncmp(s, no-, 3); ... here (making the right side expression its intializer). Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [v2 01/11] vmx: add new boot parameter to control PML enabling
On 15/04/15 08:03, Kai Huang wrote: A top level EPT parameter ept=options and a sub boolean opt_pml_enabled are added to control PML. Other booleans can be further added for any other EPT related features. Signed-off-by: Kai Huang kai.hu...@linux.intel.com Reviewed-by: Andrew Cooper andrew.coop...@citrix.com --- xen/arch/x86/hvm/vmx/vmcs.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index d614638..4fff46d 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -64,6 +64,37 @@ integer_param(ple_gap, ple_gap); static unsigned int __read_mostly ple_window = 4096; integer_param(ple_window, ple_window); +static bool_t __read_mostly opt_pml_enabled = 0; + +/* + * The 'ept' parameter controls functionalities that depend on, or impact the + * EPT mechanism. Optional comma separated value may contain: + * + * pml Enable PML + */ +static void __init parse_ept_param(char *s) +{ +char *ss; +int val; + +do { +val = !!strncmp(s, no-, 3); +if ( !val ) +s += 3; + +ss = strchr(s, ','); +if ( ss ) +*ss = '\0'; + +if ( !strcmp(s, pml) ) +opt_pml_enabled = val; + +s = ss + 1; +} while ( ss ); +} + +custom_param(ept, parse_ept_param); + /* Dynamic (run-time adjusted) execution control flags. */ u32 vmx_pin_based_exec_control __read_mostly; u32 vmx_cpu_based_exec_control __read_mostly; ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel