All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Theurer <habanero@linux.vnet.ibm.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: kvm@vger.kernel.org, Avi Kivity <avi@redhat.com>
Subject: Re: EPT support breakage on:  KVM: VMX: Zero ept module parameter if ept is not present
Date: Wed, 01 Apr 2009 15:26:44 -0500	[thread overview]
Message-ID: <49D3CE04.8030101@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090401020230.GA15680@syang10-desktop>

Sheng Yang wrote:
> Oops... Thanks very much for reporting! I can't believe we haven't awared of
> that...
>
> Could you please try the attached patch? Thanks!
>   
Tested and works great.  Thanks!

-Andrew
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index aba41ae..8d6465b 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -1195,15 +1195,6 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf)
>  		      vmx_capability.ept, vmx_capability.vpid);
>  	}
>
> -	if (!cpu_has_vmx_vpid())
> -		enable_vpid = 0;
> -
> -	if (!cpu_has_vmx_ept())
> -		enable_ept = 0;
> -
> -	if (!(vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES))
> -		flexpriority_enabled = 0;
> -
>  	min = 0;
>  #ifdef CONFIG_X86_64
>  	min |= VM_EXIT_HOST_ADDR_SPACE_SIZE;
> @@ -1307,6 +1298,15 @@ static __init int hardware_setup(void)
>  	if (boot_cpu_has(X86_FEATURE_NX))
>  		kvm_enable_efer_bits(EFER_NX);
>
> +	if (!cpu_has_vmx_vpid())
> +		enable_vpid = 0;
> +
> +	if (!cpu_has_vmx_ept())
> +		enable_ept = 0;
> +
> +	if (!(vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES))
> +		flexpriority_enabled = 0;
> +
>  	return alloc_kvm_area();
>  }
>
>   


      reply	other threads:[~2009-04-01 20:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 15:00 EPT support breakage on: KVM: VMX: Zero ept module parameter if ept is not present Andrew Theurer
2009-04-01  2:02 ` Sheng Yang
2009-04-01 20:26   ` Andrew Theurer [this message]

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=49D3CE04.8030101@linux.vnet.ibm.com \
    --to=habanero@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng@linux.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.