diff mbox

[kvm-unit-tests] nEPT: Fix logic for testing read access

Message ID 5267DB50.9060304@siemens.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka Oct. 23, 2013, 2:21 p.m. UTC
We need to fail the test if MAGIC_VAL_1 cannot be found in either
data_page1 or data_page2.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

BTW, this and the previous patch apply on top of the vmx queue of
kvm-unit-tests.

 x86/vmx_tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini Oct. 28, 2013, 1:10 p.m. UTC | #1
Il 23/10/2013 16:21, Jan Kiszka ha scritto:
> We need to fail the test if MAGIC_VAL_1 cannot be found in either
> data_page1 or data_page2.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> 
> BTW, this and the previous patch apply on top of the vmx queue of
> kvm-unit-tests.
> 
>  x86/vmx_tests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
> index a002a7a..8d47bcd 100644
> --- a/x86/vmx_tests.c
> +++ b/x86/vmx_tests.c
> @@ -956,7 +956,7 @@ static void ept_main()
>  		return;
>  	}
>  	set_stage(0);
> -	if (*((u32 *)data_page2) != MAGIC_VAL_1 &&
> +	if (*((u32 *)data_page2) != MAGIC_VAL_1 ||
>  			*((u32 *)data_page1) != MAGIC_VAL_1)
>  		report("EPT basic framework - read", 0);
>  	else {
> 

Applied to kvm-unit-tests.git vmx.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index a002a7a..8d47bcd 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -956,7 +956,7 @@  static void ept_main()
 		return;
 	}
 	set_stage(0);
-	if (*((u32 *)data_page2) != MAGIC_VAL_1 &&
+	if (*((u32 *)data_page2) != MAGIC_VAL_1 ||
 			*((u32 *)data_page1) != MAGIC_VAL_1)
 		report("EPT basic framework - read", 0);
 	else {