x86/oprofile: use unambiguous register names
authorJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 15:59:13 +0000 (16:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 15:59:13 +0000 (16:59 +0100)
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 <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/oprofile/backtrace.c
xen/arch/x86/oprofile/op_model_athlon.c
xen/arch/x86/oprofile/op_model_p4.c
xen/arch/x86/oprofile/op_model_ppro.c

index 94bd24cd4fd0e89863a07adc64d475ed339b92fb..f0fbb427cc385a01be816e9164a339431fa18282 100644 (file)
@@ -150,7 +150,7 @@ static int valid_hypervisor_stack(const struct frame_head *head,
 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))
index c0a81edeec4b1f05d16485bcf5b94bb9a903fc96..2d3763cfadc13f77bdf59c3d8e9381df93f11a6e 100644 (file)
@@ -316,22 +316,20 @@ static int athlon_check_ctrs(unsigned int const cpu,
        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);
index 29fe3bcb25596bbd01995435aff53207fac358c6..b08ba53cbd39c2811990ad5b66326309bce02257 100644 (file)
@@ -617,7 +617,7 @@ static int p4_check_ctrs(unsigned int const cpu,
        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();
index 89649d0aafdd1a6c6db61327f9fbd2608c98fd21..72c504a10216cea01b7a495e86aea295e49eddeb 100644 (file)
@@ -135,7 +135,7 @@ static int ppro_check_ctrs(unsigned int const cpu,
        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;