diff mbox series

[kvm-unit-tests,v2] x86: Fix wrong test for 5-level page-table

Message ID 20190411180146.24387-1-nadav.amit@gmail.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests,v2] x86: Fix wrong test for 5-level page-table | expand

Commit Message

Nadav Amit April 11, 2019, 6:01 p.m. UTC
Untested, but clearly bit 12 is the one that needs to be tested.

Cc: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
 x86/cstart64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini April 12, 2019, 7:47 a.m. UTC | #1
On 11/04/19 20:01, Nadav Amit wrote:
> Untested, but clearly bit 12 is the one that needs to be tested.
> 
> Cc: Sean Christopherson <sean.j.christopherson@intel.com>
> Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
> ---
>  x86/cstart64.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/cstart64.S b/x86/cstart64.S
> index 21db10f..cccfcea 100644
> --- a/x86/cstart64.S
> +++ b/x86/cstart64.S
> @@ -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
diff mbox series

Patch

diff --git a/x86/cstart64.S b/x86/cstart64.S
index 21db10f..cccfcea 100644
--- a/x86/cstart64.S
+++ b/x86/cstart64.S
@@ -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