From nobody Mon Dec 1 22:34:46 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 998FE346775 for ; Wed, 26 Nov 2025 23:17:56 +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=1764199078; cv=none; b=JB0GMTOvSVFbNvMb3CRIelZXRjeiDxdZz6nWBAC7XBMBDh86/F65UAqnEEvRsTQ7nHnWcrGfrxF3PO3hIaH2VsTyVRK8l0hFD75UGmgYaHpClQ0BJ2WDeocb+6XZH5XohMPxuTI0lrAqYSFwLVYSSTFcCfQ6LA9DRsYZXAgP5QA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764199078; c=relaxed/simple; bh=k1tQIewzaCgltNFiSSWL8XaCn9LhRqqy5e6y7F2p37c=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=XwGxR6QbYj9gwRSF+yQ9HZFd5sXvDkQMqoMkNN0gD4Vl589vwQ7quy4jKfvTK7vd36iZSRvDsMow6Gz5k28m53v4vUzT6fyMWNkE4GBW8sWSpgnyBIcqFf0CNv+Jwvc328a9raAdPl7/mR9HQwYp+l0EGA0M76XKfs4byhbxJ50= 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=PHI/IxXt; 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="PHI/IxXt" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-7b8ed43cd00so206572b3a.2 for ; Wed, 26 Nov 2025 15:17:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764199076; x=1764803876; 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=lOfh0ZHCrUDr+83C96eRTcOw/RRmvXPhkUJkr4j0xPg=; b=PHI/IxXtn4VtAj2XcOXS2zJeFshcM5kaSA1f6uyOXgLGSH7WzTgj7l5WxNRUn3zV8L YK+PUAmRfJ5qNhGQxVwTBAKS6tQbe9MdaPG0OJtc4HNW2WH6iNLJ3grlfWatQQ4tFFOy eNJhIAllpgS+USnI7wkehL4C1XLMS0yh1yeZl7eXTPVMbgF6HZQrYZ4KMEvQ+Bxl+mJa gsN7a53J1JiLleulPLh/9SMKjaPkSKnXMAHSTgwb/ed1MnO3z1/zg3LDRjn7zT0iBx1H VvVFgRUCo61fzYjwcUfhYVvaCdd+LaIX0SAASbNb3CmoS8y4YAIVlzhEHreKkOlXzX3h aXTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764199076; x=1764803876; 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=lOfh0ZHCrUDr+83C96eRTcOw/RRmvXPhkUJkr4j0xPg=; b=CQ7kvC3iwvQPAmpVI2gZUwpuav/Zfiy2lQzX4b8QUEhV0itZjktmxZ3JDqBKxAKnmV MHZ7hFcyHHb5GUaDTc0xe1wFCKrY8TnpLTRJAEvWirdz8ahdxO/1TYs/Hi2yUFu1um1a PTad8iNWQ/upk80Ut16a48PiUjswTz9extd01XG8qhC7WH8jAcp6MCbXKV5EdPkosAJp ebn32W+h7dXjZdC0AXdxHoXMTbU/hNncU0ryJXK2UFQ76gf7A+H2qbgZWbtxZHd50TXp PWwppycl1/oHGh+zuh1MGm4iEvVwit8sOA9Fy+k4NVrGz/8axK41YQ6xpi6umPq/l3XN xKjw== X-Forwarded-Encrypted: i=1; AJvYcCW6M+L9KOGwVWj5bMl6SWbQbvRY0T4X6Y57txF6wuTwujbDMYMd8VJKW9RwseLjjbLL0AX6QIFTz/p9CBI=@vger.kernel.org X-Gm-Message-State: AOJu0Ywgm+jJag+rB+MSL3WD0s3EQ1kRkHHGp0qMvSr6D1Flhj+oIe0N 3wBpohBGkvJVqobGo3g7GslO87TOuL5HP1NaeLIJYC5ynefs1x8u0qExynKlwot/mnULa3Dc98Q 0elQZhpM7TvLqwA== X-Google-Smtp-Source: AGHT+IHmJ+fr7Q1GH3an9MkfupTo7jjLnNjtNTKwF96iEI+a/Vr8k305CwqmodTnaoeO8QrvLpRa9pV1P1XcMA== X-Received: from pfxx5.prod.google.com ([2002:a05:6a00:105:b0:7a2:d31:34ef]) (user=dmatlack job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:32a2:b0:340:db9b:cfe8 with SMTP id adf61e73a8af0-36150e1fc11mr23928810637.12.1764199075933; Wed, 26 Nov 2025 15:17:55 -0800 (PST) Date: Wed, 26 Nov 2025 23:17:24 +0000 In-Reply-To: <20251126231733.3302983-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: <20251126231733.3302983-1-dmatlack@google.com> X-Mailer: git-send-email 2.52.0.487.g5c8c507ade-goog Message-ID: <20251126231733.3302983-10-dmatlack@google.com> Subject: [PATCH v4 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 Reviewed-by: Raghavendra Rao Ananta 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.487.g5c8c507ade-goog