From: Laszlo Ersek <lersek@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, "Fan, Jeff" <jeff.fan@intel.com>
Cc: "edk2-devel@ml01.01.org" <edk2-devel@ml01.01.org>,
"Yao, Jiewen" <jiewen.yao@intel.com>
Subject: Re: [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 path
Date: Mon, 14 Nov 2016 19:07:30 +0100 [thread overview]
Message-ID: <e49f4039-e54e-c2db-12b5-8a8e3f284cde@redhat.com> (raw)
In-Reply-To: <648314a4-6c17-7c88-7e47-98c4de95fe2d@redhat.com>
On 11/14/16 13:00, Paolo Bonzini wrote:
>
>
> On 14/11/2016 12:27, Laszlo Ersek wrote:
>> Well...
>>
>> http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg05658.html
>> http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg00125.html
>> http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg00563.html
>>
>> Are you suggesting that I resurrect this patch? That would be my
>> pleasure. Please say yes.
>
> It's hard to say no when someone has written the code already. :)
Thanks. I refreshed both patches (OVMF and QEMU -- no code changes just
more precise commit messages). Unfortunately, quite a few things seem
broken, although these patches worked a year ago.
My QEMU base commit is current master 83c83f9a5266. My host kernel is
3.10.0-514.el7.x86_64.
*** So, when I test these two patches, based on edk2 master (no on-list
patches), Ia32 target, my boot hangs (spins) with the log ending in:
> SmmInstallProtocolInterface: [EdkiiSmmExitBootServicesProtocol] 0
That is, MpInitChangeApLoopCallback() is entered, but it never finishes.
"info cpus" prints:
* CPU #0: pc=0x000000007f1f7763 thread_id=17395
CPU #1: pc=0x000000007f2ce01e (halted) thread_id=17396
CPU #2: pc=0x000000007f2ce01e (halted) thread_id=17397
CPU #3: pc=0x00000000fffffff0 thread_id=17398
and I've also seen a case where all the APs were stuck at the reset
vector (0x00000000fffffff0), *not* halted, like VCPU#3 above. They don't
spin, they're just stuck. The spinning comes from CPU#0, apparently in
MpInitChangeApLoopCallback.
*** I flipped the AP sync mode to traditional (considering the relaxed
mode shouldn't be required with the broadcast SMIs). This time the log
ends with:
> SmmInstallProtocolInterface: [EdkiiSmmExitBootServicesProtocol] 0
> MpInitChangeApLoopCallback() done!
but then QEMU abort()s:
> kvm_io_ioeventfd_add: error adding ioeventfd: File exists
> 2016-11-14 17:00:41.405+0000: shutting down, reason=crashed
I see some ioeventfd stuff in the recent QEMU history; do you think it's
related?
*** My last attempt was even more strange. I applied Jeff's v2 (this
series), returned to the relaxed (= currently in-tree) sync mode, and
(of course) the broadcast SMI patches on both sides. This time I didn't
even boot an OS, I just entered the setup TUI, and selected the Reset
option. QEMU crashed again with:
> kvm_io_ioeventfd_add: error adding ioeventfd: File exists
> 2016-11-14 17:00:41.405+0000: shutting down, reason=crashed
I don't know what to look at, honestly. I think I'll check the reflog
for my local QEMU master branch, and return to one of my earlier pulls,
or else use v2.7.0 for testing.
FWIW, the broadcast SMIs work just fine as long as I'm in the firmware
(not booting an OS and not resetting, just browsing around); I verified
with GDB that the broadcast SMI branch was taken in QEMU repeatedly.
Thanks
Laszlo
next prev parent reply other threads:[~2016-11-14 18:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 5:45 [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 path Jeff Fan
2016-11-11 5:45 ` [PATCH v2 1/3] UefiCpuPkg/PiSmmCpuDxeSmm: " Jeff Fan
2016-11-11 5:45 ` [PATCH v2 2/3] UefiCpuPkg/PiSmmCpuDxeSmm: Place AP to 32bit protected mode " Jeff Fan
2016-11-11 5:45 ` [PATCH v2 3/3] UefiCpuPkg/PiSmmCpuDxeSmm: Decrease mNumberToFinish in AP safe code Jeff Fan
2016-11-11 10:16 ` Paolo Bonzini
2016-11-11 19:49 ` [PATCH v2 0/3] Put AP into safe hlt-loop code on S3 path Laszlo Ersek
2016-11-13 12:51 ` Fan, Jeff
2016-11-14 1:41 ` Yao, Jiewen
2016-11-14 8:17 ` Laszlo Ersek
2016-11-14 8:50 ` Paolo Bonzini
2016-11-14 10:39 ` Laszlo Ersek
2016-11-14 11:09 ` Paolo Bonzini
2016-11-14 11:27 ` Laszlo Ersek
2016-11-14 12:00 ` Paolo Bonzini
2016-11-14 18:07 ` Laszlo Ersek [this message]
2016-11-14 18:13 ` Paolo Bonzini
2016-11-14 23:56 ` Laszlo Ersek
2016-11-15 0:47 ` Fan, Jeff
2016-11-15 1:03 ` Laszlo Ersek
2016-11-15 1:04 ` Fan, Jeff
2016-11-15 1:19 ` Fan, Jeff
2016-11-15 1:30 ` Laszlo Ersek
2016-11-15 1:27 ` Laszlo Ersek
2016-11-15 1:38 ` Fan, Jeff
[not found] ` <542CF652F8836A4AB8DBFAAD40ED192A4A2DCDE3@shsmsx102.ccr.corp.intel.com>
2016-11-15 1:21 ` Yao, Jiewen
2016-11-15 1:24 ` Fan, Jeff
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-list 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=e49f4039-e54e-c2db-12b5-8a8e3f284cde@redhat.com \
--to=devel@edk2.groups.io \
/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