From patchwork Tue Dec 20 10:39:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9481409 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 3F41A600CA for ; Tue, 20 Dec 2016 10:41:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CDD328161 for ; Tue, 20 Dec 2016 10:41:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FF04283D4; Tue, 20 Dec 2016 10:41:27 +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 A729B28161 for ; Tue, 20 Dec 2016 10:41:26 +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 1cJHpW-0000q3-Jl; Tue, 20 Dec 2016 10:39: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 1cJHpV-0000pr-Ic for xen-devel@lists.xenproject.org; Tue, 20 Dec 2016 10:39:33 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id 92/61-25093-46A09585; Tue, 20 Dec 2016 10:39:32 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRWlGSWpSXmKPExsXS6fjDSzeFKzL C4P5qbovvWyYzOTB6HP5whSWAMYo1My8pvyKBNaNp/QnGgh6tioOLdBoYfyh3MXJyCAnkSbx6 e4AFxOYVsJM4dOApI4gtIWAo8fT9dTYQm0VAVeLD1iPMIDabgLpE27PtrF2MHBwiAgYS544mg ZjMAvESV9fZg1QICzhLTH2+hAViup3E4fu3mUBKOAXsJdrvGoCYvAKCEn93CINUMANVLDy+i2 UCI88shMwsJBkIW0vi4a9bULa2xLKFr5lnga2Vllj+jwMibCOx7MdrJlQlILa7xJ0Xy9gXMHK sYlQvTi0qSy3SNdRLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgMUgYg2MG487nT IUZJDiYlUd79PBERQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR4vTgiI4QEi1LTUyvSMnOA8QKTl uDgURLhDeMESvMWFyTmFmemQ6ROMSpKifMuBekTAElklObBtcFi9BKjrJQwLyPQIUI8BalFuZ klqPKvGMU5GJWEeReDTOHJzCuBm/4KaDET0OKF3eEgi0sSEVJSDYwSsxQvVbxKcloqkrNRb0f /M/sN+xWPaM4773D2VlHRFpWpEz0dxOIYskyfG0laSLDXFBp+fNiafMm4rr7x8uYFtxxCjLYr uxnxbEq346zaqL7geNB0exW92FiuxK0rE6/uucd2pKpty9tNa1yEzuxa9s6ud0FUr/iDlTMPp bCwz7+tGbrzhpUSS3FGoqEWc1FxIgAB8R6MzAIAAA== X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-8.tower-21.messagelabs.com!1482230370!49042889!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 53931 invoked from network); 20 Dec 2016 10:39:31 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-8.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 20 Dec 2016 10:39:31 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Tue, 20 Dec 2016 03:39:20 -0700 Message-Id: <58591867020000780012ADC3@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.1 Date: Tue, 20 Dec 2016 03:39:19 -0700 From: "Jan Beulich" To: "xen-devel" References: <58590E27020000780012AD5E@prv-mh.provo.novell.com> In-Reply-To: <58590E27020000780012AD5E@prv-mh.provo.novell.com> Mime-Version: 1.0 Cc: George Dunlap , Andrew Cooper Subject: [Xen-devel] [PATCH 04/10] x86/oprofile: use unambiguous register names 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 This is in preparation of eliminating the mis-naming of 64-bit fields with 32-bit register names (eflags instead of rflags etc). Signed-off-by: Jan Beulich x86/oprofile: use unambiguous register names This is in preparation of eliminating the mis-naming of 64-bit fields with 32-bit register names (eflags instead of rflags etc). Signed-off-by: Jan Beulich --- a/xen/arch/x86/oprofile/backtrace.c +++ b/xen/arch/x86/oprofile/backtrace.c @@ -150,7 +150,7 @@ static int valid_hypervisor_stack(const void xenoprof_backtrace(struct vcpu *vcpu, const struct cpu_user_regs *regs, unsigned long depth, int mode) { - const struct frame_head *head = (void *)regs->ebp; + const struct frame_head *head = (void *)regs->rbp; if (mode > 1) { while (depth-- && valid_hypervisor_stack(head, regs)) --- a/xen/arch/x86/oprofile/op_model_athlon.c +++ b/xen/arch/x86/oprofile/op_model_athlon.c @@ -316,22 +316,20 @@ static int athlon_check_ctrs(unsigned in uint64_t msr_content; int i; int ovf = 0; - unsigned long eip = regs->eip; + unsigned long eip = regs->rip; int mode = 0; struct vcpu *v = current; struct cpu_user_regs *guest_regs = guest_cpu_user_regs(); unsigned int const nr_ctrs = model->num_counters; if (!guest_mode(regs) && - (regs->eip == (unsigned long)svm_stgi_label)) { + (eip == (unsigned long)svm_stgi_label)) { /* SVM guest was running when NMI occurred */ ASSERT(is_hvm_vcpu(v)); - eip = guest_regs->eip; + eip = guest_regs->rip; mode = xenoprofile_get_mode(v, guest_regs); - } else { - eip = regs->eip; + } else mode = xenoprofile_get_mode(v, regs); - } for (i = 0 ; i < nr_ctrs; ++i) { CTR_READ(msr_content, msrs, i); --- a/xen/arch/x86/oprofile/op_model_p4.c +++ b/xen/arch/x86/oprofile/op_model_p4.c @@ -617,7 +617,7 @@ static int p4_check_ctrs(unsigned int co uint64_t msr_content; int i; int ovf = 0; - unsigned long eip = regs->eip; + unsigned long eip = regs->rip; int mode = xenoprofile_get_mode(current, regs); stag = get_stagger(); --- a/xen/arch/x86/oprofile/op_model_ppro.c +++ b/xen/arch/x86/oprofile/op_model_ppro.c @@ -135,7 +135,7 @@ static int ppro_check_ctrs(unsigned int u64 val; int i; int ovf = 0; - unsigned long eip = regs->eip; + unsigned long eip = regs->rip; int mode = xenoprofile_get_mode(current, regs); struct arch_msr_pair *msrs_content = vcpu_vpmu(current)->context; --- a/xen/arch/x86/oprofile/backtrace.c +++ b/xen/arch/x86/oprofile/backtrace.c @@ -150,7 +150,7 @@ static int valid_hypervisor_stack(const void xenoprof_backtrace(struct vcpu *vcpu, const struct cpu_user_regs *regs, unsigned long depth, int mode) { - const struct frame_head *head = (void *)regs->ebp; + const struct frame_head *head = (void *)regs->rbp; if (mode > 1) { while (depth-- && valid_hypervisor_stack(head, regs)) --- a/xen/arch/x86/oprofile/op_model_athlon.c +++ b/xen/arch/x86/oprofile/op_model_athlon.c @@ -316,22 +316,20 @@ static int athlon_check_ctrs(unsigned in uint64_t msr_content; int i; int ovf = 0; - unsigned long eip = regs->eip; + unsigned long eip = regs->rip; int mode = 0; struct vcpu *v = current; struct cpu_user_regs *guest_regs = guest_cpu_user_regs(); unsigned int const nr_ctrs = model->num_counters; if (!guest_mode(regs) && - (regs->eip == (unsigned long)svm_stgi_label)) { + (eip == (unsigned long)svm_stgi_label)) { /* SVM guest was running when NMI occurred */ ASSERT(is_hvm_vcpu(v)); - eip = guest_regs->eip; + eip = guest_regs->rip; mode = xenoprofile_get_mode(v, guest_regs); - } else { - eip = regs->eip; + } else mode = xenoprofile_get_mode(v, regs); - } for (i = 0 ; i < nr_ctrs; ++i) { CTR_READ(msr_content, msrs, i); --- a/xen/arch/x86/oprofile/op_model_p4.c +++ b/xen/arch/x86/oprofile/op_model_p4.c @@ -617,7 +617,7 @@ static int p4_check_ctrs(unsigned int co uint64_t msr_content; int i; int ovf = 0; - unsigned long eip = regs->eip; + unsigned long eip = regs->rip; int mode = xenoprofile_get_mode(current, regs); stag = get_stagger(); --- a/xen/arch/x86/oprofile/op_model_ppro.c +++ b/xen/arch/x86/oprofile/op_model_ppro.c @@ -135,7 +135,7 @@ static int ppro_check_ctrs(unsigned int u64 val; int i; int ovf = 0; - unsigned long eip = regs->eip; + unsigned long eip = regs->rip; int mode = xenoprofile_get_mode(current, regs); struct arch_msr_pair *msrs_content = vcpu_vpmu(current)->context;