[edk2-devel] [PATCH 5/5] OvmfPkg/VirtioSerialDxe: use TPL_NOTIFY

Ard Biesheuvel ardb at kernel.org
Thu Jun 1 09:07:30 UTC 2023


On Thu, 1 Jun 2023 at 09:56, Ard Biesheuvel <ardb at kernel.org> wrote:
>
> On Fri, 12 May 2023 at 16:23, Gerd Hoffmann <kraxel at redhat.com> wrote:
> >
> > Apparently TPL_CALLBACK is too low, code runs into an ASSERT
> > complaining the new TPL is lower than the old TPL.
> >
> > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
>
> Acked-by: Ard Biesheuvel <ardb at kernel.org>
>
> I'll take this as a separate fix.
>

Merged as #4461

> > ---
> >  OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c b/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c
> > index 522b25e9698c..e4a58deff162 100644
> > --- a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c
> > +++ b/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c
> > @@ -158,7 +158,7 @@ VirtioSerialIoWrite (
> >
> >    VirtioSerialRingClearTx (SerialIo->Dev, PortTx (SerialIo->PortId));
> >
> > -  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
> > +  OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
> >    if (SerialIo->WriteOffset &&
> >        (SerialIo->WriteOffset + *BufferSize > PORT_TX_BUFSIZE))
> >    {
> > @@ -201,7 +201,7 @@ VirtioSerialIoRead (
> >      goto NoData;
> >    }
> >
> > -  OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
> > +  OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
> >    if (SerialIo->WriteOffset) {
> >      DEBUG ((DEBUG_VERBOSE, "%a:%d: WriteFlush %d\n", __func__, __LINE__, SerialIo->WriteOffset));
> >      VirtioSerialRingSendBuffer (
> > --
> > 2.40.1
> >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105547): https://edk2.groups.io/g/devel/message/105547
Mute This Topic: https://groups.io/mt/98850082/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list