[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XENOPROF] Fix oprofile for AMD SVM guests.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID e6b4dc82b1e33dcdf6d843242247ea312266dfdd
# Parent  a3aab403ec212b923b6b3cd31a6eec3066681085
[XENOPROF] Fix oprofile for AMD SVM guests.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/oprofile/op_model_athlon.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r a3aab403ec21 -r e6b4dc82b1e3 xen/arch/x86/oprofile/op_model_athlon.c
--- a/xen/arch/x86/oprofile/op_model_athlon.c   Fri Dec 01 09:51:13 2006 +0000
+++ b/xen/arch/x86/oprofile/op_model_athlon.c   Fri Dec 01 09:59:56 2006 +0000
@@ -113,14 +113,15 @@ static int athlon_check_ctrs(unsigned in
        unsigned long eip = regs->eip;
        int mode = 0;
        struct vcpu *v = current;
-       struct cpu_user_regs tmp_regs;
+       struct cpu_user_regs *guest_regs = guest_cpu_user_regs();
 
        if (!guest_mode(regs) &&
            (regs->eip == (unsigned long)svm_stgi_label)) {
                /* SVM guest was running when NMI occurred */
-               hvm_store_cpu_guest_regs(v, &tmp_regs, NULL);
-               eip = tmp_regs.eip;
-               mode = xenoprofile_get_mode(v, &tmp_regs);
+               ASSERT(is_hvm_vcpu(v));
+               hvm_store_cpu_guest_regs(v, guest_regs, NULL);
+               eip = guest_regs->eip;
+               mode = xenoprofile_get_mode(v, guest_regs);
        } else {
                eip = regs->eip;
                mode = xenoprofile_get_mode(v, regs);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.