From: Wei Huang <wei@redhat.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, hpa@zytor.com, linux-kernel@vger.kernel.org,
linux-x86_64@vger.kernel.org, bgilbert@redhat.com
Subject: Re: [PATCH 1/1] x86/boot/compressed/64: Set EFER.LME=1 in 32-bit trampoline code before returning to long mode
Date: Mon, 7 Jan 2019 14:03:15 -0600 [thread overview]
Message-ID: <6899e645-9579-f599-922a-eb26fc56e8ab@redhat.com> (raw)
In-Reply-To: <20190107082512.w5gkbebsypionyey@black.fi.intel.com>
[adding lkml and linux-x86_64]
On 1/7/19 2:25 AM, Kirill A. Shutemov wrote:
> On Fri, Jan 04, 2019 at 05:44:11AM +0000, Wei Huang wrote:
>> In some old AMD KVM implementation, guest's EFER.LME bit is cleared by KVM
>> when the hypervsior detects guest sets CR0.PG to 0. This causes guest OS
>> to reboot when it tries to return from 32-bit trampoline code because CPU
>> is in incorrect state: CR4.PAE=1, CR0.PG=1, CS.L=1, but EFER.LME=0.
>> As a precaution, this patch sets EFER.LME=1 as part of long mode
>> activation procedure. This extra step won't cause any harm when Linux is
>> booting on bare-metal machine.
>>
>> Signed-off-by: Wei Huang <wei@redhat.com>
>
> Thanks for tracking this down.
BTW I think this patch _might_ be related the recent reboot issue
reported in https://lkml.org/lkml/2018/7/1/836 since the symptoms are
exactly the same.
>
> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Fixes: 34bbb0009f3b ("x86/boot/compressed: Enable 5-level paging during decompression stage")
>
next parent reply other threads:[~2019-01-07 20:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190104054411.12489-1-wei@redhat.com>
[not found] ` <20190107082512.w5gkbebsypionyey@black.fi.intel.com>
2019-01-07 20:03 ` Wei Huang [this message]
2019-01-07 21:53 ` Benjamin Gilbert
2019-01-07 22:02 ` Wei Huang
2019-01-29 21:03 ` [tip:x86/urgent] x86/boot/compressed/64: Set EFER.LME=1 in 32-bit trampoline " tip-bot for Wei Huang
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=6899e645-9579-f599-922a-eb26fc56e8ab@redhat.com \
--to=wei@redhat.com \
--cc=bgilbert@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-x86_64@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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®