public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "pbonzini@redhat.com" <pbonzini@redhat.com>,
	"Verma, Vishal L" <vishal.l.verma@intel.com>,
	"seanjc@google.com" <seanjc@google.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"binbin.wu@linxu.intel.com" <binbin.wu@linxu.intel.com>
Subject: Re: [PATCH v2 1/4] KVM: TDX: Fix definition of tdx_guest_nr_guest_keyids()
Date: Tue, 18 Mar 2025 15:33:27 +0000	[thread overview]
Message-ID: <5a9335bdf4fbfef9d34c448d1bd8f075e56f82bc.camel@intel.com> (raw)
In-Reply-To: <20250318-vverma7-cleanup_x86_ops-v2-1-701e82d6b779@intel.com>

On Tue, 2025-03-18 at 00:35 -0600, Vishal Verma wrote:
> When CONFIG_INTEL_TDX_HOST=n, the above definition produced an
> unused-function warning with gcc.
> 
>   error: ‘tdx_get_nr_guest_keyids’ defined but not used [-Werror=unused-function]
>     198 | static u32 tdx_get_nr_guest_keyids(void) { return 0; }
>         |            ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Make the definition 'inline' so that in the config disabled case, the
> whole thing can be optimized away.

This looks to be fixed in the current kvm-coco-queue. Can you double check?

> 
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> ---
>  arch/x86/include/asm/tdx.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h
> index e6b003fe7f5e..fbc22bf39cfd 100644
> --- a/arch/x86/include/asm/tdx.h
> +++ b/arch/x86/include/asm/tdx.h
> @@ -195,7 +195,7 @@ u64 tdh_phymem_page_wbinvd_hkid(u64 hkid, struct page *page);
>  static inline void tdx_init(void) { }
>  static inline int tdx_cpu_enable(void) { return -ENODEV; }
>  static inline int tdx_enable(void)  { return -ENODEV; }
> -static u32 tdx_get_nr_guest_keyids(void) { return 0; }
> +static inline u32 tdx_get_nr_guest_keyids(void) { return 0; }
>  static inline const char *tdx_dump_mce_info(struct mce *m) { return NULL; }
>  static inline const struct tdx_sys_info *tdx_get_sysinfo(void) { return NULL; }
>  #endif	/* CONFIG_INTEL_TDX_HOST */
> 


  reply	other threads:[~2025-03-18 15:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18  6:35 [PATCH v2 0/4] KVM: TDX: Cleanup the kvm_x86_ops structure for vmx/tdx Vishal Verma
2025-03-18  6:35 ` [PATCH v2 1/4] KVM: TDX: Fix definition of tdx_guest_nr_guest_keyids() Vishal Verma
2025-03-18 15:33   ` Edgecombe, Rick P [this message]
2025-03-18 16:31     ` Verma, Vishal L
2025-03-18  6:35 ` [PATCH v2 2/4] KVM: VMX: Move apicv_pre_state_restore to posted_intr.c Vishal Verma
2025-04-29  8:17   ` Chao Gao
2025-04-29 17:25     ` Verma, Vishal L
2025-03-18  6:35 ` [PATCH v2 3/4] KVM: VMX: Make naming consistent for kvm_complete_insn_gp via define Vishal Verma
2025-03-18  6:35 ` [PATCH v2 4/4] KVM: VMX: Clean up and macrofy x86_ops Vishal Verma
2025-05-02 21:51 ` [PATCH v2 0/4] KVM: TDX: Cleanup the kvm_x86_ops structure for vmx/tdx 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=5a9335bdf4fbfef9d34c448d1bd8f075e56f82bc.camel@intel.com \
    --to=rick.p.edgecombe@intel.com \
    --cc=binbin.wu@linxu.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vishal.l.verma@intel.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