mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: kbuild-all@01.org, iommu@lists.linux-foundation.org,
	alex.williamson@redhat.com, linux-kernel@vger.kernel.org,
	ashok.raj@intel.com, tursulin@ursulin.net, dwmw2@infradead.org
Subject: Re: [PATCH] iommu/vt-d: Fix shift overflow in qi_flush_dev_iotlb
Date: Fri, 15 Dec 2017 11:12:44 +0800	[thread overview]
Message-ID: <201712151052.73FWX742%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171212224250.22173.74201.stgit@gimli.home>

[-- Attachment #1: Type: text/plain, Size: 2951 bytes --]

Hi Alex,

I love your patch! Yet something to improve:

[auto build test ERROR on v4.15-rc3]
[also build test ERROR on next-20171214]
[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/Alex-Williamson/iommu-vt-d-Fix-shift-overflow-in-qi_flush_dev_iotlb/20171215-094227
config: x86_64-randconfig-x000-201750 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/string.h:6:0,
                    from include/uapi/linux/uuid.h:22,
                    from include/linux/uuid.h:19,
                    from include/linux/mod_devicetable.h:13,
                    from include/linux/pci.h:21,
                    from drivers//iommu/dmar.c:31:
   drivers//iommu/dmar.c: In function 'qi_flush_dev_iotlb':
>> drivers//iommu/dmar.c:1348:18: error: 'MAX_AGAW_PFN_WIDTH' undeclared (first use in this function)
      BUG_ON((mask > MAX_AGAW_PFN_WIDTH) ||
                     ^
   include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> drivers//iommu/dmar.c:1348:3: note: in expansion of macro 'BUG_ON'
      BUG_ON((mask > MAX_AGAW_PFN_WIDTH) ||
      ^~~~~~
   drivers//iommu/dmar.c:1348:18: note: each undeclared identifier is reported only once for each function it appears in
      BUG_ON((mask > MAX_AGAW_PFN_WIDTH) ||
                     ^
   include/linux/compiler.h:77:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> drivers//iommu/dmar.c:1348:3: note: in expansion of macro 'BUG_ON'
      BUG_ON((mask > MAX_AGAW_PFN_WIDTH) ||
      ^~~~~~

vim +/MAX_AGAW_PFN_WIDTH +1348 drivers//iommu/dmar.c

  1341	
  1342	void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
  1343				u64 addr, unsigned mask)
  1344	{
  1345		struct qi_desc desc;
  1346	
  1347		if (mask) {
> 1348			BUG_ON((mask > MAX_AGAW_PFN_WIDTH) ||
  1349			       ((mask == MAX_AGAW_PFN_WIDTH) && addr) ||
  1350			       (addr & ((1 << (VTD_PAGE_SHIFT + mask)) - 1)));
  1351			addr |= (1ULL << (VTD_PAGE_SHIFT + mask - 1)) - 1;
  1352			desc.high = QI_DEV_IOTLB_ADDR(addr) | QI_DEV_IOTLB_SIZE;
  1353		} else
  1354			desc.high = QI_DEV_IOTLB_ADDR(addr);
  1355	
  1356		if (qdep >= QI_DEV_IOTLB_MAX_INVS)
  1357			qdep = 0;
  1358	
  1359		desc.low = QI_DEV_IOTLB_SID(sid) | QI_DEV_IOTLB_QDEP(qdep) |
  1360			   QI_DIOTLB_TYPE;
  1361	
  1362		qi_submit_sync(&desc, iommu);
  1363	}
  1364	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27927 bytes --]

      parent reply	other threads:[~2017-12-15  3:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 22:43 Alex Williamson
2017-12-13  7:13 ` Peter Xu
2017-12-13 15:58   ` Alex Williamson
2017-12-13 16:41     ` Hook, Gary
2017-12-13 17:15       ` Alex Williamson
2017-12-13 17:31         ` Hook, Gary
2017-12-15  7:29           ` Peter Xu
2017-12-15  3:12 ` kbuild test robot [this message]

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=201712151052.73FWX742%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=ashok.raj@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tursulin@ursulin.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®