From: Borislav Petkov <bp@alien8.de>
To: Michael Roth <michael.roth@amd.com>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
Kees Cook <keescook@chromium.org>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Tony Luck <tony.luck@intel.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Venu Busireddy <venu.busireddy@oracle.com>,
Joerg Roedel <jroedel@suse.de>,
Tianyu Lan <Tianyu.Lan@microsoft.com>,
Brijesh Singh <brijesh.singh@amd.com>
Subject: Re: [PATCH v2] x86/sev: get the AP jump table address from secrets page
Date: Thu, 21 Apr 2022 11:47:26 +0200 [thread overview]
Message-ID: <YmEoLvEX15l0vmam@zn.tnic> (raw)
In-Reply-To: <20220421021445.24307-1-michael.roth@amd.com>
On Wed, Apr 20, 2022 at 09:14:45PM -0500, Michael Roth wrote:
> diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
> index f01f4550e2c6..29b832c3f27f 100644
> --- a/arch/x86/kernel/sev.c
> +++ b/arch/x86/kernel/sev.c
> @@ -558,6 +558,55 @@ void noinstr __sev_es_nmi_complete(void)
> __sev_put_ghcb(&state);
> }
>
> +static u64 get_secrets_page(void)
> +{
> + u64 pa_data = boot_params.cc_blob_address;
> + struct cc_blob_sev_info info;
> + void *map;
> +
> + /*
> + * The CC blob contains the address of the secrets page, check if the
> + * blob is present.
> + */
> + if (!pa_data)
> + return 0;
> +
> + map = early_memremap(pa_data, sizeof(info));
WARNING: modpost: vmlinux.o(.text+0x58a1d): Section mismatch in reference from the function get_secrets_page() to the function .init.text:early_memremap()
The function get_secrets_page() references
the function __init early_memremap().
This is often because get_secrets_page lacks a __init
annotation or the annotation of early_memremap is wrong.
WARNING: modpost: vmlinux.o(.text+0x58a3e): Section mismatch in reference from the function get_secrets_page() to the function .init.text:early_memunmap()
The function get_secrets_page() references
the function __init early_memunmap().
This is often because get_secrets_page lacks a __init
annotation or the annotation of early_memunmap is wrong.
The previous caller was __init.
Seeing how the call chain starts at setup_real_mode() which is
__init, I'm thinking all those functions down to and including
get_secrets_page() should be __init too. And I'm guessing that should be
a pre-patch and then this one ontop.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
prev parent reply other threads:[~2022-04-21 9:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 2:14 Michael Roth
2022-04-21 9:47 ` Borislav Petkov [this message]
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=YmEoLvEX15l0vmam@zn.tnic \
--to=bp@alien8.de \
--cc=Tianyu.Lan@microsoft.com \
--cc=brijesh.singh@amd.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jroedel@suse.de \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=ndesaulniers@google.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tony.luck@intel.com \
--cc=venu.busireddy@oracle.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
all inboxes | Powered by JetHome®