mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/oprofile: put SVM only code under CONFIG_HVM
The code snippet in question is to detect NMI held by SVM until STGI is called. When Xen doesn't even support HVM guests there is no need to check svm_stgi_label. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
d6876bf23d
commit
1385a14bfc
1 file changed
+4
-1
@@ -319,9 +319,11 @@ static int athlon_check_ctrs(unsigned int const cpu,
|
||||
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 CONFIG_HVM
|
||||
struct cpu_user_regs *guest_regs = guest_cpu_user_regs();
|
||||
|
||||
if (!guest_mode(regs) &&
|
||||
(eip == (unsigned long)svm_stgi_label)) {
|
||||
/* SVM guest was running when NMI occurred */
|
||||
@@ -329,6 +331,7 @@ static int athlon_check_ctrs(unsigned int const cpu,
|
||||
eip = guest_regs->rip;
|
||||
mode = xenoprofile_get_mode(v, guest_regs);
|
||||
} else
|
||||
#endif
|
||||
mode = xenoprofile_get_mode(v, regs);
|
||||
|
||||
for (i = 0 ; i < nr_ctrs; ++i) {
|
||||
|
||||