[RFC 07/10] x86/oprofile: guard svm specific symbols with AMD_SVM

Xenia Ragiadakou posted 10 patches 2 years, 12 months ago
[RFC 07/10] x86/oprofile: guard svm specific symbols with AMD_SVM
Posted by Xenia Ragiadakou 2 years, 12 months ago
The symbol svm_stgi_label is AMD-V specific so guard its usage in common code
with AMD_SVM.

Since AMD_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>
---
 xen/arch/x86/oprofile/op_model_athlon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/oprofile/op_model_athlon.c b/xen/arch/x86/oprofile/op_model_athlon.c
index 69fd3fcc86..782fa606ee 100644
--- a/xen/arch/x86/oprofile/op_model_athlon.c
+++ b/xen/arch/x86/oprofile/op_model_athlon.c
@@ -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) &&
-- 
2.37.2
Re: [RFC 07/10] x86/oprofile: guard svm specific symbols with AMD_SVM
Posted by Jan Beulich 2 years, 11 months ago
On 13.02.2023 15:57, Xenia Ragiadakou wrote:
> The symbol svm_stgi_label is AMD-V specific so guard its usage in common code
> with AMD_SVM.
> 
> Since AMD_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>

With whatever the final name of the Kconfig control is going to be
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan