From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [sean-jc:x86/vmxon_sucks 17/18] arch/x86/kvm/vmx/main.c:1077:1: warning: label 'err_tdx_bringup' defined but not used
Date: Sun, 25 Jan 2026 21:33:05 +0800 [thread overview]
Message-ID: <202601252103.rucmNkfl-lkp@intel.com> (raw)
tree: https://github.com/sean-jc/linux x86/vmxon_sucks
head: 812d315824cbec66990b83771c86b0ef6f6fc0e6
commit: 7fcfe117b421e1077f02e13d0cd5e8d1457f4b15 [17/18] KVM: TDX: Fold tdx_bringup() into tdx_hardware_setup()
config: x86_64-rhel-9.4-kunit (https://download.01.org/0day-ci/archive/20260125/202601252103.rucmNkfl-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260125/202601252103.rucmNkfl-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601252103.rucmNkfl-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kvm/vmx/main.c: In function 'vt_init':
>> arch/x86/kvm/vmx/main.c:1077:1: warning: label 'err_tdx_bringup' defined but not used [-Wunused-label]
1077 | err_tdx_bringup:
| ^~~~~~~~~~~~~~~
vim +/err_tdx_bringup +1077 arch/x86/kvm/vmx/main.c
d6bee7813752b3 Kai Huang 2025-01-22 1040
d6bee7813752b3 Kai Huang 2025-01-22 1041 static int __init vt_init(void)
d6bee7813752b3 Kai Huang 2025-01-22 1042 {
09b3d3c17f365f Isaku Yamahata 2024-10-30 1043 unsigned vcpu_size, vcpu_align;
d6bee7813752b3 Kai Huang 2025-01-22 1044 int r;
d6bee7813752b3 Kai Huang 2025-01-22 1045
d6bee7813752b3 Kai Huang 2025-01-22 1046 r = vmx_init();
d6bee7813752b3 Kai Huang 2025-01-22 1047 if (r)
d6bee7813752b3 Kai Huang 2025-01-22 1048 return r;
d6bee7813752b3 Kai Huang 2025-01-22 1049
09b3d3c17f365f Isaku Yamahata 2024-10-30 1050 /*
09b3d3c17f365f Isaku Yamahata 2024-10-30 1051 * TDX and VMX have different vCPU structures. Calculate the
09b3d3c17f365f Isaku Yamahata 2024-10-30 1052 * maximum size/align so that kvm_init() can use the larger
09b3d3c17f365f Isaku Yamahata 2024-10-30 1053 * values to create the kmem_vcpu_cache.
09b3d3c17f365f Isaku Yamahata 2024-10-30 1054 */
09b3d3c17f365f Isaku Yamahata 2024-10-30 1055 vcpu_size = sizeof(struct vcpu_vmx);
09b3d3c17f365f Isaku Yamahata 2024-10-30 1056 vcpu_align = __alignof__(struct vcpu_vmx);
09b3d3c17f365f Isaku Yamahata 2024-10-30 1057 if (enable_tdx) {
09b3d3c17f365f Isaku Yamahata 2024-10-30 1058 vcpu_size = max_t(unsigned, vcpu_size,
09b3d3c17f365f Isaku Yamahata 2024-10-30 1059 sizeof(struct vcpu_tdx));
09b3d3c17f365f Isaku Yamahata 2024-10-30 1060 vcpu_align = max_t(unsigned, vcpu_align,
09b3d3c17f365f Isaku Yamahata 2024-10-30 1061 __alignof__(struct vcpu_tdx));
161d34609f9b31 Isaku Yamahata 2024-12-10 1062 kvm_caps.supported_vm_types |= BIT(KVM_X86_TDX_VM);
09b3d3c17f365f Isaku Yamahata 2024-10-30 1063 }
09b3d3c17f365f Isaku Yamahata 2024-10-30 1064
d6bee7813752b3 Kai Huang 2025-01-22 1065 /*
d6bee7813752b3 Kai Huang 2025-01-22 1066 * Common KVM initialization _must_ come last, after this, /dev/kvm is
d6bee7813752b3 Kai Huang 2025-01-22 1067 * exposed to userspace!
d6bee7813752b3 Kai Huang 2025-01-22 1068 */
09b3d3c17f365f Isaku Yamahata 2024-10-30 1069 r = kvm_init(vcpu_size, vcpu_align, THIS_MODULE);
d6bee7813752b3 Kai Huang 2025-01-22 1070 if (r)
d6bee7813752b3 Kai Huang 2025-01-22 1071 goto err_kvm_init;
d6bee7813752b3 Kai Huang 2025-01-22 1072
d6bee7813752b3 Kai Huang 2025-01-22 1073 return 0;
d6bee7813752b3 Kai Huang 2025-01-22 1074
d6bee7813752b3 Kai Huang 2025-01-22 1075 err_kvm_init:
fcdbdf63431c9f Kai Huang 2024-11-15 1076 tdx_cleanup();
fcdbdf63431c9f Kai Huang 2024-11-15 @1077 err_tdx_bringup:
:::::: The code at line 1077 was first introduced by commit
:::::: fcdbdf63431c9faf639bffc957ea2ce9b545432e KVM: VMX: Initialize TDX during KVM module load
:::::: TO: Kai Huang <kai.huang@intel.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-01-25 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202601252103.rucmNkfl-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=seanjc@google.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 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.