tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: bdcc9f6a568275aed4cc32fd2312432d2ff1b704 commit: 1423afcb411780c7a6a68f801fdcfb6920ad6f06 [6161/12841] KVM: arm64: Trap access to pVM restricted features config: arm64-randconfig-r033-20211027 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5db7568a6a1fcb408eb8988abdaff2a225a8eb72) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=1423afcb411780c7a6a68f801fdcfb6920ad6f06 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 1423afcb411780c7a6a68f801fdcfb6920ad6f06 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): arch/arm64/kvm/hyp/nvhe/switch.c:126: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Disable host events, enable guest events arch/arm64/kvm/hyp/nvhe/switch.c:146: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Disable guest events, enable host events arch/arm64/kvm/hyp/nvhe/switch.c:164: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Handler for protected VM restricted exceptions. arch/arm64/kvm/hyp/nvhe/switch.c:176: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Handler for protected VM MSR, MRS or System instruction execution in AArch64. arch/arm64/kvm/hyp/nvhe/switch.c:196: warning: Function parameter or member 'vcpu' not described in 'kvm_handle_pvm_fpsimd' arch/arm64/kvm/hyp/nvhe/switch.c:196: warning: Function parameter or member 'exit_code' not described in 'kvm_handle_pvm_fpsimd' >> arch/arm64/kvm/hyp/nvhe/switch.c:196: warning: expecting prototype for Handler for protected floating(). Prototype was for kvm_handle_pvm_fpsimd() instead vim +196 arch/arm64/kvm/hyp/nvhe/switch.c 144 145 /** > 146 * Disable guest events, enable host events 147 */ 148 static void __pmu_switch_to_host(struct kvm_cpu_context *host_ctxt) 149 { 150 struct kvm_host_data *host; 151 struct kvm_pmu_events *pmu; 152 153 host = container_of(host_ctxt, struct kvm_host_data, host_ctxt); 154 pmu = &host->pmu_events; 155 156 if (pmu->events_guest) 157 write_sysreg(pmu->events_guest, pmcntenclr_el0); 158 159 if (pmu->events_host) 160 write_sysreg(pmu->events_host, pmcntenset_el0); 161 } 162 163 /** 164 * Handler for protected VM restricted exceptions. 165 * 166 * Inject an undefined exception into the guest and return true to indicate that 167 * the hypervisor has handled the exit, and control should go back to the guest. 168 */ 169 static bool kvm_handle_pvm_restricted(struct kvm_vcpu *vcpu, u64 *exit_code) 170 { 171 inject_undef64(vcpu); 172 return true; 173 } 174 175 /** 176 * Handler for protected VM MSR, MRS or System instruction execution in AArch64. 177 * 178 * Returns true if the hypervisor has handled the exit, and control should go 179 * back to the guest, or false if it hasn't. 180 */ 181 static bool kvm_handle_pvm_sys64(struct kvm_vcpu *vcpu, u64 *exit_code) 182 { 183 if (kvm_handle_pvm_sysreg(vcpu, exit_code)) 184 return true; 185 186 return kvm_hyp_handle_sysreg(vcpu, exit_code); 187 } 188 189 /** 190 * Handler for protected floating-point and Advanced SIMD accesses. 191 * 192 * Returns true if the hypervisor has handled the exit, and control should go 193 * back to the guest, or false if it hasn't. 194 */ 195 static bool kvm_handle_pvm_fpsimd(struct kvm_vcpu *vcpu, u64 *exit_code) > 196 { 197 /* Linux guests assume support for floating-point and Advanced SIMD. */ 198 BUILD_BUG_ON(!FIELD_GET(ARM64_FEATURE_MASK(ID_AA64PFR0_FP), 199 PVM_ID_AA64PFR0_ALLOW)); 200 BUILD_BUG_ON(!FIELD_GET(ARM64_FEATURE_MASK(ID_AA64PFR0_ASIMD), 201 PVM_ID_AA64PFR0_ALLOW)); 202 203 return kvm_hyp_handle_fpsimd(vcpu, exit_code); 204 } 205 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip