From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 1781F46AED7 for ; Tue, 14 Jul 2026 13:07:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784034427; cv=none; b=MSWoipynWtS3RXbQ0yp2wLct2USa6g7iH+a3QXKUyxirn7vXHPdVRmjRi9UgoUuab5syLzUoz+znQM9gOCvVTl7M4fk6mZY2r45IB7SWicPGMt+LRsU0+D7vSB6ha/Vehz/zuqI/fv+r6tW8f5QTvtimBZC0MellXEBRp1fyI8M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784034427; c=relaxed/simple; bh=V44+/Ji704/zeo6ZHmgziwcNG650omqFD+V0jFjANf0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A7SSR8yiuY1MEGxaHnw2XH2iHgViCoGGeDW6EwZziWuQbnamqDffGXjb+cr+UDYx1bF+o4OlEObMg0vSnBOlUUgKm5Rtoh/zolmJA0eoj+7R7xx4XvJyrP6DLiW0dFiy+Vs+8vV/YYeQ6toT0xZMfQuNn3aH3xhPubOsPrFTsLI= 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=ca8L22g9; arc=none smtp.client-ip=209.85.214.173 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="ca8L22g9" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2ccdf36f63dso123055ad.0 for ; Tue, 14 Jul 2026 06:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784034424; x=1784639224; 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=34EVAP3xEJbniYxw7KzDG6VhCOQxXOAP3siy7t1YUHk=; b=ca8L22g9sCEKKaI1LvrrelkCj3yZPEmZGPcQ46msAeD2I4Ewg1fPZsjywrvke2aXhO WcSVcF/rxGreteg55FioIBDH1keuMp2FQLuPcX+q1cENbiwZwtLhMdcFqRbpQGpccgzC sL2hcHeMLNxHmJtPNnnleNljlVi/KT7pGAcyKUlEhWDT2KRA6ERy414S/kF6oDm3rmOf Onz8L/mGmBGO7K4qyBMCRmc2ntADUWhvzIUHp4geAU4ATEKglwyo5HKGORADCmiEGbqS q61Rr4HA/JVlxlBeCspeMI1/J03avnIF1LUCEdND9wGwE/K09F+dfqwgqqjek5rNbQIC oS7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784034424; x=1784639224; 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=34EVAP3xEJbniYxw7KzDG6VhCOQxXOAP3siy7t1YUHk=; b=KZsgFYURC7E2lZU0fSRICYIAgLHYZFLVUHMWnJcbHFuBFVOP7GQ2qwZ1dN5vLsg7kr E7PG4uz0mZwJfJ4j69ycJJ1GNZp7AOjRLrmDe2KhlhRlFVK3dKDL0j8IOR3S17JrfAqO 22RMm/fWKYY9hGWsqNrstAIi2nplvkTIowJhH5+w98ZGhO2p54fOzEm57AjpCarF2TD2 831RJJZGLC04UTV83980lEbA6y29i4WriaXGNKYY4YMFcINMUPUHpqggf1GjNCF1boqj UWsiNZ4qymVNDhTcbewDdswatNrXscAoNXHSj0atTCPMtg/FrthLYb0GeodrnPLC27vb 1UjA== X-Forwarded-Encrypted: i=1; AHgh+Rp+e9IJZhgRWkpfOVN4/KZrPkBL6fdJS6HhyYQKXrdMl3DWT8uA+AdcAY+PFtezb14m5ANoCouVa7gxYPY=@vger.kernel.org X-Gm-Message-State: AOJu0YxuFvUzvAY4NFH5RCbCR5p5qHnpjUwI9A5eAFgZknQ8/p1/61uu 0nkdaDW31l9762MsGeDUTaw2jEqT7fv0fMOytcU4Ul+b6A7xoKdSEKR0ieO2PMpSlQ== X-Gm-Gg: AfdE7cmjtRDql6Xsfm0/uDYgrfOIsFT0LV0+QOC1KhsAvP+Du7yiNjWUExALs03ttDb 9pP/UqNJgqWfU8ZmSe1lFVdlgaxPJ1nmiq99sOSRGxwzgZw9W/LnX/vJ5rxLae/E4Xd4+IgBLYX MHhhIi3FLWwaIQbLm1KE51JYccM6mpU/xhXFeOKFOJp4kYJVMIawHyKPxvJaMQ3x1LMqX/LZ7FX seQlTPflI2ztE+N/7D9MpPg5DmMfNznCj57WOKr1J4q/IxdgvbcHMfr5RqI0WEnCR+MsYGhLWGZ qCk1IHasA7307IbKjX2L3ZGK+f7sKsVxsx/ZTU7Ea65oqNT+tBA9Dtuv6tpWlngTxwI4isga22e HJoxrqGicVjmJUP2W6C1mUtwcTqN+XkGpuJAcIJBgonHB2Y+BbfvqtF0esfXN3TVI0EN3Lu2CiI PicwMWpdECo8X8NDoK1js2xszFTmMIZoy3W/QMcHOl65hGW/w= X-Received: by 2002:a17:903:1ac6:b0:2ca:cbe5:c3af with SMTP id d9443c01a7336-2cee169252cmr5952975ad.7.1784034423917; Tue, 14 Jul 2026 06:07:03 -0700 (PDT) Received: from google.com (10.129.124.34.bc.googleusercontent.com. [34.124.129.10]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ccc9bdb775sm116995885ad.2.2026.07.14.06.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 06:07:03 -0700 (PDT) Date: Tue, 14 Jul 2026 13:06:57 +0000 From: Pranjal Shrivastava To: Nicolin Chen Cc: Will Deacon , Jason Gunthorpe , Kevin Tian , Lu Baolu , Robin Murphy , joro@8bytes.org, David Woodhouse , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/5] iommufd/selftest: Convert cache invalidation mocks to the core array loop Message-ID: References: <4383c0afeba9795c9ae312826443fd7d5fc3fb58.1783539724.git.nicolinc@nvidia.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=us-ascii Content-Disposition: inline In-Reply-To: <4383c0afeba9795c9ae312826443fd7d5fc3fb58.1783539724.git.nicolinc@nvidia.com> On Wed, Jul 08, 2026 at 12:44:18PM -0700, Nicolin Chen wrote: > The vIOMMU and the nested-domain selftest invalidation mocks each used to > walk the whole request array on their own, with the vIOMMU mock even > allocating a buffer sized to the entire array in order to do so first. > > The iommufd core now iterates the request array itself and re-invokes the > op with the not-yet-handled sub-array, so handle just a single request per > call out of the front of that sub-array and report one handled entry via > the array->entry_num. Drop both of the loops and the kzalloc_objs() in the > viommu callback function, and keep returning a success for an empty array > as a probe of the selftest data type. > > Reviewed-by: Kevin Tian > Assisted-by: Claude:claude-opus-4-8 > Signed-off-by: Nicolin Chen Reviewed-by: Pranjal Shrivastava Thanks, Praan