From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (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 53A3D34D4DC for ; Wed, 17 Dec 2025 14:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765980052; cv=none; b=PCQcLn6NvXWSHDUAuB7UaDROC6pxjeRbuBt4wWlhnD+fZIVcud6z8mJ9akU/LPZF3h3FTGYW6iJL3ZeOciZYJdRpFr93YL5ALeoEw1JaT7LimDtZAOcnx9gn7WmW5t8TnNGuucQRRqd2y3drOMuNpXIhZBrcStLy32QseMECTbk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765980052; c=relaxed/simple; bh=Wa1BsId9QPfGeDLGHm5Ds6KJBFuQXBj9U+PxzlddFRk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mNceQGnWCe+v2hUJghrzmBjZmVBp8tz1EU1D9P7RefqSH4FXMNrOiykl8z3gyE+A1PmjY3z8Jcv/r3afI74KdaKh/C4gYA24kYYUN8PlrQ8lbEwK+0lMgWQBkzU5N/OljEL19c66QeWxmfiWn4AxrDNBTH/KNzQuCoZIDRhmXh0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=YFOpqiDE; arc=none smtp.client-ip=209.85.160.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="YFOpqiDE" Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-4ed861eb98cso63265341cf.3 for ; Wed, 17 Dec 2025 06:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1765980049; x=1766584849; 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=mNOaMPGrnsuzc/K3PgD8W+kjT2zih8ixOp0jwu7uQa8=; b=YFOpqiDEPuunzChRKUpWIHfrlkG1vebd5biXYOODaegAzYh9ev3wOissQGnf/tGU3E 9cXmZVqmT+EViF35vzAdZJ24Wk0Ya/qtMR0E9NRw8uOb678JAGFdlFyC7F3ORZn8cv65 //kemH/dUasyzyAVFEV9lM7nAtBCPSsmYu7tWcBY8e9PquAnibEsDiLCSEN52vhFSMxY p0doaidF0ALbU51K0has0qJg4wIDDGMSYPeucXX+h93OIP1tBYJeLxwFfVYPPYQZs9Hy o0A9zByz8WnooxbvHGnPan9bYc3MjSMiWrEaBOlRpYYdk0DzSmTLUZ4q49EwgX59tquz w4sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765980049; x=1766584849; 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=mNOaMPGrnsuzc/K3PgD8W+kjT2zih8ixOp0jwu7uQa8=; b=eJw7M04CSKtjzN1L6MAX07egIwni2PVQKsdkl4/BrFgk8gNbeXHELRI7ueAwetQ28N bzwfyRNwB1p12Hc/IUZE/1aD8mAXQhYn//PY9Jw21gVG0krIVEsM5/bb6RBsZyzgxxsA eNvpCXKxI1n6I1YaieInabaGXvUvWRa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0:b0:4f3:4c1a:4c49 with SMTP id d75a77b69052e-4f34c1a5041mr45692141cf.48.1765980048007; Wed, 17 Dec 2025 06:00:48 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-47-55-120-4.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.120.4]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-889a85eaf02sm95103076d6.40.2025.12.17.06.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Dec 2025 06:00:47 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1vVs58-00000000fUk-3YUQ; Wed, 17 Dec 2025 10:00:46 -0400 Date: Wed, 17 Dec 2025 10:00:46 -0400 From: Jason Gunthorpe To: Mostafa Saleh 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 14/27] iommu/arm-smmu-v3: Support probing KVM emulated devices Message-ID: <20251217140046.GF31492@ziepe.ca> References: <20251117184815.1027271-1-smostafa@google.com> <20251117184815.1027271-15-smostafa@google.com> <20251128165616.GD812105@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: On Fri, Dec 12, 2025 at 03:53:13PM +0000, Mostafa Saleh wrote: > > It is OK I guess, I wouldn't insist you change it, but I think it is > > kind of gross. Registering the iommu driver against the platform > > device instead of the aux is pretty ugly and denies userspace the > > ability to see that the hypervisor is sitting in there through the > > sysfs topology. > > Yes, that’s why I was wondering if it’s better to keep this as a platform > driver and create the aux devices for the parent(KVM) but that was really > complicated to handle the probe ordering. That sounds worse and inverts the required probe ordering. Attach it to the aux device :\ > > Not sure why the commentary about built-in though, what does that have > > to do with anything? If the aux driver is not built in then it will > > just module load later and everything should be fine? > > As at the moment the KVM driver doesn’t use drvdata(nor any device > resources) and the main driver(aux) does, but if that was a module, we > can’t know which version does what (if that changes in the future, > although unlikely). Kernel is monolithic, you don't need to worry about people doing silly games with modules. Jason