Re: [PATCH v3 07/10] arm64: ptdump: Parse the host stage-2 page-tables from the snapshot

From: kernel test robot
Date: Wed Nov 15 2023 - 16:58:33 EST


Hi Sebastian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on kvmarm/next linus/master v6.7-rc1 next-20231115]
[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/Sebastian-Ene/KVM-arm64-Add-snap-shooting-the-host-stage-2-pagetables/20231116-012017
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link: https://lore.kernel.org/r/20231115171639.2852644-9-sebastianene%40google.com
patch subject: [PATCH v3 07/10] arm64: ptdump: Parse the host stage-2 page-tables from the snapshot
config: arm64-randconfig-001-20231116 (https://download.01.org/0day-ci/archive/20231116/202311160522.Nr71iglr-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231116/202311160522.Nr71iglr-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311160522.Nr71iglr-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> arch/arm64/mm/ptdump.c:178:31: warning: 'stage2_pte_bits' defined but not used [-Wunused-const-variable=]
178 | static const struct prot_bits stage2_pte_bits[] = {
| ^~~~~~~~~~~~~~~


vim +/stage2_pte_bits +178 arch/arm64/mm/ptdump.c

177
> 178 static const struct prot_bits stage2_pte_bits[] = {
179 {
180 .mask = PTE_VALID,
181 .val = PTE_VALID,
182 .set = " ",
183 .clear = "F",
184 }, {
185 .mask = KVM_PTE_LEAF_ATTR_HI_S2_XN,
186 .val = KVM_PTE_LEAF_ATTR_HI_S2_XN,
187 .set = "XN",
188 .clear = " ",
189 }, {
190 .mask = KVM_PTE_LEAF_ATTR_LO_S2_S2AP_R,
191 .val = KVM_PTE_LEAF_ATTR_LO_S2_S2AP_R,
192 .set = "R",
193 .clear = " ",
194 }, {
195 .mask = KVM_PTE_LEAF_ATTR_LO_S2_S2AP_W,
196 .val = KVM_PTE_LEAF_ATTR_LO_S2_S2AP_W,
197 .set = "W",
198 .clear = " ",
199 }, {
200 .mask = KVM_PTE_LEAF_ATTR_LO_S2_AF,
201 .val = KVM_PTE_LEAF_ATTR_LO_S2_AF,
202 .set = "AF",
203 .clear = " ",
204 }, {
205 .mask = PTE_NG,
206 .val = PTE_NG,
207 .set = "FnXS",
208 .clear = " ",
209 }, {
210 .mask = PTE_CONT,
211 .val = PTE_CONT,
212 .set = "CON",
213 .clear = " ",
214 }, {
215 .mask = PTE_TABLE_BIT,
216 .val = PTE_TABLE_BIT,
217 .set = " ",
218 .clear = "BLK",
219 }, {
220 .mask = KVM_PGTABLE_PROT_SW0,
221 .val = KVM_PGTABLE_PROT_SW0,
222 .set = "SW0", /* PKVM_PAGE_SHARED_OWNED */
223 }, {
224 .mask = KVM_PGTABLE_PROT_SW1,
225 .val = KVM_PGTABLE_PROT_SW1,
226 .set = "SW1", /* PKVM_PAGE_SHARED_BORROWED */
227 }, {
228 .mask = KVM_PGTABLE_PROT_SW2,
229 .val = KVM_PGTABLE_PROT_SW2,
230 .set = "SW2",
231 }, {
232 .mask = KVM_PGTABLE_PROT_SW3,
233 .val = KVM_PGTABLE_PROT_SW3,
234 .set = "SW3",
235 },
236 };
237

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki