From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1C0532A3EC for ; Mon, 18 May 2026 06:33:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779086029; cv=none; b=BxUjEzVrwu/+iD3v1jQ7yfzYdVk+TtB4fbjIZRv97BU8bhf1I8XhcmSNC5Kk14qSj8qas0RB2Ak9nECyNEfwVdWQaMtwHbOJGN1ThyRoPjcCsVke4tRfXw78D/7XvfvFY+PQGGPvSWfoZJ1BrMXpc05BxuGjhPBCJ8HDTNvbJZE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779086029; c=relaxed/simple; bh=GzirVmbbl19vb3T/f30XWXfsVpjcUcgMGXyjfyCBb7o=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Fnqiok/6BKgYd3BOcjDK6Lph4r6xHXGyFbD84A3astqyqlntcw5/hiRiNrv9/+RpELzmcTRz1wNrflefHieWvMpnhv5qExKt83N+ipjuzJLwZOg2omQdyS3uL533Ol1h20BG+O8WNWxMcyR32D39UsA6B1M6+7nJSQzaXc0ggtU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=X2JJ8bwB; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X2JJ8bwB" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-4585a116a4aso1433091f8f.3 for ; Sun, 17 May 2026 23:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779086024; x=1779690824; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=R0+ToRarRTop3v5V07kaNb9bFJZRjYjBP/9rHn8kGX0=; b=X2JJ8bwB6ORESoUbTRIWqZNXHFo9iPp1kW1DIq6PJtrnmtn2RUa0bDJbR9emgP3b2+ saorC1JEYfGyaw3YbFnR6uWm1R5VjZ732E5kBk5G1zWp2qJQZ3zxhffzCo9ewewJDSOC Eok30vrwwyZ+2C3GmHfBny6u1L4Bj+bZ/n6KV4p9C0mmiIR8xkaBIpLjyiJLIQonbskM u5YILvLDlrantHl0VRd3WIiguo+Nyb0mlSrvhB511frlQK3yNFcHFHvX+/uiuafD4dm7 95caTkop9TDnEEVGOACnhiQiWmjVVsvNknNvLMRtzJkO+1RV002t8hGmYX7XtLAYSVWS f60Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779086024; x=1779690824; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=R0+ToRarRTop3v5V07kaNb9bFJZRjYjBP/9rHn8kGX0=; b=NIzm/p9fNk+yvWdYYkmYPSmxyBwBZQuqy4S0Z9f5aJBuNqknMb00QkScKb2HKcVo1V VtBrCq1OZNJ/fUs+d98ugPFHAVh1651Qaxw8UZzqPRFq5wL28eSeYJdeWYbTxN0SGVK8 B2iTY73+BFFygWxxUEzIrihwZ1F39VUCD3pSE/rDz4ATim4sCBn0ZsJ0SutAWZHBPNqD WxI9lOCkyjPxnUvMl9npLHkZbWSnYmZj13TAElM7yYDx3sUkAFXs7GxXKB+MH0zcPluj fcbQdu1gUU6sx4yBH/JkH0NzQ77lci3Dvl5Xx9kj/CNLI6/HgNYnCK5FhDgHAFX9JzcL RqmQ== X-Gm-Message-State: AOJu0Yz3D4UvIWJNrrW/2G42BpPzrA+d+odXvBKksLSSJi/yBM58Ggqa sAZ8OAjAMYWWWvH6U6iemwGsUbMLhgU0pFaZlT0Iz48K5t2OXmRfXgAR X-Gm-Gg: Acq92OHPzI0OWWjArPSLzwoclb3o/sXxn5WAQ8VjXF9T+6Dss28U1HkebkF3Rf+y213 lCG9NhhDfQO/e4MVyM5UXKHyXwXe/67yRto4RTpgLrh9uyDqTuw7qzi2K7q98P56giM3dOJIg7o 4j57Oz4dR1JTCLo8KA83AuRP8pb8yHVFe7Pfyoac/GfmvCdAhxG0tiNXFmm/OxDQ5f9K81cCY7a nrlyDzZ/5C4Ujdk3ptoFiW2F7cHcGe4VrZ40EFSWmpnfnW5EEwQMImbvzoaEI80fiyIR/qZqeHL zACAzrbmGIjIYusvfbugjVnoApyQOlQ+V5KJt+VaygvM5k0Uffn7IuHDQoQrnpHBCSnh4ti32dL 1NPUIS0ALY83pjtyVpnsRcYkG03Fva9Qwe2EVjd6gHnJclMhSp3DsdIgymKwHwNUGGo8xXRZ8UO qf26SF5nSljhpdjMTIoY3t1eV5SHGe9PVI X-Received: by 2002:a05:6000:2207:b0:45e:73eb:2a75 with SMTP id ffacd0b85a97d-45e73eb2ab3mr8485115f8f.16.1779086023636; Sun, 17 May 2026 23:33:43 -0700 (PDT) Received: from foxbook (bfk48.neoplus.adsl.tpnet.pl. [83.28.48.48]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45d9ec39806sm33840751f8f.9.2026.05.17.23.33.42 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 17 May 2026 23:33:43 -0700 (PDT) Date: Mon, 18 May 2026 08:33:39 +0200 From: Michal Pecio To: Desnes Nunes Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, mathias.nyman@intel.com, stable@vger.kernel.org Subject: Re: [PATCH RFT RFC] usb: xhci: Kill hosts with HCE or HSE on command timeout Message-ID: <20260518083339.507e24bd.michal.pecio@gmail.com> In-Reply-To: <20260504093118.615ff480.michal.pecio@gmail.com> References: <20260430014817.2006885-1-desnesn@redhat.com> <20260430104850.352bd946.michal.pecio@gmail.com> <20260430235453.2288c973.michal.pecio@gmail.com> <20260502114644.76e6b5a3.michal.pecio@gmail.com> <20260502235517.089ba5bf.michal.pecio@gmail.com> <20260503071749.6abda137.michal.pecio@gmail.com> <20260503213111.117db3a1.michal.pecio@gmail.com> <20260504093118.615ff480.michal.pecio@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 4 May 2026 09:31:18 +0200, Michal Pecio wrote: > Never mind, here's the smoking gun: > > [...] > [Fri May 1 09:46:41 2026] xhci_hcd 0000:80:14.0: // Turn on HC, cmd = 0x5. > [Fri May 1 09:46:41 2026] DMAR: DRHD: handling fault status reg 2 > [Fri May 1 09:46:41 2026] DMAR: [DMA Read NO_PASID] Request device > [80:14.0] fault addr 0x1001680000 [fault reason 0x39] SM: Present bit > in Root Entry is clear > > The chip IOMMU faults shortly after setting USBCMD.RUN = 1. > Such fault is expected to cause HSE assertion and usually it does. > You will probably find that HSE is already set while Enable Slot > is being queued, even if it was clear in xhci_gen_setup(). > > 1001680000 is close to valid addresses like 100167e000 or 100167c000. > > Possible causes: > - xHCI or IOMMU driver bug > - HW corrupted a pointer > - HW accessed something out of bounds > - HW dereferenced a stale pointer from the original kernel > > Do you happen to have more of those logs saved, are they all like that? > Any chance that 1001680000 appears somewhere in the main kernel's log? Hi again, I see a certain lack of interest in finding the root cause of this. I have done a simple test on my own HW: writing bogus CRCR to cause IOMMU fault when the first command is submitted. I found that not all HCs reliably set HSE in this case, but obviously none of them ever complete the command properly. It seems that unconditional hc_died() on Enable Slot timeout may not be a bad idea. Makes me wonder if the same shouldn't apply to all commands besides Address Device, they typically only timeout due to HW issues. Regards, Michal