From patchwork Thu May 18 17:09:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9734907 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 D6CA8601C8 for ; Thu, 18 May 2017 17:18:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B78C8288C7 for ; Thu, 18 May 2017 17:18:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC57E288D0; Thu, 18 May 2017 17:18:56 +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 65014288C7 for ; Thu, 18 May 2017 17:18:56 +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 1dBP2V-0004NE-K6; Thu, 18 May 2017 17:16:39 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBP2U-0004HM-5t for xen-devel@lists.xenproject.org; Thu, 18 May 2017 17:16:38 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id D1/34-23755-5F6DD195; Thu, 18 May 2017 17:16:37 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42JxWrohUvfrNdl IgxezxC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyp+56wFDzmqbi3cAlbA+NOri5GDg4JAX+J 9s+JXYycHGwCyhI/O3vZQGwRAT2JpgPPGUFsZoE8ibOrF7GC2MICnhKrHzWDxVkEVCXWvVwEV s8rYCnR3fWGCcSWEJCX2NV2kRVkPCdQ/MFRF5CwkICFxN6H65khbAWJjunHmCBaBSVOznzCAr FKQuLgixfMExh5ZyFJzUKSWsDItIpRozi1qCy1SNfQQC+pKDM9oyQ3MTMHyDPWy00tLk5MT81 JTCrWS87P3cQIDJx6BgbGHYzbupwPMUpyMCmJ8h4ukI0U4kvKT6nMSCzOiC8qzUktPsQow8Gh JMFbfRUoJ1iUmp5akZaZAwxhmLQEB4+SCO8hkDRvcUFibnFmOkTqFKOilDivI0hCACSRUZoH1 waLm0uMslLCvIwMDAxCPAWpRbmZJajyrxjFORiVhHl9QKbwZOaVwE1/BbSYCWhx8wNpkMUliQ gpqQbG7DMCFZcELLTPsIvIX+fwcoiOYheLPHZoXuSroJilbxmaG9379+vXr3224tZGFVO/kq3 zFrkwP0p/tJBv0xPhP7uSWe49rXFy/mOqaBtzYPeVu6pBkxZ8jNr8NKGziHf/CYYpWd95Qh5N 637hHFmxmPs170flB5YLM1b0rW7a7+9QF+YpUyWkxFKckWioxVxUnAgAj7B4WJYCAAA= X-Env-Sender: prvs=304fe0a9c=wei.liu2@citrix.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1495127788!100511514!3 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.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22739 invoked from network); 18 May 2017 17:16:37 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-10.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 18 May 2017 17:16:37 -0000 X-IronPort-AV: E=Sophos;i="5.38,359,1491264000"; d="scan'208";a="424430793" From: Wei Liu To: Xen-devel Date: Thu, 18 May 2017 18:09:57 +0100 Message-ID: <20170518171004.27204-16-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170518171004.27204-1-wei.liu2@citrix.com> References: <20170518171004.27204-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Wei Liu , Jan Beulich Subject: [Xen-devel] [PATCH for-next v3 15/22] x86/traps: move init_int80_direct_trap 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 No functional change. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/pv/traps.c | 14 ++++++++++++++ xen/arch/x86/x86_64/traps.c | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/pv/traps.c b/xen/arch/x86/pv/traps.c index b69990c6b7..cb9b3b1425 100644 --- a/xen/arch/x86/pv/traps.c +++ b/xen/arch/x86/pv/traps.c @@ -418,6 +418,20 @@ unsigned long do_iret(void) return 0; } +void init_int80_direct_trap(struct vcpu *v) +{ + struct trap_info *ti = &v->arch.pv_vcpu.trap_ctxt[0x80]; + struct trap_bounce *tb = &v->arch.pv_vcpu.int80_bounce; + + tb->cs = ti->cs; + tb->eip = ti->address; + + if ( null_trap_bounce(v, tb) ) + tb->flags = 0; + else + tb->flags = TBF_EXCEPTION | (TI_GET_IF(ti) ? TBF_INTERRUPT : 0); +} + /* * Local variables: * mode: C diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c index 4641bc6d06..a4ea09b1ac 100644 --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -336,20 +336,6 @@ void subarch_percpu_traps_init(void) wrmsrl(MSR_SYSCALL_MASK, XEN_SYSCALL_MASK); } -void init_int80_direct_trap(struct vcpu *v) -{ - struct trap_info *ti = &v->arch.pv_vcpu.trap_ctxt[0x80]; - struct trap_bounce *tb = &v->arch.pv_vcpu.int80_bounce; - - tb->cs = ti->cs; - tb->eip = ti->address; - - if ( null_trap_bounce(v, tb) ) - tb->flags = 0; - else - tb->flags = TBF_EXCEPTION | (TI_GET_IF(ti) ? TBF_INTERRUPT : 0); -} - static long register_guest_callback(struct callback_register *reg) { long ret = 0;