From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) by mx.groups.io with SMTP id smtpd.web11.2672.1676416044703719690 for ; Tue, 14 Feb 2023 15:07:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=YtXtg6zu; spf=pass (domain: flex--dionnaglaze.bounces.google.com, ip: 209.85.216.74, mailfrom: 3kxtsywskbsojouttgmrgfkmuumrk.iusjkbkrkjqi.mxuavy.ou@flex--dionnaglaze.bounces.google.com) Received: by mail-pj1-f74.google.com with SMTP id h11-20020a17090adb8b00b00233cde95f87so123274pjv.9 for ; Tue, 14 Feb 2023 15:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=9KUaurs/4E3pM93USNmL23t6iPDYz1wNFAsq6y8YFLg=; b=YtXtg6zuJ7mLWOaRMKaAWjrP4r3DZ94JdEvbXjHYGUGJoZcYKiJYnKflfFw3d1IALh jfkEwt5FlrhRCu7dgeg4zTIvFjZ74Pf5gqvFcetzpknlM2vDS2SsdjkQ8hABFeiqn0Qc ayGd6LGDRlVUqxBvdhPl2gxYKUEb4h4UUZ1scWgVPt2sJa95jwzbu24uehvaQWALuTCu 78Zgc5RNTAnGuhUYlQFDEIckhIV+QFZsmKx5vPDb7goAXqG+c1NmmUQ1Kgfuhh4fLDz/ NPf7qCzyb/X1s9Fe1hWhUG98pD2S2ECH+HIpxBlgCLXZfiFWJQ3YkTQ4aZ5i8bKyv7NQ i52A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9KUaurs/4E3pM93USNmL23t6iPDYz1wNFAsq6y8YFLg=; b=lmoW464g6l+KljlSvM+ZMuEPXHkk+NWnCy5PVg93kMfbWbci4jRzmuAvvNUmpRSGMn ToC9MFDrqE72vtDJ2UW4PxA+R720DWzSf2sGgWYW3eqtmxdv6KIbB0LG7js+TUVdSaom /1FJ5lj44W6QzDLJEUynIJB70UHHWKObiyw4NIyPARsbL4u5xQc4D1tIeFZE8cr1M5Ud uosZ43J/cS68bK4HZH75WCKFEyAZVGnlUm7SdIZEg1BIV89rTOFWH83B9gruvutfOJTC q7IV139cCGjZRWj6yxwJXD7uMVb+0ZHK0KO/JHhzqgpxXEMGeZh1KX/MqsO2XcjmQuPq /wmg== X-Gm-Message-State: AO0yUKUznRdAMUpZGfVUTNXNmsRipBDLQe2k9PjKIk9G1aga0Uuw0ONq BVisSt5H9Q53Akq9zF/auwheRAScN/qnqw23v7+8Tdu6fJIcJgHmme49uI6EcPQF65k7j3MTet1 38WG4iAplRkY+JNYVzi6g3RzvQmYhlMqEqY/fazIKKEXkpzWScj6HTlr3Hm6zIo4e3EpfCXJ0 X-Google-Smtp-Source: AK7set8VLyvgBt/x00w8DuBcBRJ+TZZ8QJKlBOI/98c35Cdo0E8tHSyN2r7CSvynNCOnfq01ai9nzMUVWZboB4dzmA== X-Received: from dionnaglaze.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2ee6]) (user=dionnaglaze job=sendgmr) by 2002:a63:7152:0:b0:4fb:a355:22e6 with SMTP id b18-20020a637152000000b004fba35522e6mr19230pgn.7.1676416043865; Tue, 14 Feb 2023 15:07:23 -0800 (PST) Date: Tue, 14 Feb 2023 23:07:19 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.39.1.637.g21b0678d19-goog Message-ID: <20230214230719.1457783-1-dionnaglaze@google.com> Subject: [PATCH] OvmfPkg: Close mAcceptAllMemoryEvent From: "Dionna Glaze" To: devel@edk2.groups.io Cc: Dionna Glaze , Ard Biesheuvel , Thomas Lendacky , Erdem Aktas , James Bottomley , Jiewen Yao , Min Xu , Michael Roth Content-Type: text/plain; charset="UTF-8" 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