Re: [PATCH v6 10/34] gpu: nova-core: mm: borrow BarUser for temporary BAR1 access
From: Danilo Krummrich
Date: Fri Dec 04 2026 - 13:44:26 EST
On Wed Dec 2, 2026 at 9:28 AM CET, Alok Kumar wrote:
> @@ -85,14 +85,14 @@ pub(crate) fn map(
> /// Access object for a mapped BAR1 region.
> ///
> /// Borrows the [`BarUser`] managing the mapping for the lifetime of the access object.
> -pub(crate) struct BarUserAccess<'a> {
> - bar_user: &'a BarUser<'a>,
> +pub(crate) struct BarUserAccess<'access, 'gpu> {
> + bar_user: &'access BarUser<'gpu>,
> /// Cleared only after PTE invalidation and its TLB flush succeed.
> mapped: Option<MappedRange>,
> }
BarUser is covariant in its lifetime, so this can coerce to
&'access BarUser<'access>. So this should just remain BarUserAccess<'a>.