From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 936F1239E75 for ; Wed, 13 May 2026 07:12:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778656322; cv=none; b=gf+U6ANILpuJSwFu47RZQ13dAwKp9AaY1xw6Ni/MklOwLH03P507xxJbX+dIxxADCGnmy3b/iEsAzPiN13enb85l+NAqor7CTco2AnYrgFVDg4MSLFgbR6wx3joAGjJXXA+Myve60+VPR4sBbCGeytHRTfmfimewgZIhg3/5GQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778656322; c=relaxed/simple; bh=ocTceWbdCyIQe+/QSperWMAMz5uDG99LcuPJ/Mj7aa0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=l6/azKplOd6ET3dIWzt48JE5NRpgzkbS2thtbkYTBzHS+RrQVq8A9vDxGFHCYupcbLcYcyqxmZwnsBdaD6n9E92pd7Stxam6bFpHbf+FG2axoWwoi61dKM4tLghG9LF3mKb1SARTEJfdsD9BVraVWJtLM56ddPDK5rLSnbBL7pc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IfZ1+dGY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IfZ1+dGY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 960E9C2BCB7; Wed, 13 May 2026 07:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778656322; bh=ocTceWbdCyIQe+/QSperWMAMz5uDG99LcuPJ/Mj7aa0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IfZ1+dGYGxKOdobj4UC5wARWbeKM4ZI0xRXzO1w0/GvtjWs4rKxm19I2eSR13zfMP HlJN9bFQDZNy8U0CpUGR43Uth4iAGvKoaLfpDJvE96nUnW8PoZodnjbRFofz22e15Z qrMFKwL9Qu+QsKmKGY7nt1/kgxqYymzKeUVYOEhY= Date: Wed, 13 May 2026 09:11:17 +0200 From: Greg KH To: "Aneesh Kumar K.V" Cc: Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jeremy Linton , Jonathan Cameron , Lorenzo Pieralisi , Mark Rutland , Sudeep Holla , Will Deacon , Jonathan Cameron , Suzuki K Poulose Subject: Re: [PATCH v4 2/2] coco: guest: arm64: Drop dummy RSI platform device stub Message-ID: <2026051352-albatross-contents-7113@gregkh> References: <20260427061615.905018-1-aneesh.kumar@kernel.org> <20260427061615.905018-3-aneesh.kumar@kernel.org> 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 Wed, May 13, 2026 at 12:28:12PM +0530, Aneesh Kumar K.V wrote: > Catalin Marinas writes: > > > + Suzuki again > > > > On Mon, Apr 27, 2026 at 11:46:15AM +0530, Aneesh Kumar K.V (Arm) wrote: > >> The SMCCC firmware driver now creates the `arm-smccc` platform device > >> and also creates the CCA auxiliary devices once the RSI ABI is > >> discovered. This makes the arch-specific arm64_create_dummy_rsi_dev() > >> helper redundant. Remove the arm-cca-dev platform device registration > >> and let the SMCCC probe manage the RSI device. > >> > >> systemd match on platform:arm-cca-dev for confidential vm detection [1]. > >> Losing the platform device registration can break that. Keeping this > >> removal in its own change makes it easy to revert if that regression > >> blocks the rollout. > >> > >> [1] https://lore.kernel.org/all/4a7d84b2-2ec4-4773-a2d5-7b63d5c683cf@arm.com > > > > I wouldn't merge this now given that systemd checks this file. Could we > > have a symbolic link instead for some time until systemd eventually gets > > updated (years?). > > > > I’ll add this in the next revision. > > static int create_rsi_compat_link(struct device *target_dev) > { > struct kobject *platform_kobj; > /* > * target_dev is: > * /sys/devices/platform/arm-smccc/arm_cca_guest.arm-rsi-dev.0 > * Create compat link /sys/devices/platform/arm-cca-dev > */ > platform_kobj = target_dev->kobj.parent->parent; What? That is crazy, you don't know that is always going to be ok. > return sysfs_create_link(platform_kobj, > &target_dev->kobj, > "arm-cca-dev"); No, don't do that, if a driver calls a sysfs* function, something is almost always wrong. Don't be making random sysfs symlinks please. If userspace can not find the device anymore, that's fine, that's how sysfs works, devices move around all the time. Especially platform devices as those are almost always not supposed to be platform devices :) thanks, greg k-h