From: sashiko-bot@kernel.org
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v3 6/7] drm/xe/kunit: Test partitioned VRAM manager
Date: Tue, 20 Oct 2026 09:26:06 +0000 [thread overview]
Message-ID: <sashiko-outbox-178728@kernel.org> (raw)
In-Reply-To: <20261020084258.443645-7-piotr.piorkowski@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/xe/kunit: xe_ttm_vram_mgr test included in xe.ko when modular
--
commit 5fbb2803b441b2f0a8dc39a38c6ece7e9b2329ff
Author: Piotr Piórkowski <piotr.piorkowski@intel.com>
drm/xe/kunit: Test partitioned VRAM manager
This commit adds KUnit tests for the partitioned VRAM manager to exercise
partition selection, address lookup, pool usage, and CPU-visible memory
accounting across partitions.
> diff --git a/drivers/gpu/drm/xe/tests/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/tests/xe_ttm_vram_mgr.c
> new file mode 100644
> index 0000000000000..1ad3186e6d5be
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/tests/xe_ttm_vram_mgr.c
> @@ -0,0 +1,147 @@
[ ... ]
> +static struct kunit_suite xe_ttm_vram_mgr_test_suite = {
> + .name = "xe_ttm_vram_mgr",
> + .test_cases = xe_ttm_vram_mgr_tests,
> +};
> +
> +kunit_test_suite(xe_ttm_vram_mgr_test_suite);
> diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> index 83baeec2ef9b1..509f2e2345553 100644
> --- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
> @@ -1303,3 +1303,7 @@ void xe_ttm_vram_debugfs_init(struct xe_device *xe, struct dentry *root)
> return;
> debugfs_create_file("vram_bad_pages", 0444, root, xe, &vram_bad_pages_fops);
> }
> +
> +#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
> +#include "tests/xe_ttm_vram_mgr.c"
> +#endif
[Severity: Medium]
Should this guard use IS_BUILTIN(CONFIG_DRM_XE_KUNIT_TEST) instead of
IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST) (or export the suite to xe_test.ko via
EXPORT_SYMBOL_IF_KUNIT)?
Because CONFIG_DRM_XE_KUNIT_TEST is tristate and tests/xe_ttm_vram_mgr.c
registers xe_ttm_vram_mgr_test_suite via kunit_test_suite(), building with
CONFIG_DRM_XE_KUNIT_TEST=m links the suite into the .kunit_test_suites
section of the core xe driver (xe.ko or vmlinux) rather than a test module.
When xe.ko is loaded (or during boot when built-in),
kunit_module_notify()->kunit_module_init()->kunit_run_tests() will
immediately run xe_ttm_vram_mgr_test_suite and taint the kernel with
TAINT_TEST even when no test module is loaded.
Other inlined unit tests in drivers/gpu/drm/xe/ that use kunit_test_suite()
(such as xe_lmtt.c, xe_log.c, and xe_guc_id_mgr.c) guard the #include with
#if IS_BUILTIN(CONFIG_DRM_XE_KUNIT_TEST).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261020084258.443645-1-piotr.piorkowski@intel.com?part=6
next prev parent reply other threads:[~2026-10-20 9:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 8:42 [PATCH v3 0/7] Introduce purpose-specific VRAM pools Piórkowski, Piotr
2026-10-20 8:42 ` [PATCH v3 1/7] drm/xe: Define partitioned VRAM manager types Piórkowski, Piotr
2026-10-20 8:42 ` [PATCH v3 2/7] drm/xe: Define VRAM regions and pools Piórkowski, Piotr
2026-10-20 8:42 ` [PATCH v3 3/7] drm/xe/vram: Make VRAM pools the allocation handle Piórkowski, Piotr
2026-10-20 8:42 ` [PATCH v3 4/7] drm/xe/ttm: Back each VRAM pool with its own buddy allocator Piórkowski, Piotr
2026-10-20 8:42 ` [PATCH v3 5/7] drm/xe/vram: Allow splitting a region into pools Piórkowski, Piotr
2026-10-20 8:42 ` [PATCH v3 6/7] drm/xe/kunit: Test partitioned VRAM manager Piórkowski, Piotr
2026-10-20 9:26 ` sashiko-bot [this message]
2026-10-20 8:42 ` [PATCH v3 7/7] drm/xe/kunit: Test VRAM pool allocation Piórkowski, Piotr
2026-10-20 8:49 ` ✗ CI.checkpatch: warning for Introduce purpose-specific VRAM pools (rev3) Patchwork
2026-10-20 8:52 ` ✓ CI.KUnit: success " Patchwork
2026-10-20 9:30 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-20 11:24 ` ✗ Xe.CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-178728@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=piotr.piorkowski@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.