]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/oprofile: guard svm specific symbols with CONFIG_AMD_SVM
authorXenia Ragiadakou <burzalodowa@gmail.com>
Thu, 1 Aug 2024 11:57:28 +0000 (13:57 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 1 Aug 2024 11:57:28 +0000 (13:57 +0200)
The symbol svm_stgi_label is AMD-V specific so guard its usage in common code
with CONFIG_AMD_SVM.

Since SVM depends on HVM, it can be used alone.
Also, use #ifdef instead of #if.

No functional change intended.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/oprofile/op_model_athlon.c

index 69fd3fcc86e4e7cb75b44a6df35e6a0562c34340..782fa606ee4f4e5b88527c5da703895578e42b80 100644 (file)
@@ -320,7 +320,7 @@ static int cf_check athlon_check_ctrs(
        struct vcpu *v = current;
        unsigned int const nr_ctrs = model->num_counters;
 
-#if CONFIG_HVM
+#ifdef CONFIG_AMD_SVM
        struct cpu_user_regs *guest_regs = guest_cpu_user_regs();
 
        if (!guest_mode(regs) &&