[linux-next:master 11226/11483] arch/x86/hyperv/ivm.c:43:25: sparse: sparse: incorrect type in initializer (different address spaces)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2376e5fe91bcad74b997d2cc0535abff79ec73c5
commit: cf90c4532b9281c4bff863a273eb04b0ef953f39 [11226/11483] x86/hyperv: Add new hvcall guest address host visibility support
config: x86_64-randconfig-s022-20211027 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cf90c4532b9281c4bff863a273eb04b0ef953f39
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout cf90c4532b9281c4bff863a273eb04b0ef953f39
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> arch/x86/hyperv/ivm.c:43:25: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   arch/x86/hyperv/ivm.c:43:25: sparse:     expected void const [noderef] __percpu *__vpp_verify
   arch/x86/hyperv/ivm.c:43:25: sparse:     got void [noderef] __percpu **

vim +43 arch/x86/hyperv/ivm.c

    15	
    16	/*
    17	 * hv_mark_gpa_visibility - Set pages visible to host via hvcall.
    18	 *
    19	 * In Isolation VM, all guest memory is encrypted from host and guest
    20	 * needs to set memory visible to host via hvcall before sharing memory
    21	 * with host.
    22	 */
    23	static int hv_mark_gpa_visibility(u16 count, const u64 pfn[],
    24				   enum hv_mem_host_visibility visibility)
    25	{
    26		struct hv_gpa_range_for_visibility **input_pcpu, *input;
    27		u16 pages_processed;
    28		u64 hv_status;
    29		unsigned long flags;
    30	
    31		/* no-op if partition isolation is not enabled */
    32		if (!hv_is_isolation_supported())
    33			return 0;
    34	
    35		if (count > HV_MAX_MODIFY_GPA_REP_COUNT) {
    36			pr_err("Hyper-V: GPA count:%d exceeds supported:%lu\n", count,
    37				HV_MAX_MODIFY_GPA_REP_COUNT);
    38			return -EINVAL;
    39		}
    40	
    41		local_irq_save(flags);
    42		input_pcpu = (struct hv_gpa_range_for_visibility **)
  > 43				this_cpu_ptr(hyperv_pcpu_input_arg);
    44		input = *input_pcpu;
    45		if (unlikely(!input)) {
    46			local_irq_restore(flags);
    47			return -EINVAL;
    48		}
    49	
    50		input->partition_id = HV_PARTITION_ID_SELF;
    51		input->host_visibility = visibility;
    52		input->reserved0 = 0;
    53		input->reserved1 = 0;
    54		memcpy((void *)input->gpa_page_list, pfn, count * sizeof(*pfn));
    55		hv_status = hv_do_rep_hypercall(
    56				HVCALL_MODIFY_SPARSE_GPA_PAGE_HOST_VISIBILITY, count,
    57				0, input, &pages_processed);
    58		local_irq_restore(flags);
    59	
    60		if (hv_result_success(hv_status))
    61			return 0;
    62		else
    63			return -EFAULT;
    64	}
    65	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux