lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Jun 2023 08:45:38 +0200
From:   Christian König <christian.koenig@....com>
To:     Danilo Krummrich <dakr@...hat.com>, airlied@...il.com,
        daniel@...ll.ch, tzimmermann@...e.de, mripard@...nel.org,
        corbet@....net, bskeggs@...hat.com, Liam.Howlett@...cle.com,
        matthew.brost@...el.com, boris.brezillon@...labora.com,
        alexdeucher@...il.com, ogabbay@...nel.org, bagasdotme@...il.com,
        willy@...radead.org, jason@...kstrand.net
Cc:     dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        linux-doc@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Donald Robson <donald.robson@...tec.com>,
        Dave Airlie <airlied@...hat.com>
Subject: Re: [PATCH drm-next v5 03/14] drm: manager to keep track of GPUs VA
 mappings

Hi Danilo,

sorry for the delayed reply. I've trying to dig myself out of a hole at 
the moment.

Am 20.06.23 um 02:42 schrieb Danilo Krummrich:
> [SNIP]
> diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
> index bbc721870c13..5ec8148a30ee 100644
> --- a/include/drm/drm_gem.h
> +++ b/include/drm/drm_gem.h
> @@ -36,6 +36,8 @@
>   
>   #include <linux/kref.h>
>   #include <linux/dma-resv.h>
> +#include <linux/list.h>
> +#include <linux/mutex.h>
>   
>   #include <drm/drm_vma_manager.h>
>   
> @@ -379,6 +381,18 @@ struct drm_gem_object {
>   	 */
>   	struct dma_resv _resv;
>   
> +	/**
> +	 * @gpuva:
> +	 *
> +	 * Provides the list of GPU VAs attached to this GEM object.
> +	 *
> +	 * Drivers should lock list accesses with the GEMs &dma_resv lock
> +	 * (&drm_gem_object.resv).
> +	 */
> +	struct {
> +		struct list_head list;
> +	} gpuva;
> +
>   	/**
>   	 * @funcs:
>   	 *

I'm pretty sure that it's not a good idea to attach this directly to the 
GEM object.

As you wrote in the commit message it's highly driver specific what to 
map and where to map it.

Instead I suggest to have a separate structure for mappings in a VA 
space which driver can then add to their GEM objects or whatever they 
want to map into their VMs.

Regards,
Christian.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ