From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87FDE13E02A; Sat, 2 May 2026 08:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777710837; cv=none; b=DgJ1vPQqxWm9zHMEnOW9iHhMhzUjX/G4/FZiSzE93L5sOMXOYrYoOyALpDE3PEexBfjwvelvKtJIgniEpQ6P17ympOxn9CDKHObb6BFp06yQREN7knmMcfGDUtqFbUv2zHAFRTxvQTTDVrRUDqAQ/uBhRvBKk6S+S91eZ7oQaQk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777710837; c=relaxed/simple; bh=AEFWyi1bfUyMJXHWZ66+GWlU4hMQ/K6QVwapHNfEqn8=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=L5CeortwlYj9CM2rnQA43PhV8VXwK9GQxheu6jjQeDTQgKkLOKJ+eBHTr1Tpxl1E8vsxZL36Ykfk7F/2AoNHxcTlCZibHjZyRyqe9iDeFRv8jA1oDyjmBoWpfujiVWUhWYt6C8So9o664cma6cjbkUskMlUNJ6pl1o6PsKRggnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=xCARrbXu; arc=none smtp.client-ip=80.241.56.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="xCARrbXu" Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4g71Qf0fv6z9tyN; Sat, 2 May 2026 10:33:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1777710826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z2iWztUwm+o27y5dNxbgLF4/YL24oMbdNtxNqbeQMfI=; b=xCARrbXuP9oXDZ7MWbmLF4UFkigjkeGeqqH0KcAKvvS2dFJ32ChqDLYi3wQVGGd075y9Tk LFao7tfAX31YHgcilTqyNF+ZQSOMDKSGGzzZi6ym2W/OU5kAgLsEBw/7uyYgLkWlZGABLd OoKW3Z0wwo4bVITtmUcCmK/sVD0QL6ulZ842RewCzPfzQNYxTHKPyd4AvDvYRZlk0HCuNN 54FfXr85SfuxlLkOGQ2ZZwcWbKhod265X+4d5nWGbsIvmhMB0eQz+yUOR8PlBYFWFsdMJ4 +rPgzerhlbCN9ANeBLo/GWEUEduokIZdqVWJd/BedSH+eLngA5ugNCUI51drqQ== Message-ID: <4007d59da564d357261b4ffa9c1daffcf09b5868.camel@mailbox.org> Subject: Re: [PATCH 07/11] vfio: selftests: Allow drivers to specify required region size From: Manuel Ebner To: Jason Gunthorpe , Alex Williamson , David Matlack , kvm@vger.kernel.org, Leon Romanovsky , linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, Mark Bloch , netdev@vger.kernel.org, Saeed Mahameed , Shuah Khan , Tariq Toukan Cc: patches@lists.linux.dev Date: Sat, 02 May 2026 10:33:39 +0200 In-Reply-To: <7-v1-dc5fa250ca1d+3213-mlx5st_jgg@nvidia.com> References: <7-v1-dc5fa250ca1d+3213-mlx5st_jgg@nvidia.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MBO-RS-META: z4gfwoiygq3ad9gdyib4am31dmz9b8hw X-MBO-RS-ID: 59239b2a35230070757 Hi, On Thu, 2026-04-30 at 21:08 -0300, Jason Gunthorpe wrote: > Add a region_size field to struct vfio_pci_driver_ops so drivers can > declare how much DMA-mapped region they need. The mlx5 driver will > need ~18MB for firmware pages. Existing drivers leave region_size as > 0 and get the current default of SZ_2M. >=20 > Assisted-by: Claude:claude-opus-4.6 > Signed-off-by: Jason Gunthorpe > --- > =C2=A0.../selftests/vfio/lib/include/libvfio/vfio_pci_driver.h=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 | 3 +++ > =C2=A0tools/testing/selftests/vfio/vfio_pci_driver_test.c=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 3 ++- > =C2=A02 files changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git > a/tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_driver.h > b/tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_driver.h > index e5ada209b1d102..fa172635632453 100644 > --- a/tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_driver.h > +++ b/tools/testing/selftests/vfio/lib/include/libvfio/vfio_pci_driver.h > @@ -9,6 +9,9 @@ struct vfio_pci_device; > =C2=A0struct vfio_pci_driver_ops { > =C2=A0 const char *name; > =C2=A0 > + /* Minimum driver region size, 0 =3D default SZ_2M */ > + u64 region_size; i guess i do not understand this comment, but that's no surprise because i'm new to the kernel.=20 would one of my suggestions be better? + /* Minimum driver region size =3D=3D 0 -> default =3D SZ_2M */ or + /* Minimum driver region size, default SZ_2M =3D 0 */ > [...] Manuel