From patchwork Tue Jul 18 10:34:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Dyasli X-Patchwork-Id: 9847679 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 EE6B4602C8 for ; Tue, 18 Jul 2017 10:36:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E791C2853A for ; Tue, 18 Jul 2017 10:36:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC5CD28567; Tue, 18 Jul 2017 10:36:40 +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 A124A2853A for ; Tue, 18 Jul 2017 10:36:40 +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 1dXPpv-00064Y-9g; Tue, 18 Jul 2017 10:34:39 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXPpt-00062g-Jo for xen-devel@lists.xen.org; Tue, 18 Jul 2017 10:34:37 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 10/9F-03044-C34ED695; Tue, 18 Jul 2017 10:34:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRWlGSWpSXmKPExsXitHRDpK7Nk9x Ig4lbVSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ozm1p+sBQ/YKlY/msrcwLiStYuRk0NCwF9i f8cVdhCbTUBPYuPsV0wgtoiArMTqrjlgcWaBT0wSDcccQWxhgRCJNa8PsoDYLAKqEnN6X4DZv AK2EltnLWWEmCkvsavtIth8TgE7iXnPO8FqhIBqVl/YxQphq0q8frELqldQ4uTMJywQuyQkDr 54wTyBkXcWktQsJKkFjEyrGDWKU4vKUot0DS31kooy0zNKchMzc3QNDcz0clOLixPTU3MSk4r 1kvNzNzECg4cBCHYw/lgWcIhRkoNJSZR39YHcSCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvEcf AeUEi1LTUyvSMnOAYQyTluDgURLhDXoMlOYtLkjMLc5Mh0idYjTmaPqw5QsTx6sJ/78xCbHk5 eelSonz1oBMEgApzSjNgxsEi69LjLJSwryMQKcJ8RSkFuVmlqDKv2IU52BUEubdAjKFJzOvBG 7fK6BTmIBOEfbNATmlJBEhJdXAKPqyK/24keqa2vc3vRNXBmRozD9onXnotd1Vq/qlj2vYVxe ccdz3h2/N2YqJC2Oq1AQV5TcqnP9dcWrGUVuR8lk6iS8e76ztvaXl/l66PNd5ztsqPk7z7EBu 5bA0Zvn+V2eeZMjW1sns2DRzsc6Xh1vk59g/V9z7OMjC9cX709dut6vuvTtnpxJLcUaioRZzU XEiAJqpuB2qAgAA X-Env-Sender: prvs=365bef495=sergey.dyasli@citrix.com X-Msg-Ref: server-3.tower-21.messagelabs.com!1500374074!70287400!2 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.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17790 invoked from network); 18 Jul 2017 10:34:36 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-3.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 18 Jul 2017 10:34:36 -0000 X-IronPort-AV: E=Sophos;i="5.40,377,1496102400"; d="scan'208";a="431880761" From: Sergey Dyasli To: Date: Tue, 18 Jul 2017 11:34:20 +0100 Message-ID: <20170718103429.25020-4-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 03/12] x86/vvmx: use np2m_flush_eptp() 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_eptp() 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 2c8cf637a8..56678127e1 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1895,12 +1895,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_eptp(current, eptp); break; } case INVEPT_ALL_CONTEXT: