From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id F20EBD80230 for ; Sun, 3 Nov 2024 13:38:19 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=KLqAjtuZRkn+tzX9oKBiwlR10T//m6SXNzid0Rzp+uY=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1730641099; v=1; x=1730900298; b=OnxoQ66I27n6iRBJYCCAUrMxDmYvwExEwH/ss2tCQrJkSuhoZsRHIu9BN+xM8bdK2z3MvfnP 3LXHGYF5+zyG/+EDfSUMmBTuvOdLBCme5ADGY+Hp/bhd8S73s9lW3x/dldPqK+IfTniRTpuRtPE eKNjuGIXVzBQzTFDAnoOWrylpCIW6G6WpO3EoYvd/TkZEuY3S4tfjQPo4q7jb+lv8tqlCx5oO80 tMTXXSAAnOA4IkYAWJZIdkCxg35JAwPvZCNfaZESV8Wb6ZeFXdOVv3hOJSxxpW8wx9zLOWEzbq3 Qt5Uq58N5dOx7Ya9lzLEcOhcLflzOVv+sUL+EAJP9lrag== X-Received: by 127.0.0.2 with SMTP id NS3tYY7687511xydSicLAGeq; Sun, 03 Nov 2024 05:38:18 -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.35754.1730641092233048507 for ; Sun, 03 Nov 2024 05:38:12 -0800 X-Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-141-BSUjTuqNMqS3JxORrPRcSA-1; Sun, 03 Nov 2024 08:38:09 -0500 X-MC-Unique: BSUjTuqNMqS3JxORrPRcSA-1 X-Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-539f5f33333so2269650e87.1 for ; Sun, 03 Nov 2024 05:38:09 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUl+q+H/l6jkBrsaS0PN7j4zxLQQg3rI18xQHrxWEkePIIbTsAtbEM9Vyv0gptjDYOHWWYkHw==@edk2.groups.io X-Gm-Message-State: vuy4n1lwPYtGYWSwr5cQJ5xlx7686176AA= X-Received: by 2002:a05:6512:280a:b0:537:a824:7e5 with SMTP id 2adb3069b0e04-53d65df26afmr3963637e87.18.1730641087675; Sun, 03 Nov 2024 05:38:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnPQrKP7YojtztLrCj4HW+oTf4hv4/RvB+IpN/K+L/KQa7gBAK34NlxaR4JlhLXWLWeMNCObxDO70lDJkHHvo= X-Received: by 2002:a05:6512:280a:b0:537:a824:7e5 with SMTP id 2adb3069b0e04-53d65df26afmr3963625e87.18.1730641087184; Sun, 03 Nov 2024 05:38:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Oliver Steffen" Date: Sun, 3 Nov 2024 14:37:55 +0100 Message-ID: Subject: Re: [edk2-devel] OVMF Issue with Netboot, VirtioRng, and both COM1/COM2 configured To: Gerd Hoffmann Cc: Stefano Garzarella , devel@edk2.groups.io, Jiewen Yao , Zachary Clark-williams , Saloni Kasbekar , Doug Flick , Daniel Berrange , Cong Li 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 Resent-Date: Sun, 03 Nov 2024 05:38:12 -0800 Resent-From: osteffen@redhat.com Reply-To: devel@edk2.groups.io,osteffen@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: multipart/alternative; boundary="0000000000003c59e206260247aa" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=OnxoQ66I; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 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) --0000000000003c59e206260247aa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Nov 1, 2024 at 10:31=E2=80=AFAM Gerd Hoffmann w= rote: > Hi, > > > By analyzing the calls to the dispatcher (`gDS->Dispatch ()`) I found > > that when we only have COM1, EfiBootManagerConnectDevicePath() at some > > point invokes `gDS->Dispatch ()` after VirtioRng has started. This call > > will then get DxeNetLib loaded. > > Ok, so it is probably a good idea to explicitly request a dispatch after > activating virtio-rng, so we do not depend on this happening by pure > luck for other reasons: > > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > @@ -670,6 +670,7 @@ ConnectVirtioPciRng ( > if (EFI_ERROR (Status)) { > goto Error; > } > + gDS->Dispatch (); > } > > return EFI_SUCCESS; > > [ untested patch, and we probably should do something similar for ArmVirt= , > /me goes continue walking through my email backlog now ] > That works. > > take care, > Gerd > > -=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 (#120701): https://edk2.groups.io/g/devel/message/120701 Mute This Topic: https://groups.io/mt/109008158/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- --0000000000003c59e206260247aa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Nov 1, 2024 at 10:31=E2=80=AFAM G= erd Hoffmann <kraxel@redhat.com= > wrote:
=C2= =A0 Hi,

> By analyzing the calls to the dispatcher (`gDS->Dispatch ()`) I fou= nd
> that when we only have COM1, EfiBootManagerConnectDevicePath() at some=
> point invokes `gDS->Dispatch ()` after VirtioRng has started. This = call
> will then get DxeNetLib loaded.

Ok, so it is probably a good idea to explicitly request a dispatch after activating virtio-rng, so we do not depend on this happening by pure
luck for other reasons:

--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -670,6 +670,7 @@ ConnectVirtioPciRng (
=C2=A0 =C2=A0 =C2=A0if (EFI_ERROR (Status)) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0goto Error;
=C2=A0 =C2=A0 =C2=A0}
+=C2=A0 =C2=A0 gDS->Dispatch ();
=C2=A0 =C2=A0}

=C2=A0 =C2=A0return EFI_SUCCESS;

[ untested patch, and we probably should do something similar for ArmVirt,<= br> =C2=A0 /me goes continue walking through my email backlog now ]

That works.
=C2=A0

take care,
=C2=A0 Gerd

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#120701) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--0000000000003c59e206260247aa--