Re: [PATCH v4.1] KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES

From: kernel test robot
Date: Fri Apr 08 2022 - 00:34:31 EST


Hi Peter,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on kvm/master]
[also build test ERROR on v5.18-rc1 next-20220407]
[cannot apply to v4.1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/intel-lab-lkp/linux/commits/Peter-Gonda/KVM-SEV-Add-KVM_EXIT_SHUTDOWN-metadata-for-SEV-ES/20220408-050628
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git master
config: arm64-randconfig-r035-20220408 (https://download.01.org/0day-ci/archive/20220408/202204081255.SUNyj4S3-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c29a51b3a257908aebc01cd7c4655665db317d66)
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://github.com/intel-lab-lkp/linux/commit/3b310e5891d172b59042783c128f6efcf5bf6198
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Peter-Gonda/KVM-SEV-Add-KVM_EXIT_SHUTDOWN-metadata-for-SEV-ES/20220408-050628
git checkout 3b310e5891d172b59042783c128f6efcf5bf6198
# save the config file 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/kvm/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> arch/arm64/kvm/psci.c:184:26: error: no member named 'flags' in 'struct kvm_run::(unnamed at include/uapi/linux/kvm.h:443:3)'
vcpu->run->system_event.flags = flags;
~~~~~~~~~~~~~~~~~~~~~~~ ^
1 error generated.


vim +184 arch/arm64/kvm/psci.c

e6bc13c8a70eab arch/arm/kvm/psci.c Anup Patel 2014-04-29 163
34739fd95fab3a arch/arm64/kvm/psci.c Will Deacon 2022-02-21 164 static void kvm_prepare_system_event(struct kvm_vcpu *vcpu, u32 type, u64 flags)
4b1238269ed340 arch/arm/kvm/psci.c Anup Patel 2014-04-29 165 {
46808a4cb89708 arch/arm64/kvm/psci.c Marc Zyngier 2021-11-16 166 unsigned long i;
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 167 struct kvm_vcpu *tmp;
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 168
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 169 /*
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 170 * The KVM ABI specifies that a system event exit may call KVM_RUN
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 171 * again and may perform shutdown/reboot at a later time that when the
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 172 * actual request is made. Since we are implementing PSCI and a
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 173 * caller of PSCI reboot and shutdown expects that the system shuts
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 174 * down or reboots immediately, let's make sure that VCPUs are not run
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 175 * after this call is handled and before the VCPUs have been
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 176 * re-initialized.
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 177 */
cc9b43f99d5ff4 virt/kvm/arm/psci.c Andrew Jones 2017-06-04 178 kvm_for_each_vcpu(i, tmp, vcpu->kvm)
3781528e3045e7 arch/arm/kvm/psci.c Eric Auger 2015-09-25 179 tmp->arch.power_off = true;
7b244e2be654d9 virt/kvm/arm/psci.c Andrew Jones 2017-06-04 180 kvm_make_all_cpus_request(vcpu->kvm, KVM_REQ_SLEEP);
cf5d318865e25f arch/arm/kvm/psci.c Christoffer Dall 2014-10-16 181
4b1238269ed340 arch/arm/kvm/psci.c Anup Patel 2014-04-29 182 memset(&vcpu->run->system_event, 0, sizeof(vcpu->run->system_event));
4b1238269ed340 arch/arm/kvm/psci.c Anup Patel 2014-04-29 183 vcpu->run->system_event.type = type;
34739fd95fab3a arch/arm64/kvm/psci.c Will Deacon 2022-02-21 @184 vcpu->run->system_event.flags = flags;
4b1238269ed340 arch/arm/kvm/psci.c Anup Patel 2014-04-29 185 vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT;
4b1238269ed340 arch/arm/kvm/psci.c Anup Patel 2014-04-29 186 }
4b1238269ed340 arch/arm/kvm/psci.c Anup Patel 2014-04-29 187

--
0-DAY CI Kernel Test Service
https://01.org/lkp