From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 9105E3C9896 for ; Wed, 13 May 2026 21:55:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778709304; cv=none; b=Xjb9l8M6V2goQqoQZY9G1evPMBz6z8bfnEsTspVpEwMtlj/3vFZLVqyOKqVXP+eUkhM3bVSTvyXHa+kPGyIrYjd1KJKx7i72e+9TZphaGy5UpcmZvYwh07EMwLkItinUqXpc80BYfi4iNKEXWVSBDmN0M54SEaxBfFEINuTeY5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778709304; c=relaxed/simple; bh=33ib9KkcLLrn3VhTTtFpwjAuQ5li1GsPjQBsArINN90=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Gs4DGuNmF6KGuCCsNvUVQQRBA4yblsZ9zH7U+k5zMY/DCQmKQhSC26WV1YAzXtPB9tOf/O6hjp/PF24j/nMV3LdFVrwS/JpaPd++XNh7xu3R4KkZ7dJLgFkfVCRPE8sXQs4eYqE0f6HlApatUVsxcyb4wRVFCP8eHUpfwTj2fD4= 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=Qc8s3gdo; arc=none smtp.client-ip=209.85.128.44 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="Qc8s3gdo" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-488940ccfa6so11365e9.1 for ; Wed, 13 May 2026 14:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1778709301; x=1779314101; 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=ezXQwA1bTr4JmObmofRNYrBy4UfsX59CPxxan0BrTBM=; b=Qc8s3gdoG0Q2etQxHENeGY8eIo0kqgw5KkFk32A3s0SAnC0SDtwGZoqjHuVt5xg/bh RWIPahq2D693LCT/hjA75Stsw05Qh4C2Tytuih5LwlS268J74pP65vCOWf22UC2TVqR5 +VmkryvDtMLhZbqOzuQZMDZW0oHZOuc2HCgZpozjQAqP/vv62FpYl8KRuJ3n+cc2werW einEMCP+8NyhlHh56yyLdglXdXU9GDeSx8cGqFRXwTBfhsa9zyGui200By4wWGR8RMCq MwiMH7rQukZyuaLc726bEYTPY/onQSIFOzHH1PR9yrlUJYx7AnrTe0xlV3EywcOtRSAt zlUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778709301; x=1779314101; 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=ezXQwA1bTr4JmObmofRNYrBy4UfsX59CPxxan0BrTBM=; b=Rbv3poqq0ThfOlAUaHIgdPdZnk9qV3GELLNmlDK1j95PHAbnF0asPCVS6xq7hHzvxd kct4A1QbDf4vU7iILqTzVBWZBUKCLwHhiLh0FmOu4JEBB3SoA0Whc6+U5qdi6R36Arm8 N2B2Yg3N/EH81N9n/igbakMFRLpbkRCxVh7l9JGg/jWdam1PtHWTmkujthu7bJbNyW5x 6fvwNw4cd3s8N23Fb072mLOTJBBpSsgxGNqQAvtiGWZSb12hZnDvIgeNTvpuFBdDhecH blIAzBzQTyBRsiWChQNJ1Xq67VWJ9qidpGG1KbLBzYB3pZWlwkSKQ4SeeSjVE+FttKtj Rjtg== X-Forwarded-Encrypted: i=1; AFNElJ8MuIWToD9ATLXpF891y31Qt/lna2B/VtN9zLTQ4yuuZYiRmv3Xe+sMuaLebtczlyRKBz3WgCUaLEh1lF8=@vger.kernel.org X-Gm-Message-State: AOJu0YyyemObpl4bYg/OihSSMhsNFpYK5po7G9Q0N3uTWepUInoPXgUu s7pag8CIpsHx+nNW8KAyxeWjEfjmWmVqjvGmcuuJxWc5KsdQmWZF8eayqfQQlccbcg== X-Gm-Gg: Acq92OEjWStHA6qRi/7w7YX2ElwKFRZeyMJ+ZH84XUDprLBw/SLpMTuVLOE0OBw0/9r aAXWt+NAssBmVkgZ8rfIEG3joJksqA28UzMQmLMbJYRa7fIRvgfQ9GjoPdr3icuPpLGn+vwQrxQ f7s/InhcfEH9bRts12PZqJv7eK7xjfPQeN7yQCON4o/qSokgDBGLXEIaQ1+1auEB6IqTdwtAOKz vPYa6FfY8sm2uPlwCrchWg3xGYpeTTDI/tpJADAZ0Sl9xtHocdTdIDNrFnMMKGHK2AV+5CXBNNS uEnECOr0y9yl29gzacJGHmlStHP9H2Kns37Cs57m0r58ngB93hBJA934fbnnZ/OisxIcY36Lhqk LTnWr3xpjZLWNJA8u98cwxZEN9RSWc8u2cZ9SNP0C44sK5rmzo7w1WjqtkhZrR711fKtj7i0AGN uQYiQJzcRY4hW4Nx0j9+QncOzpyK9B4csLw4Pg7sR7sFv6wjSE2KOOGWBSJVMwwpJe/E0= X-Received: by 2002:a05:600c:a404:b0:483:6a76:11a6 with SMTP id 5b1f17b1804b1-48fdafcf030mr95235e9.5.1778709300573; Wed, 13 May 2026 14:55:00 -0700 (PDT) Received: from google.com (8.181.38.34.bc.googleusercontent.com. [34.38.181.8]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da0a19b1dsm1499641f8f.17.2026.05.13.14.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 14:54:59 -0700 (PDT) Date: Wed, 13 May 2026 21:54:46 +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, mark.rutland@arm.com, qperret@google.com, tabba@google.com, vdonnefort@google.com, sebastianene@google.com, keirf@google.com Subject: Re: [PATCH v6 06/25] iommu/io-pgtable-arm: Rework to use the iommu-pages API Message-ID: References: <20260501111928.259252-1-smostafa@google.com> <20260501111928.259252-7-smostafa@google.com> <20260501122424.GA6912@ziepe.ca> <20260509232155.GH9285@ziepe.ca> <20260511141849.GO9285@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: <20260511141849.GO9285@ziepe.ca> On Mon, May 11, 2026 at 11:18:49AM -0300, Jason Gunthorpe wrote: > On Mon, May 11, 2026 at 11:16:47AM +0000, Mostafa Saleh wrote: > > > IDK, why? virt_to_phys() is part of the iommu-pages API, I'd just > > > leave it.. If you want to narrow it then #define it for pkvm when > > > compiling this file.. > > > > It is not going to be part of the iommu-pages API, I meant in > > io-pgtable-arm, we will use something arm_lpae_virt_to_phys()... > > which is then implemented differently for pkvm. > > Again why? I think the main goal should be to not mess up the normal > code. > > #define virt_to_phys pkvm_virt_to_phys > > Does that, we should be leaning into this pattern I think, not adding > unnecessary churn... > > If anything is needed then it should be an iommu_pages function to > wrapper virt_to_phys() for use by iommu_pages uses but I'd rather > not.. > Sure, no strong opinion, I did post this patch along with cleanups separately in: https://lore.kernel.org/linux-iommu/20260513215203.3852661-1-smostafa@google.com/ Thanks, Mostafa > Jason