<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/include/drm/ttm, branch update-toolchain</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/include/drm/ttm?h=update-toolchain</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/include/drm/ttm?h=update-toolchain'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2024-06-20T13:47:34Z</updated>
<entry>
<title>drm/ttm: increase ttm pre-fault value to PMD size</title>
<updated>2024-06-20T13:47:34Z</updated>
<author>
<name>Zhu Lingshan</name>
<email>lingshan.zhu@amd.com</email>
</author>
<published>2024-06-04T08:49:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=0ddd2ae586d28e521d37393364d989ce118802e0'/>
<id>urn:sha1:0ddd2ae586d28e521d37393364d989ce118802e0</id>
<content type='text'>
ttm page fault handler ttm_bo_vm_fault_reserved() maps
TTM_BO_VM_NUM_PREFAULT more pages beforehand
due to the principle of locality.

However, on some platform the page faults are more costly, this
patch intends to increase the number of ttm pre-fault to relieve
the number of page faults.

When multiple levels of page table is supported, the new default
value would be the PMD size, similar to huge page.

Signed-off-by: Zhu Lingshan &lt;lingshan.zhu@amd.com&gt;
Reported-and-tested-by: Li Jingxiang &lt;jingxiang.li@ecarxgroup.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240604084934.225738-1-lingshan.zhu@amd.com
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: warn when resv objs are mixed in a bulk_move</title>
<updated>2024-03-20T10:18:10Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2024-03-12T10:37:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5a95f39d9b214d59cbe742002767737e03d43844'/>
<id>urn:sha1:5a95f39d9b214d59cbe742002767737e03d43844</id>
<content type='text'>
The BOs in a bulk move must share all the same reservation object
to make sure that we lock the whole bulk during eviction.

Actually document and enforce that with a warning.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240312105555.3065-1-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/ttm: make ttm_pool.h self-contained</title>
<updated>2024-03-11T09:47:06Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2024-03-08T11:55:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2042ada01519d0751bcffa1434209ffb6b53bf96'/>
<id>urn:sha1:2042ada01519d0751bcffa1434209ffb6b53bf96</id>
<content type='text'>
struct seq_file needs a forward declaration in some configs. Sort the
forward declarations while at it.

Cc: Christian Koenig &lt;christian.koenig@amd.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202403072259.EEC2Vf1X-lkp@intel.com/
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/b92373759bba305ddf8d24fdca345f195400e206.1709898638.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: fix ttm_kmap_iter.h kernel-doc warnings</title>
<updated>2024-03-11T09:47:06Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2024-03-08T11:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c136883b10ce62c4101f96cd27c7f691fa7b9882'/>
<id>urn:sha1:c136883b10ce62c4101f96cd27c7f691fa7b9882</id>
<content type='text'>
There's no proper way to document function pointer members, but at least
silence the warnings.

Cc: Christian Koenig &lt;christian.koenig@amd.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/e80e74ac4b6c5f1df3bc2dd98651ba289aae8e83.1709898638.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: fix ttm_execbuf_util.h kernel-doc warnings</title>
<updated>2024-03-11T09:47:06Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2024-03-08T11:55:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=bc6adc2e340bb3b59f85562ff4f47316015a95ae'/>
<id>urn:sha1:bc6adc2e340bb3b59f85562ff4f47316015a95ae</id>
<content type='text'>
Fix some formatting errors and excess documentation.

Cc: Christian Koenig &lt;christian.koenig@amd.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/b0f6d243c4e5eb1564ef2f4bb5bb834ee2c0305b.1709898638.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: make ttm_caching.h self-contained</title>
<updated>2024-03-11T09:47:06Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2024-03-08T11:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2c6f6831876acabfc917248927e7622fa789eb24'/>
<id>urn:sha1:2c6f6831876acabfc917248927e7622fa789eb24</id>
<content type='text'>
Include &lt;linux/pgtable.h&gt; for pgprot_t.

Cc: Christian Koenig &lt;christian.koenig@amd.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/fb87ab4b4490c53e9ece66d53c4f178ead244cb5.1709898638.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: fix ttm_bo.h kernel-doc warnings</title>
<updated>2024-03-11T09:47:06Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2024-03-08T16:07:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4f51e057c0a28f52fc17824c628cf3123b0ef12f'/>
<id>urn:sha1:4f51e057c0a28f52fc17824c628cf3123b0ef12f</id>
<content type='text'>
Some renames, some formatting fixes, add some missing documentation.

v3: Fix struct ttm_buffer_object .sg documentation (Christian)

Cc: Christian Koenig &lt;christian.koenig@amd.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240308160750.3741833-1-jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: improve idle/busy handling v5</title>
<updated>2024-03-01T16:11:16Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2023-12-06T15:37:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=cc941c70df3927be89dfb875a9b3cec3ef5cf2c8'/>
<id>urn:sha1:cc941c70df3927be89dfb875a9b3cec3ef5cf2c8</id>
<content type='text'>
Previously we would never try to move a BO into the preferred placements
when it ever landed in a busy placement since those were considered
compatible.

Rework the whole handling and finally unify the idle and busy handling.
ttm_bo_validate() is now responsible to try idle placement first and then
use the busy placement if that didn't worked.

Drawback is that we now always try the idle placement first for each
validation which might cause some additional CPU overhead on overcommit.

v2: fix kerneldoc warning and coding style
v3: take care of XE as well
v4: keep the ttm_bo_mem_space functionality as it is for now, only add
    new handling for ttm_bo_validate as suggested by Thomas
v5: fix bug pointed out by Matthew

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Zack Rusin &lt;zack.rusin@broadcom.com&gt; v3
Link: https://patchwork.freedesktop.org/patch/msgid/20240229134003.3688-1-christian.koenig@amd.com
Reviewed-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2024-01-29T13:20:23Z</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2024-01-29T13:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4db102dcb0396a4ccf89b1eac0f4eb3fd167a080'/>
<id>urn:sha1:4db102dcb0396a4ccf89b1eac0f4eb3fd167a080</id>
<content type='text'>
Kickstart 6.9 development cycle.

Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Make sure the mapped tt pages are decrypted when needed</title>
<updated>2024-01-26T19:10:52Z</updated>
<author>
<name>Zack Rusin</name>
<email>zack.rusin@broadcom.com</email>
</author>
<published>2024-01-05T13:51:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=71ce046327cfd3aef3f93d1c44e091395eb03f8f'/>
<id>urn:sha1:71ce046327cfd3aef3f93d1c44e091395eb03f8f</id>
<content type='text'>
Some drivers require the mapped tt pages to be decrypted. In an ideal
world this would have been handled by the dma layer, but the TTM page
fault handling would have to be rewritten to able to do that.

A side-effect of the TTM page fault handling is using a dma allocation
per order (via ttm_pool_alloc_page) which makes it impossible to just
trivially use dma_mmap_attrs. As a result ttm has to be very careful
about trying to make its pgprot for the mapped tt pages match what
the dma layer thinks it is. At the ttm layer it's possible to
deduce the requirement to have tt pages decrypted by checking
whether coherent dma allocations have been requested and the system
is running with confidential computing technologies.

This approach isn't ideal but keeping TTM matching DMAs expectations
for the page properties is in general fragile, unfortunately proper
fix would require a rewrite of TTM's page fault handling.

Fixes vmwgfx with SEV enabled.

v2: Explicitly include cc_platform.h
v3: Use CC_ATTR_GUEST_MEM_ENCRYPT instead of CC_ATTR_MEM_ENCRYPT to
limit the scope to guests and log when memory decryption is enabled.

Signed-off-by: Zack Rusin &lt;zack.rusin@broadcom.com&gt;
Fixes: 3bf3710e3718 ("drm/ttm: Add a generic TTM memcpy move for page-based iomem")
Reviewed-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Huang Rui &lt;ray.huang@amd.com&gt;
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: &lt;stable@vger.kernel.org&gt; # v5.14+
Link: https://patchwork.freedesktop.org/patch/msgid/20230926040359.3040017-1-zack@kde.org
</content>
</entry>
</feed>
