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.web10.25579.1685606188052256641 for ; Thu, 01 Jun 2023 00:56:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tuCi0nMM; 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 845C36375A for ; Thu, 1 Jun 2023 07:56:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E19ECC4339B for ; Thu, 1 Jun 2023 07:56:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685606186; bh=ravZnAAhpFOi00+8BkIsBMm+v9ePub09j7UKeQgcEl0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tuCi0nMMNJV87dxQJq2M8P+XaIACJVSVXCCBzvwp9nLmzkY5vabTHBs5qLwA53b1y /gxhGqYwsdFjG5lJj98pzVFAnQhvXoMHT90ZsF9uh4csPneHrd01JSbK4T/EOYnZwC uFqdM/SCX9uOAAkijd0AktsEEusxWVNLXP380wr3/MKB15V0E8whjE4SMgYKUc32wQ Lnv7vraalr7uIFxJA0QaenCYGPCTxlgIlDihgxyCI+syQ5q/ybO2rSs4222rJ/CRqZ QJaBtVIuJshYNHlWOk4HKmaWvQu8WAsI6m5dqRcIML/Ak3balg0PDQ0dRYjEVbdUme +nw5f2/XvqaSw== Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2b03d3e41fcso23848491fa.0 for ; Thu, 01 Jun 2023 00:56:26 -0700 (PDT) X-Gm-Message-State: AC+VfDzvIKjhrA8ZUVNrNdFyOTOce/frGxJNj6U2Sr6YN7RoJT33AdvZ VEZaCM/p1O0VugMQiajUeGUaHUU3ohYZgw3ixWI= X-Google-Smtp-Source: ACHHUZ6dMBfa20iVtYGuNpDmfApbQh26JCVemT+XaLhuSb0OWCv/ODCkXTRmhbUUggrYHekcTb5OFeHgcB58drFC+4c= X-Received: by 2002:a2e:3016:0:b0:2ad:16d1:eaad with SMTP id w22-20020a2e3016000000b002ad16d1eaadmr311874ljw.12.1685606184910; Thu, 01 Jun 2023 00:56:24 -0700 (PDT) MIME-Version: 1.0 References: <20230512142306.1323983-1-kraxel@redhat.com> <20230512142306.1323983-6-kraxel@redhat.com> In-Reply-To: <20230512142306.1323983-6-kraxel@redhat.com> From: "Ard Biesheuvel" Date: Thu, 1 Jun 2023 09:56:13 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/5] OvmfPkg/VirtioSerialDxe: use TPL_NOTIFY To: Gerd Hoffmann Cc: devel@edk2.groups.io, Jiewen Yao , Jordan Justen , Leif Lindholm , Pawel Polawski , Sami Mujawar , Oliver Steffen , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" 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 >