WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: Addback capability check for non-initial features

To: "Dong, Eddie" <eddie.dong@xxxxxxxxx>
Subject: [Xen-devel] Re: Addback capability check for non-initial features
From: Keir Fraser <keir@xxxxxxx>
Date: Fri, 10 Jun 2011 08:33:30 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 10 Jun 2011 00:34:28 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:user-agent:date:subject:from:to:cc :message-id:thread-topic:thread-index:in-reply-to:mime-version :content-type:content-transfer-encoding; bh=TsQMJJEEUAT85LtK5ddPg66/Zwnp8bAAVjIdGUtpBNA=; b=S/0OVgcRsNEL2BiO3pXtMZsLTrzyfD9PGQyQzrSHtGxazQgiiagdt5wtL7P2g0gpK+ JGpQaYtfdmaAP0ZyS9tskG2TQE6rhfHPxFIRm6bv6JT5pKteEzjJLvvWuMgoni/1xqFr cklcO0hGcXcxmbHYue6DgG7Bb/K4SX6r+dFJg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=dMfCrsk1H/yhiT0Scx3A4cC5Z093UzILN6wrGcwhHfvh6gV5zEq6rt72ouR8jGDPLB 17ogqHsW/R/hiEyjHO06iTwVrLwDqaH01M1bcLycAUYIwTbZonbp/XVCg1kxQ5cZ0YWN g9CUHPpXOKJcOtKakS/ktQrVkyEmE5+x/Byh4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1A42CE6F5F474C41B63392A5F80372B256260B2A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acwm8ei0Bw+DOsTeG0qq3AI37qSa+QAPjT8AAACHkVAAA51xuw==
Thread-topic: Addback capability check for non-initial features
User-agent: Microsoft-Entourage/12.29.0.110113
On 10/06/2011 06:50, "Dong, Eddie" <eddie.dong@xxxxxxxxx> wrote:

> 
> add back missing capability check of MSR_IA32_VMX_PROCBASED_CTLS.
> 
> Besides initial configuration, adjust_vmx_controls is responsible for
> hardware capibility check as well. This patch add back the check.

I've fixed this and then applied it as xen-unstable:23508. Please take a
look.

 -- Keir

> Signed-off-by: Eddie Dong <eddie.dong@xxxxxxxxx>
> 
> diff -r 43a06a43e60b xen/arch/x86/hvm/vmx/vmcs.c
> --- a/xen/arch/x86/hvm/vmx/vmcs.c Thu Jun 09 16:30:34 2011 +0800
> +++ b/xen/arch/x86/hvm/vmx/vmcs.c Fri Jun 10 13:28:49 2011 +0800
> @@ -148,6 +148,11 @@ static int vmx_init_vmcs_config(void)
>          MSR_IA32_VMX_PINBASED_CTLS, &mismatch);
>  
>      min = (CPU_BASED_HLT_EXITING |
> +           CPU_BASED_VIRTUAL_INTR_PENDING |
> +#ifdef __x86_64__
> +           CPU_BASED_CR8_LOAD_EXITING |
> +           CPU_BASED_CR8_STORE_EXITING |
> +#endif
>             CPU_BASED_INVLPG_EXITING |
>             CPU_BASED_CR3_LOAD_EXITING |
>             CPU_BASED_CR3_STORE_EXITING |
> @@ -164,15 +169,12 @@ static int vmx_init_vmcs_config(void)
>      _vmx_cpu_based_exec_control = adjust_vmx_controls(
>          "CPU-Based Exec Control", min, opt,
>          MSR_IA32_VMX_PROCBASED_CTLS, &mismatch);
> -    _vmx_cpu_based_exec_control &= ~CPU_BASED_RDTSC_EXITING;
> +    _vmx_cpu_based_exec_control &= ~(CPU_BASED_RDTSC_EXITING |
> +                                     CPU_BASED_VIRTUAL_INTR_PENDING);
>  #ifdef __x86_64__
>      if ( !(_vmx_cpu_based_exec_control & CPU_BASED_TPR_SHADOW) )
> -    {
> -        min |= CPU_BASED_CR8_LOAD_EXITING | CPU_BASED_CR8_STORE_EXITING;
> -        _vmx_cpu_based_exec_control = adjust_vmx_controls(
> -            "CPU-Based Exec Control", min, opt,
> -            MSR_IA32_VMX_PROCBASED_CTLS, &mismatch);
> -    }
> +        _vmx_cpu_based_exec_control &= ~(CPU_BASED_CR8_LOAD_EXITING |
> +                                         CPU_BASED_CR8_STORE_EXITING);
>  #endif
>  
>      if ( _vmx_cpu_based_exec_control & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS
> )



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel