From: kernel test robot <lkp@intel.com>
To: Xin3 Li <xin3.li@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [xinli-intel-fred-public:fred-kvm-v7 44/45] arch/x86/kvm/vmx/vmx.c:2220:42: error: implicit declaration of function 'vmx_read_guest_fred_ssp0'; did you mean 'vmx_read_guest_fred_rsp0'?
Date: Sun, 24 Aug 2025 07:05:49 +0800 [thread overview]
Message-ID: <202508240654.Wd2CTESU-lkp@intel.com> (raw)
tree: https://github.com/xinli-intel/linux-fred-public.git fred-kvm-v7
head: ba4a099cdfb6456f5fae6fd235ce77659517af0e
commit: ba4a099cdfb6456f5fae6fd235ce77659517af0e [44/45] KVM: VMX: Add support for FRED SSP0 save/restore
config: i386-buildonly-randconfig-001-20250824 (https://download.01.org/0day-ci/archive/20250824/202508240654.Wd2CTESU-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250824/202508240654.Wd2CTESU-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/202508240654.Wd2CTESU-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/kvm/vmx/vmx.c: In function 'vmx_get_msr':
>> arch/x86/kvm/vmx/vmx.c:2220:42: error: implicit declaration of function 'vmx_read_guest_fred_ssp0'; did you mean 'vmx_read_guest_fred_rsp0'? [-Werror=implicit-function-declaration]
2220 | msr_info->data = vmx_read_guest_fred_ssp0(vmx);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| vmx_read_guest_fred_rsp0
arch/x86/kvm/vmx/vmx.c: In function 'vmx_set_msr':
>> arch/x86/kvm/vmx/vmx.c:2583:25: error: implicit declaration of function 'vmx_write_guest_fred_ssp0'; did you mean 'vmx_read_guest_fred_rsp0'? [-Werror=implicit-function-declaration]
2583 | vmx_write_guest_fred_ssp0(vmx, data);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| vmx_read_guest_fred_rsp0
cc1: some warnings being treated as errors
vim +2220 arch/x86/kvm/vmx/vmx.c
2053
2054 /*
2055 * Reads an msr value (of 'msr_info->index') into 'msr_info->data'.
2056 * Returns 0 on success, non-0 otherwise.
2057 * Assumes vcpu_load() was already called.
2058 */
2059 int vmx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
2060 {
2061 struct vcpu_vmx *vmx = to_vmx(vcpu);
2062 struct vmx_uret_msr *msr;
2063 u32 index;
2064
2065 switch (msr_info->index) {
2066 #ifdef CONFIG_X86_64
2067 case MSR_FS_BASE:
2068 msr_info->data = vmcs_readl(GUEST_FS_BASE);
2069 break;
2070 case MSR_GS_BASE:
2071 msr_info->data = vmcs_readl(GUEST_GS_BASE);
2072 break;
2073 case MSR_KERNEL_GS_BASE:
2074 msr_info->data = vmx_read_guest_kernel_gs_base(vmx);
2075 break;
2076 case MSR_IA32_FRED_RSP0:
2077 msr_info->data = vmx_read_guest_fred_rsp0(vmx);
2078 break;
2079 case MSR_IA32_FRED_RSP1 ... MSR_IA32_FRED_CONFIG:
2080 msr_info->data = vmcs_read64(fred_msr_to_vmcs(msr_info->index));
2081 break;
2082 #endif
2083 case MSR_EFER:
2084 return kvm_get_msr_common(vcpu, msr_info);
2085 case MSR_IA32_TSX_CTRL:
2086 if (!msr_info->host_initiated &&
2087 !(vcpu->arch.arch_capabilities & ARCH_CAP_TSX_CTRL_MSR))
2088 return 1;
2089 goto find_uret_msr;
2090 case MSR_IA32_UMWAIT_CONTROL:
2091 if (!msr_info->host_initiated && !vmx_has_waitpkg(vmx))
2092 return 1;
2093
2094 msr_info->data = vmx->msr_ia32_umwait_control;
2095 break;
2096 case MSR_IA32_SPEC_CTRL:
2097 if (!msr_info->host_initiated &&
2098 !guest_has_spec_ctrl_msr(vcpu))
2099 return 1;
2100
2101 msr_info->data = to_vmx(vcpu)->spec_ctrl;
2102 break;
2103 case MSR_IA32_SYSENTER_CS:
2104 msr_info->data = vmcs_read32(GUEST_SYSENTER_CS);
2105 break;
2106 case MSR_IA32_SYSENTER_EIP:
2107 msr_info->data = vmcs_readl(GUEST_SYSENTER_EIP);
2108 break;
2109 case MSR_IA32_SYSENTER_ESP:
2110 msr_info->data = vmcs_readl(GUEST_SYSENTER_ESP);
2111 break;
2112 case MSR_IA32_BNDCFGS:
2113 if (!kvm_mpx_supported() ||
2114 (!msr_info->host_initiated &&
2115 !guest_cpu_cap_has(vcpu, X86_FEATURE_MPX)))
2116 return 1;
2117 msr_info->data = vmcs_read64(GUEST_BNDCFGS);
2118 break;
2119 case MSR_IA32_MCG_EXT_CTL:
2120 if (!msr_info->host_initiated &&
2121 !(vmx->msr_ia32_feature_control &
2122 FEAT_CTL_LMCE_ENABLED))
2123 return 1;
2124 msr_info->data = vcpu->arch.mcg_ext_ctl;
2125 break;
2126 case MSR_IA32_FEAT_CTL:
2127 msr_info->data = vmx->msr_ia32_feature_control;
2128 break;
2129 case MSR_IA32_SGXLEPUBKEYHASH0 ... MSR_IA32_SGXLEPUBKEYHASH3:
2130 if (!msr_info->host_initiated &&
2131 !guest_cpu_cap_has(vcpu, X86_FEATURE_SGX_LC))
2132 return 1;
2133 msr_info->data = to_vmx(vcpu)->msr_ia32_sgxlepubkeyhash
2134 [msr_info->index - MSR_IA32_SGXLEPUBKEYHASH0];
2135 break;
2136 case KVM_FIRST_EMULATED_VMX_MSR ... KVM_LAST_EMULATED_VMX_MSR:
2137 if (!guest_cpu_cap_has(vcpu, X86_FEATURE_VMX))
2138 return 1;
2139 if (vmx_get_vmx_msr(&vmx->nested.msrs, msr_info->index,
2140 &msr_info->data))
2141 return 1;
2142 #ifdef CONFIG_KVM_HYPERV
2143 /*
2144 * Enlightened VMCS v1 doesn't have certain VMCS fields but
2145 * instead of just ignoring the features, different Hyper-V
2146 * versions are either trying to use them and fail or do some
2147 * sanity checking and refuse to boot. Filter all unsupported
2148 * features out.
2149 */
2150 if (!msr_info->host_initiated && guest_cpu_cap_has_evmcs(vcpu))
2151 nested_evmcs_filter_control_msr(vcpu, msr_info->index,
2152 &msr_info->data);
2153 #endif
2154 break;
2155 case MSR_IA32_RTIT_CTL:
2156 if (!vmx_pt_mode_is_host_guest())
2157 return 1;
2158 msr_info->data = vmx->pt_desc.guest.ctl;
2159 break;
2160 case MSR_IA32_RTIT_STATUS:
2161 if (!vmx_pt_mode_is_host_guest())
2162 return 1;
2163 msr_info->data = vmx->pt_desc.guest.status;
2164 break;
2165 case MSR_IA32_RTIT_CR3_MATCH:
2166 if (!vmx_pt_mode_is_host_guest() ||
2167 !intel_pt_validate_cap(vmx->pt_desc.caps,
2168 PT_CAP_cr3_filtering))
2169 return 1;
2170 msr_info->data = vmx->pt_desc.guest.cr3_match;
2171 break;
2172 case MSR_IA32_RTIT_OUTPUT_BASE:
2173 if (!vmx_pt_mode_is_host_guest() ||
2174 (!intel_pt_validate_cap(vmx->pt_desc.caps,
2175 PT_CAP_topa_output) &&
2176 !intel_pt_validate_cap(vmx->pt_desc.caps,
2177 PT_CAP_single_range_output)))
2178 return 1;
2179 msr_info->data = vmx->pt_desc.guest.output_base;
2180 break;
2181 case MSR_IA32_RTIT_OUTPUT_MASK:
2182 if (!vmx_pt_mode_is_host_guest() ||
2183 (!intel_pt_validate_cap(vmx->pt_desc.caps,
2184 PT_CAP_topa_output) &&
2185 !intel_pt_validate_cap(vmx->pt_desc.caps,
2186 PT_CAP_single_range_output)))
2187 return 1;
2188 msr_info->data = vmx->pt_desc.guest.output_mask;
2189 break;
2190 case MSR_IA32_RTIT_ADDR0_A ... MSR_IA32_RTIT_ADDR3_B:
2191 index = msr_info->index - MSR_IA32_RTIT_ADDR0_A;
2192 if (!vmx_pt_mode_is_host_guest() ||
2193 (index >= 2 * vmx->pt_desc.num_address_ranges))
2194 return 1;
2195 if (index % 2)
2196 msr_info->data = vmx->pt_desc.guest.addr_b[index / 2];
2197 else
2198 msr_info->data = vmx->pt_desc.guest.addr_a[index / 2];
2199 break;
2200 case MSR_IA32_S_CET:
2201 msr_info->data = vmcs_readl(GUEST_S_CET);
2202 break;
2203 case MSR_KVM_INTERNAL_GUEST_SSP:
2204 msr_info->data = vmcs_readl(GUEST_SSP);
2205 break;
2206 case MSR_IA32_INT_SSP_TAB:
2207 msr_info->data = vmcs_readl(GUEST_INTR_SSP_TABLE);
2208 break;
2209 case MSR_IA32_DEBUGCTLMSR:
2210 msr_info->data = vmx_guest_debugctl_read();
2211 break;
2212 case MSR_IA32_PL0_SSP:
2213 /*
2214 * If kvm_cpu_cap_has(X86_FEATURE_SHSTK) but
2215 * !guest_cpu_cap_has(vcpu, X86_FEATURE_SHSTK), XSAVES/XRSTORS
2216 * cover SSP MSRs.
2217 */
2218 if (!kvm_cpu_cap_has(X86_FEATURE_SHSTK) &&
2219 guest_cpu_cap_has(vcpu, X86_FEATURE_FRED)) {
> 2220 msr_info->data = vmx_read_guest_fred_ssp0(vmx);
2221 break;
2222 }
2223 fallthrough;
2224 default:
2225 find_uret_msr:
2226 msr = vmx_find_uret_msr(vmx, msr_info->index);
2227 if (msr) {
2228 msr_info->data = msr->data;
2229 break;
2230 }
2231 return kvm_get_msr_common(vcpu, msr_info);
2232 }
2233
2234 return 0;
2235 }
2236
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-08-23 23:06 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=202508240654.Wd2CTESU-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=xin3.li@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 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.