[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/5] x86/cpu: Renumber X86_VENDOR_* to form a bitmap



>>> On 04.04.19 at 22:26, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/include/asm-x86/x86-vendors.h
> +++ b/xen/include/asm-x86/x86-vendors.h
> @@ -4,28 +4,29 @@
>  /*
>   * CPU vendor IDs
>   *
> - * - X86_VENDOR_* are Xen-internal identifiers.  Values and order are
> - *   arbitrary.
> + * - X86_VENDOR_* are Xen-internal identifiers.  The order is arbitrary, but
> + *   values form a bitmap so vendor checks can be made against multiple
> + *   vendors at once.
>   * - X86_VENDOR_*_E?X are architectural information from CPUID leaf 0
>   */
>  #define X86_VENDOR_UNKNOWN 0
>  
> -#define X86_VENDOR_INTEL 1
> +#define X86_VENDOR_INTEL (1 << 1)

Any reason you start from a shift count of 1, instead of 0, when
"unknown" simply is no bit set? We're not about to run out of bits,
but preferably with this corrected
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.