ia64/xen-unstable

changeset 12720:e6b4dc82b1e3

[XENOPROF] Fix oprofile for AMD SVM guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Dec 01 09:59:56 2006 +0000 (2006-12-01)
parents a3aab403ec21
children c032103da101
files xen/arch/x86/oprofile/op_model_athlon.c
line diff
     1.1 --- a/xen/arch/x86/oprofile/op_model_athlon.c	Fri Dec 01 09:51:13 2006 +0000
     1.2 +++ b/xen/arch/x86/oprofile/op_model_athlon.c	Fri Dec 01 09:59:56 2006 +0000
     1.3 @@ -113,14 +113,15 @@ static int athlon_check_ctrs(unsigned in
     1.4  	unsigned long eip = regs->eip;
     1.5  	int mode = 0;
     1.6  	struct vcpu *v = current;
     1.7 -	struct cpu_user_regs tmp_regs;
     1.8 +	struct cpu_user_regs *guest_regs = guest_cpu_user_regs();
     1.9  
    1.10  	if (!guest_mode(regs) &&
    1.11  	    (regs->eip == (unsigned long)svm_stgi_label)) {
    1.12  		/* SVM guest was running when NMI occurred */
    1.13 -		hvm_store_cpu_guest_regs(v, &tmp_regs, NULL);
    1.14 -		eip = tmp_regs.eip;
    1.15 -		mode = xenoprofile_get_mode(v, &tmp_regs);
    1.16 +		ASSERT(is_hvm_vcpu(v));
    1.17 +		hvm_store_cpu_guest_regs(v, guest_regs, NULL);
    1.18 +		eip = guest_regs->eip;
    1.19 +		mode = xenoprofile_get_mode(v, guest_regs);
    1.20  	} else {
    1.21  		eip = regs->eip;
    1.22  		mode = xenoprofile_get_mode(v, regs);