Messages in this thread | | | Date | Sun, 2 Feb 2020 17:04:50 +0800 | From | kbuild test robot <> | Subject | arch/mips/kvm/mips.c:303:43: error: 'kvm_mips_comparecount_wakeup' undeclared |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 94f2630b18975bb56eee5d1a36371db967643479 commit: d11dfed5d700b8973d5742300e04b2aaa9d11217 KVM: MIPS: Move all vcpu init code into kvm_arch_vcpu_create() date: 6 days ago config: mips-malta_kvm_defconfig (attached as .config) compiler: mipsel-linux-gcc (GCC) 5.5.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout d11dfed5d700b8973d5742300e04b2aaa9d11217 # save the attached .config to linux build tree GCC_VERSION=5.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/mips/kvm/mips.c: In function 'kvm_arch_vcpu_create': >> arch/mips/kvm/mips.c:303:43: error: 'kvm_mips_comparecount_wakeup' undeclared (first use in this function) vcpu->arch.comparecount_timer.function = kvm_mips_comparecount_wakeup; ^ arch/mips/kvm/mips.c:303:43: note: each undeclared identifier is reported only once for each function it appears in arch/mips/kvm/mips.c: At top level: >> arch/mips/kvm/mips.c:1224:29: error: 'kvm_mips_comparecount_wakeup' defined but not used [-Werror=unused-function] static enum hrtimer_restart kvm_mips_comparecount_wakeup(struct hrtimer *timer) ^ cc1: all warnings being treated as errors
vim +/kvm_mips_comparecount_wakeup +303 arch/mips/kvm/mips.c
287 288 int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) 289 { 290 int err, size; 291 void *gebase, *p, *handler, *refill_start, *refill_end; 292 int i; 293 294 kvm_debug("kvm @ %p: create cpu %d at %p\n", 295 vcpu->kvm, vcpu->vcpu_id, vcpu); 296 297 err = kvm_mips_callbacks->vcpu_init(vcpu); 298 if (err) 299 return err; 300 301 hrtimer_init(&vcpu->arch.comparecount_timer, CLOCK_MONOTONIC, 302 HRTIMER_MODE_REL); > 303 vcpu->arch.comparecount_timer.function = kvm_mips_comparecount_wakeup; 304 305 /* 306 * Allocate space for host mode exception handlers that handle 307 * guest mode exits 308 */ 309 if (cpu_has_veic || cpu_has_vint) 310 size = 0x200 + VECTORSPACING * 64; 311 else 312 size = 0x4000; 313 314 gebase = kzalloc(ALIGN(size, PAGE_SIZE), GFP_KERNEL); 315 316 if (!gebase) { 317 err = -ENOMEM; 318 goto out_uninit_vcpu; 319 } 320 kvm_debug("Allocated %d bytes for KVM Exception Handlers @ %p\n", 321 ALIGN(size, PAGE_SIZE), gebase); 322 323 /* 324 * Check new ebase actually fits in CP0_EBase. The lack of a write gate 325 * limits us to the low 512MB of physical address space. If the memory 326 * we allocate is out of range, just give up now. 327 */ 328 if (!cpu_has_ebase_wg && virt_to_phys(gebase) >= 0x20000000) { 329 kvm_err("CP0_EBase.WG required for guest exception base %pK\n", 330 gebase); 331 err = -ENOMEM; 332 goto out_free_gebase; 333 } 334 335 /* Save new ebase */ 336 vcpu->arch.guest_ebase = gebase; 337 338 /* Build guest exception vectors dynamically in unmapped memory */ 339 handler = gebase + 0x2000; 340 341 /* TLB refill (or XTLB refill on 64-bit VZ where KX=1) */ 342 refill_start = gebase; 343 if (IS_ENABLED(CONFIG_KVM_MIPS_VZ) && IS_ENABLED(CONFIG_64BIT)) 344 refill_start += 0x080; 345 refill_end = kvm_mips_build_tlb_refill_exception(refill_start, handler); 346 347 /* General Exception Entry point */ 348 kvm_mips_build_exception(gebase + 0x180, handler); 349 350 /* For vectored interrupts poke the exception code @ all offsets 0-7 */ 351 for (i = 0; i < 8; i++) { 352 kvm_debug("L1 Vectored handler @ %p\n", 353 gebase + 0x200 + (i * VECTORSPACING)); 354 kvm_mips_build_exception(gebase + 0x200 + i * VECTORSPACING, 355 handler); 356 } 357 358 /* General exit handler */ 359 p = handler; 360 p = kvm_mips_build_exit(p); 361 362 /* Guest entry routine */ 363 vcpu->arch.vcpu_run = p; 364 p = kvm_mips_build_vcpu_run(p); 365 366 /* Dump the generated code */ 367 pr_debug("#include <asm/asm.h>\n"); 368 pr_debug("#include <asm/regdef.h>\n"); 369 pr_debug("\n"); 370 dump_handler("kvm_vcpu_run", vcpu->arch.vcpu_run, p); 371 dump_handler("kvm_tlb_refill", refill_start, refill_end); 372 dump_handler("kvm_gen_exc", gebase + 0x180, gebase + 0x200); 373 dump_handler("kvm_exit", gebase + 0x2000, vcpu->arch.vcpu_run); 374 375 /* Invalidate the icache for these ranges */ 376 flush_icache_range((unsigned long)gebase, 377 (unsigned long)gebase + ALIGN(size, PAGE_SIZE)); 378 379 /* 380 * Allocate comm page for guest kernel, a TLB will be reserved for 381 * mapping GVA @ 0xFFFF8000 to this page 382 */ 383 vcpu->arch.kseg0_commpage = kzalloc(PAGE_SIZE << 1, GFP_KERNEL); 384 385 if (!vcpu->arch.kseg0_commpage) { 386 err = -ENOMEM; 387 goto out_free_gebase; 388 } 389 390 kvm_debug("Allocated COMM page @ %p\n", vcpu->arch.kseg0_commpage); 391 kvm_mips_commpage_init(vcpu); 392 393 /* Init */ 394 vcpu->arch.last_sched_cpu = -1; 395 vcpu->arch.last_exec_cpu = -1; 396 397 /* Initial guest state */ 398 err = kvm_mips_callbacks->vcpu_setup(vcpu); 399 if (err) 400 goto out_free_commpage; 401 402 return 0; 403 404 out_free_commpage: 405 kfree(vcpu->arch.kseg0_commpage); 406 out_free_gebase: 407 kfree(gebase); 408 out_uninit_vcpu: 409 kvm_mips_callbacks->vcpu_uninit(vcpu); 410 return err; 411 } 412
--- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation [unhandled content-type:application/gzip] | |