Hi Dov,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 42eb8fdac2fc5d62392dcfcf0253753e821a97b0]
url:
https://github.com/0day-ci/linux/commits/Dov-Murik/Allow-guest-access-to-...
base: 42eb8fdac2fc5d62392dcfcf0253753e821a97b0
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.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/547e54014b34e24cd885e941dd66e3fde...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Dov-Murik/Allow-guest-access-to-EFI-confidential-computing-secret-area/20211118-193724
git checkout 547e54014b34e24cd885e941dd66e3fdece3c0c6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/virt/coco/efi_secret/efi_secret.c: In function 'efi_secret_map_area':
drivers/virt/coco/efi_secret/efi_secret.c:181:26: error: implicit declaration of
function 'ioremap_encrypted' [-Werror=implicit-function-declaration]
181 | s->secret_data = ioremap_encrypted(secret_area->base_pa,
secret_area->size);
| ^~~~~~~~~~~~~~~~~
> drivers/virt/coco/efi_secret/efi_secret.c:181:24: warning:
assignment to 'void *' from 'int' makes pointer from integer without a
cast [-Wint-conversion]
181 | s->secret_data =
ioremap_encrypted(secret_area->base_pa, secret_area->size);
| ^
cc1: some warnings being treated as errors
vim +181 drivers/virt/coco/efi_secret/efi_secret.c
157
158 static int efi_secret_map_area(void)
159 {
160 int ret;
161 struct efi_secret *s = efi_secret_get();
162 struct linux_efi_coco_secret_area *secret_area;
163
164 if (efi.coco_secret == EFI_INVALID_TABLE_ADDR) {
165 pr_err("Secret area address is not available\n");
166 return -EINVAL;
167 }
168
169 secret_area = memremap(efi.coco_secret, sizeof(*secret_area), MEMREMAP_WB);
170 if (secret_area == NULL) {
171 pr_err("Could not map secret area EFI config entry\n");
172 return -ENOMEM;
173 }
174 if (!secret_area->base_pa || secret_area->size < sizeof(struct
secret_header)) {
175 pr_err("Invalid secret area memory location (base_pa=0x%llx
size=0x%llx)\n",
176 secret_area->base_pa, secret_area->size);
177 ret = -EINVAL;
178 goto unmap;
179 }
180
181 s->secret_data = ioremap_encrypted(secret_area->base_pa,
secret_area->size);
182 if (s->secret_data == NULL) {
183 pr_err("Could not map secret area\n");
184 ret = -ENOMEM;
185 goto unmap;
186 }
187
188 s->secret_data_len = secret_area->size;
189 ret = 0;
190
191 unmap:
192 memunmap(secret_area);
193 return ret;
194 }
195
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org