All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 11226/11483] arch/x86/hyperv/ivm.c:43:25: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Wed, 27 Oct 2021 19:32:57 +0800	[thread overview]
Message-ID: <202110271948.vb63dCJD-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3398 bytes --]

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@intel.com>


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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36038 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Tianyu Lan <Tianyu.Lan@microsoft.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Wei Liu <wei.liu@kernel.org>,
	Michael Kelley <mikelley@microsoft.com>
Subject: [linux-next:master 11226/11483] arch/x86/hyperv/ivm.c:43:25: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Wed, 27 Oct 2021 19:32:57 +0800	[thread overview]
Message-ID: <202110271948.vb63dCJD-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3315 bytes --]

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@intel.com>


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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36038 bytes --]

             reply	other threads:[~2021-10-27 11:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 11:32 kernel test robot [this message]
2021-10-27 11:32 ` [linux-next:master 11226/11483] arch/x86/hyperv/ivm.c:43:25: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202110271948.vb63dCJD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.