From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 6E01232D5DD for ; Tue, 16 Sep 2025 16:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758041931; cv=none; b=EpdQ34bBEnBm3dZ7NTGmYO2q+84gpJ9c+vz4JtJUFJpjqasvQjBuVEtWUQsYss5zD42+RCoA3ZF2IiksUvMsBw39SCkaOMUNHT07jUY27LKWcErwLa7Ar/p8eVU7sle6gd458YZFJbm5Z9v+C/AZGW8DoblJbB7VbepVMHTAMag= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758041931; c=relaxed/simple; bh=bHQ6aI2mmvQouH+/tAfvYb03+Rc0ZH6B20NRMqFTVJQ=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QvgpZmWXuHCLOvfR8HIdGW8cCRKBBHwx9wGec9vllTSJLiwFiJwuAGnp4pZgnwxJNd1xpvLUX19xxZ9fs4cHcByPh8yuLqWTSOLddDJHqow8ONhdfJeCdZV+3Cv8ptaU+5rHqZsp6tQKRAXzgKR/gU5d1I7m9OFcAhvWRFSgWVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4cR7Nq5P6sz6L4wn; Wed, 17 Sep 2025 00:57:15 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 4B4BD140137; Wed, 17 Sep 2025 00:58:46 +0800 (CST) Received: from localhost (10.203.177.15) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 16 Sep 2025 18:58:45 +0200 Date: Tue, 16 Sep 2025 17:58:44 +0100 From: Jonathan Cameron To: Dan Williams CC: , , , , , , , Christoph Hellwig , Jason Gunthorpe , "Marek Szyprowski" , Robin Murphy , Roman Kisel , "Samuel Ortiz" , "Rafael J. Wysocki" , "Danilo Krummrich" Subject: Re: [PATCH 3/7] device core: Introduce confidential device acceptance Message-ID: <20250916175844.0000504f@huawei.com> In-Reply-To: <20250827035259.1356758-4-dan.j.williams@intel.com> References: <20250827035259.1356758-1-dan.j.williams@intel.com> <20250827035259.1356758-4-dan.j.williams@intel.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500011.china.huawei.com (7.191.174.215) To frapeml500008.china.huawei.com (7.182.85.71) > diff --git a/drivers/base/coco.c b/drivers/base/coco.c > new file mode 100644 > index 000000000000..97c22d0e9247 > --- /dev/null > +++ b/drivers/base/coco.c > @@ -0,0 +1,96 @@ > +/** > + * device_cc_accept(): Mark a device as accepted for TEE operation > + * @dev: device to accept > + * > + * Confidential bus drivers use this helper to accept devices at initial > + * enumeration, or dynamically one attestation has been performed. once > + * > + * Given that moving a device into confidential / private operation implicates I'm not sure what 'implicates' covers here. > + * any of MMIO mapping attributes, physical address, and IOMMU mappings this > + * transition must be done while the device is idle (driver detached). > + * > + * This is an internal helper for buses not device drivers. > + */