From patchwork Thu Aug 31 11:45:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9931949 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 350CC6022E for ; Thu, 31 Aug 2017 11:47:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2868D28914 for ; Thu, 31 Aug 2017 11:47:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D7D528916; Thu, 31 Aug 2017 11:47:42 +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 9C43128919 for ; Thu, 31 Aug 2017 11:47:41 +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 1dnNuQ-0004dO-Bh; Thu, 31 Aug 2017 11:45:18 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnNuP-0004ai-9g for xen-devel@lists.xenproject.org; Thu, 31 Aug 2017 11:45:17 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id DC/ED-03283-CC6F7A95; Thu, 31 Aug 2017 11:45:16 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42JxWrohUvfMt+W RBi/n81p83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBl/GusLGvgq9l7bwtjAuI+ri5GTQ0LAX+LW +itsIDabgLLEz85eMFtEQE+i6cBzRhCbWSBP4uzqRawgtrCAk0TXj+fMXYwcHCwCqhIPnkuCh HkFzCV+TfvHCDFSXmJX20Wwck4BC4kFFy8wg9hCQDUXvu+CshUkOqYfY4LoFZQ4OfMJC8QqCY mDL14wT2DknYUkNQtJagEj0ypGjeLUorLUIl0jE72kosz0jJLcxMwcXUMDM73c1OLixPTUnMS kYr3k/NxNjMDAYQCCHYz7PkYeYpTkYFIS5X14e3mkEF9SfkplRmJxRnxRaU5q8SFGGQ4OJQne i1+BcoJFqempFWmZOcAQhklLcPAoifAyAcNYiLe4IDG3ODMdInWKUVFKnHc9SJ8ASCKjNA+uD RY3lxhlpYR5GYEOEeIpSC3KzSxBlX/FKM7BqCTMexZkCk9mXgnc9FdAi5mAFsd6LQVZXJKIkJ JqYExUefe8ViR9olKWitbfC1vu9F77q7O954fD/nlf/K5PMbX2vevpK7nilOuO7h4mOcbdz0L rFhTETL84PcZh3WubvnkxPDd/3xZ1X1O+pEVnzYLVy05sad3F2PLDT7UvLal1zZ/ymf+U7LMF 7tQtsTjWz3+Zb5+rwoGP/TEnw5epL998OyesbKcSS3FGoqEWc1FxIgCtKQ/slgIAAA== X-Env-Sender: prvs=4097f923a=wei.liu2@citrix.com X-Msg-Ref: server-16.tower-27.messagelabs.com!1504179914!114030512!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 37473 invoked from network); 31 Aug 2017 11:45:15 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-16.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 31 Aug 2017 11:45:15 -0000 X-IronPort-AV: E=Sophos;i="5.41,453,1498521600"; d="scan'208";a="437819065" From: Wei Liu To: Xen-devel Date: Thu, 31 Aug 2017 12:45:06 +0100 Message-ID: <20170831114506.9610-3-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170831114506.9610-1-wei.liu2@citrix.com> References: <20170831114506.9610-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Wei Liu , Jan Beulich Subject: [Xen-devel] [PATCH 2/2] x86/pv: drop gate_op prefix in emul-gate-op.c 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 There is only one function gate_op_read that needs to be modified. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/pv/emul-gate-op.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/pv/emul-gate-op.c b/xen/arch/x86/pv/emul-gate-op.c index 0a7381a094..002fb782f2 100644 --- a/xen/arch/x86/pv/emul-gate-op.c +++ b/xen/arch/x86/pv/emul-gate-op.c @@ -117,12 +117,8 @@ struct gate_op_ctxt { bool insn_fetch; }; -static int gate_op_read( - enum x86_segment seg, - unsigned long offset, - void *p_data, - unsigned int bytes, - struct x86_emulate_ctxt *ctxt) +static int read(enum x86_segment seg, unsigned long offset, void *p_data, + unsigned int bytes, struct x86_emulate_ctxt *ctxt) { const struct gate_op_ctxt *goc = container_of(ctxt, struct gate_op_ctxt, ctxt); @@ -230,7 +226,7 @@ void pv_emulate_gate_op(struct cpu_user_regs *regs) ctxt.ctxt.addr_size = ar & _SEGMENT_DB ? 32 : 16; /* Leave zero in ctxt.ctxt.sp_size, as it's not needed for decoding. */ - state = x86_decode_insn(&ctxt.ctxt, gate_op_read); + state = x86_decode_insn(&ctxt.ctxt, read); ctxt.insn_fetch = false; if ( IS_ERR_OR_NULL(state) ) { @@ -265,9 +261,8 @@ void pv_emulate_gate_op(struct cpu_user_regs *regs) case 3: ++jump; base = x86_insn_operand_ea(state, &seg); - rc = gate_op_read(seg, - base + (x86_insn_opsize(state) >> 3), - &opnd_sel, sizeof(opnd_sel), &ctxt.ctxt); + rc = read(seg, base + (x86_insn_opsize(state) >> 3), + &opnd_sel, sizeof(opnd_sel), &ctxt.ctxt); break; } break;