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.web11.25.1660556451129818466 for ; Mon, 15 Aug 2022 02:40:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DJcKn/jF; 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 31AA46100B; Mon, 15 Aug 2022 09:40:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D730BC433D7; Mon, 15 Aug 2022 09:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660556449; bh=teAWTZun/2uqiEmUdHngeRz4RKgpdRH8PrwAZwc+W7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DJcKn/jFL/Gk05SzY+u293QS22YDRhtkS8oqCvtij3kjAuP8a4PGoPyy4JiVqikjX 09PpsbnsdDL8zu7NsffwX/T5hMkwlkF5jTU0vORMk+ohyaa4Qc0KhBX2AoLg25UBUD 6T+LdrHxOB6m04q29WiominT1F7Jj5isiBSNmimOITxXED2Be5/GxZ4kdPZrL8uG70 8ZrHfcqF3T+OQ8cFVLm893qf2dhM186J1arsMT/boWSqqBtn0FJ67Kx3m1NHmH8E1u ZUuVfqD+wSc9XAfd5WTnH+8qvXJ01eitjvUDG3ewUPrf4gBmH4s7vYM1Udo4Jzx+dB 55GwkcSx4vKWg== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Yuan Yu , Laszlo Ersek , Gerd Hoffmann , Pawel Polawski , Oliver Steffen , Jiewen Yao Subject: [PATCH 2/2] OvmfPkg/OvmfPkgX64: Allow runtime control of IPv4 and IPv6 support Date: Mon, 15 Aug 2022 11:40:30 +0200 Message-Id: <20220815094030.465587-3-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220815094030.465587-1-ardb@kernel.org> References: <20220815094030.465587-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Wire up the newly added DriverLoadInhibitorLib in a way that ties dispatch of the Ip4Dxe and Ip6Dxe drivers to QEMU fw_cfg variables 'opt/org.tianocore/IPv4Support' and 'opt/org.tianocore/IPv6Support' respectively. Setting both variables to 'n' disables IP based networking entirely, without the need for additional code changes at the NIC driver or network boot protocol level. Signed-off-by: Ard Biesheuvel --- OvmfPkg/OvmfPkgX64.dsc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index 6e68f60dc90f..0c0ded88f86e 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -947,6 +947,20 @@ [Components] NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf=0D }=0D =0D + NetworkPkg/Ip4Dxe/Ip4Dxe.inf {=0D + =0D + NULL|OvmfPkg/Library/DriverLoadInhibitorLib/DriverLoadInhibitorLib.i= nf=0D + =0D + gUefiOvmfPkgTokenSpaceGuid.PcdDriverInhibitorFwCfgVarName|"opt/org.t= ianocore/IPv4Support"=0D + }=0D +=0D + NetworkPkg/Ip6Dxe/Ip6Dxe.inf {=0D + =0D + NULL|OvmfPkg/Library/DriverLoadInhibitorLib/DriverLoadInhibitorLib.i= nf=0D + =0D + gUefiOvmfPkgTokenSpaceGuid.PcdDriverInhibitorFwCfgVarName|"opt/org.t= ianocore/IPv6Support"=0D + }=0D +=0D !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE=0D NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {=0D =0D --=20 2.35.1