From mboxrd@z Thu Jan 1 00:00:00 1970 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.web10.26252.1683901398046317543 for ; Fri, 12 May 2023 07:23:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HefhAL0d; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683901397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QOpg0SFYhp59g5MPEtoeLewZ0U3UXMI4Rx9MygcsFwY=; b=HefhAL0dX9sehFCxK+TDy19C38m3WM1G2z/XOzjGiRNp4IpkAmq4YwZFprDEaE/zAvKhlV 16ZcuLzaMcugWuttTIa6jnjpG4N3aQZdkrLZxbhIhyUMzU8AF/6stEd8JRw03oEgRzGUEs xRceT/hZAEW/aDBQrtP9WuHd5OzG0Tc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-117-4xrceypKM4GGB9HUiuF9QQ-1; Fri, 12 May 2023 10:23:14 -0400 X-MC-Unique: 4xrceypKM4GGB9HUiuF9QQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6DDE13C0CD56; Fri, 12 May 2023 14:23:13 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1AAF163F8A; Fri, 12 May 2023 14:23:13 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BD41D1800917; Fri, 12 May 2023 16:23:06 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Pawel Polawski , Sami Mujawar , Oliver Steffen , Ard Biesheuvel Subject: [PATCH 5/5] OvmfPkg/VirtioSerialDxe: use TPL_NOTIFY Date: Fri, 12 May 2023 16:23:06 +0200 Message-Id: <20230512142306.1323983-6-kraxel@redhat.com> In-Reply-To: <20230512142306.1323983-1-kraxel@redhat.com> References: <20230512142306.1323983-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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