From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DF84C07E9D for ; Mon, 26 Sep 2022 10:14:02 +0000 (UTC) Received: from localhost ([::1]:53098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocl7h-0004sQ-Io for qemu-devel@archiver.kernel.org; Mon, 26 Sep 2022 06:14:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ockpq-0005Q7-B6 for qemu-devel@nongnu.org; Mon, 26 Sep 2022 05:55:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:56075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ockpn-0003nB-N1 for qemu-devel@nongnu.org; Mon, 26 Sep 2022 05:55:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664186131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fIdR0vI29oZeRCFZBp8CQiXoR7cYaIYvZ9xzZVFSJ94=; b=ih8k0mS/59r7VS2qmt5E6mbfH/8ZMaizYOyo778RsiRWDwToiDtwOvbmfM1/mtnlYHvj8P 28FOVtQi7/haYwHL5o2j0cuxZZztv7Q4kzdM+ugXjL9lwBBehV698pkMVNJAENuc7JR7AE l4MxdmngdCTahYCHtwMEnipUTuSeqYA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-343-yg-xe8O6MkmeUPftbKzi0Q-1; Mon, 26 Sep 2022 05:55:27 -0400 X-MC-Unique: yg-xe8O6MkmeUPftbKzi0Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25B5B872841; Mon, 26 Sep 2022 09:55:27 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D064540C6EC2; Mon, 26 Sep 2022 09:55:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D4B5518030BB; Mon, 26 Sep 2022 11:55:10 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: Eric Blake , Markus Armbruster , Gerd Hoffmann , Bandan Das , Alexander Bulekov , Laurent Vivier , Darren Kenny , Qiuhao Li , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Akihiko Odaki , "Michael S. Tsirkin" , Alexandre Ratchov , Peter Maydell , Stefan Hajnoczi , Thomas Huth , Qiang Liu Subject: [PULL 16/25] hcd-xhci: drop operation with secondary stream arrays enabled Date: Mon, 26 Sep 2022 11:55:00 +0200 Message-Id: <20220926095509.3759409-17-kraxel@redhat.com> In-Reply-To: <20220926095509.3759409-1-kraxel@redhat.com> References: <20220926095509.3759409-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass client-ip=170.10.129.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Qiang Liu The abort() in xhci_find_stream() can be triggered via enabling the secondary stream arrays by setting linear stream array (LSA) bit (in endpoint context) to 0. We may show warnings and drop this operation. Fixes: 024426acc0a2 ("usb-xhci: usb3 streams") Reported-by: Qiang Liu Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1192 Signed-off-by: Qiang Liu Message-Id: <20220904125926.2141607-1-cyruscyliu@gmail.com> Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index acd60b1a4904..8299f35e6695 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -1020,7 +1020,9 @@ static XHCIStreamContext *xhci_find_stream(XHCIEPContext *epctx, } sctx = epctx->pstreams + streamid; } else { - FIXME("secondary streams not implemented yet"); + fprintf(stderr, "xhci: FIXME: secondary streams not implemented yet"); + *cc_error = CC_INVALID_STREAM_TYPE_ERROR; + return NULL; } if (sctx->sct == -1) { -- 2.37.3