iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jacob Pan <jacob.jun.pan@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	iommu@lists.linux-foundation.org, Joerg Roedel <joro@8bytes.org>,
	Lu Baolu <baolu.lu@linux.intel.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	kbuild-all@lists.01.org, Raj Ashok <ashok.raj@intel.com>,
	Yi Sun <yi.y.sun@intel.com>, Dave Jiang <dave.jiang@intel.com>,
	Wu Hao <hao.wu@intel.com>
Subject: Re: [PATCH 1/4] iommu/vt-d: Enable write protect for supervisor SVM
Date: Thu, 4 Mar 2021 16:06:11 +0800	[thread overview]
Message-ID: <202103041527.778WkYN9-lkp@intel.com> (raw)
In-Reply-To: <1613683878-89946-2-git-send-email-jacob.jun.pan@linux.intel.com>

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

Hi Jacob,

I love your patch! Yet something to improve:

[auto build test ERROR on iommu/next]
[also build test ERROR on linux/master linus/master v5.12-rc1 next-20210303]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jacob-Pan/Misc-vSVA-fixes-for-VT-d/20210219-141141
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: ia64-randconfig-r023-20210304 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/4c1de3403ecb6f91cc1bdc5e3ca81f16a2ffc0b5
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jacob-Pan/Misc-vSVA-fixes-for-VT-d/20210219-141141
        git checkout 4c1de3403ecb6f91cc1bdc5e3ca81f16a2ffc0b5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:154,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:33,
                    from include/linux/scatterlist.h:8,
                    from include/linux/dma-mapping.h:10,
                    from include/linux/iova.h:16,
                    from include/linux/intel-iommu.h:14,
                    from drivers/iommu/intel/pasid.c:15:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                         ^~~~~~~
   drivers/iommu/intel/pasid.c: In function 'pasid_enable_wpe':
>> drivers/iommu/intel/pasid.c:536:22: error: implicit declaration of function 'read_cr0' [-Werror=implicit-function-declaration]
     536 |  unsigned long cr0 = read_cr0();
         |                      ^~~~~~~~
   In file included from include/linux/build_bug.h:5,
                    from include/linux/bits.h:22,
                    from include/linux/bitops.h:6,
                    from drivers/iommu/intel/pasid.c:12:
>> drivers/iommu/intel/pasid.c:539:23: error: 'X86_CR0_WP' undeclared (first use in this function)
     539 |  if (unlikely(!(cr0 & X86_CR0_WP))) {
         |                       ^~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   drivers/iommu/intel/pasid.c:539:23: note: each undeclared identifier is reported only once for each function it appears in
     539 |  if (unlikely(!(cr0 & X86_CR0_WP))) {
         |                       ^~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   cc1: some warnings being treated as errors


vim +/read_cr0 +536 drivers/iommu/intel/pasid.c

   533	
   534	static inline int pasid_enable_wpe(struct pasid_entry *pte)
   535	{
 > 536		unsigned long cr0 = read_cr0();
   537	
   538		/* CR0.WP is normally set but just to be sure */
 > 539		if (unlikely(!(cr0 & X86_CR0_WP))) {
   540			pr_err_ratelimited("No CPU write protect!\n");
   541			return -EINVAL;
   542		}
   543		pasid_set_wpe(pte);
   544	
   545		return 0;
   546	};
   547	

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

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

[-- Attachment #3: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2021-03-04  8:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 21:31 [PATCH 0/4] Misc vSVA fixes for VT-d Jacob Pan
2021-02-18 21:31 ` [PATCH 1/4] iommu/vt-d: Enable write protect for supervisor SVM Jacob Pan
2021-02-20  1:56   ` Lu Baolu
2021-02-22 17:59     ` Jacob Pan
2021-03-04  8:06   ` kernel test robot [this message]
2021-02-18 21:31 ` [PATCH 2/4] iommu/vt-d: Enable write protect propagation from guest Jacob Pan
2021-02-19  6:19   ` Tian, Kevin
2021-02-19 17:08     ` Jacob Pan
2021-02-20  2:38       ` Tian, Kevin
2021-02-22 18:01         ` Jacob Pan
2021-02-18 21:31 ` [PATCH 3/4] iommu/vt-d: Reject unsupported page request modes Jacob Pan
2021-02-20  2:12   ` Lu Baolu
2021-02-18 21:31 ` [PATCH 4/4] iommu/vt-d: Calculate and set flags for handle_mm_fault Jacob Pan
2021-02-20  2:18   ` Lu Baolu

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=202103041527.778WkYN9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=hao.wu@intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=joro@8bytes.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yi.y.sun@intel.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
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;
as well as URLs for NNTP newsgroup(s).