From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lucky1.263xmail.com (lucky1.263xmail.com [211.157.147.133]) by mx.groups.io with SMTP id smtpd.web12.2469.1653446436865276302 for ; Tue, 24 May 2022 19:40:37 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: byosoft.net, ip: 211.157.147.133, mailfrom: byomail@byosoft.net) Received: from localhost (unknown [192.168.167.32]) by lucky1.263xmail.com (Postfix) with ESMTP id ACC5AE2DBA for ; Wed, 25 May 2022 10:40:32 +0800 (CST) X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-ADDR-CHECKED4: 1 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from mail.byosoft.com.cn (unknown [58.240.74.242]) by smtp.263.net (postfix) whith ESMTP id P29418T140422236059392S1653446431646712_; Wed, 25 May 2022 10:40:32 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: byomail@byosoft.net X-SENDER: byomail@byosoft.net X-LOGIN-NAME: byomail@byosoft.net X-FST-TO: devel@edk2.groups.io X-RCPT-COUNT: 1 X-LOCAL-RCPT-COUNT: 0 X-MUTI-DOMAIN-COUNT: 0 X-SENDER-IP: 58.240.74.242 X-ATTACHMENT-NUM: 0 X-UNIQUE-TAG: X-System-Flag: 0 Received: from DESKTOPS6D0PVI ([101.224.116.119]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 25 May 2022 10:39:40 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 101.224.116.119 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Yamahata, Isaku'" Cc: "'Jiewen Yao'" References: In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBPdm1mUGtnOiBUZHhEeGU6IEZpeCBBc21SZWxvY2F0ZUFwTWFpbEJveExvb3A=?= Date: Wed, 25 May 2022 10:39:42 +0800 Message-ID: <027b01d86fe0$b050c370$10f24a50$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIBPi0VdXBPT0zxNsR0K3KgYWWXtAKWApb+rMiUpdA= Sender: "gaoliming" Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Min, Isaku, Jiewen: Is this patch required to catch edk2 202205 stable tag? Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: devel@edk2.groups.io =B4=FA=B1= =ED Min Xu > =B7=A2=CB=CD=CA=B1=BC=E4: 2022=C4=EA5=D4=C224=C8=D5 17:14 > =CA=D5=BC=FE=C8=CB: Yamahata, Isaku ; > devel@edk2.groups.io > =D6=F7=CC=E2: Re: [edk2-devel] [PATCH] OvmfPkg: TdxDxe: Fix > AsmRelocateApMailBoxLoop >=20 > 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 > > Signed-off-by: Isaku Yamahata > > --- > > 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 >=20 > Thanks Isaku. > Reviewed-by: Min Xu >=20 >=20 >=20 >=20 >=20