tree: https://github.com/intel/tdx.git guest head: 44e41606b85b08fad5378c876547f8557f835cf6 commit: 6ab2ec84687b999b5f42477972779e801d557612 [75/113] virtio: Initialize authorized attribute for protected guest config: hexagon-buildonly-randconfig-r003-20210826 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project ea08c4cd1c0869ec5024a8bb3f5cdf06ab03ae83) 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/intel/tdx/commit/6ab2ec84687b999b5f42477972779e801d557612 git remote add intel-tdx https://github.com/intel/tdx.git git fetch --no-tags intel-tdx guest git checkout 6ab2ec84687b999b5f42477972779e801d557612 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/virtio/virtio.c:350:6: error: implicit declaration of function 'prot_guest_has' [-Werror,-Wimplicit-function-declaration] if (prot_guest_has(PATTR_GUEST_DEVICE_FILTER)) ^ >> drivers/virtio/virtio.c:350:21: error: use of undeclared identifier 'PATTR_GUEST_DEVICE_FILTER' if (prot_guest_has(PATTR_GUEST_DEVICE_FILTER)) ^ >> drivers/virtio/virtio.c:351:25: error: implicit declaration of function 'prot_guest_authorized' [-Werror,-Wimplicit-function-declaration] dev->dev.authorized = prot_guest_authorized(&dev->dev, ^ 3 errors generated. vim +/prot_guest_has +350 drivers/virtio/virtio.c 321 322 /** 323 * register_virtio_device - register virtio device 324 * @dev : virtio device to be registered 325 * 326 * On error, the caller must call put_device on &@dev->dev (and not kfree), 327 * as another code path may have obtained a reference to @dev. 328 * 329 * Returns: 0 on suceess, -error on failure 330 */ 331 int register_virtio_device(struct virtio_device *dev) 332 { 333 int err; 334 335 dev->dev.bus = &virtio_bus; 336 device_initialize(&dev->dev); 337 338 /* Assign a unique device index and hence name. */ 339 err = ida_simple_get(&virtio_index_ida, 0, 0, GFP_KERNEL); 340 if (err < 0) 341 goto out; 342 343 dev->index = err; 344 dev_set_name(&dev->dev, "virtio%u", dev->index); 345 346 spin_lock_init(&dev->config_lock); 347 dev->config_enabled = false; 348 dev->config_change_pending = false; 349 > 350 if (prot_guest_has(PATTR_GUEST_DEVICE_FILTER)) > 351 dev->dev.authorized = prot_guest_authorized(&dev->dev, 352 (char *)dev_name(&dev->dev)); 353 354 /* We always start by resetting the device, in case a previous 355 * driver messed it up. This also tests that code path a little. */ 356 dev->config->reset(dev); 357 358 /* Acknowledge that we've seen the device. */ 359 virtio_add_status(dev, VIRTIO_CONFIG_S_ACKNOWLEDGE); 360 361 INIT_LIST_HEAD(&dev->vqs); 362 363 /* 364 * device_add() causes the bus infrastructure to look for a matching 365 * driver. 366 */ 367 err = device_add(&dev->dev); 368 if (err) 369 ida_simple_remove(&virtio_index_ida, dev->index); 370 out: 371 if (err) 372 virtio_add_status(dev, VIRTIO_CONFIG_S_FAILED); 373 return err; 374 } 375 EXPORT_SYMBOL_GPL(register_virtio_device); 376 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org