Skip to contentSkip to conversation

nEPT: Fix logic for testing read access

PATCH In review Jan Kiszka 2 participants 2 messages Oct 23, 2013 – Oct 28, 2013 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 nEPT: Fix logic for testing read access

We need to fail the test if MAGIC_VAL_1 cannot be found in either data_page1 or data_page2.

---

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(-)
x86/vmx_tests.c +1 -1
index a002a7a..8d47bcd 100644
@@ -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 {
Signature · 1 line
1.8.1.1.298.ge7eed54
maintainer
#1 lore raw

Il 23/10/2013 16:21, Jan Kiszka ha scritto:

Quoted 18 lines

We need to fail the test if MAGIC_VAL_1 cannot be found in either data_page1 or data_page2.

---

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(-)
x86/vmx_tests.c +0 -0
index a002a7a..8d47bcd 100644

x86/vmx_tests.c static void ept_main() · line 962

Quoted 8 lines
x86/vmx_tests.c +1 -1
@@ -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