From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (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 6CBAC3CC32C for ; Wed, 13 May 2026 23:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778715188; cv=none; b=aLG1U5SCBMlaQRHz+jTI1oGSFMroU8J1cl2hnXDnvatp3hTGwYYvIgEM0/v2yJ7MyXjkmTVpNUGiOjWBADES95oPwseGd/jL0T+h0MAszaLT+WLsPR7LJMPRYmaxkjAKvUc6AsoawwmuxNMIZb3mrsdefVxC7QOGEZkU/YnpIoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778715188; c=relaxed/simple; bh=Hq/A3AGR+clgfWZctOXr6BbesstRAudCd0yGsK+Tw3o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n1G+e80zdpLbxlFYvPqPOsST5PhctczoM6JLUuUynagIQSd10BCMceMO1D2onWubrJEfJS2Rr4Sd+qMt8wH+ByzmP/9SWK/AejmtjAENq7BpPoJZyIS9GMJCVEm20LdHHQfJBf4h5orUnZu+1d64G5tkXI5/fLb6mJS1OHEUpOk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Bjs4zFFy; arc=none smtp.client-ip=209.85.215.175 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=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Bjs4zFFy" Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-c82471904fcso3309147a12.2 for ; Wed, 13 May 2026 16:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778715187; x=1779319987; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=NsiDmjXtYlzjW8kSMiUkwYEAF0x8k/ex7IY8QVm8zJg=; b=Bjs4zFFyust5IVjSPfeJc3WoNFwhxEVFG2hvn1W0jg/fGcAdk1gx39ocftcmaOlISe Jl+atnQi9tUW/5J3ZPTA4NJ7lVS0/KLIoBqamqOfGlA9Lj/PoO3FSVzFLG8PzBhbt5P3 l10rnnG14BKOxWj6Je8y3EpEC7cKDdNwcL2XroAr2OzdaOPAgHX80uGIeLwOQrUTqTxS Yc8tVSXkq+EYzX1tiyn5FbJLzNXmNaXDqWVXrWmismwSrQJ+hn238fIzOqPEKEyhWuXp govQdBvEDTHZoWlBs9Ezf7Wln7G3YvR8BcqrCCbyo7LTGYChL6m5a/JlBUDHmCym8AIC 5lmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778715187; x=1779319987; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NsiDmjXtYlzjW8kSMiUkwYEAF0x8k/ex7IY8QVm8zJg=; b=Xivc7TyP2l1Wcqg+Ih3gktuPvJvt5L7kf1nfpeN2xBCuSkFOXhcWuJcR0g0faSszwE 6JqUH5X/7Ivh8U3cvivqzgoe1Tl6f9+IMx0RE5OQbypkX9vYRSmGfzy8IO3BTTxcM15A Cq/lZEiOGSs2qnaDpuOIf+klDp7qkTd8AydM2UnNUQ9qWmrRAk7oneaw/152DB4k9RVF tpkGvpgk1613v65sVXEPxcSXSJ5vQH/5bqXfaFP4cvzjjlT5DKubGkO3bcaFQE3OdTuT dQJUcfSWM7ofobsTwmqSfh4AoDlyDo+/0oV/jlyzJd0bQrOA1A5ebmtmCJAzug7Ch5+p rKvg== X-Forwarded-Encrypted: i=1; AFNElJ8hITMdJUPFiRdxN8OXUJeKbYsiqAwxzCP/Q015JPe98hmDlxHMsAVM2oBb+QsurPrBtRSsLYrsD6r+Y4U=@vger.kernel.org X-Gm-Message-State: AOJu0YzMOw+svhgYwTlTGHhZ/sL6mIZ9kHXhjKr8FLl4bHpvVyCJhoKt YaDmm4eAEJuw2WB7cpwpw3VR4qy3NEnqMu0jMM0YYgGnt846CNejgOmkY1LFQKO+Nw== X-Gm-Gg: Acq92OFX/qHGgQ5KtaSGPTzvH6gp6wItB+0K6P8MhyekND98YlWY6R06pghoVGq1KfN e3Fbdpn0NwblWspbRgZnXwCqp3jcqCHjRnQbtM9HkMjECUbYsp7LkhtYkQD8s3vWsJX/gpVmFlY KqQcAZjMy+TOKJWdvakdGh7p2JGtJJYJyhIRaJnzi3Aw6q1lcqQLB2jomrxXxLqiQEUnJez1Ciq eolR+yoeztDqLYNzlFIAjKQvdRfbXoX7e1hZcAnXPgWAHxMFdHyQAappx7MZuSGNAB6Vxz2VpVL lj9LZXriPOzBDwjGxBcmACmJDdMjmVGxtOEZa6H6nc5iLtiRjfZt7sajavyAVym9Sdtrmnom+pt xw+7VWtsf9LYXREP4JU6sbneavTwrY9N5A0HiOoDxUTqcoL9ip9LBu8MKSc4vjkxGpUPVMi7DKf Vd2nBZ6ldSTzHNU0HRimZ/raXAsaw0G8kL1+RR2+d4YahL/4f1CeL2wtFKSUjDjArJMZW+oiDj X-Received: by 2002:a17:90b:3a46:b0:368:ac5f:d313 with SMTP id 98e67ed59e1d1-368f3e7b6e1mr5890966a91.20.1778715186079; Wed, 13 May 2026 16:33:06 -0700 (PDT) Received: from google.com (56.149.168.34.bc.googleusercontent.com. [34.168.149.56]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c82bb115c38sm336563a12.28.2026.05.13.16.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 16:33:05 -0700 (PDT) Date: Wed, 13 May 2026 23:33:02 +0000 From: David Matlack To: Josh Hilke Cc: Alex Williamson , Vipin Sharma , Jason Gunthorpe , Shuah Khan , Tony Nguyen , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] vfio: selftests: Add driver for IGB QEMU device Message-ID: References: <20260511211839.2781731-1-jrhilke@google.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On 2026-05-13 11:49 AM, Josh Hilke wrote: > On Tue, May 12, 2026 at 7:12 PM Josh Hilke wrote: > > On Mon, May 11, 2026 at 4:45 PM David Matlack wrote: > > > On 2026-05-11 09:18 PM, Josh Hilke wrote: > > > > + retries = 100; > > > > + while (retries-- > 0) { > > > > + if (rx->wb.status_error & 1) > > > > + break; > > > > + usleep(10); > > > > + } > > > > > > Why bail after a certain timeout? The test may have kicked off a large > > > count of memcpys. Is this for error detection? > > > > The bailout was intended to detect errors during development. > > Shouldn't need it anymore. I'll remove it in v2. > > Sorry, I forgot: we need the timeout to detect DMA errors for the > memcpy_from_unmapped_iova test in vfio_pci_driver_test. The test > triggers an IOMMU fault because the IOVA is unmapped, and the IOMMU > aborts the DMA operation. However, the QEMU IGB implementation does > not set an error bit, so timing out is our only method for error > detection. Hm... that's going to be tricky then. This means we would have to set the timeout to longer than the longest possible memcpy duration to avoid false negatives? That means we'll have to set the timeout to quite long.