From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-10631.protonmail.ch (mail-10631.protonmail.ch [79.135.106.31]) (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 D9F98258CF8 for ; Mon, 14 Apr 2025 12:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.31 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744632919; cv=none; b=mA85yHjF9Vjubnb/4/y3GWrwI55Cj8/5wZfF/YxAF2SNp8p4+O1xLxb9n9/cJM8a0RAe4OUSz8Q3wPRr2DvpUeuGq3Hr91e0g6539j8EnEmSO6vQjeoqu03c4QqCU9pft67I+gDgxYV4cWqLk6H+PMEFrEAK40WtbJyYcWJA8cg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744632919; c=relaxed/simple; bh=oca2unmatHku3o5dirlH4WdUgZRNMvMi6TJwThtLpxw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BWINPx9ytD3ob9R7wAhtA0mTB2x9MM79YR/yzr/SK/kcJfcjoiziAGDACevVYdehKk0nUxeNCXIMv+9SBN7SSOKddOZVw5YSYc/b5tZFxfeumsfRhF6f5Q3MOYlmu3AGlfDPvDNwhl1q3laljvXXIn3mk5AWOtVEQM6mtq9YGog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=OaO9G+Rg; arc=none smtp.client-ip=79.135.106.31 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="OaO9G+Rg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1744632914; x=1744892114; bh=jaNDriKc/gf2w9ZI3JU8uqBPkII9SsT+iiGZ/PuIi54=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=OaO9G+RgZTAQYgNrq7F4ploS0Hfo9LBWVfxnosvoFvhEYwMRPoPpGqndZAdccBuHi ucRiWU00sbe035HloTkcYv3p4J19PnqJP+2d+QgZVS+J+ITsn/YeoFHRpRKUKULqqf lmU+B+wIVTYKW8QrJFVPyEvTlLF+OqXJCkxHhV5EZFn3M9TiyjNMjGCjJQMt9P5t02 kknmyLr5XEaFGrJTs9VsCeM9nRhXxtCUuarOQQxmxbL+qqM4niJjNm6UMxBuRWZ2nw nNU2CZu2TSBOAKSHPl+eWeQCEnXO9Q5du9hyDX1Nxx3lroAfcsP3xBpkUFonjjCckA nUMc+xzl3tjyw== Date: Mon, 14 Apr 2025 12:15:08 +0000 To: Danilo Krummrich From: Benno Lossin Cc: bhelgaas@google.com, kwilczynski@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, abdiel.janulgue@gmail.com, ojeda@kernel.org, alex.gaynor@gmail.com, boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, a.hindborg@kernel.org, aliceryhl@google.com, tmgross@umich.edu, daniel.almeida@collabora.com, robin.murphy@arm.com, linux-pci@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/9] rust: device: implement Bound device context Message-ID: In-Reply-To: References: <20250413173758.12068-1-dakr@kernel.org> <20250413173758.12068-7-dakr@kernel.org> Feedback-ID: 71780778:user:proton X-Pm-Message-ID: 38b383cca383a845f034fc982a1b448e72685755 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon Apr 14, 2025 at 1:13 PM CEST, Danilo Krummrich wrote: > On Mon, Apr 14, 2025 at 10:44:35AM +0000, Benno Lossin wrote: >> On Sun Apr 13, 2025 at 7:37 PM CEST, Danilo Krummrich wrote: >>=20 >> > + $device, >> > + $crate::device::Bound =3D> $crate::device::Normal >>=20 >> IIUC, all "devices" (so eg `pci::Device`) will use this macro, right? In >> that case, I think we can document this behavior a bit better, possibly >> on the `DeviceContext` context trait and/or on the different type >> states. So on `Core` we could say "The `Core` context is a supercontext >> of the [`Bound`] context and devices also expose operations available in >> that context while in `Core`." and similarly on `Bound` with `Normal`. > > Fully agree, I absolutely want to have this documented. I wasn't yet sure= where > I want to document this though. device::DeviceContext seems to be a reaso= nable > place. > > Besides that, I think I also want to rename it to device::Context, not su= re if > it's worth though. Sounds reasonable to me. --- Cheers, Benno