From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.2745.1676416443678396674 for ; Tue, 14 Feb 2023 15:14:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a2UndXTS; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1484F61952 for ; Tue, 14 Feb 2023 23:14:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76E50C4339B for ; Tue, 14 Feb 2023 23:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676416442; bh=TxxNfFOWKxrcXHPElZDb1wQOOeIyZW/z4eyhs3E8Xu4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=a2UndXTS13zOAtZE99jUSfepKF3LD+qkYzmCBFOsySj34b5F736wh44O9uut/VhKM 0zI2KPrA7tRmYvjUhQqVCKoZ4fGVkFRQidCCSlhOZ2dnaR445XWIuKnxZ5mhQJ1LjY iTfB/skuenC1S8ImP30KaFKFDFJbkfam+3GCb7nvbPc6Txk1MwUcbnShhK6cb74uW/ c9Ih6gvoGM49OVuUHUmIfAg0UJUxKK9iG1O9d+UEyuQ+Oa2tYuE774rk//4HvHi5An 54/c+7SnvQDsjFVBzbSeRl/+exp/3heVyfuo39cY7lcdhBuSENbDRa8t5U1fhkAzaI 01KZ+ONQLMtdw== Received: by mail-lf1-f52.google.com with SMTP id cf42so25559960lfb.1 for ; Tue, 14 Feb 2023 15:14:02 -0800 (PST) X-Gm-Message-State: AO0yUKWWx/6AIxFgOCwlRCaEPwWFzXzKVbaFdmuv14Lrr3OUDT+aP33c xzt6VVkoxPI8SBClmFcxaHrBz3I63XCcG24pQKQ= X-Google-Smtp-Source: AK7set9TeQlZvCch9XaAbiUAPXYE3clJDpzEy3t8+/nEv8+FO7S9ShOnZ9S1T1Ok8b1C8qYd/sLu98NasCeEv7QEZig= X-Received: by 2002:a05:6512:709:b0:4db:4923:6393 with SMTP id b9-20020a056512070900b004db49236393mr735768lfs.7.1676416440514; Tue, 14 Feb 2023 15:14:00 -0800 (PST) MIME-Version: 1.0 References: <20230214230719.1457783-1-dionnaglaze@google.com> In-Reply-To: <20230214230719.1457783-1-dionnaglaze@google.com> From: "Ard Biesheuvel" Date: Wed, 15 Feb 2023 00:13:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent To: Dionna Glaze Cc: devel@edk2.groups.io, Thomas Lendacky , Erdem Aktas , James Bottomley , Jiewen Yao , Min Xu , Michael Roth Content-Type: text/plain; charset="UTF-8" On Wed, 15 Feb 2023 at 00:07, Dionna Glaze wrote: > > This event should only trigger once. It should be idempotent, but the > allocation of the memory map itself is observable and can cause > ExitBootServices to fail with a modified map key. > > Cc: Ard Biesheuvel > Cc: Thomas Lendacky > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Min Xu > Cc: Michael Roth > > Signed-off-by: Dionna Glaze > --- > OvmfPkg/AmdSevDxe/AmdSevDxe.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c > index 6391d1f775..f9baca90bd 100644 > --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c > +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c > @@ -124,6 +124,7 @@ AcceptAllMemory ( > } > > gBS->FreePool (AllDescMap); > + gBS->CloseEvent (mAcceptAllMemoryEvent); > return Status; > } > > -- > 2.39.1.637.g21b0678d19-goog > Reviewed-by: Ard Biesheuvel Queued as #4041