From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web11.2296.1598296416558769794 for ; Mon, 24 Aug 2020 12:13:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IRsrZNjY; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598296415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PHn7YZrexXWsOJKXO6Y+XE/nIS03UwiOFN4NkgX3Kh0=; b=IRsrZNjY13gOdBY2yiuMHRmQeEk6HNHszwfBQ7s1G86VDdKP/euWaRzQ2SSpL5TApG1Eo7 wubwlI+0JhKfQckY7m2xuuH2ZPQnWRlBc5AsHbUkrb84ljfxqeV4NM72Nxv5hie3Quool/ TIoMW8X4ZI5d9VRmaRff0HWCl1PCT+0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-200-lnxBD9JvN3CxO-5Bd5wusg-1; Mon, 24 Aug 2020 15:13:26 -0400 X-MC-Unique: lnxBD9JvN3CxO-5Bd5wusg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DB91981F010; Mon, 24 Aug 2020 19:13:22 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-186.ams2.redhat.com [10.36.112.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7806B62AE1; Mon, 24 Aug 2020 19:13:21 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 1/1] UefiCpuPkg/MpInitLib: Always initialize the DoDecrement variable To: devel@edk2.groups.io, thomas.lendacky@amd.com Cc: Liming Gao , Eric Dong , Ray Ni , Rahul Kumar References: <76a9f18992475b915e5f8457704676067210cacf.1597935198.git.thomas.lendacky@amd.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 24 Aug 2020 21:13:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <76a9f18992475b915e5f8457704676067210cacf.1597935198.git.thomas.lendacky@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 08/20/20 16:53, Lendacky, Thomas wrote: > From: Tom Lendacky > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2901 > > The DoDecrement variable in ApWakeupFunction () wasn't always being > initialized. Update the code to always fully initialize it. > > Cc: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > Cc: Rahul Kumar > Signed-off-by: Tom Lendacky > --- > UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c > index 90416c81b616..07426274f639 100644 > --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c > +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c > @@ -885,9 +885,7 @@ ApWakeupFunction ( > UINT64 Status; > BOOLEAN DoDecrement; > > - if (CpuMpData->InitFlag == ApInitConfig) { > - DoDecrement = TRUE; > - } > + DoDecrement = (BOOLEAN) (CpuMpData->InitFlag == ApInitConfig); > > while (TRUE) { > Msr.GhcbPhysicalAddress = AsmReadMsr64 (MSR_SEV_ES_GHCB); > Merged as commit 48a83481d2a2, via . Thanks Laszlo