Hi Dongli, Thank you for the patch! Yet something to improve: [auto build test ERROR on xen-tip/linux-next] [also build test ERROR on v4.14-rc7 next-20171018] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Dongli-Zhang/xen-time-do-not-decrease-steal-time-after-live-migration-on-xen/20171102-011408 base: https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next config: arm64-defconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm64 All error/warnings (new ones prefixed by >>): drivers//xen/time.c: In function 'xen_accumulate_runstate_time': >> drivers//xen/time.c:92:20: error: implicit declaration of function 'kcalloc' [-Werror=implicit-function-declaration] runstate_delta = kcalloc(num_possible_cpus(), ^~~~~~~ >> drivers//xen/time.c:92:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion] runstate_delta = kcalloc(num_possible_cpus(), ^ >> drivers//xen/time.c:128:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration] kfree(runstate_delta); ^~~~~ cc1: some warnings being treated as errors vim +/kcalloc +92 drivers//xen/time.c 82 83 void xen_accumulate_runstate_time(int action) 84 { 85 struct vcpu_runstate_info state; 86 int cpu, i; 87 88 switch (action) { 89 case -1: /* backup runstate time before suspend */ 90 WARN_ON_ONCE(unlikely(runstate_delta)); 91 > 92 runstate_delta = kcalloc(num_possible_cpus(), 93 sizeof(*runstate_delta), 94 GFP_KERNEL); 95 if (unlikely(!runstate_delta)) { 96 pr_alert("%s: failed to allocate runstate_delta\n", 97 __func__); 98 return; 99 } 100 101 for_each_possible_cpu(cpu) { 102 xen_get_runstate_snapshot_cpu_delta(&state, cpu); 103 memcpy(runstate_delta[cpu].time, state.time, 104 RUNSTATE_max * sizeof(*runstate_delta[cpu].time)); 105 } 106 107 break; 108 109 case 0: /* backup runstate time after resume */ 110 if (unlikely(!runstate_delta)) { 111 pr_alert("%s: cannot accumulate runstate time as runstate_delta is NULL\n", 112 __func__); 113 return; 114 } 115 116 for_each_possible_cpu(cpu) { 117 for (i = 0; i < RUNSTATE_max; i++) 118 per_cpu(old_runstate_time, cpu)[i] += 119 runstate_delta[cpu].time[i]; 120 } 121 break; 122 123 default: /* do not accumulate runstate time for checkpointing */ 124 break; 125 } 126 127 if (action != -1 && runstate_delta) { > 128 kfree(runstate_delta); 129 runstate_delta = NULL; 130 } 131 } 132 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation