mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] KVM: SVM: Use compound literal in lieu of __maybe_unused rdmsr() param
Date: Tue, 18 Jun 2024 06:44:40 -0700	[thread overview]
Message-ID: <ZnGPSEB9GOclr9yO@google.com> (raw)
In-Reply-To: <20240618102434.GDZnFgYsJHTGibyuX1@fat_crate.local>

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 :-/

  reply	other threads:[~2024-06-18 13:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 21:04 [PATCH 0/3] KVM: SVM: SEV-ES save area fix+cleanups Sean Christopherson
2024-06-17 21:04 ` [PATCH 1/3] KVM: SVM: Force sev_es_host_save_area() to be inlined (for noinstr usage) Sean Christopherson
2024-06-18 10:17   ` Borislav Petkov
2024-06-17 21:04 ` [PATCH 2/3] KVM: SVM: Use sev_es_host_save_area() helper when initializing tsc_aux Sean Christopherson
2024-06-17 21:04 ` [PATCH 3/3] KVM: SVM: Use compound literal in lieu of __maybe_unused rdmsr() param Sean Christopherson
2024-06-18 10:24   ` Borislav Petkov
2024-06-18 13:44     ` Sean Christopherson [this message]
2024-06-18 13:49       ` Borislav Petkov
2024-06-28 22:55 ` [PATCH 0/3] KVM: SVM: SEV-ES save area fix+cleanups Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZnGPSEB9GOclr9yO@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®