From: Tom Lendacky <thomas.lendacky@amd.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Borislav Petkov <bp@suse.de>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH tip/sched/core] mm/early_ioremap: Adjust early_ioremap system_state check
Date: Fri, 16 Jun 2017 09:43:40 -0500 [thread overview]
Message-ID: <9408c89a-8c72-32a8-9b28-87cbfcf7bcaa@amd.com> (raw)
In-Reply-To: <dae047fa-6b09-d15b-0362-ca814822318a@amd.com>
On 6/16/2017 8:03 AM, Tom Lendacky wrote:
> On 6/16/2017 5:58 AM, Thomas Gleixner wrote:
>> On Wed, 14 Jun 2017, Tom Lendacky wrote:
>>> A recent change added a new system_state value, SYSTEM_SCHEDULING, which
>>> exposed a warning issued by early_ioreamp() when the system_state was
>>> not
>>> SYSTEM_BOOTING. Since early_ioremap() can be called when the
>>> system_state
>>> is SYSTEM_SCHEDULING, the check to issue the warning is changed from
>>> system_state != SYSTEM_BOOTING to system_state >= SYSTEM_RUNNING.
>>
>> Errm, why is that early_ioremap() stuff called after we enabled the
>> scheduler? At that point the regular ioremap stuff is long working.
>
> As part of the SME support I'm decrypting the trampoline area during
> set_real_mode_permissions(). Since it was still valid to use the
> early_memremap()/early_ioremap() functions I chose to use those instead
> of creating new ioremap functions to support encrypted or decrypted
> mappings with and without write-protection.
Looking at this again, in setup_real_mode() I can update the trampoline
area with the proper encryption attributes using set_memory_decrypted()
before the trampoline area is copied and thus avoid having to decrypt
the area in-place. With that I won't need to use the early_memremap()
functions.
So you can ignore this patch.
Thanks,
Tom
>
> I could look into adding new ioremap APIs, but their usage would be
> limited to this one case. Since the early_memremap() works I thought
> that would be the best path and just adjust the WARNing condition.
>
> Thanks,
> Tom
>
>>
>> Thanks,
>>
>> tglx
>>
>>
prev parent reply other threads:[~2017-06-16 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 19:11 Tom Lendacky
2017-06-16 10:58 ` Thomas Gleixner
2017-06-16 13:03 ` Tom Lendacky
2017-06-16 14:43 ` Tom Lendacky [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=9408c89a-8c72-32a8-9b28-87cbfcf7bcaa@amd.com \
--to=thomas.lendacky@amd.com \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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®