From patchwork Wed Oct 23 14:21:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3088961 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AF67DBF924 for ; Wed, 23 Oct 2013 14:21:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 254B620343 for ; Wed, 23 Oct 2013 14:21:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4A1320320 for ; Wed, 23 Oct 2013 14:21:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751480Ab3JWOVR (ORCPT ); Wed, 23 Oct 2013 10:21:17 -0400 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 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id r9NEL7mO010813; Wed, 23 Oct 2013 16:21:07 +0200 Received: from mchn199C.mchp.siemens.de ([146.254.78.187]) by mail1.siemens.de (8.13.6/8.13.6) with SMTP id r9NEL4Wl004472; Wed, 23 Oct 2013 16:21:06 +0200 Message-ID: <5267DB50.9060304@siemens.com> Date: Wed, 23 Oct 2013 15:21:04 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Gleb Natapov , Paolo Bonzini CC: kvm , =?UTF-8?B?IuadjuaYpeWlhyA8QXJ0aHVyIENodW5x?= =?UTF-8?B?aSBMaT4i?= Subject: [PATCH][kvm-unit-tests] nEPT: Fix logic for testing read access Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 {