On 15.08.2025 22:41, Andrew Cooper wrote:
> We're about to turn the rdmsr() macro into a real function, at which point
> Eclair complains that we're now shadowing an identifer.
> 
> Rename rdmsr to is_rdmsr.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

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


> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -2087,14 +2087,14 @@ static int cf_check svm_msr_write_intercept(
>  static void svm_do_msr_access(struct cpu_user_regs *regs)
>  {
>      struct vcpu *curr = current;
> -    bool rdmsr = curr->arch.hvm.svm.vmcb->exitinfo1 == 0;
> -    int rc, inst_len = svm_get_insn_len(curr, rdmsr ? INSTR_RDMSR
> -                                                    : INSTR_WRMSR);
> +    bool is_rdmsr = curr->arch.hvm.svm.vmcb->exitinfo1 == 0;

Could also have used the shorter "read" or "rd" instead.

Jan

> +    int rc, inst_len = svm_get_insn_len(curr, is_rdmsr ? INSTR_RDMSR
> +                                                       : INSTR_WRMSR);
>  
>      if ( inst_len == 0 )
>          return;
>  
> -    if ( rdmsr )
> +    if ( is_rdmsr )
>      {
>          uint64_t msr_content = 0;
>  


Reply via email to