From patchwork Tue Jul 18 10:34:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Dyasli X-Patchwork-Id: 9847781 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3833602A7 for ; Tue, 18 Jul 2017 10:48:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFD2626E4E for ; Tue, 18 Jul 2017 10:48:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C47402854A; Tue, 18 Jul 2017 10:48:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5286D26E4E for ; Tue, 18 Jul 2017 10:48:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXQ1J-0008U4-7m; Tue, 18 Jul 2017 10:46:25 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXQ1I-0008Tg-4q for xen-devel@lists.xen.org; Tue, 18 Jul 2017 10:46:24 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id 33/BF-27137-FF6ED695; Tue, 18 Jul 2017 10:46:23 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIIsWRWlGSWpSXmKPExsXitHSDve6/Z7m RBnN6TC2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oy1a7awFFzhqNj1eTV7A+Mlti5GTg4JAX+J NTPPsIPYbAJ6Ehtnv2ICsUUEZCVWd80BizMLfGKSaDjmCGILCwRJTN7bDVbDIqAqsXzjPEYQm 1fATmLhjL0sEDPlJXa1XWQFsTmB4vOed4LFhQRsJVZf2MUKYatKvH6xiwWiV1Di5MwnLBC7JC QOvnjBPIGRdxaS1CwkqQWMTKsYNYpTi8pSi3SNLPSSijLTM0pyEzNzdA0NzPRyU4uLE9NTcxK TivWS83M3MQKDhwEIdjCeXxt4iFGSg0lJlHf1gdxIIb6k/JTKjMTijPii0pzU4kOMMhwcShK8 nMBgFBIsSk1PrUjLzAGGMUxagoNHSYT3yVOgNG9xQWJucWY6ROoUoy7Hqwn/vzEJseTl56VKi fN+BCkSACnKKM2DGwGLqUuMslLCvIxARwnxFKQW5WaWoMq/YhTnYFQS5tUHuYQnM68EbtMroC OYgI4Q9s0BOaIkESEl1cAYGXz6h6NO5kWpCfYLJmUaeR048nCr4D4H/n0qbJO97UwzHrz83zm h4XmE37Szms+9Pm6anqC+amU1k/qMk+3zLkpHLZpykaHqez7fV9/dzpwB3smy6cfSqzddEc/7 E5za4JQwp5hV9gfnljQfK3b5lJ8xyyw6NCt3BBrnVaVba/44W/z7aLkSS3FGoqEWc1FxIgDar VL+pAIAAA== X-Env-Sender: prvs=365bef495=sergey.dyasli@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1500374781!54816865!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14336 invoked from network); 18 Jul 2017 10:46:22 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-15.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 18 Jul 2017 10:46:22 -0000 X-IronPort-AV: E=Sophos;i="5.40,377,1496102400"; d="scan'208";a="440265687" From: Sergey Dyasli To: Date: Tue, 18 Jul 2017 11:34:29 +0100 Message-ID: <20170718103429.25020-13-sergey.dyasli@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170718103429.25020-1-sergey.dyasli@citrix.com> References: <20170718103429.25020-1-sergey.dyasli@citrix.com> MIME-Version: 1.0 Cc: Sergey Dyasli , Kevin Tian , Jun Nakajima , George Dunlap , Andrew Cooper , Tim Deegan , Jan Beulich , Boris Ostrovsky , Suravee Suthikulpanit Subject: [Xen-devel] [PATCH RFC 12/12] x86/vvmx: remove EPTP write from ept_handle_violation() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Now there is no need to update shadow EPTP after handling L2 EPT violation since all EPTP updates are handled by nvmx_eptp_update(). Signed-off-by: Sergey Dyasli --- xen/arch/x86/hvm/vmx/vmx.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 35aa57e24f..3a3e04bb0f 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -3282,12 +3282,6 @@ static void ept_handle_violation(ept_qual_t q, paddr_t gpa) case 0: // Unhandled L1 EPT violation break; case 1: // This violation is handled completly - /*Current nested EPT maybe flushed by other vcpus, so need - * to re-set its shadow EPTP pointer. - */ - if ( nestedhvm_vcpu_in_guestmode(current) && - nestedhvm_paging_mode_hap(current ) ) - __vmwrite(EPT_POINTER, get_shadow_eptp(current)); return; case -1: // This vioaltion should be injected to L1 VMM vcpu_nestedhvm(current).nv_vmexit_pending = 1;