[firefly] [PATCH] lguest: fix comments in lguest_cpuid function.

Daniel Baluta daniel.baluta at gmail.com
Sun Apr 21 15:02:11 EEST 2013


On Sun, Apr 21, 2013 at 10:36 AM, Cosmin Paraschiv <csmnprschv at gmail.com> wrote:
> CMPXCHG8 was misspelled, having an extra B.
> In addition, the family of a CPU is returned as bits 11:8 in the EAX
> register, not 12:8.
>
> Signed-off-by: Cosmin Paraschiv <csmnprschv at gmail.com>
Please add here:
Cc: Daniel Baluta <dbaluta at ixiacom.com>
> ---
>  arch/x86/lguest/boot.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
> index 1cbd89c..d837c18 100644
> --- a/arch/x86/lguest/boot.c
> +++ b/arch/x86/lguest/boot.c
> @@ -435,8 +435,8 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
>         /*
>          * CPUID 1 is a basic feature request.
>          *
> -        * CX: we only allow kernel to see SSE3, CMPXCHG16B and SSSE3
> -        * DX: SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, TSC, FPU and PAE.
> +        * CX: we only allow kernel to see SSE3, CMPXCHG16B and SSSE3.
> +        * DX: SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8, TSC, FPU and PAE.
So CMPXCHG16B doesn't have an extra B? what about CMPXCHG8B?
>          */
>         case 1:
>                 *cx &= 0x00002201;
> @@ -452,7 +452,7 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
>                 /*
>                  * We also lie, and say we're family id 5.  6 or greater
>                  * leads to a rdmsr in early_init_intel which we can't handle.
> -                * Family ID is returned as bits 8-12 in ax.
> +                * Family ID is returned as bits 8-11 in ax.
This look good.
>                  */
>                 *ax &= 0xFFFFF0FF;
>                 *ax |= 0x00000500;
> @@ -467,7 +467,7 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
>                 break;
>
>         /*
> -        * 0x80000000 returns the highest Extended Function, so we futureproof
> +        * 0x80000000 returns the Highest Extended Function, so we futureproof
>          * like we do above by limiting it to known fields.
>          */
>         case 0x80000000:

Don't forget to call:
* scripts/checkpatch.pl - for patch integrity
* scripts/get_maintainer.pl - to get the list of addresses where to
send this patch.

thanks,
Daniel.


More information about the firefly mailing list