Hi Marc,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kvmarm/next]
[also build test WARNING on next-20201210]
[cannot apply to arm64/for-next/core soc/for-next arm/for-next xlnx/master linus/master
kvm/linux-next v5.10-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/0day-ci/linux/commits/Marc-Zyngier/KVM-arm64-ARMv8-3-8...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.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/0day-ci/linux/commit/af7a3cada1fa577612a86dd0a7c4016ff...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Marc-Zyngier/KVM-arm64-ARMv8-3-8-4-Nested-Virtualization-support/20201211-004741
git checkout af7a3cada1fa577612a86dd0a7c4016ffed68acc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/arm64/kvm/arch_timer.c: In function 'kvm_timer_vcpu_load_nested_switch':
> arch/arm64/kvm/arch_timer.c:656:10: warning: variable
'ret' set but not used [-Wunused-but-set-variable]
656 | int hw, ret;
| ^~~
vim +/ret +656 arch/arm64/kvm/arch_timer.c
652
653 static void kvm_timer_vcpu_load_nested_switch(struct kvm_vcpu *vcpu,
654 struct timer_map *map)
655 {
656 int hw, ret;
657
658 if (!irqchip_in_kernel(vcpu->kvm))
659 return;
660
661 /*
662 * We only ever unmap the vtimer irq on a VHE system that runs nested
663 * virtualization, in which case we have both a valid emul_vtimer,
664 * emul_ptimer, direct_vtimer, and direct_ptimer.
665 *
666 * Since this is called from kvm_timer_vcpu_load(), a change between
667 * vEL2 and vEL1/0 will have just happened, and the timer_map will
668 * represent this, and therefore we switch the emul/direct mappings
669 * below.
670 */
671 hw = kvm_vgic_get_map(vcpu, map->direct_vtimer->irq.irq);
672 if (hw < 0) {
673 kvm_vgic_unmap_phys_irq(vcpu, map->emul_vtimer->irq.irq);
674 kvm_vgic_unmap_phys_irq(vcpu, map->emul_ptimer->irq.irq);
675
676 ret = kvm_vgic_map_phys_irq(vcpu,
677 map->direct_vtimer->host_timer_irq,
678 map->direct_vtimer->irq.irq,
679 kvm_arch_timer_get_input_level);
680 ret = kvm_vgic_map_phys_irq(vcpu,
681 map->direct_ptimer->host_timer_irq,
682 map->direct_ptimer->irq.irq,
683 kvm_arch_timer_get_input_level);
684 }
685 }
686
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org