lkml.org 
[lkml]   [2020]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] kvm: Replace vcpu->swait with rcuwait
Hi Davidlohr,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20200323]
[also build test ERROR on v5.6-rc7]
[cannot apply to kvm/linux-next kvmarm/next linus/master kvm-ppc/kvm-ppc-next v5.6-rc7 v5.6-rc6 v5.6-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Davidlohr-Bueso/kvm-Use-rcuwait-for-vcpu-blocking/20200324-155230
base: 5149100c3aebe5e640d6ff68e0b5e5a7eb8638e0
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

arch/x86/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_vcpu_block':
>> arch/x86/kvm/../../../virt/kvm/kvm_main.c:2698:16: error: macro "rcuwait_wait_event" passed 3 arguments, but takes just 2
TASK_IDLE);
^
>> arch/x86/kvm/../../../virt/kvm/kvm_main.c:2696:2: error: 'rcuwait_wait_event' undeclared (first use in this function); did you mean 'rcuwait_wake_up'?
rcuwait_wait_event(&vcpu->wait,
^~~~~~~~~~~~~~~~~~
rcuwait_wake_up
arch/x86/kvm/../../../virt/kvm/kvm_main.c:2696:2: note: each undeclared identifier is reported only once for each function it appears in

vim +/rcuwait_wait_event +2698 arch/x86/kvm/../../../virt/kvm/kvm_main.c

2664
2665 /*
2666 * The vCPU has executed a HLT instruction with in-kernel mode enabled.
2667 */
2668 void kvm_vcpu_block(struct kvm_vcpu *vcpu)
2669 {
2670 ktime_t start, cur;
2671 u64 block_ns;
2672 int block_check = -EINTR;
2673
2674 kvm_arch_vcpu_blocking(vcpu);
2675
2676 start = cur = ktime_get();
2677 if (vcpu->halt_poll_ns && !kvm_arch_no_poll(vcpu)) {
2678 ktime_t stop = ktime_add_ns(ktime_get(), vcpu->halt_poll_ns);
2679
2680 ++vcpu->stat.halt_attempted_poll;
2681 do {
2682 /*
2683 * This sets KVM_REQ_UNHALT if an interrupt
2684 * arrives.
2685 */
2686 if (kvm_vcpu_check_block(vcpu) < 0) {
2687 ++vcpu->stat.halt_successful_poll;
2688 if (!vcpu_valid_wakeup(vcpu))
2689 ++vcpu->stat.halt_poll_invalid;
2690 goto out;
2691 }
2692 cur = ktime_get();
2693 } while (single_task_running() && ktime_before(cur, stop));
2694 }
2695
> 2696 rcuwait_wait_event(&vcpu->wait,
2697 (block_check = kvm_vcpu_check_block(vcpu)) < 0,
> 2698 TASK_IDLE);
2699 cur = ktime_get();
2700 out:
2701 kvm_arch_vcpu_unblocking(vcpu);
2702 block_ns = ktime_to_ns(cur) - ktime_to_ns(start);
2703
2704 if (!kvm_arch_no_poll(vcpu)) {
2705 if (!vcpu_valid_wakeup(vcpu)) {
2706 shrink_halt_poll_ns(vcpu);
2707 } else if (halt_poll_ns) {
2708 if (block_ns <= vcpu->halt_poll_ns)
2709 ;
2710 /* we had a long block, shrink polling */
2711 else if (vcpu->halt_poll_ns && block_ns > halt_poll_ns)
2712 shrink_halt_poll_ns(vcpu);
2713 /* we had a short halt and our poll time is too small */
2714 else if (vcpu->halt_poll_ns < halt_poll_ns &&
2715 block_ns < halt_poll_ns)
2716 grow_halt_poll_ns(vcpu);
2717 } else {
2718 vcpu->halt_poll_ns = 0;
2719 }
2720 }
2721
2722 trace_kvm_vcpu_wakeup(block_ns, !block_check, vcpu_valid_wakeup(vcpu));
2723 kvm_arch_vcpu_block_finish(vcpu);
2724 }
2725 EXPORT_SYMBOL_GPL(kvm_vcpu_block);
2726

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-03-24 17:51    [W:0.127 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site