From patchwork Mon Sep 4 08:14:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Dyasli X-Patchwork-Id: 9936813 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 2C75A601EB for ; Mon, 4 Sep 2017 08:18:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DAD328781 for ; Mon, 4 Sep 2017 08:18:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1243E28784; Mon, 4 Sep 2017 08:18:31 +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 9C16128781 for ; Mon, 4 Sep 2017 08:18:30 +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 1domYc-0007TU-26; Mon, 04 Sep 2017 08:16:34 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1domYb-0007T0-CH for xen-devel@lists.xen.org; Mon, 04 Sep 2017 08:16:33 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id DB/72-03093-0EB0DA95; Mon, 04 Sep 2017 08:16:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42JxWrrBXvcB99p Ig303RSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1owHuzazFFzhqDjz4R1TA+Mlti5GTg4JAX+J XwtfMoHYbAJ6EhtnvwKzRQRkJVZ3zWEHsZkFPjFJNBxz7GLk4BAWCJTo6GAGMVkEVCR6V8mAV PAK2EksOb6LBWKivMSutousIDYnUPzs6jeMILaQgK1Ez+LDzBC2qsTrFxD1vAKCEidnPmGB2C QhcfDFC+YJjLyzkKRmIUktYGRaxahRnFpUllqka2yol1SUmZ5RkpuYmaNraGCml5taXJyYnpq TmFSsl5yfu4kRGDgMQLCDsWlR4CFGSQ4mJVHe+4/XRArxJeWnVGYkFmfEF5XmpBYfYpTh4FCS 4D3ItTZSSLAoNT21Ii0zBxjCMGkJDh4lEV5+YBgL8RYXJOYWZ6ZDpE4xKkqJ894H6RMASWSU5 sG1weLmEqOslDAvI9AhQjwFqUW5mSWo8q8YxTkYlYR5t4FM4cnMK4Gb/gpoMRPQ4qqXa0AWly QipKQaGLeJpy3f6f6lJeOv1rLjqa5ZsabWW27Wxe1u2TF9YmzQyVUPG/YxHuv5ZzOB14X3TtW /k8+itpj8+38+6eWsJeoJN/U//ZmV9uh5V9jyvgJZJb2//6cLTSl68p17V1hEo5rlgvSjtivX TOyqW75x8XzbWzZum9fMK5Hz7N24kcVhgtXppRkT1cWUWIozEg21mIuKEwHZ5WEOlgIAAA== X-Env-Sender: prvs=413848043=sergey.dyasli@citrix.com X-Msg-Ref: server-11.tower-27.messagelabs.com!1504512990!83049964!2 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.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31873 invoked from network); 4 Sep 2017 08:16:32 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-11.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 4 Sep 2017 08:16:32 -0000 X-IronPort-AV: E=Sophos;i="5.41,473,1498521600"; d="scan'208";a="446424857" From: Sergey Dyasli To: Date: Mon, 4 Sep 2017 09:14:52 +0100 Message-ID: <20170904081452.12960-15-sergey.dyasli@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170904081452.12960-1-sergey.dyasli@citrix.com> References: <20170904081452.12960-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 v1 14/14] 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 06509590b7..6a2553cc58 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -3269,12 +3269,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;