From patchwork Mon Sep 4 08:14:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Dyasli X-Patchwork-Id: 9936795 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 4E7E5601EB for ; Mon, 4 Sep 2017 08:17:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4044428770 for ; Mon, 4 Sep 2017 08:17:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34C5028781; Mon, 4 Sep 2017 08:17:41 +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 2EDBF2877D for ; Mon, 4 Sep 2017 08:17:39 +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 1domXK-0006lW-7t; Mon, 04 Sep 2017 08:15:14 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1domXI-0006k0-UZ for xen-devel@lists.xen.org; Mon, 04 Sep 2017 08:15:13 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id DE/70-01916-F8B0DA95; Mon, 04 Sep 2017 08:15:11 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsXitHRDpG4f99p Ig62PmCyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ozTH5cwFTxgq9h9S7GBcSVrFyMnh4SAv8T5 KQ/ZQGw2AT2JjbNfMYHYIgKyEqu75rCD2MwCn5gkGo45gtjCAsES616tButlEVCRaDg4mwXE5 hWwlVh64CcTxEx5iV1tF8FqOAXsJM6ufsMIYgsB1fQsPswMYatKvH6xC6pXUOLkzCcsELskJA 6+eME8gZF3FpLULCSpBYxMqxg1ilOLylKLdI0s9JKKMtMzSnITM3N0DQ2M9XJTi4sT01NzEpO K9ZLzczcxAkOnnoGBcQdj+wm/Q4ySHExKorz3H6+JFOJLyk+pzEgszogvKs1JLT7EKMPBoSTB K8G1NlJIsCg1PbUiLTMHGMQwaQkOHiURXjmQNG9xQWJucWY6ROoUoy5H04ctX5iEWPLy81Klx HndQIoEQIoySvPgRsAi6hKjrJQwLyMDA4MQT0FqUW5mCar8K0ZxDkYlYd5tIFN4MvNK4Da9Aj qCCeiIqpdrQI4oSURISTUwLpz3S9z86a+/kTK7t/0WDrfpSFvxhvnsRYFdvgG8QeV7o4yPeZn 81486oi4h6XXizqG33mf7JFkVX79uf9pjJjV9c3zTulyReH7jM5fPb/nZY7eQX//cNludGBUl 0zNuKo+er8ifYP92/kweyTctoiF2JcsOPDSO3Z5/pimhVM3yZ4ZF2WlOJZbijERDLeai4kQAg ltLN6MCAAA= X-Env-Sender: prvs=413848043=sergey.dyasli@citrix.com X-Msg-Ref: server-8.tower-31.messagelabs.com!1504512908!113034703!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 60711 invoked from network); 4 Sep 2017 08:15:09 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-8.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 4 Sep 2017 08:15:09 -0000 X-IronPort-AV: E=Sophos;i="5.41,473,1498521600"; d="scan'208";a="438259572" From: Sergey Dyasli To: Date: Mon, 4 Sep 2017 09:14:41 +0100 Message-ID: <20170904081452.12960-4-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 03/14] x86/vvmx: use np2m_flush_base() for INVEPT_SINGLE_CONTEXT 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 nvmx_handle_invept() updates current's np2m just to flush it. Instead, use the new np2m_flush_base() directly for this purpose. Signed-off-by: Sergey Dyasli --- xen/arch/x86/hvm/vmx/vvmx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index e2361a1394..3c5f560aec 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1910,12 +1910,7 @@ int nvmx_handle_invept(struct cpu_user_regs *regs) { case INVEPT_SINGLE_CONTEXT: { - struct p2m_domain *p2m = p2m_get_nestedp2m(current, eptp); - if ( p2m ) - { - p2m_flush(current, p2m); - ept_sync_domain(p2m); - } + np2m_flush_base(current, eptp); break; } case INVEPT_ALL_CONTEXT: