From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 0CB1A339B56 for ; Tue, 16 Dec 2025 23:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765926501; cv=none; b=peb8vWwitKZn/FeMXdRR4vMVFfLBGBtzo2DmXijSeU5px4l6j6JRhCzWWfvCAEFB/eWDm7tZf/MWtEI/mcA9uM99tJsJCdfgzaPrTqRrJHFY99ssf4zKBjFoxazh4vxu+Li1GfK2Lz67xEkzS9ugveImj3a59r/0yJghhzyOko8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765926501; c=relaxed/simple; bh=LwZNqfOuoiJ6sUVjJ5q/voOJVJp/rjqb6MA2e4MaQeA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kQui2dra8rf+XsmOJMHdTMZ5mJTGwIvG8illnm1boO3YYeID9OpyC78O8REyqwZ045w2v9/fB53h1jbbkj6lqBro2jlzUL0mVPkoaFahQ0OZl5yR5hNzmCkAb8PEc+mf3XJNxXv1OadVol1NgcxGxaJz9ggK/E/uGlYpt1nG75k= 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=oknQeNSU; arc=none smtp.client-ip=209.85.128.50 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="oknQeNSU" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-477a1c8cc47so26335e9.0 for ; Tue, 16 Dec 2025 15:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765926498; x=1766531298; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fEnKjDj9pQFaCr4EZmae2jNEPFVNmbflp2ZNa+r+P+Y=; b=oknQeNSUaiXqzl7ikOx1lp50jeIokTCaDJ8K05tjtwc7vXsDuFjlYb3jI4a53fufnM NUKtfiUjhs4YMFnClJZkj7qkMt1qmWpAzLypXXw5fQ2GCXluqDW1SQnubvQ23lKgaipA P/fo9SSAPZhqUlPLQuVNai2M2Qk790EkzJB6JOB1OqNQE+Q5e4T2eDypZAy00f1gduQ+ NkdFU9AKnkFBUEnAW4L4lKUSIKlgtoQryl5O3aan0XuMgWynB1WrZz9qW4Y2/0VmbyoQ VswQQKlwF63b54IBEvuNE1QkV7fasHbljozFOlFDaRl58NQMiC7vg+/v5IBAENSTLEyf VBqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765926498; x=1766531298; h=in-reply-to:content-disposition: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; bh=fEnKjDj9pQFaCr4EZmae2jNEPFVNmbflp2ZNa+r+P+Y=; b=M1s2uaTIZd5wF+zxmhTs/5Y92JPFw5qiny197RNb+dMVTFBCl46AzHxRuZCsMb1Sz1 IYk/bfKGUYK6VuMeyfkmc9T0wGxJgJLbiaHTMmbtalnHD8mRlfVuqGbei6IUAWuyaUJC 5nlg/Fbi1DvTZWxYq0kRQIis/wD7fveqOkvzFPBIsn/yJcJoFTuFEIYlJPAqu0sSUVJf JOHqpsSNOq6m9OOz1s7No+EuYgkybTxD9Wt/bUaLxTtn1PCHRWtZwxJreXYGqt8ifV71 uvgyyjnR6nWkkb5mVBZ+VyWWuTQpMNDOZ8AguEiAbTfA7A9hWmeKt0bkzGJjur214cTb s33Q== X-Forwarded-Encrypted: i=1; AJvYcCWw/a4nR2pFGj7BgaF2i+EELz5hlrkcVbQAY836KO96RWOcB5D7Xrvt4+LyfpAhY+Hgf+hlmqlg3h97LJQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzxRi6fiyrJcfffrYuhxcaY1Y4QZi8KmUwZtC2gM4TVRRTqYYWm mv/kD+NplwjmY4Gkw7HJB+mAvk3MvW3D+mV1hjdQ2PVgXhXoaTMkha8EFmXHbaFDLA== X-Gm-Gg: AY/fxX4e1cAitLAqi3yMj0YhhXzslC12UhaW9hNSfoFUjdNs2H0+vPfEZOnx8Kxr8Gr 5db6na8dTo+ssK8YcBwqTR1sQIGtIhN3orgjLTlcwrAC6inTADVnB/GTWYMq26zsricTJknXVx/ 2ey3LLBEJNHAAhE8rqrbgI9fnnbTGcVNbEmBthxMeiA3Ve4JnwlR5XcchIoCDjabzhFK2J2dDkO TXNi1qaomU1JCXtqV7Tv8MBNlhB0l+AGmM7jPVUtWiSnoB6qqawLzM1vNoVOt9FMIdutwEQEiuj RZRQPCW8y89bmGRkJMlFlbVWnfqWDIknVZGCaCf9jSUvcCZrlsfB4PJhkeESmibZoQVhd+TOeyj wubRxnosUxcfkQZDsXsObhJaR0zF5wO5SQ16gXL7X7x9d0nG6i1RvJes61KIGUBeTtgY83PEz+5 MTtdLTt55wotXOaHF42AI9hgElIKUDa5hfNLoc6LdjZCIavheGafap5g1zU1/J/bg= X-Google-Smtp-Source: AGHT+IG7LwUc1KusrGX+ZA2zOk94gnfIHzqutaEubqj6+XSKrKArOVejMGxCukQG8Efn/eVNuyxG+Q== X-Received: by 2002:a05:600c:4b99:b0:477:255c:bea8 with SMTP id 5b1f17b1804b1-47bdd2b0bfamr45995e9.7.1765926498247; Tue, 16 Dec 2025 15:08:18 -0800 (PST) Received: from google.com (170.226.195.35.bc.googleusercontent.com. [35.195.226.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47bdc2355d7sm11409285e9.14.2025.12.16.15.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Dec 2025 15:08:17 -0800 (PST) Date: Tue, 16 Dec 2025 23:08:14 +0000 From: Mostafa Saleh To: Jason Gunthorpe Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, iommu@lists.linux.dev, catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, joro@8bytes.org, jean-philippe@linaro.org, praan@google.com, danielmentz@google.com, mark.rutland@arm.com, qperret@google.com, tabba@google.com Subject: Re: [PATCH v5 04/27] iommu/io-pgtable-arm: Factor kernel specific code out Message-ID: References: <20251117184815.1027271-1-smostafa@google.com> <20251117184815.1027271-5-smostafa@google.com> <20251128164541.GA812105@ziepe.ca> <20251216005834.GC31492@ziepe.ca> 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: <20251216005834.GC31492@ziepe.ca> On Mon, Dec 15, 2025 at 08:58:34PM -0400, Jason Gunthorpe wrote: > On Fri, Dec 12, 2025 at 03:37:43PM +0000, Mostafa Saleh wrote: > > On Fri, Nov 28, 2025 at 12:45:41PM -0400, Jason Gunthorpe wrote: > > > On Mon, Nov 17, 2025 at 06:47:51PM +0000, Mostafa Saleh wrote: > > > > Some of the used APIs are only part of the kernel and are not > > > > available in the hypervisor, factor those out: > > > > - alloc/free memory > > > > > > Why not provide the iommu-pages API for the hypervisor environment? > > > > > > Same for virt_to_phys, that could be moved into an iommu-pages wrapper > > > too.. > > > > I guess that's possible, but then we would have to stub dma_map/unmap, > > which might a bit ugly. I will look more into it. > > I am hoping to drop the dma_map/unmap and replace it with an arch > cache flush call directly since the code is no longer modular and > relying on the DMA API will have some problems with a future patch > series I'm expecting.. > I see, I always wondered about that, it's because CMO are not exported for modules, I can look more into it and send a separate clean up. Thanks, Mostafa > Jason