tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aab7ee9f8ff0110bfcd594b33dc33748dc1baf46
commit: c34b26b98caca48ec9ee981d4a89ac4f73376a3a [6264/9127] KVM: MIPS: clean up redundant
'kvm_run' parameters
config: mips-randconfig-r005-20200719 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
ed6b578040a85977026c93bf4188f996148f3218)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout c34b26b98caca48ec9ee981d4a89ac4f73376a3a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/mips/kvm/emulate.c:946:23: warning: no previous prototype for function
'kvm_mips_emul_eret' [-Wmissing-prototypes]
enum emulation_result kvm_mips_emul_eret(struct kvm_vcpu *vcpu)
^
arch/mips/kvm/emulate.c:946:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
enum emulation_result kvm_mips_emul_eret(struct kvm_vcpu *vcpu)
^
static
arch/mips/kvm/emulate.c:1029:23: warning: no previous prototype for function
'kvm_mips_emul_tlbr' [-Wmissing-prototypes]
enum emulation_result kvm_mips_emul_tlbr(struct kvm_vcpu *vcpu)
^
arch/mips/kvm/emulate.c:1029:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
enum emulation_result kvm_mips_emul_tlbr(struct kvm_vcpu *vcpu)
^
static
arch/mips/kvm/emulate.c:1102:23: warning: no previous prototype for function
'kvm_mips_emul_tlbwi' [-Wmissing-prototypes]
enum emulation_result kvm_mips_emul_tlbwi(struct kvm_vcpu *vcpu)
^
arch/mips/kvm/emulate.c:1102:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
enum emulation_result kvm_mips_emul_tlbwi(struct kvm_vcpu *vcpu)
^
static
arch/mips/kvm/emulate.c:1138:23: warning: no previous prototype for function
'kvm_mips_emul_tlbwr' [-Wmissing-prototypes]
enum emulation_result kvm_mips_emul_tlbwr(struct kvm_vcpu *vcpu)
^
arch/mips/kvm/emulate.c:1138:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
enum emulation_result kvm_mips_emul_tlbwr(struct kvm_vcpu *vcpu)
^
static
arch/mips/kvm/emulate.c:1163:23: warning: no previous prototype for function
'kvm_mips_emul_tlbp' [-Wmissing-prototypes]
enum emulation_result kvm_mips_emul_tlbp(struct kvm_vcpu *vcpu)
^
arch/mips/kvm/emulate.c:1163:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
enum emulation_result kvm_mips_emul_tlbp(struct kvm_vcpu *vcpu)
^
static
arch/mips/kvm/emulate.c:1733:28: warning: shift count >= width of type
[-Wshift-count-overflow]
((vcpu->arch.gprs[rt] >> 56) &
0xff);
^ ~~
arch/mips/kvm/emulate.c:1737:28: warning: shift count >= width of type
[-Wshift-count-overflow]
((vcpu->arch.gprs[rt] >> 48) &
0xffff);
^ ~~
arch/mips/kvm/emulate.c:1741:28: warning: shift count >= width of type
[-Wshift-count-overflow]
((vcpu->arch.gprs[rt] >> 40) &
0xffffff);
^ ~~
arch/mips/kvm/emulate.c:1745:28: warning: shift count >= width of type
[-Wshift-count-overflow]
((vcpu->arch.gprs[rt] >> 32) &
0xffffffff);
^ ~~
arch/mips/kvm/emulate.c:1795:27: warning: shift count >= width of type
[-Wshift-count-overflow]
(vcpu->arch.gprs[rt] << 32);
^ ~~
arch/mips/kvm/emulate.c:1799:27: warning: shift count >= width of type
[-Wshift-count-overflow]
(vcpu->arch.gprs[rt] << 40);
^ ~~
arch/mips/kvm/emulate.c:1803:27: warning: shift count >= width of type
[-Wshift-count-overflow]
(vcpu->arch.gprs[rt] << 48);
^ ~~
arch/mips/kvm/emulate.c:1807:27: warning: shift count >= width of type
[-Wshift-count-overflow]
(vcpu->arch.gprs[rt] << 56);
^ ~~
> arch/mips/kvm/emulate.c:2126:37: error: too many arguments to
function call, expected single argument 'vcpu', have 2 arguments
kvm_mips_complete_mmio_load(vcpu, run);
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~
arch/mips/include/asm/kvm_host.h:1072:30: note: 'kvm_mips_complete_mmio_load'
declared here
extern enum emulation_result kvm_mips_complete_mmio_load(struct kvm_vcpu *vcpu);
^
13 warnings and 1 error generated.
vim +/vcpu +2126 arch/mips/kvm/emulate.c
dc6d95b153e78e arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2111
e685c689f3a84e arch/mips/kvm/kvm_mips_emul.c Sanjay Lal 2012-11-21 2112 default:
d86c1ebe8e3d8a arch/mips/kvm/emulate.c James Hogan 2016-06-14 2113
kvm_err("Load not yet supported (inst=0x%08x)\n",
258f3a2ea93ff7 arch/mips/kvm/emulate.c James Hogan 2016-06-15 2114 inst.word);
8b48d5b75dc4cb arch/mips/kvm/emulate.c James Hogan 2017-03-14 2115
vcpu->mmio_needed = 0;
8b48d5b75dc4cb arch/mips/kvm/emulate.c James Hogan 2017-03-14 2116 return
EMULATE_FAIL;
e685c689f3a84e arch/mips/kvm/kvm_mips_emul.c Sanjay Lal 2012-11-21 2117 }
e685c689f3a84e arch/mips/kvm/kvm_mips_emul.c Sanjay Lal 2012-11-21 2118
8b48d5b75dc4cb arch/mips/kvm/emulate.c James Hogan 2017-03-14 2119
run->mmio.is_write = 0;
8b48d5b75dc4cb arch/mips/kvm/emulate.c James Hogan 2017-03-14 2120
vcpu->mmio_is_write = 0;
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2121
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2122 r =
kvm_io_bus_read(vcpu, KVM_MMIO_BUS,
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2123
run->mmio.phys_addr, run->mmio.len, run->mmio.data);
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2124
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2125 if (!r) {
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 @2126
kvm_mips_complete_mmio_load(vcpu, run);
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2127
vcpu->mmio_needed = 0;
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2128 return
EMULATE_DONE;
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2129 }
f21db3090de2c0 arch/mips/kvm/emulate.c Huacai Chen 2020-05-23 2130
8b48d5b75dc4cb arch/mips/kvm/emulate.c James Hogan 2017-03-14 2131 return
EMULATE_DO_MMIO;
e685c689f3a84e arch/mips/kvm/kvm_mips_emul.c Sanjay Lal 2012-11-21 2132 }
e685c689f3a84e arch/mips/kvm/kvm_mips_emul.c Sanjay Lal 2012-11-21 2133
:::::: The code at line 2126 was first introduced by commit
:::::: f21db3090de2c056728dee76d5fb66343aaf6dd1 KVM: MIPS: Add Loongson-3 Virtual IPI
interrupt support
:::::: TO: Huacai Chen <chenhc(a)lemote.com>
:::::: CC: Paolo Bonzini <pbonzini(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org