Re: [PATCH] KVM: arm: Don't try to flush hyp-mode device mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christoffer,

[auto build test WARNING on: kvmarm/next]
[also build test WARNING on: v4.3 next-20151105]

url:    https://github.com/0day-ci/linux/commits/Christoffer-Dall/KVM-arm-Don-t-try-to-flush-hyp-mode-device-mappings/20151105-232548
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
config: arm-axm55xx_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All warnings (new ones prefixed by >>):

   arch/arm/kvm/mmu.c: In function 'unmap_ptes':
>> arch/arm/kvm/mmu.c:212:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      pte_t old_pte = *pte;
      ^

vim +212 arch/arm/kvm/mmu.c

363ef89f8 Marc Zyngier     2014-12-19  196   *
363ef89f8 Marc Zyngier     2014-12-19  197   * This is why right after unmapping a page/section and invalidating
363ef89f8 Marc Zyngier     2014-12-19  198   * the corresponding TLBs, we call kvm_flush_dcache_p*() to make sure
363ef89f8 Marc Zyngier     2014-12-19  199   * the IO subsystem will never hit in the cache.
363ef89f8 Marc Zyngier     2014-12-19  200   */
4f853a714 Christoffer Dall 2014-05-09  201  static void unmap_ptes(struct kvm *kvm, pmd_t *pmd,
4f853a714 Christoffer Dall 2014-05-09  202  		       phys_addr_t addr, phys_addr_t end)
4f728276f Marc Zyngier     2013-04-12  203  {
4f853a714 Christoffer Dall 2014-05-09  204  	phys_addr_t start_addr = addr;
4f853a714 Christoffer Dall 2014-05-09  205  	pte_t *pte, *start_pte;
4f853a714 Christoffer Dall 2014-05-09  206  
4f853a714 Christoffer Dall 2014-05-09  207  	start_pte = pte = pte_offset_kernel(pmd, addr);
4f853a714 Christoffer Dall 2014-05-09  208  	do {
8e9a96138 Christoffer Dall 2015-11-05  209  		if (pte_none(*pte))
8e9a96138 Christoffer Dall 2015-11-05  210  			continue;
8e9a96138 Christoffer Dall 2015-11-05  211  
363ef89f8 Marc Zyngier     2014-12-19 @212  		pte_t old_pte = *pte;
363ef89f8 Marc Zyngier     2014-12-19  213  
4f728276f Marc Zyngier     2013-04-12  214  		kvm_set_pte(pte, __pte(0));
d4cb9df5d Marc Zyngier     2013-05-14  215  		kvm_tlb_flush_vmid_ipa(kvm, addr);
363ef89f8 Marc Zyngier     2014-12-19  216  
363ef89f8 Marc Zyngier     2014-12-19  217  		/* No need to invalidate the cache for device mappings */
8e9a96138 Christoffer Dall 2015-11-05  218  		if ((pte_val(old_pte) & PAGE_S2_DEVICE) != PAGE_S2_DEVICE &&
8e9a96138 Christoffer Dall 2015-11-05  219  		    (pte_val(old_pte) & PAGE_HYP_DEVICE) != PAGE_HYP_DEVICE)
363ef89f8 Marc Zyngier     2014-12-19  220  			kvm_flush_dcache_pte(old_pte);

:::::: The code at line 212 was first introduced by commit
:::::: 363ef89f8e9bcedc28b976d0fe2d858fe139c122 arm/arm64: KVM: Invalidate data cache on unmap

:::::: TO: Marc Zyngier <marc.zyngier@xxxxxxx>
:::::: CC: Christoffer Dall <christoffer.dall@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux