From mboxrd@z Thu Jan 1 00:00:00 1970 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.web10.45109.1671521164868141885 for ; Mon, 19 Dec 2022 23:26:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KK6WLJUr; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671521164; 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: in-reply-to:in-reply-to:references:references; bh=DyltmrfJkXbUzurJEmtjOFWxSEbcWKmdwLZRwmHWoFY=; b=KK6WLJUrG0OfJJink/lpp721KslrKuftHqovgeqFaaTbV0BXClZ5vwN84IMoPbfEwF5eic rMaTpX9ol1yG4pkgtPAEIBO5KLfbtzRjdLXIoNkZ5Q04pGvGWcE1gF9rp/PUk6bmDHz3vF gqjdVjOewSCI/+RYbJ2wnfGtvXrvZIc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-46OgMGdsM62kNHBm2sYJVw-1; Tue, 20 Dec 2022 02:26:00 -0500 X-MC-Unique: 46OgMGdsM62kNHBm2sYJVw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 572C18027F8; Tue, 20 Dec 2022 07:26:00 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2BA0E492C14; Tue, 20 Dec 2022 07:26:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D19FD18000B3; Tue, 20 Dec 2022 08:25:58 +0100 (CET) Date: Tue, 20 Dec 2022 08:25:58 +0100 From: "Gerd Hoffmann" To: devel@edk2.groups.io, anthony.perard@citrix.com Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/OvmfXen: Build platform info HOB in XenPlatformPei Message-ID: <20221220072558.6af73qvo43gngqvs@sirius.home.kraxel.org> References: <20221219163620.20155-1-anthony.perard@citrix.com> MIME-Version: 1.0 In-Reply-To: <20221219163620.20155-1-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 19, 2022 at 04:36:20PM +0000, Anthony PERARD via groups.io wrote: > From: Anthony PERARD > > Copy the function BuildPlatformInfoHob() from OvmfPkg/PlatformPei. > > QemuFwCfgLib expect this HOB to be present, or fails to do anything. > InternalQemuFwCfgIsAvailable() from QemuFwCfgPeiLib module will not > check if the HOB is actually present for example and try to use a NULL > pointer. > > Fixes: cda98df16228 ("OvmfPkg/QemuFwCfgLib: remove mQemuFwCfgSupported + mQemuFwCfgDmaSupported") > Signed-off-by: Anthony PERARD Reviewed-by: Gerd Hoffmann You might also consider moving global variables to the PlatformInfoHob or use PlatformInitLib functions instead of your own copy or both. take care, Gerd