From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (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 9D69E3CBE6D for ; Fri, 10 Jul 2026 22:06:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783721222; cv=none; b=sMJI50WrfdW1viQAQ71B0zFx2iwKscyRAl1x680ovPeHRq3FdIWJ47Y4sYnAyAjssh73VzegedGtjZKZgR/DTIrSv+do86YYSvrV8AgFIZTntWgZW4gPQP2Wl/m/8Ty81wTK/K7mO2fF05qJ0qPCzH1HwyOzGzFhlmeAg8t5+sU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783721222; c=relaxed/simple; bh=shDmtApnZvdyo7L5TZAFGjMrm9vqx2VXSgijpuIkVbc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=k9LTODZoxbDFHxFR1JBlpdKo3W/11EAfyFN+Vof2E4ry09KRg4u40sGFgl9JJlwQATyrRNI0E29T6H5Wy4nkS5e0GxiEaNji3qOVMXpaXsp7MxSIWbm0cugeYpcqy5gVRcswyJWwbYBH+gbiCYQiRfZX7mSJvbfeAf21F8X+hHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jrhilke.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=GkVrxyz9; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jrhilke.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GkVrxyz9" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2cc7e86e7c5so26025705ad.3 for ; Fri, 10 Jul 2026 15:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783721215; x=1784326015; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=tQns3HevZIzRhw7H0Nuhca8MxJp9vTEMOhRtrWCAyX8=; b=GkVrxyz9ajBJh5WbyHLI/BScIE/Vk/hATQ6746H/ZoQxtfn4057+EiHRUHQNXksPXS lVGYGF3QwSu/Kj/JkXHWqdFy2yCnhG6gdFxGDgjFPqAQQOCf8+GOHyWOy5JOrOiBL3zN fM+uOcrlpjr5mihIJeu4eh5LomoGmzHMdYu/lljujSXfhOFdq6ARgAipg+wEnCStAfFo MBw80LUK409kK4DvY7NZrmZf2raxdK9oDRvRBJ1P/sXV0MvAuv0pTGty7eWqxHxBFmKc HpVJ34YCf/YqXG4Tw8QMh9LpDZBqmz00HlDcOFW6/Rdz528PxOTVyCuMg9D9kjHkw/tm wEuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783721215; x=1784326015; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tQns3HevZIzRhw7H0Nuhca8MxJp9vTEMOhRtrWCAyX8=; b=C1/P9HzHvzxdt5rbuFw1Af5Zl2Jd0wdw4G+tpgpTAYA4Jb7dTgsj4SyVbdKkywSPm8 7AqFncAbbmLXGascoPQUeBiZ68MCT8rTYCmW2TbazW4XEV1G0u4t0c+JMCbfOLvWVmF6 jbS79w0XywUAM+kE4iTliyHL12lsAwwih+W1JeAHC8vZdX4daxJovuTG7IXJWQCI+Fos B9ZCpCwyWlTGGIf4soPalDfxVYoCYZGyBPHAE8hswYFT8l1bvjjpDpjcr4xgzuS0ydLV FMwj5pP4IrO+6azdJs7tQIWkf97WKCtCuoP95SPEg9s8RCPOVZlfRi1aY8IHXGeBrtvI 0fyQ== X-Forwarded-Encrypted: i=1; AHgh+RotG3UtjNxLuZxPIckzeN7C7/CMlVHoDmFtFrVOklDB0fkakyzwV7ffkHV/1HZNb3to/EuCNX8IPDcWTaE=@vger.kernel.org X-Gm-Message-State: AOJu0YxPNjPlu1p+f7UbH/RuKl0ERh4McinJ2ZzZkclggbAy6YBikdq8 BHnCPhl/eueBDu2uA64Ygc08avMpyh2VHWHhzckhrjAiGrMblrLxxUdNeTUW/kmS7bTd6/ywCUQ 321mVM2vu X-Received: from plhq14.prod.google.com ([2002:a17:903:11ce:b0:2ca:d246:c7c8]) (user=jrhilke job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:110f:b0:2cc:fa08:eebc with SMTP id d9443c01a7336-2ce9e7a544cmr8374465ad.1.1783721214508; Fri, 10 Jul 2026 15:06:54 -0700 (PDT) Date: Fri, 10 Jul 2026 22:06:50 +0000 In-Reply-To: <20260710-igb_v3_b4-v4-0-56e7e2576cc1@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260710-igb_v3_b4-v4-0-56e7e2576cc1@google.com> X-Developer-Key: i=jrhilke@google.com; a=ed25519; pk=cK+Urrh214DoCHywJiTwhMP+zcs1ofpGrewToO/i/3A= X-Developer-Signature: v=1; a=ed25519-sha256; t=1783721208; l=1853; i=jrhilke@google.com; s=20260710; h=from:subject:message-id; bh=ULyYN7S4rWudzktl97NB9xV0EBoQIE8YAYNFU9RV/IU=; b=faKEKwlLwFC21rtzYiGCpQGJmOlryRDxBoYYhFyHp8njegao69icprtRlf8nh38PY+sZzwK2l DR3dNnTn1LyAkg2ZZPsDGJ0KklKobjPJMUPaj986jiAhVElN5+cUsJj X-Mailer: b4 0.14.3 Message-ID: <20260710-igb_v3_b4-v4-6-56e7e2576cc1@google.com> Subject: [PATCH v4 6/9] vfio: selftests: igb: Disable PCIe completion timeout retries From: Josh Hilke To: David Matlack , Alex Williamson Cc: Shuah Khan , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, Vipin Sharma , Josh Hilke , Alex Williamson Content-Type: text/plain; charset="utf-8" From: Alex Williamson The mix_and_match test intentionally submits TX descriptors with an unmapped source IOVA so that the DMA read fails. By default the 82576 re-sends the request after a PCIe completion timeout (datasheet section 8.6.1, GCR.Completion_Timeout_Resend, bit 16, initial value 1b). On real hardware this turns a single fault into a stream of retried reads, keeping PCIe AER and IOMMU error handling busy and interfering with reset recovery. Clear GCR.Completion_Timeout_Resend during device initialization so a failed read fails once and stays failed. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: Alex Williamson --- tools/testing/selftests/vfio/lib/drivers/igb/igb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests/vfio/lib/drivers/igb/igb.c b/tools/testing/selftests/vfio/lib/drivers/igb/igb.c index 172c95cea3c8..ac116834bbf6 100644 --- a/tools/testing/selftests/vfio/lib/drivers/igb/igb.c +++ b/tools/testing/selftests/vfio/lib/drivers/igb/igb.c @@ -230,6 +230,18 @@ static void igb_init(struct vfio_pci_device *device) vfio_pci_config_writew(device, PCI_COMMAND, cmd_reg); } + /* + * Disable DMA re-send on PCIe completion timeout (82576 datasheet + * section 8.6.1, GCR.Completion_Timeout_Resend, bit 16). The + * mix_and_match test intentionally submits descriptors targeting + * unmapped IOVAs; with the default (set) value, the device keeps + * retrying the failed read indefinitely, which keeps PCIe AER and + * IOMMU error handling busy and interferes with reset recovery. + */ + ctrl = igb_read32(igb, E1000_GCR); + ctrl &= ~E1000_GCR_CMPL_TMOUT_RESEND; + igb_write32(igb, E1000_GCR, ctrl); + /* Configure PHY internal loopback for testing. */ igb_setup_loopback(igb); -- 2.55.0.795.g602f6c329a-goog