[PATCH i-g-t] tests/intel/xe_fault_injection: Pick a valid PAT index for vm_bind

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Nov 29 16:18:01 UTC 2024


Hi Matt,
On 2024-11-25 at 10:54:32 -0800, Matt Roper wrote:
> The vm_bind helper function in the fault injection test failed to
> specify a PAT index to use for the bind, effectively leaving the index
> as 0.  On Xe2 and Xe3 platforms, index 0 provides non-coherent behavior
> which is incompatible with vm_bind operations on userptr, resulting in a
> test failure before the test even got to the point of intentionally
> injecting errors.
> 
> Fixes: 13e3d5126 ("tests/intel/xe_fault_injection: Inject errors during vm bind IOCTL")
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3499
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>

LGTM,
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  tests/intel/xe_fault_injection.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
> index 7d6c90276..7ae941367 100644
> --- a/tests/intel/xe_fault_injection.c
> +++ b/tests/intel/xe_fault_injection.c
> @@ -18,6 +18,7 @@
>  #include "igt_kmod.h"
>  #include "igt_sysfs.h"
>  #include "lib/igt_syncobj.h"
> +#include "lib/intel_pat.h"
>  #include "xe/xe_ioctl.h"
>  #include "xe/xe_query.h"
>  
> @@ -238,6 +239,7 @@ simple_vm_bind(int fd, uint32_t vm)
>  		.bind.range = BO_SIZE,
>  		.bind.addr = BO_ADDR,
>  		.bind.op = DRM_XE_VM_BIND_OP_MAP_USERPTR,
> +		.bind.pat_index = intel_get_pat_idx_wb(fd),
>  		.bind.flags = 0,
>  		.num_syncs = 1,
>  		.syncs = (uintptr_t)&syncobj,
> -- 
> 2.47.0
> 


More information about the igt-dev mailing list