Re: [PATCH v9 05/14] KVM: X86: Implement ring-based dirty memory tracking
Hi Peter, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on vhost/linux-next] [also build test WARNING on linus/master v5.7-rc7] [cannot apply to kvm/linux-next tip/auto-latest linux/master next-20200522] [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/Peter-Xu/KVM-Dirty-ring-interface/20200524-070926 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next config: x86_64-allyesconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): # save the attached .config to linux build tree make W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot All warnings (new ones prefixed by >>, old ones prefixed by <<): >> arch/x86/kvm/../../../virt/kvm/dirty_ring.c:33:6: warning: no previous >> prototype for 'kvm_dirty_ring_full' [-Wmissing-prototypes] bool kvm_dirty_ring_full(struct kvm_dirty_ring *ring) ^~~ -- arch/x86/kvm/vmx/vmx.c: In function 'init_rmode_identity_map': >> arch/x86/kvm/vmx/vmx.c:3472:12: warning: variable 'identity_map_pfn' set but >> not used [-Wunused-but-set-variable] kvm_pfn_t identity_map_pfn; ^~~~ vim +/kvm_dirty_ring_full +33 arch/x86/kvm/../../../virt/kvm/dirty_ring.c 32 > 33 bool kvm_dirty_ring_full(struct kvm_dirty_ring *ring) 34 { 35 return kvm_dirty_ring_used(ring) >= ring->size; 36 } 37 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip
Re: [PATCH v9 05/14] KVM: X86: Implement ring-based dirty memory tracking
On Mon, May 25, 2020 at 10:54:58PM +0800, kbuild test robot wrote: > Hi Peter, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on vhost/linux-next] > [also build test WARNING on linus/master v5.7-rc7] > [cannot apply to kvm/linux-next tip/auto-latest linux/master next-20200522] > [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/Peter-Xu/KVM-Dirty-ring-interface/20200524-070926 > base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git > linux-next > config: x86_64-allyesconfig (attached as .config) > compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 > reproduce (this is a W=1 build): > # save the attached .config to linux build tree > make W=1 ARCH=x86_64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kbuild test robot > > All warnings (new ones prefixed by >>, old ones prefixed by <<): > > >> arch/x86/kvm/../../../virt/kvm/dirty_ring.c:33:6: warning: no previous > >> prototype for 'kvm_dirty_ring_full' [-Wmissing-prototypes] > bool kvm_dirty_ring_full(struct kvm_dirty_ring *ring) > ^~~ I'll add a "static" to quiesce this.. > -- > arch/x86/kvm/vmx/vmx.c: In function 'init_rmode_identity_map': > >> arch/x86/kvm/vmx/vmx.c:3472:12: warning: variable 'identity_map_pfn' set > >> but not used [-Wunused-but-set-variable] > kvm_pfn_t identity_map_pfn; > ^~~~ Hmm, this seems to be true but not related to this series afaict... but sure I can add another patch to remove it. > > vim +/kvm_dirty_ring_full +33 arch/x86/kvm/../../../virt/kvm/dirty_ring.c > > 32 > > 33bool kvm_dirty_ring_full(struct kvm_dirty_ring *ring) > 34{ > 35return kvm_dirty_ring_used(ring) >= ring->size; > 36} > 37 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org -- Peter Xu
Re: [PATCH v9 05/14] KVM: X86: Implement ring-based dirty memory tracking
On Mon, May 25, 2020 at 10:48:08AM +0800, kbuild test robot wrote: > Hi Peter, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on vhost/linux-next] > [also build test WARNING on linus/master v5.7-rc7] > [cannot apply to kvm/linux-next tip/auto-latest linux/master next-20200522] > [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/Peter-Xu/KVM-Dirty-ring-interface/20200524-070926 > base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git > linux-next > config: s390-randconfig-s002-20200524 (attached as .config) > compiler: s390-linux-gcc (GCC) 9.3.0 > reproduce: > # apt-get install sparse > # sparse version: v0.6.1-240-gf0fe1cd9-dirty > # save the attached .config to linux build tree > make W=1 C=1 ARCH=s390 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kbuild test robot > > All warnings (new ones prefixed by >>, old ones prefixed by <<): > > arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function > 'kvm_page_in_dirty_ring': > >> arch/s390/kvm/../../../virt/kvm/kvm_main.c:2932:16: warning: comparison of > >> unsigned expression >= 0 is always true [-Wtype-limits] > 2932 | return (pgoff >= KVM_DIRTY_LOG_PAGE_OFFSET) && > |^~ Should be a false positive, since when KVM_DIRTY_LOG_PAGE_OFFSET==0 (true for s390) then the code won't reach here at all due to the previous check [1]. I thought gcc should be able to directly remove the below code when it sees "if (1) return false;", but it seems not... I wanted to avoid using "#if" macros because I think it always makes the code harder to read (especially when nested). Maybe it's still ok to use one more time here. Thanks, > > vim +2932 arch/s390/kvm/../../../virt/kvm/kvm_main.c > > 2926 > 2927static bool kvm_page_in_dirty_ring(struct kvm *kvm, unsigned > long pgoff) > 2928{ > 2929if (!KVM_DIRTY_LOG_PAGE_OFFSET) > 2930return false; [1] > 2931 > > 2932return (pgoff >= KVM_DIRTY_LOG_PAGE_OFFSET) && > 2933(pgoff < KVM_DIRTY_LOG_PAGE_OFFSET + > 2934 kvm->dirty_ring_size / PAGE_SIZE); > 2935} > 2936 -- Peter Xu
Re: [PATCH v9 05/14] KVM: X86: Implement ring-based dirty memory tracking
Hi Peter, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on vhost/linux-next] [also build test WARNING on linus/master v5.7-rc7] [cannot apply to kvm/linux-next tip/auto-latest linux/master next-20200522] [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/Peter-Xu/KVM-Dirty-ring-interface/20200524-070926 base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next config: s390-randconfig-s002-20200524 (attached as .config) compiler: s390-linux-gcc (GCC) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-240-gf0fe1cd9-dirty # save the attached .config to linux build tree make W=1 C=1 ARCH=s390 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot All warnings (new ones prefixed by >>, old ones prefixed by <<): arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_page_in_dirty_ring': >> arch/s390/kvm/../../../virt/kvm/kvm_main.c:2932:16: warning: comparison of >> unsigned expression >= 0 is always true [-Wtype-limits] 2932 | return (pgoff >= KVM_DIRTY_LOG_PAGE_OFFSET) && |^~ vim +2932 arch/s390/kvm/../../../virt/kvm/kvm_main.c 2926 2927 static bool kvm_page_in_dirty_ring(struct kvm *kvm, unsigned long pgoff) 2928 { 2929 if (!KVM_DIRTY_LOG_PAGE_OFFSET) 2930 return false; 2931 > 2932 return (pgoff >= KVM_DIRTY_LOG_PAGE_OFFSET) && 2933 (pgoff < KVM_DIRTY_LOG_PAGE_OFFSET + 2934 kvm->dirty_ring_size / PAGE_SIZE); 2935 } 2936 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip