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 ECA7778042C for ; Thu, 23 Nov 2023 15:02:44 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5iM6w1uz+CktLGL8EWB+onh5YPNwyIKdSW7lpMjPrnM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1700751763; v=1; b=bCbMVjEDMKzUXJZwIoyIWSCrYZruUan2VUWHN20bmauBCXbjRwq0cvXt+Vdy1/ENOLFb3SvM QcPACTHL1zfQ799xGDYdKwGy8zKBsiozhNADAbgf2064YWAM18Bgm6lO29f9crr5v9EI1UK3Gcv wSHHfkn0nOYfuGYVFMMBJo7U= X-Received: by 127.0.0.2 with SMTP id IPHhYY7687511xG8xhYM0gww; Thu, 23 Nov 2023 07:02:43 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.93008.1700751761506314791 for ; Thu, 23 Nov 2023 07:02:41 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-465-SIT5jAWHNxW5X6EBqiSLkg-1; Thu, 23 Nov 2023 10:02:39 -0500 X-MC-Unique: SIT5jAWHNxW5X6EBqiSLkg-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3D3941C05135 for ; Thu, 23 Nov 2023 15:02:39 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DD9D492BE0; Thu, 23 Nov 2023 15:02:39 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E19B71800DDE; Thu, 23 Nov 2023 16:02:34 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Oliver Steffen , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Gerd Hoffmann Subject: [edk2-devel] [PATCH 5/7] OvmfPkg/VirtMmCommunicationDxe: stop on init failure Date: Thu, 23 Nov 2023 16:02:32 +0100 Message-ID: <20231123150234.117835-6-kraxel@redhat.com> In-Reply-To: <20231123150234.117835-1-kraxel@redhat.com> References: <20231123150234.117835-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 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,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hgKiwWuZxloEzWO5xqCMDMaJx7686176AA= Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=bCbMVjED; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Print an error and stop in case VirtMmCommunicationDxe initialization fails. Signed-off-by: Gerd Hoffmann --- OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf | 1 + OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf index 1403e92e1d6d..08fadefa5275 100644 --- a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf +++ b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf @@ -36,6 +36,7 @@ [LibraryClasses] [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdVariableCollectStatistics ## CONSUMES + gUefiOvmfPkgTokenSpaceGuid.PcdQemuVarsRequire ## CONSUMES [Protocols] gEfiMmCommunication2ProtocolGuid ## PRODUCES diff --git a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c index 7b4ebe1257c6..c33561b39f9b 100644 --- a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c +++ b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c @@ -376,5 +376,15 @@ VirtMmCommunication2Initialize ( FreePages (mCommunicateBuffer, EFI_SIZE_TO_PAGES (MAX_BUFFER_SIZE)); ReturnErrorStatus: + if (FeaturePcdGet (PcdQemuVarsRequire)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: qemu uefi variable service is not available, use \n" + " 'qemu-system-x86_64 -device uefi-vars-isa' or\n" + " 'qemu-system-aarch64 -machine virt,x-uefi-vars=on'\n" + )); + CpuDeadLoop (); + } + return EFI_INVALID_PARAMETER; } -- 2.42.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111680): https://edk2.groups.io/g/devel/message/111680 Mute This Topic: https://groups.io/mt/102767937/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-