| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/vmx: correct the SMEP logic for HVM_CR0_GUEST_RESERVED_BITS
 >>> On 23.04.14 at 16:32, <feng.wu@xxxxxxxxx> wrote:
> --- a/xen/include/asm-x86/hvm/hvm.h
> +++ b/xen/include/asm-x86/hvm/hvm.h
> @@ -351,6 +351,15 @@ static inline int hvm_event_pending(struct vcpu *v)
>      return hvm_funcs.event_pending(v);
>  }
>  
> +static inline bool_t hvm_vcpu_has_smep(void)
> +{
> +    unsigned int ebx = 0, leaf = 0x7;
Pointless initializer for ebx, and pointless variable leaf.
> +    hvm_cpuid(leaf, NULL, &ebx, NULL, NULL);
And, as I just saw Andrew already pointed out, this needs gating on
there being a (visible) leaf 7 in the first place.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |