mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Dave Young <dyoung@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Yu Chen <yu.c.chen@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Juergen Gross <jgross@suse.com>, Tony Luck <tony.luck@intel.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Borislav Petkov <bp@alien8.de>, Rui Zhang <rui.zhang@intel.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Ingo Molnar <mingo@kernel.org>,
	Kexec Mailing List <kexec@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ebiederm@redhat.com, Baoquan He <bhe@redhat.com>
Subject: Re: kexec reboot fails with extra wbinvd introduced for AME SME
Date: Wed, 17 Jan 2018 23:14:54 -0600	[thread overview]
Message-ID: <2264b098-1c8f-6f11-9956-4e1b8cb4b309@amd.com> (raw)
In-Reply-To: <20180118022905.GA2933@dhcp-128-65.nay.redhat.com>

On 1/17/2018 8:29 PM, Dave Young wrote:
> On 01/17/18 at 06:14pm, Linus Torvalds wrote:
>> On Wed, Jan 17, 2018 at 5:47 PM, Dave Young <dyoung@redhat.com> wrote:
>>>
>>> It does not work with just once wbinvd(), and it only works with
>>> removing the wbinvd() for me.  Tom's new post works for me as well
>>> since my cpu is an Intel i5-4200U.
>>
>> Intriguing.
>>
>> It's not like the wbinvd really should be that much of a deal.
>>
>> I think Tom's patch is fine and should be applied, but it does worry
>> me a bit that even a single wbinvd makes that much of a difference for
>> you. There is very little logical reason I can think of that a wbinvd
>> should make any difference what-so-ever on an i5-4200U.
>>
>> I wonder if you have some system issues, and wbinvd just happens to
>> trigger them. But I think we do wbinvd before a suspend-to-RAM too
>> (it's "ACPI_FLUSH_CPU_CACHE()" in the ACPI code). And the dmr code
>> dioes "wbinvd_on_all_cpus()" which does a cross-call etc.
>>
>> Would you mind experimenting a bit with that wbinvd?
>>
>> In particular, what happens if you enable it (so it's not hidden by
>> the SME check), but you move it up to before interrupts are disabled?
> 
> Will play with it more.  Actually I found the hang seems happens
> in code of arch/x86/kernel/relocate_kernel_64.S, there is another
> wbinvd there as well.

The wbinvd in arch/x86/kernel/relocate_kernel_64.S is only performed if
SME is active, so that one won't be executed on an Intel chip.

Thanks,
Tom

> 
>>
>> I'm wondering if there is some issue with MCE generation and wbinvd
>> and whatever, and doing it when the CPU is down and interrupts are
>> disabled causes some system issue..
>>
>> Does anybody have any other ideas?
>>
>>                 Linus

  reply	other threads:[~2018-01-18  5:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  2:52 Regression: kexec/kdump boot hangs with x86/vector commits Dave Young
2017-12-13 15:57 ` Yu Chen
2017-12-14  9:24   ` Dave Young
2018-01-04  3:15     ` Dave Young
2018-01-17  7:22       ` kexec reboot fails with extra wbinvd introduced for AME SME Dave Young
2018-01-17 15:06         ` Tom Lendacky
2018-01-18  1:50           ` Dave Young
2018-01-17 19:42         ` Linus Torvalds
2018-01-17 20:01           ` Tom Lendacky
2018-01-17 22:53             ` Tom Lendacky
2018-01-17 20:10           ` Linus Torvalds
2018-01-18  1:47           ` Dave Young
2018-01-18  2:14             ` Linus Torvalds
2018-01-18  2:29               ` Dave Young
2018-01-18  5:14                 ` Tom Lendacky [this message]
2018-01-18  2:47               ` Dave Young
2018-01-18  2:56                 ` Linus Torvalds
2018-01-18  2:53               ` Arjan van de Ven
2018-01-18  2:57                 ` Dave Young
2018-01-18  3:00                   ` Linus Torvalds
2018-01-18  3:04                     ` Dave Young
2018-01-18  3:31                       ` Dave Young
2018-01-18  3:00               ` Arjan van de Ven

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=2264b098-1c8f-6f11-9956-4e1b8cb4b309@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=arjan@linux.intel.com \
    --cc=bhe@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@redhat.com \
    --cc=jgross@suse.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=yu.c.chen@intel.com \
    /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®