Skip to contentSkip to conversation

x86: Fix wrong test for 5-level page-table

PATCH Applied Nadav Amit 2 participants 2 messages Apr 11, 2019 – Apr 12, 2019 KVM

lore
Share & tools
lore

Nadav Amit

author
#0 lore raw

PATCH v2 1/1 x86: Fix wrong test for 5-level page-table

Untested, but clearly bit 12 is the one that needs to be tested.

Cc Sean Christopherson <[email protected]>
---
 x86/cstart64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/cstart64.S +1 -1
index 21db10f..cccfcea 100644
@@ -243,7 +243,7 @@ start64:
 setup_5level_page_table:
 	/* Check if 5-level paging has already enabled */
 	mov %cr4, %rax
-	test $12, %eax
+	test $0x1000, %eax
 	jnz lvl5
 
 	pushq $32
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 14 lines · Nadav Amit

Untested, but clearly bit 12 is the one that needs to be tested.

Cc Sean Christopherson <[email protected]>
---
 x86/cstart64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/cstart64.S +0 -0
index 21db10f..cccfcea 100644

x86/cstart64.S start64: · line 249

Quoted 8 lines
x86/cstart64.S +1 -1
@@ -243,7 +243,7 @@ start64:
 setup_5level_page_table:
 	/* Check if 5-level paging has already enabled */
 	mov %cr4, %rax
-	test $12, %eax
+	test $0x1000, %eax
 	jnz lvl5
 
 	pushq $32

Applied, thanks.

Paolo