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

Cosmin Paraschiv csmnprschv at gmail.com
Sun Apr 21 10:36:05 EEST 2013


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>
---
 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.
 	 */
 	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.
 		 */
 		*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:
-- 
1.7.9.5



More information about the firefly mailing list