KVM: arm64: cancel the return value check of kvm_arm_init_sve()
PATCH 1/1 KVM: arm64: cancel the return value check of kvm_arm_init_sve()
Currently, kvm_arm_init_sve() has only a unique return value, so change the return value type of kvm_arm_init_sve() to void.
Meanwhile, there's no need to check the return value of kvm_arm_init_sve() in kvm_arch_init().
--- arch/arm64/kvm/arm.c | 4 +--- arch/arm64/kvm/reset.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-)
arch/arm64/kvm/arm.c +1 -3
@@ -2206,9 +2206,7 @@ int kvm_arch_init(void *opaque)if (err)return err; - err =kvm_arm_init_sve (); -if (err) -return err; +kvm_arm_init_sve (); err =kvm_arm_vmid_alloc_init ();if (err) {
arch/arm64/kvm/reset.c +1 -3
@@ -43,7 +43,7 @@ static u32 kvm_ipa_limit;unsigned int kvm_sve_max_vl; -int kvm_arm_init_sve (void ) +void kvm_arm_init_sve (void ) {if (system_supports_sve ()) { kvm_sve_max_vl =sve_max_virtualisable_vl ();
@@ -65,8 +65,6 @@ int kvm_arm_init_sve(void)pr_warn ("KVM: SVE vector length for guests limited to %u bytes\n" , kvm_sve_max_vl); } - -return 0 ; }static int kvm_vcpu_enable_sve (struct kvm_vcpu *vcpu)
Signature · 1 line
2.17.1
kernel test robot
build botThank you for the patch! Yet something to improve:
Hi Peng,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kvmarm/next]
[also build test ERROR on v5.18-rc7]
[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/Peng-Wu/KVM-arm64-cancel-the-return-value-check-of-kvm_arm_init_sve/20220520-165501 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220521/[email protected]/config) compiler: aarch64-linux-gcc (GCC) 11.3.0
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
# https://github.com/intel-lab-lkp/linux/commit/4f7983bee8e912289335be279fb1f0a0abd6b31b
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Peng-Wu/KVM-arm64-cancel-the-return-value-check-of-kvm_arm_init_sve/20220520-165501 git checkout 4f7983bee8e912289335be279fb1f0a0abd6b31b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
All errors (new ones prefixed by >>):
>> arch/arm64/kvm/reset.c:46:6: error: conflicting types for 'kvm_arm_init_sve'; have 'void(void)'
46 | void kvm_arm_init_sve(void)
| ^~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:45,
from arch/arm64/kvm/reset.c:13:
arch/arm64/include/asm/kvm_host.h:70:5: note: previous declaration of 'kvm_arm_init_sve' with type 'int(void)'
70 | int kvm_arm_init_sve(void);
| ^~~~~~~~~~~~~~~~vim +46 arch/arm64/kvm/reset.c
45
> 46 void kvm_arm_init_sve(void)
47 {
48 if (system_supports_sve()) {
49 kvm_sve_max_vl = sve_max_virtualisable_vl();
50
51 /*
52 * The get_sve_reg()/set_sve_reg() ioctl interface will need
53 * to be extended with multiple register slice support in
54 * order to support vector lengths greater than
55 * VL_ARCH_MAX:
56 */
57 if (WARN_ON(kvm_sve_max_vl > VL_ARCH_MAX))
58 kvm_sve_max_vl = VL_ARCH_MAX;
59
60 /*
61 * Don't even try to make use of vector lengths that
62 * aren't available on all CPUs, for now:
63 */
64 if (kvm_sve_max_vl < sve_max_vl())
65 pr_warn("KVM: SVE vector length for guests limited to %u bytes\n",
66 kvm_sve_max_vl);
67 }
68 }
69 Signature · 6 lines
0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm