From: "Min Xu" <min.m.xu@intel.com>
To: "Yamahata, Isaku" <isaku.yamahata@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [PATCH] OvmfPkg: TdxDxe: Fix AsmRelocateApMailBoxLoop
Date: Tue, 24 May 2022 09:14:28 +0000 [thread overview]
Message-ID: <PH0PR11MB506462DE0CF39AB6717516CDC5D79@PH0PR11MB5064.namprd11.prod.outlook.com> (raw)
In-Reply-To: <b5032c14d819a79955271d81be9da1d70c965a3c.1653378492.git.isaku.yamahata@intel.com>
On May 24, 2022 3:54 PM, Yamahata, Isaku wrote:
>
> In TDX, Application Processor busy-loops on Mailbox for OS to issue
> MpProtectedModeWakeupCommandWakeup command to UEFI. As the AP
> acking to it, it clears the command member according to ACPI spec 6.4,
> 5.2.12.19 Multiprocessor Wakeup Structure: "The application processor
> need clear the command to Noop(0) as the acknowledgement that the
> command is received."
> However, AsmRelocateApMailBoxLoop wrongly clears WakeupVector.
> Correctly clear command instead of WakeupVector.
>
> Without this patch, TD guest kernel fails to boot APs.
>
> Fixes: fae5c1464d ("OvmfPkg: Add TdxDxe driver")
> Cc: Min Xu <min.m.xu@intel.com>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
> ---
> OvmfPkg/TdxDxe/X64/ApRunLoop.nasm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> index 49bd04415c..a859375fb8 100644
> --- a/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> +++ b/OvmfPkg/TdxDxe/X64/ApRunLoop.nasm
> @@ -69,7 +69,7 @@ MailBoxWakeUp:
> mov rax, [rbx + WakeupVectorOffset] ; OS sends a wakeup command
> for a given APIC ID, firmware is supposed to reset ; the command field back
> to zero as acknowledgement.- mov qword [rbx + WakeupVectorOffset],
> 0+ mov qword [rbx + CommandOffset], 0 jmp rax MailBoxSleep:
> jmp $--
> 2.25.1
Thanks Isaku.
Reviewed-by: Min Xu <min.m.xu@intel.com>
next prev parent reply other threads:[~2022-05-24 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 7:53 [PATCH] OvmfPkg: TdxDxe: Fix AsmRelocateApMailBoxLoop isaku.yamahata
2022-05-24 9:14 ` Min Xu [this message]
2022-05-25 2:39 ` 回复: [edk2-devel] " gaoliming
2022-05-25 3:00 ` Yao, Jiewen
2022-05-25 13:44 ` Yao, Jiewen
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=PH0PR11MB506462DE0CF39AB6717516CDC5D79@PH0PR11MB5064.namprd11.prod.outlook.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