Re: [PATCH v1 04/13] KVM: s390: move pv gmap functions into kvm

kernel test robot
2025-01-09T17:42:46Z

Hi Claudio,

kernel test robot noticed the following build warnings:

[auto build test WARNING on s390/features]
[also build test WARNING on kvm/queue kvm/next mst-vhost/linux-next linus/master v6.13-rc6 next-20250109]
[cannot apply to kvms390/next kvm/linux-next]
[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/Claudio-Imbrenda/KVM-s390-wrapper-for-KVM_BUG/20250109-021808
base: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
patch link: https://lore.kernel.org/r/20250108181451.74383-5-imbrenda%40linux.ibm.com
patch subject: [PATCH v1 04/13] KVM: s390: move pv gmap functions into kvm
config: s390-randconfig-001-20250109 (https://download.01.org/0day-ci/archive/20250110/202501100045.U1NGK9qJ-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250110/202501100045.U1NGK9qJ-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/202501100045.U1NGK9qJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/s390/kvm/gmap.c:144: warning: Function parameter or struct member 'page' not described in '__gmap_destroy_page'
>> arch/s390/kvm/gmap.c:144: warning: expecting prototype for gmap_destroy_page(). Prototype was for __gmap_destroy_page() instead

vim +144 arch/s390/kvm/gmap.c

133
134 /**
135 * gmap_destroy_page - Destroy a guest page.
136 * @gmap: the gmap of the guest
137 * @gaddr: the guest address to destroy
138 *
139 * An attempt will be made to destroy the given guest page. If the attempt
140 * fails, an attempt is made to export the page. If both attempts fail, an
141 * appropriate error is returned.
142 */
143 static int __gmap_destroy_page(struct gmap *gmap, struct page *page)
> 144 {
145 struct folio *folio = page_folio(page);
146 int rc;
147
148 /*
149 * See gmap_make_secure(): large folios cannot be secure. Small
150 * folio implies FW_LEVEL_PTE.
151 */
152 if (folio_test_large(folio))
153 return -EFAULT;
154
155 rc = uv_destroy_folio(folio);
156 /*
157 * Fault handlers can race; it is possible that two CPUs will fault
158 * on the same secure page. One CPU can destroy the page, reboot,
159 * re-enter secure mode and import it, while the second CPU was
160 * stuck at the beginning of the handler. At some point the second
161 * CPU will be able to progress, and it will not be able to destroy
162 * the page. In that case we do not want to terminate the process,
163 * we instead try to export the page.
164 */
165 if (rc)
166 rc = uv_convert_from_secure_folio(folio);
167
168 return rc;
169 }
170

--
0-DAY CI Kernel Test Service