Re: [PATCH 3/3] KVM: SVM: Use compound literal in lieu of __maybe_unused rdmsr() param
From: Sean Christopherson
Date: Tue Jun 18 2024 - 10:06:46 EST
On Tue, Jun 18, 2024, Borislav Petkov wrote:
> > + rdmsr(MSR_TSC_AUX, sev_es_host_save_area(sd)->tsc_aux, (u32){0});
> >
> > return 0;
> > }
> > --
>
> Right, slick, but I'd argue that before it was better because __maybe_unused was
> actually documenting why that var is there.
>
> (u32){} looks a bit more cryptic but meh, ok, I guess.
Yeah, I'm 50/50 on whether it's too clever. I'm totally fine keeping msr_hi,
what I really want to do is rewrite the rdmsr() macros to return values :-/