From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796052513; b=LLpr+AV1x9Vo8DoMRcyatpq4gKfFh0jfO0xB119VGLHGYYIp5SgcG7iO2k8sIK0erHKN kQTKCSmAyWOXM2AjCs82v+cWfp/EaQAh6zyyQ78X+VcUoMBnLP/ivyIYVbF0djCYfav5D 3M6RtGaC8SWpVUfN/Cx/MTT8uVxbO3a7wKkDgGwRAWAnDLfG49Bxl2U/K/P9xafX/iea8 5hHdB9yNbXoPfROkSTHkFFab9oHSD8SV1h4Zm2o/oUSDKCtDRzD924LKHIJI51321Ycyy poyBb8jWuM7yu8Vvw2QawDZKKLRnbB1VqsclM6PH3ZpFQAUUshKkbX1P5wuupodmqIA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796052513; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=d8vKOm7VnbyhZx+y5NJ/tPt1nRv5OjF7AlTfX+7bj0c=; b=oMPfNXlMCM5iGYRHLL6BYgEDRn8CQiTRmvGZFWpto0sLeVT9k3jNU/E0s1i36Y/9cr+5 bsfywOzs6TY56fMWxSvv2Pwe0aIkMECIZQBHRRCSXdryweJ/kTQ/X3GJmc4VMHAJf+Vct yukq9+KgD6GSKuXoAJf2/wfgUL4c/CsBLrlOiny0KGoTwNBErbEMQsJHvKUTpfSTbl3la SijYkSxXemj+EBowTeyND5OwIoqIJRdbiEMwbEtas3+8+KaT0qOUA/NRFFd5CLtle1LK0 2dDWA35ummOkd4DlIIVvA1tuwHRscEmkrBbzMcz9nNEaUKC7iF36/pTvgHXHlSqLNnQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=JH5oQ6dC; arc=none smtp.remote-ip=209.85.214.169 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55F61606A327 for ; Mon, 30 Nov 2026 15:28:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 55F61606A327 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.a=rsa-sha256 header.s=20260707 header.b=JH5oQ6dC Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2f0afdb97abso446945ad.1 for ; Mon, 30 Nov 2026 07:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796052513; x=1796657313; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=d8vKOm7VnbyhZx+y5NJ/tPt1nRv5OjF7AlTfX+7bj0c=; b=JH5oQ6dCX7cxRLoOuo3fa3mCUGXjB/ztNYi5E5h5Gjb1LjyRQdNiBzFUUKVHkjVPeY gaKMir1g50GfMTYvic1RaahY2w2+saGXVeuHsoOBqf9ZqFPYdDxSMG0EAIXMyL41zxGY BFp4oQ4mvnwDAi96zH+vKviC2+EMaHKra4xH1awpwPH2yvGLZ/TxfMJWJ2j+p4RABw/b Wn5Po8YLs3g5dk42laJZK7lGY48T/gbavni6Yrv78cnIOAuT61FNpTY0Y5cuMzhuhcZ3 NodnTwBjKddI7CX+MwpUGR0Y4WxFjVQgrj4Wg5G8DTPFSrpCtiZQqTNN8oaO5MYO+gx6 DXmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052513; x=1796657313; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=d8vKOm7VnbyhZx+y5NJ/tPt1nRv5OjF7AlTfX+7bj0c=; b=AtJ2zUmrT8LrKJkVyiv6FzghIqqMBtXvFITGCKpkD1cZsA1o1ADnprUR6oWlEtHkvB J1LyrAbVgUmQEweZokXlK+idIUEGSVOX3NaGX/JBtIc0ML7qvRU77V8TRG6dABKUWaOt i4KJabAsLIxIbxidP/ZHqYRmdH/1+5k/6qbxlaQaoHyUT/ntn7YyZbdWmClARrAVM9Pr rqJT3mRsZCxXy3TJWpDDHUwuECf/72+ajlGZBtlWKcUvkdrtThHF5Lgk+HiJ2KQBuX4Y PC8ViwY4DW1OMO77OCdC3h4mMEUFduOKUdzcvrF6Drs8wiN/8gW0F1DZ1fnJ0Oyx7bD0 1ueg== X-Forwarded-Encrypted: i=1; AL+hErH1xSNpJZRHb2XfgKbUSPLTozbWo8p0bPaWAJD8p0pIkHwlxS2FZPTY8oeHF8lNlBzqPtkLH5A1Kchz82Y=@vger.kernel.org X-Gm-Message-State: APuU4Z9xVrvXrYMTF7ev+3KvzoGcCxEBdnBq5PW9t6bR0tVuEA+8j8EJ uxYSCpoc8mTt8oFlVcwejRstKb/wEBnXYoqV/CkfdFGymgFndjVAVjHdQBlmFwtsHg== X-Gm-Gg: AZFdTZd1uiXg3Zj31jTxaNdWfxLWu57JiABKR6w5buwINGfowsW9oJPGMSbpAh1uRLh nuS5ukS1xlyUMi4Jz9DkK+CqY1KDxTO9QEMMzLSZhtb8ReIkSsfWv4APcjx7yiLGkhnDIAwV9yp bUTSUD6M25O5/+yVzCwwluqH4TBo1K7OEFweWfGgjTKHakshuZxDxIv2C/nPmB1AWG70hV3YK6g YtEX9XPHBYFi2IlMpxSmBJrBFbHfM8CKzMyRLZgUiYiNeYw98Lh0WCUc3lcwkvvnAuLJ2hhO/v5 5jkFFpz7YzfWeodEk5mgtv6bNj58i8KGTXvDkUWSAIssQImIkEdVU7aOkwD7d0w2+QVr07WeBZq gKfHgEFxnwYvX3VkFOWjzFz7JybEr+C89zLOJVwEnxQRYvH/Q/i8iYcMFDvgPBJZlMYDuV39Y2S I+9fdscA7eM3MevAbwDZntMFlCuc53gBzzGQV9Q1IRkdQ+v5Y5oCBqlkO1z/PMfyLAdAG9GE6DL L/g3NK1Iik5Y5Og/Nb375uYbOaAf+58+t3uGAQ+5DOZkscPRGbtdGymMajsT0HKZck0mogp8kXj l4VZExiRSZtgd1GhPzVLxmHNiWoLT0tPOoTM+Ra3F/97qEIStO22DF5e/JULGPJ8eNw= X-Received: by 2002:a17:902:cf42:b0:2eb:19f0:6e2a with SMTP id d9443c01a7336-2f066571064mr29044095ad.8.1796052512113; Mon, 30 Nov 2026 07:28:32 -0800 (PST) Received: from google.com (105.211.142.34.bc.googleusercontent.com. [34.142.211.105]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f03f1207f1sm167915035ad.64.2026.11.30.07.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 07:28:30 -0800 (PST) Date: Mon, 30 Nov 2026 15:28:22 +0000 From: Pranjal Shrivastava To: David Matlack Cc: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian , Alex Williamson , Jonathan Corbet , Shuah Khan , Randy Dunlap , Mostafa Saleh , Daniel Mentz , Samiullah Khawaja , iommu@lists.linux.dev, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, Logan Odell , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 7/7] vfio/selftests: Add observability test for IO page table usage Message-ID: References: <20261001224531.765278-1-praan@google.com> <20261001224531.765278-8-praan@google.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Nov 25, 2026 at 04:33:32PM -0800, David Matlack wrote: > On Thu Oct 1, 2026 at 3:45 PM PDT, Pranjal Shrivastava wrote: > > Add a new selftest, vfio_nr_pages_test, to validate the iommu-nr-pages > > fdinfo metric across all IOMMU backends (Type 1 and IOMMUFD native/compat). > > What's the status of this series? Should we expect another version > (e.g. after the discussion on the shrinker RFC and at LPC)? > > nit: Please use "vfio: selftests:" as the shortlog prefix for VFIO > selftests (see Documentation/driver-api/vfio-selftests.rst). > Yes. Following the discussion at LPC, Jason would prefer to expose this only through iommufd rather than VFIO type1, so I'm reworking the series along those lines and plan to post it soon. That drops the type1 fdinfo patch and this VFIO selftest. > I gave this a try in QEMU with an emulated Intel IOMMU (which uses > generic_pt, so it reports iommu-nr-pages), on top of this series. It > fails in every mode except iommufd, which skips. Details below. > > [...] > Thanks a lot for testing this, and you're right about both the fd selection and the PROT_NONE mapping. Your point about the final assertion carries over though: I'll make the iommufd selftest check that the count goes back down after a full-table unmap, rather than asserting that it stays up. Thanks, Praan