[PATCH 1/5] x86/ler: use feature flag to check if option is enabled

Roger Pau Monne posted 5 patches 3 years, 8 months ago
[PATCH 1/5] x86/ler: use feature flag to check if option is enabled
Posted by Roger Pau Monne 3 years, 8 months ago
It's more consistent with the rest of the usages of cpu_has_xen_lbr.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/x86_64/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_64/traps.c b/xen/arch/x86/x86_64/traps.c
index 9d7f1f818b..24c5067ca2 100644
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -156,7 +156,7 @@ void show_registers(const struct cpu_user_regs *regs)
     printk("CPU:    %d\n", smp_processor_id());
     _show_registers(&fault_regs, fault_crs, context, v);
 
-    if ( ler_msr && !guest_mode(regs) )
+    if ( cpu_has_xen_lbr && !guest_mode(regs) )
     {
         u64 from, to;
 
-- 
2.36.0


Re: [PATCH 1/5] x86/ler: use feature flag to check if option is enabled
Posted by Jan Beulich 3 years, 8 months ago
On 20.05.2022 15:37, Roger Pau Monne wrote:
> It's more consistent with the rest of the usages of cpu_has_xen_lbr.
> 
> No functional change intended.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

I wonder though whether the use as a conditional in percpu_traps_init()
wouldn't then better also be replaced, for being consistent.

Jan