From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B8264D8118F for ; Tue, 5 Mar 2024 12:44:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=NFGu0R+Z81PG3BtqCFfmv0sxwUbPxlt7yRK0oWu/3VQ=; c=relaxed/simple; d=groups.io; h=MIME-Version:In-Reply-To:References:From:User-Agent:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1709642652; v=1; b=X5C6/yhzTaOE19q4ZLN/OMYZiyQz37x1xyTeYc1/1TFlICcLPx1SRKYPfWBkdL3DQvYU2Wz1 7mrpT5bZuZM6zvBZK7B3iNJfkTmSoiQDweqVH+wsZ2M5nZw4lEFjQ4iJY8L0FLkLvaiG9dv91Kz 6ct5VinWwUfaLe8kujCX8j5E= X-Received: by 127.0.0.2 with SMTP id jc4CYY7687511xW3UCNLG2Er; Tue, 05 Mar 2024 04:44:12 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.21963.1709642651527992864 for ; Tue, 05 Mar 2024 04:44:11 -0800 X-Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-536-Ft4B1z6tPk6DsKT04c9uJQ-1; Tue, 05 Mar 2024 07:44:09 -0500 X-MC-Unique: Ft4B1z6tPk6DsKT04c9uJQ-1 X-Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-513149e133cso4858027e87.1 for ; Tue, 05 Mar 2024 04:44:09 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUCCaX9C8FaoMAdHTYMFI+4qIRtkh/66HkaVig4j6YztzaNG6iEkR307BL8Jyv8lVB1MYwxxfdzzSBsxHBT6wBlzwhnrg== X-Gm-Message-State: iLz1dZnO4m7wcGIxdcFQXbwGx7686176AA= X-Received: by 2002:a05:6512:1192:b0:513:1c71:4a44 with SMTP id g18-20020a056512119200b005131c714a44mr1520596lfr.37.1709642647814; Tue, 05 Mar 2024 04:44:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGT2zIn/c+eFex3nIL9OKv3LASRjdboCCQGnh7efbxBd2VTMxQNHHVrS7Uq/xrAs1ZJ6bhwHB1KM7besZtes3Q= X-Received: by 2002:a05:6512:1192:b0:513:1c71:4a44 with SMTP id g18-20020a056512119200b005131c714a44mr1520573lfr.37.1709642647396; Tue, 05 Mar 2024 04:44:07 -0800 (PST) X-Received: from 567203818698 named unknown by gmailapi.google.com with HTTPREST; Tue, 5 Mar 2024 06:44:06 -0600 MIME-Version: 1.0 In-Reply-To: <6fd2dded-3b45-100e-605a-653de6d1b257@redhat.com> References: <20240304151805.129004-1-osteffen@redhat.com> <20240304151805.129004-2-osteffen@redhat.com> <004401da6e95$ac5d9e90$0518dbb0$@byosoft.com.cn> <6fd2dded-3b45-100e-605a-653de6d1b257@redhat.com> From: "Oliver Steffen" User-Agent: alot/0.8.1 Date: Tue, 5 Mar 2024 06:44:06 -0600 Message-ID: Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW2VkazItZGV2ZWxdIFtQQVRDSCB2MSAxLzFdIE1kZU1vZHVsZVBrZzogV2FybiBpZiBvdXQgb2YgZmxhc2ggc3BhY2Ugd2hlbiB3cml0aW5nIHZhcmlhYmxlcw==?= To: Laszlo Ersek , devel@edk2.groups.io, gaoliming@byosoft.com.cn Cc: Bob Feng , Rebecca Cran , Yuwei Chen , Gerd Hoffmann X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,osteffen@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="X5C6/yhz"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) Quoting Laszlo Ersek (2024-03-05 08:33:57) > On 3/5/24 01:40, gaoliming via groups.io wrote: > > Oliver: > > If there is no enough space, Variable driver will reclaim flash and > > reserve the enough space at boot time. > > What if the flash is genuinely fully occupied by *live* non-volatile > variables? > > Laszlo > > > At the runtime, reclaim will not be trigged. The space may be out of > > resource. The warning message may be reported. Is this your case? > > Not exactly. It is like Laszlo describes in his question above. Background: We had the case where an OVMF based VM ran out of flash space after a large number of reboots and hardware configuration changes. The MAC address of the NIC was changing a lot over the life time of the VM. The variable store was consumed entirely by networking related non-volatile variables, written for each network card/MAC address present during boot. Almost all of those were obsolete, of course, but the error that presented itself at first was a VM that failed to boot the firmware and ended up in an rather cryptic ASSERT message. The hope is that this new message makes it easier for non-experts to diagnose the situation. The root cause is of course not addressed by this, but it might also be hard to solve. One would have to identify obsolete network/hardware settings somehow, but there is no way to tell if a certain NIC/MAC might come back at a later point or not. Thanks, Oliver > > Thanks > > Liming > >> -----\u90ae\u4ef6\u539f\u4ef6----- > >> \u53d1\u4ef6\u4eba: devel@edk2.groups.io \u4ee3= \u8868 Oliver Steffen > >> \u53d1\u9001\u65f6\u95f4: 2024\u5e743\u67084\u65e5 23:18 > >> \u6536\u4ef6\u4eba: devel@edk2.groups.io > >> \u6284\u9001: Oliver Steffen ; Bob Feng > >> ; Liming Gao ; Rebecca > >> Cran ; Yuwei Chen ; Gerd > >> Hoffmann ; Laszlo Ersek > >> \u4e3b\u9898: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Warn if out of= flash space > >> when writing variables > >> > >> Emit a DEBUG_WARN message if there is not enough flash space left to > >> write/update a variable. This condition is currently not logged > >> appropriately in all cases, given that full variable store can easily > >> render the system unbootable. > >> This new message helps identifying this condition. > >> > >> Cc: Bob Feng > >> Cc: Gerd Hoffmann > >> Cc: Laszlo Ersek > >> Cc: Liming Gao > >> Cc: Rebecca Cran > >> Cc: Yuwei Chen > >> > >> Signed-off-by: Oliver Steffen > >> --- > >> MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> index d394d237a53f..1c7659031dc5 100644 > >> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> @@ -2364,6 +2364,8 @@ UpdateVariable ( > >> ); > >> > >> ASSERT_EFI_ERROR (Status); > >> > >> } > >> > >> + } else if (Status =3D=3D EFI_OUT_OF_RESOURCES) { > >> > >> + DEBUG ((DEBUG_WARN, "UpdateVariable failed: Out of flash > >> space\n")); > >> > >> } > >> > >> > >> > >> return Status; > >> > >> -- > >> 2.44.0 > >> > >> > >> > >> > >> > > > > > > > > > > > >=20 > > > > > -- =F0=9F=8E=A9Oliver Steffen (he/him) - Software Engineer, Virtualization Red Hat GmbH , Registered seat: Werner-von-Siemens-Ring 12, D-85630 Grasbrunn, Germany Commercial register: Amtsgericht M=C3=BCnchen/Munich, HRB 153243, Managing Directors: Ryan Barnhart, Charles Cachera, Michael O'Neill, Amy Ross Everyone has different working hours=E2=80=A6 Please do not feel obligated = to reply outside of your normal work schedule. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116386): https://edk2.groups.io/g/devel/message/116386 Mute This Topic: https://groups.io/mt/104735640/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-