KVM Archive on lore.kernel.org
 help / color / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Peter Xu <peterx@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: kbuild-all@lists.01.org, Vitaly Kuznetsov <vkuznets@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Christophe de Dinechin <dinechin@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Kevin Tian <kevin.tian@intel.com>,
	peterx@redhat.com
Subject: Re: [PATCH v9 07/14] KVM: Don't allocate dirty bitmap if dirty ring is enabled
Date: Tue, 26 May 2020 23:05:47 +0800
Message-ID: <20200526150547.GC30967@xsang-OptiPlex-9020> (raw)
In-Reply-To: <20200523225659.1027044-8-peterx@redhat.com>

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
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
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 <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> arch/x86/kvm/mmu/mmu.c:1280:3: warning: Returning an integer in a function with pointer return type is not portable. [CastIntegerToAddressAtReturn]
     return false;
     ^
   arch/x86/kvm/mmu/mmu.c:3725:9: warning: Redundant initialization for 'root'. The initialized value is overwritten before it is read. [redundantInitialization]
      root = __pa(sp->spt);
           ^
   arch/x86/kvm/mmu/mmu.c:3715:15: note: root is initialized
      hpa_t root = vcpu->arch.mmu->pae_root[i];
                 ^
   arch/x86/kvm/mmu/mmu.c:3725:9: note: root is overwritten
      root = __pa(sp->spt);
           ^
   arch/x86/kvm/mmu/mmu.c:3769:8: warning: Redundant initialization for 'root'. The initialized value is overwritten before it is read. [redundantInitialization]
     root = __pa(sp->spt);
          ^
   arch/x86/kvm/mmu/mmu.c:3758:14: note: root is initialized
     hpa_t root = vcpu->arch.mmu->root_hpa;
                ^
   arch/x86/kvm/mmu/mmu.c:3769:8: note: root is overwritten
     root = __pa(sp->spt);
          ^
   arch/x86/kvm/mmu/mmu.c:4670:15: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
    const u8 x = BYTE_MASK(ACC_EXEC_MASK);
                 ^
   arch/x86/kvm/mmu/mmu.c:4671:15: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
    const u8 w = BYTE_MASK(ACC_WRITE_MASK);
                 ^
   arch/x86/kvm/mmu/mmu.c:4672:15: warning: Clarify calculation precedence for '&' and '?'. [clarifyCalculation]
    const u8 u = BYTE_MASK(ACC_USER_MASK);

# https://github.com/0day-ci/linux/commit/2c23bd2b96e30ae3814e3e56f01a6234131cb531
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 2c23bd2b96e30ae3814e3e56f01a6234131cb531
vim +1280 arch/x86/kvm/mmu/mmu.c

b8e8c8303ff28c arch/x86/kvm/mmu.c     Paolo Bonzini   2019-11-04  1269  
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1270  static struct kvm_memory_slot *
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1271  gfn_to_memslot_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t gfn,
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1272  			    bool no_dirty_log)
05da45583de9b3 arch/x86/kvm/mmu.c     Marcelo Tosatti 2008-02-23  1273  {
05da45583de9b3 arch/x86/kvm/mmu.c     Marcelo Tosatti 2008-02-23  1274  	struct kvm_memory_slot *slot;
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1275  
54bf36aac52031 arch/x86/kvm/mmu.c     Paolo Bonzini   2015-04-08  1276  	slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn);
91b0d268a59dd9 arch/x86/kvm/mmu/mmu.c Paolo Bonzini   2020-01-21  1277  	if (!slot || slot->flags & KVM_MEMSLOT_INVALID)
91b0d268a59dd9 arch/x86/kvm/mmu/mmu.c Paolo Bonzini   2020-01-21  1278  		return NULL;
2c23bd2b96e30a arch/x86/kvm/mmu/mmu.c Peter Xu        2020-05-23  1279  	if (no_dirty_log && kvm_slot_dirty_track_enabled(slot))
2c23bd2b96e30a arch/x86/kvm/mmu/mmu.c Peter Xu        2020-05-23 @1280  		return false;
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1281  
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1282  	return slot;
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1283  }
5d163b1c9d6e55 arch/x86/kvm/mmu.c     Xiao Guangrong  2011-03-09  1284  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


  reply index

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23 22:56 [PATCH v9 00/14] KVM: Dirty ring interface Peter Xu
2020-05-23 22:56 ` [PATCH v9 01/14] KVM: X86: Change parameter for fast_page_fault tracepoint Peter Xu
2020-05-23 22:56 ` [PATCH v9 02/14] KVM: Cache as_id in kvm_memory_slot Peter Xu
2020-05-23 22:56 ` [PATCH v9 03/14] KVM: X86: Don't track dirty for KVM_SET_[TSS_ADDR|IDENTITY_MAP_ADDR] Peter Xu
2020-05-23 22:56 ` [PATCH v9 04/14] KVM: Pass in kvm pointer into mark_page_dirty_in_slot() Peter Xu
2020-05-23 22:56 ` [PATCH v9 05/14] KVM: X86: Implement ring-based dirty memory tracking Peter Xu
2020-05-25  2:48   ` kbuild test robot
2020-05-25 15:26     ` Peter Xu
     [not found]   ` <202005252245.ZeOB8qNJ%lkp@intel.com>
2020-05-25 15:33     ` Peter Xu
2020-05-23 22:56 ` [PATCH v9 06/14] KVM: Make dirty ring exclusive to dirty bitmap log Peter Xu
2020-05-23 22:56 ` [PATCH v9 07/14] KVM: Don't allocate dirty bitmap if dirty ring is enabled Peter Xu
2020-05-26 15:05   ` kbuild test robot [this message]
2020-05-26 15:21     ` Peter Xu
2020-05-27 12:53   ` kbuild test robot
2020-05-23 22:56 ` [PATCH v9 08/14] KVM: selftests: Always clear dirty bitmap after iteration Peter Xu
2020-05-23 22:56 ` [PATCH v9 09/14] KVM: selftests: Sync uapi/linux/kvm.h to tools/ Peter Xu
2020-05-23 22:56 ` [PATCH v9 10/14] KVM: selftests: Use a single binary for dirty/clear log test Peter Xu
2020-05-23 22:56 ` [PATCH v9 11/14] KVM: selftests: Introduce after_vcpu_run hook for dirty " Peter Xu
2020-05-23 22:56 ` [PATCH v9 12/14] KVM: selftests: Add dirty ring buffer test Peter Xu
2020-05-23 23:06 ` [PATCH v9 13/14] KVM: selftests: Let dirty_log_test async for dirty ring test Peter Xu
2020-05-23 23:06 ` [PATCH v9 14/14] KVM: selftests: Add "-c" parameter to dirty log test Peter Xu
2020-05-23 23:14 ` [PATCH v9 00/14] KVM: Dirty ring interface Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200526150547.GC30967@xsang-OptiPlex-9020 \
    --to=lkp@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=dinechin@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git