All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Yang Zhang <yang.z.zhang@intel.com>
Cc: xen-devel@lists.xensource.com, JBeulich@suse.com
Subject: Re: [PATCH] VMX, apicv: add boot parameter to enable/disable APIC-v dynamically
Date: Fri, 9 Aug 2013 10:42:55 +0100	[thread overview]
Message-ID: <5204B99F.5070109@citrix.com> (raw)
In-Reply-To: <1376038886-18645-1-git-send-email-yang.z.zhang@intel.com>

On 09/08/13 10:01, Yang Zhang wrote:
> From: Yang Zhang <yang.z.zhang@Intel.com>
>
> Add a boot parameter to enable/disable the APIC-v dynamically. APIC-v is
> enabled by default. User can use apicv=0 to disable it.
>
> Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
> ---

Please patch docs/misc/xen-command-line.markdown as well.

>  xen/arch/x86/hvm/vmx/vmcs.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
> index de9f592..b52408d 100644
> --- a/xen/arch/x86/hvm/vmx/vmcs.c
> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
> @@ -46,6 +46,9 @@ boolean_param("vpid", opt_vpid_enabled);
>  static bool_t __read_mostly opt_unrestricted_guest_enabled = 1;
>  boolean_param("unrestricted_guest", opt_unrestricted_guest_enabled);
>  
> +static bool_t __read_mostly opt_apicv_enabled = 1;
> +boolean_param("apicv", opt_apicv_enabled);
> +
>  /*
>   * These two parameters are used to config the controls for Pause-Loop Exiting:
>   * ple_gap:    upper bound on the amount of time between two successive
> @@ -196,12 +199,12 @@ static int vmx_init_vmcs_config(void)
>           * "APIC Register Virtualization" and "Virtual Interrupt Delivery"
>           * can be set only when "use TPR shadow" is set
>           */
> -        if ( _vmx_cpu_based_exec_control & CPU_BASED_TPR_SHADOW )
> +        if ( _vmx_cpu_based_exec_control & CPU_BASED_TPR_SHADOW &&
> +                opt_apicv_enabled )
>              opt |= SECONDARY_EXEC_APIC_REGISTER_VIRT |
>                     SECONDARY_EXEC_VIRTUAL_INTR_DELIVERY |
>                     SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE;
>  
> -

Unrelated whitespace alteration.

~Andrew

>          _vmx_secondary_exec_control = adjust_vmx_controls(
>              "Secondary Exec Control", min, opt,
>              MSR_IA32_VMX_PROCBASED_CTLS2, &mismatch);

  reply	other threads:[~2013-08-09  9:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-09  9:01 [PATCH] VMX, apicv: add boot parameter to enable/disable APIC-v dynamically Yang Zhang
2013-08-09  9:42 ` Andrew Cooper [this message]
2013-08-09 10:00   ` Zhang, Yang Z
2013-08-09 10:07     ` Andrew Cooper
2013-08-09 10:19       ` Zhang, Yang Z
2013-08-09 10:20         ` Andrew Cooper
2013-08-09 11:55         ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5204B99F.5070109@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yang.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.