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 58CAA293B5F for ; Fri, 12 Dec 2025 15:41:39 +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=1765554101; cv=none; b=PvVNP8qTfvRLRcdAgabXFpcOkDB+MzEz9qAa/xxG+WcMGcjJHuS3pMmD66N0nXJ6bEEUCmDsTCq90DB8Y3EmS35xN9lI/SFxeAdtce+fWhzU4Mj0fuRP9XMSHFjAJRTJdiFPG208VXP9dWftrkgEg8+l6p3klfXbg1Zc4G6PUp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765554101; c=relaxed/simple; bh=DXvytcOpbGo1jKvvdjOi6minbJGrWLE9ozhpxKSuBGc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=k4kgpW5qUykqfVkuJ8a+yf19IUS5u0IzdAu0ALYNdlHvlkvRhprMopEw/nn1QU21k+oLdaAmETeFDjZwxACe31bdNo4d35aEgt6GAP9CgYi1/4wVCi5e0VzEZGKKA6uun527vJXT5pHRiSLL6hkS65/aCNkinoKn0Ot637kAbbA= 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=aAew84nN; 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="aAew84nN" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4779a4fb9bfso128755e9.0 for ; Fri, 12 Dec 2025 07:41:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765554098; x=1766158898; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=yb0mpDrVWWr4Uchsh7e1JfdRTz6GJRCuX0Lg98K6TFs=; b=aAew84nN0yoxoW6gPU77ZO9Vrb0k0doo+R5jQl7Fqn7TEmfextfi9d1Nin64+X4jDe /VCuazk9XU7VvP2JJWygjbeGi1Tc3eggoM5Bgwi2ZSwbfSwapTzD4LfQFjx07jDk7rdB kL5o30rfxRsK/i9dh0hP5+CdzKAv867znECaAmqVT0OKwyjiAeTb0G3E86P/k/RivRVF S0Y8Sf3kbM8dvoL7ZP2je6Ewug1OixR1WQzdUlvozvEgo71O23OsnvFlkOaqEIskvGby fzEPheHDRWGhr2nRTVdNJT0Wx30RDXL67mB/9nyIZiZfCfS8VZtwXb+dhPGHWt2NmMJw CSZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765554098; x=1766158898; h=in-reply-to:content-transfer-encoding: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=yb0mpDrVWWr4Uchsh7e1JfdRTz6GJRCuX0Lg98K6TFs=; b=oyCacS4w9xQhUyo1K190htfvr1nzTTbOWkYx1tyrsI682RkmhZedeQh9sJKYvwKpZD F48dXCfwoi0zDE+LnIqbFHmeYAcjcZVzLyDZJN+QhGiFPEBh9r6kyDDpJ55CXsPhLD45 KyzdVJzrz/Bp21wiVKnUANhfQGeXgGN+sUj5cCGMpg4faJkNfTsQTcOl7xtsvDVWozGF o1Q2QvJwS6pf2OU2wOLqqbOetgz1Q6Yj+Rst9oYoOdmmQsBVaaZZvyaD0Up4BVWYnrUj Y4WRFaSCMXGmW6UV3Z4ptE8mvzZFYMmYtgLifu478Y5wEDx54rC75NeCN7ZEUzHJu7sL NHaQ== X-Forwarded-Encrypted: i=1; AJvYcCUCWfoTC1zyYxPvyHuBwaxDVnZTcg0CrHU6BMr80++lfx6plTKc7rgfeq8OjZItq2CTp7348HyGqBwaNHc=@vger.kernel.org X-Gm-Message-State: AOJu0YyQgY9+gXracbD0ynPFSQDniQYw7KS46uxsB8v5xqK9Yg3T1wYB Tw5eIojr7ROp3Tbxv0XAu+1dBJx5NIMvVkQsJezzbwahq1IOst/Eg8bSsL2Ba7We2g== X-Gm-Gg: AY/fxX7OpmYrQU/Ejl6r+fGKSI/EDF7VC2VqrOvZ3V+P+rp0wj3cSggCLhyGrrevxZa uhaPG0MgzhGTaq3T2sLjpF0e2bYeFo7OjjlyR/v200GAnfug+/lY1H4k/Ew+e4qnxcW6yiHuiqS P7DfqEI6Ayc11rQNpZAzc/r5GX4H2/jQKPHHjqsRMKXlIBEHuGuPBUgs1i9Lv+U80hlXbiXF9Ql Aa8EpSbJvKrGzmXbKa3bkGxQ4zAVaHWFxxawG/RpzACa86XTATXMZLjIWBK5853ma6LWLaW4UJ5 od7SgjNPmWjHRbLnHhMHH0NaPL6OehJsAOsUAzThJsFHr/FSpcjwPha91aauw5BtE2hh/Ebfq8p 4kNTWibx+WvOkCkAanTSG2+LV/7m7tsXFvluBV0nZEfzXOoxgC50MgAKaFYqqcYacC3LMhPqaw3 7U9WJI/e3KT6pVLF6msm+onHlFOzePL89QRSrk1lcKcGd5DrvG9w== X-Google-Smtp-Source: AGHT+IE8Wx434r/TRdblX8cNOSB3Il2X+1GmWAuGcjE2WU7i1xwbelBfzCA/D0WahfUc0XUl/gS5rw== X-Received: by 2002:a05:600c:8885:b0:477:2f6f:44db with SMTP id 5b1f17b1804b1-47a8980f38emr1011225e9.5.1765554097506; Fri, 12 Dec 2025 07:41:37 -0800 (PST) Received: from google.com (54.140.140.34.bc.googleusercontent.com. [34.140.140.54]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47a8f49da20sm36628515e9.5.2025.12.12.07.41.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Dec 2025 07:41:36 -0800 (PST) Date: Fri, 12 Dec 2025 15:41:33 +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 05/27] iommu/arm-smmu-v3: Split code with hyp Message-ID: References: <20251117184815.1027271-1-smostafa@google.com> <20251117184815.1027271-6-smostafa@google.com> <20251128164655.GB812105@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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20251128164655.GB812105@ziepe.ca> On Fri, Nov 28, 2025 at 12:46:55PM -0400, Jason Gunthorpe wrote: > On Mon, Nov 17, 2025 at 06:47:52PM +0000, Mostafa Saleh wrote: > > The KVM SMMUv3 driver would re-use some of the cmdq code inside > > the hypervisor, move these functions to a new common c file that > > is shared between the host kernel and the hypervisor. > > > > Signed-off-by: Mostafa Saleh > > --- > > drivers/iommu/arm/arm-smmu-v3/Makefile | 2 +- > > .../arm/arm-smmu-v3/arm-smmu-v3-common-lib.c | 114 +++++++++++++ > > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 161 ------------------ > > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 61 +++++++ > > I would think these inlines should go in some -common.h instead of > arm-smmu-v3.h for better clarity, and ideally pkvm stuff does not > include arm-smmu-v3.h at all? My thought was that we use “arm-smmu-v3.h” to avoid moving a lot of code and messing up the git history, but I have no strong opinion, splitting is fine also. Thanks, Mostafa > > Jason