From nobody Tue Dec 2 01:27:31 2025 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (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 06DA933E341 for ; Fri, 21 Nov 2025 18:14:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763748897; cv=none; b=IElqquYHhq7wLC144SkpbtXwJZLXoM2GGG+Et0SKd5I6PfkYvDkTjEKihTB3nfJes2oRud+QkET7kcnbGFuNBXa7ezv59l/Y6WwQM1CGo0MEDLm+fe7Jm9WuKG4WXmMcgetk4HfFItIJXo08BOaHP4ptFb/LuqN0LjZBSynrcyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763748897; c=relaxed/simple; bh=EWzdxi/6D7uOhC0usSXd/odovIK6k2auEMXfrZlT0D4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=E/MLDefcvZIZjxYtmDklq+P7dAHAm5tzwC2c95qVLGgd8Jiv4zZ1sGfUdNEmuMzzf/iuqrr3H1xywDD/Cqnpm36ObEla0UBO6eMQOOX9W+zOajjN326o95Cvoh08RBVmcGY/sYbQ+XXi5oGQRTQwN9TVJmuWI2RXv71FLiiJM6o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--dmatlack.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=XknTcb0z; arc=none smtp.client-ip=209.85.210.202 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--dmatlack.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="XknTcb0z" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-7b8ed43cd00so2657959b3a.2 for ; Fri, 21 Nov 2025 10:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1763748893; x=1764353693; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=gxoRtWy7HuLenxKtZXNeAeuShCDGWTm4ZnN8F9lAoo4=; b=XknTcb0zqQmWJ09IthNfoNSVq43zP7nMCrsQ5FnG+AB8wVB5dhYE7xk0diORJr4ORZ kACjObXTIKmxdN6M14HpcrMTNb6EmVivSiAs4/VcwXFx/1OS3F4a0fbhuL4UXAW42F4t OjctWeXF8SUZ6q4NMuSRhW/To9c2ffiKZu/fNs6JizdrSENOUofmwOFmUWmQ/ycwpMdA huXEvdyESmZrMv14IuJqls4GRwGXcGxHDedYinQIxbjfOpikPn5kJ49csJjg0msLcl6m IIP1tDUfZuameuqnysjXmJSRzcSp9I8Ut5Ofq15LSc41OaayC6pFnrNXjQC6iwrhbRBV Xmfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763748893; x=1764353693; h=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; bh=gxoRtWy7HuLenxKtZXNeAeuShCDGWTm4ZnN8F9lAoo4=; b=ZhTsBiI5p+oSRmCPFSG91ACwbsbpq/6rLfagumd6RvGMWPRwuCHmnPVtUewU69TMgf zr4MfVAmdX8vufUiSFqnuNJM9KA4LBzdlyvM/RiWHj4G8Fu8ejkiSMPk15ky3fzfLpXY j22lFksIrivIAalCl/iOTCBnTBL3TQ5MGOVnB7+yaPti4i7DZOVFV5T2k9oqaop78Fpe VCiHg4A9/VMULiEEDRSIJzu7Vh9ICZWYnfEw1gHF/UDamX1aPAtVESH6SyU2ilxdmZjh s+O9ehkVuRmsupgblFRw6JfNa8hi7jRxMTEWl9Nf/iZsDGEzr1sz3xRy15pDuyN0oGID 1WxQ== X-Forwarded-Encrypted: i=1; AJvYcCX0t840B0O2KhwcUUS/Z5JYtZkqhDyUiGJQprnZuLO43uzEvqAWpEavrtL/PSMYCMd2gsN8xrgeYNCMfck=@vger.kernel.org X-Gm-Message-State: AOJu0YwAO+jJUbRxQRWYJNlMylT04qSc4C+xiqLedXZXMf8xtALVMdtc 243qPbqGoajccUXQgmbUC/4MdL4A4hmhh2HYoDwADeai/6R24ofO7kc3inVuQl8DQz1DslQWQxs +BvZonkLuZ+fPGg== X-Google-Smtp-Source: AGHT+IHQn7qr1/J/V6EApoKUiOvFm+H4aq1OEXxG+wD/Rq1YWwhDHIUSbBCfzvmajb9SiXfW7VESioXVGKGKTw== X-Received: from pfih10.prod.google.com ([2002:a05:6a00:218a:b0:7b9:3791:eaee]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:3d12:b0:7b9:df65:93a9 with SMTP id d2e1a72fcca58-7c58eaf27a7mr3961144b3a.32.1763748892978; Fri, 21 Nov 2025 10:14:52 -0800 (PST) Date: Fri, 21 Nov 2025 18:14:20 +0000 In-Reply-To: <20251121181429.1421717-1-dmatlack@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251121181429.1421717-1-dmatlack@google.com> X-Mailer: git-send-email 2.52.0.rc2.455.g230fcf2819-goog Message-ID: <20251121181429.1421717-10-dmatlack@google.com> Subject: [PATCH v3 09/18] vfio: selftests: Upgrade driver logging to dev_err() From: David Matlack To: Alex Williamson Cc: Alex Mastro , David Matlack , Jason Gunthorpe , Josh Hilke , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Raghavendra Rao Ananta , Vipin Sharma Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Upgrade various logging in the VFIO selftests drivers from dev_info() to dev_err(). All of these logs indicate scenarios that may be unexpected. For example, the logging during probing indicates matching devices but that aren't supported by the driver. And the memcpy errors can indicate a problem if the caller was not trying to do something like exercise I/O fault handling. Exercising I/O fault handling is certainly a valid thing to do, but the driver can't infer the caller's expectations, so better to just log with dev_err(). Suggested-by: Raghavendra Rao Ananta Reviewed-by: Alex Mastro Tested-by: Alex Mastro Signed-off-by: David Matlack --- tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c | 4 ++-- tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c b/tools/tes= ting/selftests/vfio/lib/drivers/dsa/dsa.c index 8d667be80229..0afbab0d82de 100644 --- a/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c +++ b/tools/testing/selftests/vfio/lib/drivers/dsa/dsa.c @@ -70,7 +70,7 @@ static int dsa_probe(struct vfio_pci_device *device) return -EINVAL; =20 if (dsa_int_handle_request_required(device)) { - dev_info(device, "Device requires requesting interrupt handles\n"); + dev_err(device, "Device requires requesting interrupt handles\n"); return -EINVAL; } =20 @@ -256,7 +256,7 @@ static int dsa_completion_wait(struct vfio_pci_device *= device, if (status =3D=3D DSA_COMP_SUCCESS) return 0; =20 - dev_info(device, "Error detected during memcpy operation: 0x%x\n", status= ); + dev_err(device, "Error detected during memcpy operation: 0x%x\n", status); return -1; } =20 diff --git a/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c b/tools/t= esting/selftests/vfio/lib/drivers/ioat/ioat.c index e04dce1d544c..c6db311ce64d 100644 --- a/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c +++ b/tools/testing/selftests/vfio/lib/drivers/ioat/ioat.c @@ -51,7 +51,7 @@ static int ioat_probe(struct vfio_pci_device *device) r =3D 0; break; default: - dev_info(device, "ioat: Unsupported version: 0x%x\n", version); + dev_err(device, "ioat: Unsupported version: 0x%x\n", version); r =3D -EINVAL; } return r; @@ -135,7 +135,7 @@ static void ioat_handle_error(struct vfio_pci_device *d= evice) { void *registers =3D ioat_channel_registers(device); =20 - dev_info(device, "Error detected during memcpy operation!\n" + dev_err(device, "Error detected during memcpy operation!\n" " CHANERR: 0x%x\n" " CHANERR_INT: 0x%x\n" " DMAUNCERRSTS: 0x%x\n", --=20 2.52.0.rc2.455.g230fcf2819-goog