From: kernel test robot <lkp@intel.com>
To: Wencheng Yang <east.moutain.yang@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Wencheng Yang <east.moutain.yang@gmail.com>,
Joerg Roedel <joro@8bytes.org>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drviers/iommu/amd: support P2P access through IOMMU when SME is enabled
Date: Sat, 11 Jan 2025 18:43:37 +0800 [thread overview]
Message-ID: <202501111847.N7CwntR4-lkp@intel.com> (raw)
In-Reply-To: <20250110130756.333265-1-east.moutain.yang@gmail.com>
Hi Wencheng,
kernel test robot noticed the following build warnings:
[auto build test WARNING on arm-perf/for-next/perf]
[also build test WARNING on linus/master joro-iommu/next v6.13-rc6 next-20250110]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Wencheng-Yang/drviers-iommu-amd-support-P2P-access-through-IOMMU-when-SME-is-enabled/20250110-210948
base: https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-next/perf
patch link: https://lore.kernel.org/r/20250110130756.333265-1-east.moutain.yang%40gmail.com
patch subject: [PATCH] drviers/iommu/amd: support P2P access through IOMMU when SME is enabled
config: x86_64-buildonly-randconfig-001-20250111 (https://download.01.org/0day-ci/archive/20250111/202501111847.N7CwntR4-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501111847.N7CwntR4-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501111847.N7CwntR4-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/iommu/amd/io_pgtable_v2.c:14:
In file included from include/linux/io-pgtable.h:6:
In file included from include/linux/iommu.h:10:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/iommu/amd/io_pgtable_v2.c:68:6: warning: variable 'pte' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
68 | if (!(prot & IOMMU_PROT_MMIO))
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/amd/io_pgtable_v2.c:71:2: note: uninitialized use occurs here
71 | pte |= IOMMU_PAGE_PRESENT | IOMMU_PAGE_USER;
| ^~~
drivers/iommu/amd/io_pgtable_v2.c:68:2: note: remove the 'if' if its condition is always true
68 | if (!(prot & IOMMU_PROT_MMIO))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69 | pte = __sme_set(paddr & PM_ADDR_MASK);
drivers/iommu/amd/io_pgtable_v2.c:66:9: note: initialize the variable 'pte' to silence this warning
66 | u64 pte;
| ^
| = 0
2 warnings generated.
vim +68 drivers/iommu/amd/io_pgtable_v2.c
63
64 static u64 set_pte_attr(u64 paddr, u64 pg_size, int prot)
65 {
66 u64 pte;
67
> 68 if (!(prot & IOMMU_PROT_MMIO))
69 pte = __sme_set(paddr & PM_ADDR_MASK);
70
71 pte |= IOMMU_PAGE_PRESENT | IOMMU_PAGE_USER;
72 pte |= IOMMU_PAGE_ACCESS | IOMMU_PAGE_DIRTY;
73
74 if (prot & IOMMU_PROT_IW)
75 pte |= IOMMU_PAGE_RW;
76
77 /* Large page */
78 if (pg_size == IOMMU_PAGE_SIZE_1G || pg_size == IOMMU_PAGE_SIZE_2M)
79 pte |= IOMMU_PAGE_PSE;
80
81 return pte;
82 }
83
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-01-11 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 13:07 [PATCH] drviers/iommu/amd: support P2P access through IOMMU when SME is enabled Wencheng Yang
2025-01-11 10:43 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-12 7:45 Wencheng Yang
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=202501111847.N7CwntR4-lkp@intel.com \
--to=lkp@intel.com \
--cc=east.moutain.yang@gmail.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
/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