From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH][kvm-unit-tests] nEPT: Fix logic for testing read access Date: Wed, 23 Oct 2013 15:21:04 +0100 Message-ID: <5267DB50.9060304@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm , =?UTF-8?B?IuadjuaYpeWlhyA8QXJ0aHVyIENodW5x?= =?UTF-8?B?aSBMaT4i?= To: Gleb Natapov , Paolo Bonzini Return-path: Received: from thoth.sbs.de ([192.35.17.2]:29217 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222Ab3JWOVQ (ORCPT ); Wed, 23 Oct 2013 10:21:16 -0400 Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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 { -- 1.8.1.1.298.ge7eed54