From patchwork Sat Sep 1 08:16:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junjie Mao X-Patchwork-Id: 1394881 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2899D3FC85 for ; Sat, 1 Sep 2012 08:16:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752491Ab2IAIQV (ORCPT ); Sat, 1 Sep 2012 04:16:21 -0400 Received: from mga03.intel.com ([143.182.124.21]:35680 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752194Ab2IAIQT convert rfc822-to-8bit (ORCPT ); Sat, 1 Sep 2012 04:16:19 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 01 Sep 2012 01:16:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,351,1344236400"; d="scan'208";a="187662035" Received: from fmsmsx107.amr.corp.intel.com ([10.19.9.54]) by azsmga001.ch.intel.com with ESMTP; 01 Sep 2012 01:16:18 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX107.amr.corp.intel.com (10.19.9.54) with Microsoft SMTP Server (TLS) id 14.1.355.2; Sat, 1 Sep 2012 01:16:18 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.175]) with mapi id 14.01.0355.002; Sat, 1 Sep 2012 16:16:16 +0800 From: "Mao, Junjie" To: Avi Kivity , Marcelo Tosatti , "'kvm@vger.kernel.org'" Subject: FW: [PATCH kvm-unit-tests RESEND] Restore cr3 after tests on PCID Thread-Topic: [PATCH kvm-unit-tests RESEND] Restore cr3 after tests on PCID Thread-Index: Ac2IGY8Abs+fKWkmSKyBfUPFtKJaBAAAD+UQ Date: Sat, 1 Sep 2012 08:16:16 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The INVPCID enabling test assumes cr3[11:0] is 0. But at present PCID enabling test sets cr3[11:0] to 1 for its own purpose and doesn't restore the register, which leads to a failure when INVPCID test tries to enable PCIDE. This patch restores cr3 after PCID enabling test is done so that PCIDE can be enabled normally in later tests. Signed-off-by: Junjie Mao --- x86/pcid.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- 1.7.1 -- 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 --git a/x86/pcid.c b/x86/pcid.c index de0f6fe..8bfeba2 100644 --- a/x86/pcid.c +++ b/x86/pcid.c @@ -79,6 +79,7 @@ void test_pcid_enabled(void) write_cr3(cr3 | 0x001); if (write_cr4_checking(cr4 | X86_CR4_PCIDE) != GP_VECTOR) goto report; + write_cr3(cr3); passed = 1;