Re: [PATCH v12 07/19] x86/sev: Carve out and export SNP guest messaging init routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nikunj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b]

url:    https://github.com/intel-lab-lkp/linux/commits/Nikunj-A-Dadhania/virt-sev-guest-Use-AES-GCM-crypto-library/20241009-173734
base:   8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
patch link:    https://lore.kernel.org/r/20241009092850.197575-8-nikunj%40amd.com
patch subject: [PATCH v12 07/19] x86/sev: Carve out and export SNP guest messaging init routines
config: x86_64-randconfig-121-20241017 (https://download.01.org/0day-ci/archive/20241017/202410171505.gZbmXuo2-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241017/202410171505.gZbmXuo2-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/202410171505.gZbmXuo2-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> arch/x86/coco/sev/core.c:2663:24: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct snp_secrets_page *secrets @@     got void [noderef] __iomem * @@
   arch/x86/coco/sev/core.c:2663:24: sparse:     expected struct snp_secrets_page *secrets
   arch/x86/coco/sev/core.c:2663:24: sparse:     got void [noderef] __iomem *
>> arch/x86/coco/sev/core.c:2694:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got struct snp_secrets_page *secrets @@
   arch/x86/coco/sev/core.c:2694:22: sparse:     expected void volatile [noderef] __iomem *addr
   arch/x86/coco/sev/core.c:2694:22: sparse:     got struct snp_secrets_page *secrets

vim +2663 arch/x86/coco/sev/core.c

  2649	
  2650	struct snp_msg_desc *snp_msg_alloc(void)
  2651	{
  2652		struct snp_msg_desc *mdesc;
  2653	
  2654		BUILD_BUG_ON(sizeof(struct snp_guest_msg) > PAGE_SIZE);
  2655	
  2656		if (snp_mdesc)
  2657			return snp_mdesc;
  2658	
  2659		mdesc = kzalloc(sizeof(struct snp_msg_desc), GFP_KERNEL);
  2660		if (!mdesc)
  2661			return ERR_PTR(-ENOMEM);
  2662	
> 2663		mdesc->secrets = ioremap_encrypted(secrets_pa, PAGE_SIZE);
  2664		if (!mdesc->secrets)
  2665			return ERR_PTR(-ENODEV);
  2666	
  2667		/* Allocate the shared page used for the request and response message. */
  2668		mdesc->request = alloc_shared_pages(sizeof(struct snp_guest_msg));
  2669		if (!mdesc->request)
  2670			goto e_unmap;
  2671	
  2672		mdesc->response = alloc_shared_pages(sizeof(struct snp_guest_msg));
  2673		if (!mdesc->response)
  2674			goto e_free_request;
  2675	
  2676		mdesc->certs_data = alloc_shared_pages(SEV_FW_BLOB_MAX_SIZE);
  2677		if (!mdesc->certs_data)
  2678			goto e_free_response;
  2679	
  2680		/* initial the input address for guest request */
  2681		mdesc->input.req_gpa = __pa(mdesc->request);
  2682		mdesc->input.resp_gpa = __pa(mdesc->response);
  2683		mdesc->input.data_gpa = __pa(mdesc->certs_data);
  2684	
  2685		snp_mdesc = mdesc;
  2686	
  2687		return mdesc;
  2688	
  2689	e_free_response:
  2690		free_shared_pages(mdesc->response, sizeof(struct snp_guest_msg));
  2691	e_free_request:
  2692		free_shared_pages(mdesc->request, sizeof(struct snp_guest_msg));
  2693	e_unmap:
> 2694		iounmap(mdesc->secrets);

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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux