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

2023-06-01 Thread Ard Biesheuvel
On Thu, 1 Jun 2023 at 09:56, Ard Biesheuvel  wrote:
>
> On Fri, 12 May 2023 at 16:23, Gerd Hoffmann  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 
>
> Acked-by: Ard Biesheuvel 
>
> 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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2023-06-01 Thread Ard Biesheuvel
On Fri, 12 May 2023 at 16:23, Gerd Hoffmann  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 

Acked-by: Ard Biesheuvel 

I'll take this as a separate fix.

> ---
>  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 (#105532): https://edk2.groups.io/g/devel/message/105532
Mute This Topic: https://groups.io/mt/98850082/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




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

2023-05-12 Thread Gerd Hoffmann
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 
---
 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 (#104803): https://edk2.groups.io/g/devel/message/104803
Mute This Topic: https://groups.io/mt/98850082/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-