From: kernel test robot <lkp@intel.com>
To: Brijesh Singh <brijesh.singh@amd.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
x86@kernel.org, Borislav Petkov <bp@suse.de>,
Michael Roth <michael.roth@amd.com>
Subject: [tip:x86/sev 55/55] arch/x86/kernel/sev.c:605:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Mon, 2 May 2022 22:19:04 +0800 [thread overview]
Message-ID: <202205022233.XgNDR7WR-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/sev
head: c2106a231c2ba36ff9af50cdf2867b9a5f8150a6
commit: c2106a231c2ba36ff9af50cdf2867b9a5f8150a6 [55/55] x86/sev: Get the AP jump table address from secrets page
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220502/202205022233.XgNDR7WR-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=c2106a231c2ba36ff9af50cdf2867b9a5f8150a6
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip x86/sev
git checkout c2106a231c2ba36ff9af50cdf2867b9a5f8150a6
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/
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/kernel/sev.c:605:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got struct snp_secrets_page_layout *[assigned] layout @@
arch/x86/kernel/sev.c:605:17: sparse: expected void volatile [noderef] __iomem *addr
arch/x86/kernel/sev.c:605:17: sparse: got struct snp_secrets_page_layout *[assigned] layout
vim +605 arch/x86/kernel/sev.c
588
589 static u64 __init get_snp_jump_table_addr(void)
590 {
591 struct snp_secrets_page_layout *layout;
592 u64 pa, addr;
593
594 pa = get_secrets_page();
595 if (!pa)
596 return 0;
597
598 layout = (__force void *)ioremap_encrypted(pa, PAGE_SIZE);
599 if (!layout) {
600 pr_err("Unable to locate AP jump table address: failed to map the SNP secrets page.\n");
601 return 0;
602 }
603
604 addr = layout->os_area.ap_jump_table_pa;
> 605 iounmap(layout);
606
607 return addr;
608 }
609
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-05-02 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 14:19 kernel test robot [this message]
2022-05-02 14:48 ` [tip:x86/sev 55/55] arch/x86/kernel/sev.c:605:17: sparse: sparse: incorrect type in argument 1 (different address spaces) Borislav Petkov
2022-05-02 15:50 ` [tip: x86/sev] x86/sev: Fix address space sparse warning tip-bot2 for Borislav Petkov
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=202205022233.XgNDR7WR-lkp@intel.com \
--to=lkp@intel.com \
--cc=bp@suse.de \
--cc=brijesh.singh@amd.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).