All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yosry Ahmed <yosry@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v2 6/7] KVM: x86: Move supported EFER bits to kvm_caps
Date: Mon, 6 Jul 2026 20:27:38 +0000	[thread overview]
Message-ID: <akwPqttHzRDzaqtb@google.com> (raw)
In-Reply-To: <20260706200533.8A79C1F000E9@smtp.kernel.org>

On Mon, Jul 06, 2026 at 08:05:33PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Leftover function declarations for `kvm_enable_efer_bits()` and `kvm_disable_efer_bits()` in `arch/x86/kvm/msrs.h` after their definitions were removed.
> --
> 
> commit eef68f2b444ee82f826a87d9dc12393124877c19
> Author: Yosry Ahmed <yosry@kernel.org>
> 
> KVM: x86: Move supported EFER bits to kvm_caps
> 
> This commit moves the supported EFER bits into kvm_caps.supported_efer_bits 
> to allow them to be recomputed during vendor initialization. It also removes 
> the kvm_enable_efer_bits() and kvm_disable_efer_bits() helpers in favor of 
> open-coding the updates directly to kvm_caps.
> 
> > diff --git a/arch/x86/kvm/msrs.c b/arch/x86/kvm/msrs.c
> > index 10669c5418da3..66fa7140d65d9 100644
> > --- a/arch/x86/kvm/msrs.c
> > +++ b/arch/x86/kvm/msrs.c
> [ ... ]
> > @@ -650,18 +647,6 @@ static int set_efer(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
> >  	return 0;
> >  }
> >  
> > -void kvm_enable_efer_bits(u64 mask)
> > -{
> > -	efer_supported_bits |= mask;
> > -}
> > -EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_enable_efer_bits);
> > -
> > -void kvm_disable_efer_bits(u64 mask)
> > -{
> > -	efer_supported_bits &= ~mask;
> > -}
> > -EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_disable_efer_bits);
> > -
> 
> [Severity: Low]
> This isn't a bug, but did this commit leave dangling function declarations for
> kvm_enable_efer_bits() and kvm_disable_efer_bits() in arch/x86/kvm/msrs.h?
> 
> It appears the prototypes were not removed from the header file when these
> implementations were deleted here.

Yeah, this needs to be folded in:

diff --git a/arch/x86/kvm/msrs.h b/arch/x86/kvm/msrs.h
index 89f10447cdddf..4cb9ca8bff979 100644
--- a/arch/x86/kvm/msrs.h
+++ b/arch/x86/kvm/msrs.h
@@ -58,8 +58,6 @@ int kvm_get_set_one_reg(struct kvm_vcpu *vcpu, unsigned int ioctl,
 int kvm_get_reg_list(struct kvm_vcpu *vcpu,
                     struct kvm_reg_list __user *user_list);

-void kvm_enable_efer_bits(u64);
-void kvm_disable_efer_bits(u64);
 bool kvm_valid_efer(struct kvm_vcpu *vcpu, u64 efer);
 int kvm_emulate_msr_read(struct kvm_vcpu *vcpu, u32 index, u64 *data);
 int kvm_emulate_msr_write(struct kvm_vcpu *vcpu, u32 index, u64 data);

  reply	other threads:[~2026-07-06 20:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 19:54 [PATCH v2 0/7] KVM: x86: EFER validity fixes and cleanups Yosry Ahmed
2026-07-06 19:54 ` [PATCH v2 1/7] KVM: x86: Check EFER validity on KVM_SET_SREGS* Yosry Ahmed
2026-07-06 19:54 ` [PATCH v2 2/7] KVM: SVM: Disallow EFER.SVME and EFER.LSMLE if nested is disabled Yosry Ahmed
2026-07-06 19:54 ` [PATCH v2 3/7] KVM: x86: Disallow EFER.LME and EFER.LMA if long mode is not supported Yosry Ahmed
2026-07-06 19:54 ` [PATCH v2 4/7] KVM: x86: Add a per-vendor callback to setup EFER caps Yosry Ahmed
2026-07-07 21:56   ` Sean Christopherson
2026-07-07 22:29     ` Yosry Ahmed
2026-07-06 19:54 ` [PATCH v2 5/7] KVM: x86: Reverse the polarity of efer_reserved_bits Yosry Ahmed
2026-07-06 19:54 ` [PATCH v2 6/7] KVM: x86: Move supported EFER bits to kvm_caps Yosry Ahmed
2026-07-06 20:05   ` sashiko-bot
2026-07-06 20:27     ` Yosry Ahmed [this message]
2026-07-06 19:54 ` [PATCH v2 7/7] KVM: selftests: Extend set_sregs test to cover EFER Yosry Ahmed

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=akwPqttHzRDzaqtb@google.com \
    --to=yosry@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.