public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: devel@edk2.groups.io, Yuan Yu <yuanyu@google.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Pawel Polawski <ppolawsk@redhat.com>,
	Oliver Steffen <osteffen@redhat.com>,
	Jiewen Yao <jiewen.yao@intel.com>
Subject: Re: [PATCH 2/2] OvmfPkg/OvmfPkgX64: Allow runtime control of IPv4 and IPv6 support
Date: Mon, 15 Aug 2022 16:06:03 +0200	[thread overview]
Message-ID: <20220815140603.q2ggx47atcj3wnfp@sirius.home.kraxel.org> (raw)
In-Reply-To: <20220815094030.465587-3-ardb@kernel.org>

On Mon, Aug 15, 2022 at 11:40:30AM +0200, Ard Biesheuvel wrote:
> 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 <ardb@kernel.org>
> ---
>  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
>    }
>  
> +  NetworkPkg/Ip4Dxe/Ip4Dxe.inf {
> +    <LibraryClasses>
> +      NULL|OvmfPkg/Library/DriverLoadInhibitorLib/DriverLoadInhibitorLib.inf
> +    <PcdsFixedAtBuild>
> +      gUefiOvmfPkgTokenSpaceGuid.PcdDriverInhibitorFwCfgVarName|"opt/org.tianocore/IPv4Support"
> +  }
> +
> +  NetworkPkg/Ip6Dxe/Ip6Dxe.inf {
> +    <LibraryClasses>
> +      NULL|OvmfPkg/Library/DriverLoadInhibitorLib/DriverLoadInhibitorLib.inf
> +    <PcdsFixedAtBuild>
> +      gUefiOvmfPkgTokenSpaceGuid.PcdDriverInhibitorFwCfgVarName|"opt/org.tianocore/IPv6Support"
> +  }
> +

Hmm.  Not a comment to this specifically, but more to the OVMF *.dsc and
*.fdf files in general.  We have a lot of duplication here.  I've
already moved some bits to include files (OvmfPkg/OvmfTpm*.inc for
example) to reduce that.  Makes maintainance easier and builds more
consistent.

This looks like a prime candidate for a new OvmfNetwork.dsc.inc file,
so we can easily get that for all build variants and not only X64.

And there is more which we can split out.  crypto (have an experimental
branch doing that as part of my CryptoPkg/Driver experiments).  drivers
(usb / virtio / ...).  Shell.efi

Maybe it makes sense to move those include snippets into a subdirectory
so they don't pile up in OvmfPkg/ when we move more stuff to includes?

take care,
  Gerd


      reply	other threads:[~2022-08-15 14:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15  9:40 [PATCH 0/2] Ovmf: Allow IPv4 and IPv6 to be disabled at runtime Ard Biesheuvel
2022-08-15  9:40 ` [PATCH 1/2] OvmfPkg: Introduce NULL class library to inhibit driver load Ard Biesheuvel
2022-08-16 12:30   ` Laszlo Ersek
2022-08-16 21:08     ` [edk2-devel] " Brian J. Johnson
2022-08-17  8:39       ` Ard Biesheuvel
2022-08-17  9:22         ` Laszlo Ersek
2022-08-17 15:07           ` Ard Biesheuvel
2022-08-17  8:53       ` Laszlo Ersek
2022-08-15  9:40 ` [PATCH 2/2] OvmfPkg/OvmfPkgX64: Allow runtime control of IPv4 and IPv6 support Ard Biesheuvel
2022-08-15 14:06   ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220815140603.q2ggx47atcj3wnfp@sirius.home.kraxel.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox