* [linux-next:master 11226/11483] arch/x86/hyperv/ivm.c:43:25: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2021-10-27 11:32 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-27 11:32 UTC (permalink / raw)
To: Tianyu Lan
Cc: kbuild-all, Linux Memory Management List, Wei Liu, Michael Kelley
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-27 11:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox