[Intel-xe] [PATCH 3/3] drm/xe: NULL binding implementation

Zanoni, Paulo R paulo.r.zanoni at intel.com
Wed Jun 14 18:48:38 UTC 2023


On Wed, 2023-06-07 at 22:03 -0700, Matthew Brost wrote:
> Add uAPI and implementation for NULL bindings. A NULL binding is defined
> as writes dropped and read zero. A single bit in the uAPI has been added
> which results in a single bit in the PTEs being set.
> 
> NULL bindings are indended to be used to implement VK sparse bindings,
> in particular residencyNonResidentStrict property.

I tried to test this on my Mesa Sparse branch, and I'm getting BUG()s.
The interesting thing about this is that multiple BUG()s are competing
to appear on dmesg at the same time. Perhaps there's some kind of race
condition here? I'd happily try experimental patches for this.

[  582.816170] ------------[ cut here ]------------
[  582.816170] ------------[ cut here ]------------
[  582.816172] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  582.816173] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  582.816180] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[  582.816183] CPU: 0 PID: 18152 Comm: deqp-vk Tainted: G        W          6.3.0pz+ #90
[  582.816185] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  582.816186] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  582.816245] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  582.816246] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  582.816248] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  582.816249] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  582.816250] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  582.816251] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  582.816252] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  582.816253] FS:  00007f9088034740(0000) GS:ffff8a4060400000(0000) knlGS:0000000000000000
[  582.816254] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  582.816256] CR2: 000055c1f75fc1a4 CR3: 000000013c396002 CR4: 0000000000770ef0
[  582.816257] PKRU: 55555554
[  582.816258] Call Trace:
[  582.816260]  <TASK>
[  582.816262]  ? xe_vma_create+0x59/0x2d0 [xe]
[  582.816304]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  582.816345]  ? update_load_avg+0x7e/0x780
[  582.816348]  ? __cgroup_account_cputime+0x4c/0x70
[  582.816351]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  582.816391]  ? psi_group_change+0x152/0x3d0
[  582.816394]  ? select_task_rq_fair+0x174/0x1720
[  582.816396]  ? _raw_spin_lock_irqsave+0x23/0x50
[  582.816399]  ? lock_timer_base+0x61/0x80
[  582.816401]  ? preempt_count_add+0x6a/0xa0
[  582.816404]  ? _raw_spin_unlock+0x15/0x30
[  582.816406]  ? drm_syncobj_find+0x49/0x80 [drm]
[  582.816434]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  582.816473]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  582.816514]  ? tomoyo_init_request_info+0x95/0xc0
[  582.816516]  ? tomoyo_path_number_perm+0x68/0x1d0
[  582.816519]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  582.816540]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  582.816581]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  582.816606]  drm_ioctl+0x24c/0x490 [drm]
[  582.816628]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  582.816669]  __x64_sys_ioctl+0x8d/0xd0
[  582.816672]  do_syscall_64+0x37/0x90
[  582.816674]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  582.816678] RIP: 0033:0x7f9087d1cafb
[  582.816679] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  582.816681] RSP: 002b:00007ffd011743e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  582.816682] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9087d1cafb
[  582.816683] RDX: 00007ffd011744c0 RSI: 0000000040786445 RDI: 000000000000000e
[  582.816684] RBP: 00007ffd01174470 R08: 0000000000000000 R09: 0000000000000078
[  582.816685] R10: 00007ffd011721e3 R11: 0000000000000246 R12: 0000000000000000
[  582.816686] R13: 00007ffd011763a8 R14: 0000000000000000 R15: 00007f908847c020
[  582.816687]  </TASK>
[  582.816687] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  582.816717]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  582.816749]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  582.816754] ---[ end trace 0000000000000000 ]---
[  582.816755] invalid opcode: 0000 [#2] PREEMPT SMP NOPTI
[  582.816757] CPU: 1 PID: 18149 Comm: deqp-vk Tainted: G      D W          6.3.0pz+ #90
[  582.816759] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  582.816760] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  582.816809] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  582.816811] RSP: 0018:ffffa6170f327a40 EFLAGS: 00010202
[  582.816812] RAX: ffff8a3cc48d5f40 RBX: ffff8a3dfe41d200 RCX: 0000000000000002
[  582.816813] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3dfe6c9200
[  582.816814] RBP: ffff8a3f0c6c6400 R08: ffff8a3dfe6c9260 R09: 0000000000000001
[  582.816815] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  582.816816] R13: 0000000000020000 R14: ffff8a3dfe6c9200 R15: ffff8a3dfe6c9200
[  582.816817] FS:  00007f0c7e81f740(0000) GS:ffff8a4060440000(0000) knlGS:0000000000000000
[  582.816818] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  582.816819] CR2: 000055e47877c1a4 CR3: 000000013c2a2005 CR4: 0000000000770ee0
[  582.816820] PKRU: 55555554
[  582.816821] Call Trace:
[  582.816822]  <TASK>
[  582.816824]  ? xe_vma_create+0x59/0x2d0 [xe]
[  582.816865]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  582.816906]  ? update_load_avg+0x7e/0x780
[  582.816908]  ? __cgroup_account_cputime+0x4c/0x70
[  582.816910]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  582.816950]  ? psi_group_change+0x152/0x3d0
[  582.816952]  ? select_task_rq_fair+0x174/0x1720
[  582.816954]  ? _raw_spin_lock_irqsave+0x23/0x50
[  582.816957]  ? _raw_spin_lock_irqsave+0x23/0x50
[  582.816959]  ? preempt_count_add+0x6a/0xa0
[  582.816961]  ? _raw_spin_unlock+0x15/0x30
[  582.816963]  ? drm_syncobj_find+0x49/0x80 [drm]
[  582.816986]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  582.817027]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  582.817068]  ? tomoyo_init_request_info+0x95/0xc0
[  582.817070]  ? tomoyo_path_number_perm+0x68/0x1d0
[  582.817072]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  582.817094]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  582.817135]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  582.817160]  drm_ioctl+0x24c/0x490 [drm]
[  582.817183]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  582.817234]  __x64_sys_ioctl+0x8d/0xd0
[  582.817237]  do_syscall_64+0x37/0x90
[  582.817240]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  582.817243] RIP: 0033:0x7f0c7e43dafb
[  582.817245] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  582.817246] RSP: 002b:00007ffcbf6e36e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  582.817248] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0c7e43dafb
[  582.817249] RDX: 00007ffcbf6e37c0 RSI: 0000000040786445 RDI: 000000000000000e
[  582.817250] RBP: 00007ffcbf6e3770 R08: 0000000000000000 R09: 0000000000000078
[  582.817251] R10: 00007ffcbf6e14e3 R11: 0000000000000246 R12: 0000000000000000
[  582.817252] R13: 00007ffcbf6e56a8 R14: 0000000000000000 R15: 00007f0c7eb13020
[  582.817253]  </TASK>
[  582.817254] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  582.817288]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  582.817324]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  582.817341] ---[ end trace 0000000000000000 ]---
[  583.825648] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  583.825739] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  583.825741] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  583.825744] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  583.825746] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  583.825748] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  583.825749] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  583.825750] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  583.825752] FS:  00007f9088034740(0000) GS:ffff8a4060400000(0000) knlGS:0000000000000000
[  583.825754] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  583.825756] CR2: 000055c1f75fc1a4 CR3: 000000013c396002 CR4: 0000000000770ef0
[  583.825757] PKRU: 55555554
[  584.824359] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  584.824440] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  584.824442] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  584.824445] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  584.824446] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  584.824448] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  584.824449] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  584.824450] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  584.824451] FS:  00007f0c7e81f740(0000) GS:ffff8a4060440000(0000) knlGS:0000000000000000
[  584.824453] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  584.824454] CR2: 000055e47877c1a4 CR3: 000000013c2a2005 CR4: 0000000000770ee0
[  584.824456] PKRU: 55555554
[  584.923394] ------------[ cut here ]------------
[  584.923398] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  584.923413] invalid opcode: 0000 [#3] PREEMPT SMP NOPTI
[  584.923416] CPU: 5 PID: 18148 Comm: deqp-vk Tainted: G      D W          6.3.0pz+ #90
[  584.923418] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  584.923420] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  584.923492] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  584.923494] RSP: 0018:ffffa6170f3afa40 EFLAGS: 00010202
[  584.923497] RAX: ffff8a3cc8455f40 RBX: ffff8a3dfe6ad200 RCX: 0000000000000002
[  584.923499] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3dfe6af800
[  584.923500] RBP: ffff8a3f0c74e000 R08: ffff8a3dfe6af860 R09: 0000000000000001
[  584.923501] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  584.923502] R13: 0000000000020000 R14: ffff8a3dfe6af800 R15: ffff8a3dfe6af800
[  584.923503] FS:  00007f6e7e01c740(0000) GS:ffff8a4060540000(0000) knlGS:0000000000000000
[  584.923504] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  584.923505] CR2: 00005639e8e701a4 CR3: 000000018b27c003 CR4: 0000000000770ee0
[  584.923507] PKRU: 55555554
[  584.923508] Call Trace:
[  584.923511]  <TASK>
[  584.923513]  ? xe_vma_create+0x59/0x2d0 [xe]
[  584.923569]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  584.923610]  ? update_load_avg+0x7e/0x780
[  584.923613]  ? __cgroup_account_cputime+0x4c/0x70
[  584.923616]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  584.923655]  ? psi_group_change+0x152/0x3d0
[  584.923658]  ? select_task_rq_fair+0x174/0x1720
[  584.923660]  ? _raw_spin_lock_irqsave+0x23/0x50
[  584.923663]  ? lock_timer_base+0x61/0x80
[  584.923665]  ? preempt_count_add+0x6a/0xa0
[  584.923667]  ? _raw_spin_unlock+0x15/0x30
[  584.923670]  ? drm_syncobj_find+0x49/0x80 [drm]
[  584.923697]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  584.923737]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  584.923776]  ? tomoyo_init_request_info+0x95/0xc0
[  584.923780]  ? tomoyo_path_number_perm+0x68/0x1d0
[  584.923782]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  584.923803]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  584.923842]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  584.923870]  drm_ioctl+0x24c/0x490 [drm]
[  584.923893]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  584.923938]  __x64_sys_ioctl+0x8d/0xd0
[  584.923942]  do_syscall_64+0x37/0x90
[  584.923944]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  584.923948] RIP: 0033:0x7f6e7dc3dafb
[  584.923949] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  584.923951] RSP: 002b:00007ffcc1247030 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  584.923952] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6e7dc3dafb
[  584.923953] RDX: 00007ffcc1247110 RSI: 0000000040786445 RDI: 000000000000000e
[  584.923954] RBP: 00007ffcc12470c0 R08: 0000000000000000 R09: 0000000000000078
[  584.923955] R10: 00007ffcc1244e33 R11: 0000000000000246 R12: 0000000000000000
[  584.923956] R13: 00007ffcc1248ff8 R14: 0000000000000000 R15: 00007f6e7e378020
[  584.923957]  </TASK>
[  584.923958] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  584.923991]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  584.924025]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  584.924031] ---[ end trace 0000000000000000 ]---
[  586.008597] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  586.008679] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  586.008681] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  586.008684] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  586.008685] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  586.008687] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  586.008688] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  586.008689] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  586.008691] FS:  00007f6e7e01c740(0000) GS:ffff8a4060540000(0000) knlGS:0000000000000000
[  586.008692] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  586.008694] CR2: 00005639e8e701a4 CR3: 000000018b27c003 CR4: 0000000000770ee0
[  586.008695] PKRU: 55555554
[  586.010521] ------------[ cut here ]------------
[  586.010524] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  586.010531] invalid opcode: 0000 [#4] PREEMPT SMP NOPTI
[  586.010534] CPU: 6 PID: 18150 Comm: deqp-vk Tainted: G      D W          6.3.0pz+ #90
[  586.010537] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  586.010538] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  586.010616] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  586.010618] RSP: 0018:ffffa6170f3b7a40 EFLAGS: 00010202
[  586.010621] RAX: ffff8a3d273b5f40 RBX: ffff8a3f0c45d000 RCX: 0000000000000002
[  586.010622] RDX: 0000000000000013 RSI: ffff8a3cc1f14000 RDI: ffff8a3f0c483000
[  586.010623] RBP: ffff8a3d20083800 R08: ffff8a3f0c483060 R09: 0000000000000001
[  586.010625] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  586.010626] R13: 0000000000020000 R14: ffff8a3f0c483000 R15: ffff8a3f0c483000
[  586.010627] FS:  00007ff676bb2740(0000) GS:ffff8a4060580000(0000) knlGS:0000000000000000
[  586.010628] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  586.010630] CR2: 000056437f23d1a4 CR3: 00000002c5f46002 CR4: 0000000000770ee0
[  586.010632] PKRU: 55555554
[  586.010632] Call Trace:
[  586.010635]  <TASK>
[  586.010638]  ? xe_vma_create+0x59/0x2d0 [xe]
[  586.010702]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  586.010764]  ? update_load_avg+0x7e/0x780
[  586.010768]  ? __cgroup_account_cputime+0x4c/0x70
[  586.010772]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  586.010833]  ? psi_group_change+0x152/0x3d0
[  586.010837]  ? select_task_rq_fair+0x174/0x1720
[  586.010840]  ? _raw_spin_lock_irqsave+0x23/0x50
[  586.010844]  ? lock_timer_base+0x61/0x80
[  586.010846]  ? preempt_count_add+0x6a/0xa0
[  586.010849]  ? _raw_spin_unlock+0x15/0x30
[  586.010852]  ? drm_syncobj_find+0x49/0x80 [drm]
[  586.010889]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  586.010955]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  586.011018]  ? tomoyo_init_request_info+0x95/0xc0
[  586.011022]  ? tomoyo_path_number_perm+0x68/0x1d0
[  586.011024]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  586.011064]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  586.011124]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  586.011161]  drm_ioctl+0x24c/0x490 [drm]
[  586.011193]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  586.011261]  __x64_sys_ioctl+0x8d/0xd0
[  586.011265]  do_syscall_64+0x37/0x90
[  586.011268]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  586.011272] RIP: 0033:0x7ff676d1cafb
[  586.011275] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  586.011276] RSP: 002b:00007ffeacdccf10 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  586.011279] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff676d1cafb
[  586.011280] RDX: 00007ffeacdccff0 RSI: 0000000040786445 RDI: 000000000000000e
[  586.011281] RBP: 00007ffeacdccfa0 R08: 0000000000000000 R09: 0000000000000078
[  586.011283] R10: 00007ffeacdcad13 R11: 0000000000000246 R12: 0000000000000000
[  586.011284] R13: 00007ffeacdceed8 R14: 0000000000000000 R15: 00007ff6774af020
[  586.011286]  </TASK>
[  586.011287] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  586.011337]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  586.011390]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  586.011398] ---[ end trace 0000000000000000 ]---
[  586.137384] ------------[ cut here ]------------
[  586.137390] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  586.137397] invalid opcode: 0000 [#5] PREEMPT SMP NOPTI
[  586.137401] CPU: 7 PID: 18153 Comm: deqp-vk Tainted: G      D W          6.3.0pz+ #90
[  586.137404] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  586.137406] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  586.137488] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  586.137490] RSP: 0018:ffffa6170f3cfa40 EFLAGS: 00010202
[  586.137493] RAX: ffff8a3d41f75f40 RBX: ffff8a3f0c24de00 RCX: 0000000000000002
[  586.137495] RDX: 0000000000000013 RSI: ffff8a3cc1f14000 RDI: ffff8a3f0c24c000
[  586.137496] RBP: ffff8a3cc6177c00 R08: ffff8a3f0c24c060 R09: 0000000000000001
[  586.137498] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  586.137499] R13: 0000000000020000 R14: ffff8a3f0c24c000 R15: ffff8a3f0c24c000
[  586.137501] FS:  00007fc966258740(0000) GS:ffff8a40605c0000(0000) knlGS:0000000000000000
[  586.137503] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  586.137504] CR2: 00007fc963c90a9a CR3: 00000002c5ca6001 CR4: 0000000000770ee0
[  586.137506] PKRU: 55555554
[  586.137507] Call Trace:
[  586.137510]  <TASK>
[  586.137513]  ? xe_vma_create+0x59/0x2d0 [xe]
[  586.137576]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  586.137638]  ? update_load_avg+0x7e/0x780
[  586.137642]  ? __cgroup_account_cputime+0x4c/0x70
[  586.137646]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  586.137705]  ? psi_group_change+0x152/0x3d0
[  586.137710]  ? select_task_rq_fair+0x174/0x1720
[  586.137713]  ? _raw_spin_lock_irqsave+0x23/0x50
[  586.137717]  ? lock_timer_base+0x61/0x80
[  586.137720]  ? preempt_count_add+0x6a/0xa0
[  586.137723]  ? _raw_spin_unlock+0x15/0x30
[  586.137726]  ? drm_syncobj_find+0x49/0x80 [drm]
[  586.137765]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  586.137826]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  586.137887]  ? tomoyo_init_request_info+0x95/0xc0
[  586.137891]  ? tomoyo_path_number_perm+0x68/0x1d0
[  586.137894]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  586.137925]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  586.137985]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  586.138017]  drm_ioctl+0x24c/0x490 [drm]
[  586.138047]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  586.138107]  __x64_sys_ioctl+0x8d/0xd0
[  586.138112]  do_syscall_64+0x37/0x90
[  586.138115]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  586.138119] RIP: 0033:0x7fc96643dafb
[  586.138122] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  586.138124] RSP: 002b:00007ffc7383a720 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  586.138127] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc96643dafb
[  586.138128] RDX: 00007ffc7383a800 RSI: 0000000040786445 RDI: 000000000000000e
[  586.138130] RBP: 00007ffc7383a7b0 R08: 0000000000000000 R09: 0000000000000078
[  586.138131] R10: 00007ffc73838523 R11: 0000000000000246 R12: 0000000000000000
[  586.138132] R13: 00007ffc7383c6e8 R14: 0000000000000000 R15: 00007fc966b56020
[  586.138135]  </TASK>
[  586.138136] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  586.138183]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  586.138236]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  586.138245] ---[ end trace 0000000000000000 ]---
[  586.203830] ------------[ cut here ]------------
[  586.203834] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  586.203841] invalid opcode: 0000 [#6] PREEMPT SMP NOPTI
[  586.203844] CPU: 3 PID: 18151 Comm: deqp-vk Tainted: G      D W          6.3.0pz+ #90
[  586.203846] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  586.203848] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  586.203920] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  586.203921] RSP: 0018:ffffa6170f3bfa40 EFLAGS: 00010202
[  586.203924] RAX: ffff8a3cc6cedf40 RBX: ffff8a3e36f7be00 RCX: 0000000000000002
[  586.203925] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3e36f7a400
[  586.203926] RBP: ffff8a3eed3e9000 R08: ffff8a3e36f7a460 R09: 0000000000000001
[  586.203927] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  586.203928] R13: 0000000000020000 R14: ffff8a3e36f7a400 R15: ffff8a3e36f7a400
[  586.203929] FS:  00007ff5022c2740(0000) GS:ffff8a40604c0000(0000) knlGS:0000000000000000
[  586.203930] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  586.203931] CR2: 00005637548a21a4 CR3: 0000000487fe8003 CR4: 0000000000770ee0
[  586.203933] PKRU: 55555554
[  586.203933] Call Trace:
[  586.203936]  <TASK>
[  586.203938]  ? xe_vma_create+0x59/0x2d0 [xe]
[  586.203985]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  586.204031]  ? update_load_avg+0x7e/0x780
[  586.204035]  ? __cgroup_account_cputime+0x4c/0x70
[  586.204038]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  586.204081]  ? psi_group_change+0x152/0x3d0
[  586.204084]  ? select_task_rq_fair+0x174/0x1720
[  586.204087]  ? _raw_spin_lock_irqsave+0x23/0x50
[  586.204090]  ? lock_timer_base+0x61/0x80
[  586.204092]  ? preempt_count_add+0x6a/0xa0
[  586.204095]  ? _raw_spin_unlock+0x15/0x30
[  586.204098]  ? drm_syncobj_find+0x49/0x80 [drm]
[  586.204131]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  586.204176]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  586.204220]  ? tomoyo_init_request_info+0x95/0xc0
[  586.204224]  ? tomoyo_path_number_perm+0x68/0x1d0
[  586.204226]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  586.204249]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  586.266200]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  586.266241]  drm_ioctl+0x24c/0x490 [drm]
[  586.266273]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  586.266332]  __x64_sys_ioctl+0x8d/0xd0
[  586.266336]  do_syscall_64+0x37/0x90
[  586.266340]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  586.266345] RIP: 0033:0x7ff5024fcafb
[  586.266348] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  586.266350] RSP: 002b:00007ffdca7cde00 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  586.266353] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff5024fcafb
[  586.266354] RDX: 00007ffdca7cdee0 RSI: 0000000040786445 RDI: 000000000000000e
[  586.266355] RBP: 00007ffdca7cde90 R08: 0000000000000000 R09: 0000000000000078
[  586.266357] R10: 00007ffdca7cbc03 R11: 0000000000000246 R12: 0000000000000000
[  586.266358] R13: 00007ffdca7cfdc8 R14: 0000000000000000 R15: 00007ff502bc0020
[  586.266361]  </TASK>
[  586.266362] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  586.266414]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  586.266469]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  586.266495] ---[ end trace 0000000000000000 ]---
[  586.961460] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  586.961541] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  586.961542] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  586.961545] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  586.961546] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  586.961548] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  586.961549] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  586.961550] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  586.961551] FS:  00007ff676bb2740(0000) GS:ffff8a4060580000(0000) knlGS:0000000000000000
[  586.961552] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  586.961553] CR2: 000056437f23d1a4 CR3: 00000002c5f46002 CR4: 0000000000770ee0
[  586.961555] PKRU: 55555554
[  587.916215] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  587.916313] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  587.916316] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  587.916318] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  587.916321] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  587.916322] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  587.916323] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  587.916325] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  587.916326] FS:  00007fc966258740(0000) GS:ffff8a40605c0000(0000) knlGS:0000000000000000
[  587.916328] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  587.916330] CR2: 00007fc963c90a9a CR3: 00000002c5ca6001 CR4: 0000000000770ee0
[  587.916331] PKRU: 55555554
[  588.857849] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  588.857933] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  588.857935] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  588.857937] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  588.857938] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  588.857939] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  588.857940] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  588.857941] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  588.857942] FS:  00007ff5022c2740(0000) GS:ffff8a40604c0000(0000) knlGS:0000000000000000
[  588.857943] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  588.857944] CR2: 00005637548a21a4 CR3: 0000000487fe8003 CR4: 0000000000770ee0
[  588.857960] PKRU: 55555554
[  702.893558] ------------[ cut here ]------------
[  702.893562] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  702.893568] invalid opcode: 0000 [#7] PREEMPT SMP NOPTI
[  702.893571] CPU: 1 PID: 18205 Comm: deqp-vk Tainted: G      D W          6.3.0pz+ #90
[  702.893572] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  702.893573] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  702.893631] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  702.893632] RSP: 0018:ffffa6170f5d3a40 EFLAGS: 00010202
[  702.893634] RAX: ffff8a3cdb7d3f80 RBX: ffff8a3e36fc2e00 RCX: 0000000000000002
[  702.893635] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3e36fc0e00
[  702.893636] RBP: ffff8a4047e6d800 R08: ffff8a3e36fc0e60 R09: 0000000000000001
[  702.893637] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  702.893638] R13: 0000000000020000 R14: ffff8a3e36fc0e00 R15: ffff8a3e36fc0e00
[  702.893639] FS:  00007f5c1292f740(0000) GS:ffff8a4060440000(0000) knlGS:0000000000000000
[  702.893640] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  702.893641] CR2: 00007f5c0f107000 CR3: 000000015c374005 CR4: 0000000000770ee0
[  702.893642] PKRU: 55555554
[  702.893643] Call Trace:
[  702.893645]  <TASK>
[  702.893647]  ? xe_vma_create+0x59/0x2d0 [xe]
[  702.893689]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  702.893730]  ? update_load_avg+0x7e/0x780
[  702.893733]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  702.893771]  ? ___slab_alloc+0x4d5/0x9a0
[  702.893774]  ? xe_vm_bind_ioctl+0xf96/0x2430 [xe]
[  702.893812]  ? xe_vm_bind_ioctl+0xf96/0x2430 [xe]
[  702.893849]  ? preempt_count_add+0x6a/0xa0
[  702.893852]  ? _raw_spin_unlock+0x15/0x30
[  702.893855]  ? drm_syncobj_find+0x49/0x80 [drm]
[  702.893883]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  702.893922]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  702.893961]  ? tomoyo_init_request_info+0x95/0xc0
[  702.893963]  ? tomoyo_path_number_perm+0x68/0x1d0
[  702.893965]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  702.893986]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  702.894024]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  702.894049]  drm_ioctl+0x24c/0x490 [drm]
[  702.894070]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  702.894109]  __x64_sys_ioctl+0x8d/0xd0
[  702.894112]  do_syscall_64+0x37/0x90
[  702.894114]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  702.894118] RIP: 0033:0x7f5c12b1cafb
[  702.894119] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  702.894121] RSP: 002b:00007ffe4ff4caf0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  702.894122] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5c12b1cafb
[  702.894123] RDX: 00007ffe4ff4cbd0 RSI: 0000000040786445 RDI: 000000000000000e
[  702.894124] RBP: 00007ffe4ff4cb80 R08: 0000000000000000 R09: 0000000000000078
[  702.894125] R10: 00007ffe4ff4a8f3 R11: 0000000000000246 R12: 0000000000000000
[  702.894125] R13: 00007ffe4ff4eab8 R14: 0000000000000000 R15: 00007f5c1322b020
[  702.894127]  </TASK>
[  702.894127] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  702.894157]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  702.894189]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  702.894194] ---[ end trace 0000000000000000 ]---
[  703.331800] ------------[ cut here ]------------
[  703.331804] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:67!
[  703.331810] invalid opcode: 0000 [#8] PREEMPT SMP NOPTI
[  703.331813] CPU: 7 PID: 18207 Comm: deqp-vk Tainted: G      D W          6.3.0pz+ #90
[  703.331815] Hardware name: ASUSTeK COMPUTER INC. ZenBook UX325EA_UX325EA/UX325EA, BIOS UX325EA.316 06/10/2022
[  703.331816] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  703.331874] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  703.331876] RSP: 0018:ffffa6170f5e3a40 EFLAGS: 00010202
[  703.331878] RAX: ffff8a3d20bd9fc0 RBX: ffff8a3e36f88400 RCX: 0000000000000002
[  703.331879] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3ecd756200
[  703.331880] RBP: ffff8a3eb86d6400 R08: ffff8a3ecd756260 R09: 0000000000000001
[  703.331881] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  703.331881] R13: 0000000000020000 R14: ffff8a3ecd756200 R15: ffff8a3ecd756200
[  703.331882] FS:  00007f924fc1d740(0000) GS:ffff8a40605c0000(0000) knlGS:0000000000000000
[  703.331884] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  703.331885] CR2: 00007f9240000020 CR3: 00000002c5ee6001 CR4: 0000000000770ee0
[  703.331886] PKRU: 55555554
[  703.331887] Call Trace:
[  703.331889]  <TASK>
[  703.331891]  ? xe_vma_create+0x59/0x2d0 [xe]
[  703.331933]  vm_bind_ioctl_lookup_vma+0xc21/0xef0 [xe]
[  703.331974]  ? __vm_bind_ioctl_lookup_vma.constprop.0+0x8f/0x150 [xe]
[  703.332010]  ? _raw_spin_lock+0x13/0x40
[  703.332014]  ? psi_group_change+0x152/0x3d0
[  703.332018]  ? select_task_rq_fair+0x174/0x1720
[  703.332021]  ? _raw_spin_lock_irqsave+0x23/0x50
[  703.332023]  ? preempt_count_add+0x6a/0xa0
[  703.332025]  ? _raw_spin_unlock+0x15/0x30
[  703.332028]  ? drm_syncobj_find+0x49/0x80 [drm]
[  703.332055]  ? xe_sync_entry_parse+0xcd/0x640 [xe]
[  703.332095]  xe_vm_bind_ioctl+0x122a/0x2430 [xe]
[  703.332134]  ? tomoyo_init_request_info+0x95/0xc0
[  703.332137]  ? tomoyo_path_number_perm+0x68/0x1d0
[  703.332139]  ? drm_syncobj_get_handle+0x74/0x100 [drm]
[  703.332160]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  703.332198]  drm_ioctl_kernel+0xbe/0x160 [drm]
[  703.332222]  drm_ioctl+0x24c/0x490 [drm]
[  703.332244]  ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe]
[  703.332283]  __x64_sys_ioctl+0x8d/0xd0
[  703.332286]  do_syscall_64+0x37/0x90
[  703.332288]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[  703.332291] RIP: 0033:0x7f924f83dafb
[  703.332293] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[  703.332294] RSP: 002b:00007ffce8a0d910 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  703.332295] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f924f83dafb
[  703.332296] RDX: 00007ffce8a0d9f0 RSI: 0000000040786445 RDI: 000000000000000e
[  703.332297] RBP: 00007ffce8a0d9a0 R08: 0000000000000000 R09: 0000000000000078
[  703.332298] R10: 00007ffce8a0b713 R11: 0000000000000246 R12: 0000000000000000
[  703.332299] R13: 00007ffce8a0f8d8 R14: 0000000000000000 R15: 00007f924ff11020
[  703.332300]  </TASK>
[  703.332301] Modules linked in: ccm rfcomm cmac algif_hash algif_skcipher af_alg qrtr bnep nls_ascii nls_cp437 vfat fat snd_ctl_led snd_soc_skl_hda_dsp snd_soc_intel_hda_dsp_common snd_soc_hdac_hdmi snd_sof_probes snd_soc_dmic joydev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel btmtk snd_sof_pci_intel_tgl snd_sof_intel_hda_common x86_pkg_temp_thermal intel_powerclamp coretemp snd_soc_acpi_intel_match snd_soc_hdac_hda snd_sof_pci kvm_intel snd_sof_xtensa_dsp iwlmvm bluetooth snd_sof_intel_hda kvm mac80211 snd_sof snd_sof_utils snd_hda_ext_core snd_soc_acpi libarc4 irqbypass crc32_pclmul snd_soc_core jitterentropy_rng ghash_clmulni_intel snd_compress iwlwifi sha512_ssse3 snd_hda_intel sha512_generic snd_intel_dspcfg mei_hdcp intel_rapl_msr ctr snd_hda_codec uvcvideo cfg80211 asus_nb_wmi drbg aesni_intel videobuf2_vmalloc videobuf2_memops asus_wmi snd_hwdep uvc ansi_cprng videobuf2_v4l2 crypto_simd ledtrig_audio cryptd ecdh_generic sparse_keymap snd_hda_core ecc platform_profile
[  703.332330]  iTCO_wdt videodev snd_pcm intel_pmc_bxt intel_cstate iTCO_vendor_support intel_uncore videobuf2_common mc pcspkr watchdog processor_thermal_device_pci_legacy snd_timer mei_me wmi_bmof intel_soc_dts_iosf snd processor_thermal_device ucsi_acpi mei soundcore processor_thermal_rfim typec_ucsi processor_thermal_mbox rfkill processor_thermal_rapl roles typec intel_rapl_common int3403_thermal battery int340x_thermal_zone int3400_thermal intel_pmc_core button acpi_thermal_rel acpi_tad acpi_pad evdev hid_multitouch serio_raw msr parport_pc ppdev lp parport fuse efi_pstore configfs efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 r8152 mii nvme nvme_core t10_pi crc64_rocksoft crc64 crc_t10dif crct10dif_generic xe hid_generic drm_ttm_helper ttm i2c_algo_bit gpu_sched drm_buddy drm_suballoc_helper drm_display_helper drm_kms_helper rtsx_pci_sdmmc xhci_pci mmc_core xhci_hcd crct10dif_pclmul drm crct10dif_common crc32c_intel usbcore rtsx_pci i2c_i801 intel_lpss_pci cec i2c_smbus i2c_hid_acpi
[  703.332362]  intel_lpss rc_core i2c_hid idma64 vmd usb_common hid video wmi
[  703.332367] ---[ end trace 0000000000000000 ]---
[  703.934202] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  703.934284] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  703.934287] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  703.934290] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  703.934292] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  703.934293] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  703.934295] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  703.934296] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  703.934298] FS:  00007f5c1292f740(0000) GS:ffff8a4060440000(0000) knlGS:0000000000000000
[  703.934300] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  703.934301] CR2: 00007f5c0f107000 CR3: 000000015c374005 CR4: 0000000000770ee0
[  703.934314] PKRU: 55555554
[  704.939954] RIP: 0010:xe_vma_userptr_pin_pages+0x23/0x400 [xe]
[  704.940023] Code: 90 90 90 90 90 90 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 65 48 8b 04 25 c0 13 03 00 48 83 ec 40 48 83 7f 38 00 74 02 <0f> 0b 8b 4f 30 49 89 fe f6 c1 02 75 f3 48 8b 57 18 48 8b 80 e0 08
[  704.940025] RSP: 0018:ffffa6170f3c7a40 EFLAGS: 00010202
[  704.940027] RAX: ffff8a3d28398000 RBX: ffff8a3da44cce00 RCX: 0000000000000002
[  704.940028] RDX: 0000000000000017 RSI: ffff8a3cc1f14000 RDI: ffff8a3da44cee00
[  704.940029] RBP: ffff8a3cd4e5f400 R08: ffff8a3da44cee60 R09: 0000000000000001
[  704.940030] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
[  704.940030] R13: 0000000000020000 R14: ffff8a3da44cee00 R15: ffff8a3da44cee00
[  704.940031] FS:  00007f924fc1d740(0000) GS:ffff8a40605c0000(0000) knlGS:0000000000000000
[  704.940032] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  704.940033] CR2: 00007f9240000020 CR3: 00000002c5ee6001 CR4: 0000000000770ee0
[  704.940035] PKRU: 55555554
[  705.036071] ------------[ cut here ]------------



Suggested-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
 drivers/gpu/drm/xe/xe_bo.h           |  1 +
 drivers/gpu/drm/xe/xe_exec.c         |  2 +
 drivers/gpu/drm/xe/xe_gt_pagefault.c |  4 +-
 drivers/gpu/drm/xe/xe_pt.c           | 71 +++++++++++++++------
 drivers/gpu/drm/xe/xe_vm.c           | 95 ++++++++++++++++++----------
 drivers/gpu/drm/xe/xe_vm.h           | 12 +++-
 drivers/gpu/drm/xe/xe_vm_types.h     |  1 +
 include/uapi/drm/xe_drm.h            |  8 +++
 8 files changed, 138 insertions(+), 56 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
index dd3d448fee0b..3a148cc6e811 100644
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
@@ -61,6 +61,7 @@
 #define XE_PPGTT_PTE_LM			BIT_ULL(11)
 #define XE_PDE_64K			BIT_ULL(6)
 #define XE_PTE_PS64			BIT_ULL(8)
+#define XE_PTE_NULL			BIT_ULL(9)
 



 #define XE_PAGE_PRESENT			BIT_ULL(0)
 #define XE_PAGE_RW			BIT_ULL(1)
diff --git a/drivers/gpu/drm/xe/xe_exec.c b/drivers/gpu/drm/xe/xe_exec.c
index e44076ee2e11..4f7694a29348 100644
--- a/drivers/gpu/drm/xe/xe_exec.c
+++ b/drivers/gpu/drm/xe/xe_exec.c
@@ -120,6 +120,8 @@ static int xe_exec_begin(struct xe_engine *e, struct ww_acquire_ctx *ww,
 	 * to a location where the GPU can access it).
 	 */
 	list_for_each_entry(vma, &vm->rebind_list, rebind_link) {
+		XE_WARN_ON(xe_vma_is_null(vma));
+
 		if (xe_vma_is_userptr(vma))
 			continue;
 



diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
index 73db7f7c0381..6faebd02f3fb 100644
--- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
+++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
@@ -533,8 +533,8 @@ static int handle_acc(struct xe_gt *gt, struct acc *acc)
 



 	trace_xe_vma_acc(vma);
 



-	/* Userptr can't be migrated, nothing to do */
-	if (xe_vma_is_userptr(vma))
+	/* Userptr or null can't be migrated, nothing to do */
+	if (xe_vma_has_no_bo(vma))
 		goto unlock_vm;
 



 	/* Lock VM and BOs dma-resv */
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 39ec94549439..265ee45bee5c 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -81,7 +81,9 @@ u64 gen8_pde_encode(struct xe_bo *bo, u64 bo_offset,
 static dma_addr_t vma_addr(struct xe_vma *vma, u64 offset,
 			   size_t page_size, bool *is_vram)
 {
-	if (xe_vma_is_userptr(vma)) {
+	if (xe_vma_is_null(vma)) {
+		return 0;
+	} else if (xe_vma_is_userptr(vma)) {
 		struct xe_res_cursor cur;
 		u64 page;
 



@@ -559,6 +561,10 @@ static bool xe_pt_hugepte_possible(u64 addr, u64 next, unsigned int level,
 	if (next - xe_walk->va_curs_start > xe_walk->curs->size)
 		return false;
 



+	/* null VMA's do not have dma adresses */
+	if (xe_walk->pte_flags & XE_PTE_FLAG_NULL)
+		return true;
+
 	/* Is the DMA address huge PTE size aligned? */
 	size = next - addr;
 	dma = addr - xe_walk->va_curs_start + xe_res_dma(xe_walk->curs);
@@ -575,6 +581,10 @@ xe_pt_scan_64K(u64 addr, u64 next, struct xe_pt_stage_bind_walk *xe_walk)
 {
 	struct xe_res_cursor curs = *xe_walk->curs;
 



+	/* null VMA's do not have dma adresses */
+	if (xe_walk->pte_flags & XE_PTE_FLAG_NULL)
+		return true;
+
 	if (!IS_ALIGNED(addr, SZ_64K))
 		return false;
 



@@ -631,12 +641,29 @@ xe_pt_stage_bind_entry(struct xe_ptw *parent, pgoff_t offset,
 	/* Is this a leaf entry ?*/
 	if (level == 0 || xe_pt_hugepte_possible(addr, next, level, xe_walk)) {
 		struct xe_res_cursor *curs = xe_walk->curs;
+		u64 pte = 0;
+		bool is_null = xe_walk->pte_flags & XE_PTE_FLAG_NULL;
 



 		XE_WARN_ON(xe_walk->va_curs_start != addr);
 



-		pte = __gen8_pte_encode(xe_res_dma(curs) + xe_walk->dma_offset,
-					xe_walk->cache, xe_walk->pte_flags,
-					level);
+		if (is_null) {
+			pte |= XE_PAGE_PRESENT | XE_PAGE_RW;
+			if (xe_walk->pte_flags & XE_PTE_FLAG_READ_ONLY)
+				pte &= ~XE_PAGE_RW;
+
+			if (level == 1)
+				pte |= XE_PDE_PS_2M;
+			else if (level == 2)
+				pte |= XE_PDPE_PS_1G;
+
+			pte |= XE_PTE_NULL;
+		} else {
+			pte = __gen8_pte_encode(xe_res_dma(curs) +
+						xe_walk->dma_offset,
+						xe_walk->cache,
+						xe_walk->pte_flags,
+						level);
+		}
 		pte |= xe_walk->default_pte;
 



 		/*
@@ -654,7 +681,8 @@ xe_pt_stage_bind_entry(struct xe_ptw *parent, pgoff_t offset,
 		if (unlikely(ret))
 			return ret;
 



-		xe_res_next(curs, next - addr);
+		if (!is_null)
+			xe_res_next(curs, next - addr);
 		xe_walk->va_curs_start = next;
 		*action = ACTION_CONTINUE;
 



@@ -761,24 +789,29 @@ xe_pt_stage_bind(struct xe_tile *tile, struct xe_vma *vma,
 		xe_walk.dma_offset = vram_region_gpu_offset(bo->ttm.resource);
 		xe_walk.cache = XE_CACHE_WB;
 	} else {
-		if (!xe_vma_is_userptr(vma) && bo->flags & XE_BO_SCANOUT_BIT)
+		if (!xe_vma_has_no_bo(vma) && bo->flags & XE_BO_SCANOUT_BIT)
 			xe_walk.cache = XE_CACHE_WT;
 		else
 			xe_walk.cache = XE_CACHE_WB;
 	}
-	if (!xe_vma_is_userptr(vma) && xe_bo_is_stolen(bo))
+	if (!xe_vma_has_no_bo(vma) && xe_bo_is_stolen(bo))
 		xe_walk.dma_offset = xe_ttm_stolen_gpu_offset(xe_bo_device(bo));
 



 	xe_bo_assert_held(bo);
-	if (xe_vma_is_userptr(vma))
-		xe_res_first_sg(vma->userptr.sg, 0, vma->end - vma->start + 1,
-				&curs);
-	else if (xe_bo_is_vram(bo) || xe_bo_is_stolen(bo))
-		xe_res_first(bo->ttm.resource, vma->bo_offset,
-			     vma->end - vma->start + 1, &curs);
-	else
-		xe_res_first_sg(xe_bo_get_sg(bo), vma->bo_offset,
-				vma->end - vma->start + 1, &curs);
+
+	if (!xe_vma_is_null(vma)) {
+		if (xe_vma_is_userptr(vma))
+			xe_res_first_sg(vma->userptr.sg, 0,
+					vma->end - vma->start + 1, &curs);
+		else if (xe_bo_is_vram(bo) || xe_bo_is_stolen(bo))
+			xe_res_first(bo->ttm.resource, vma->bo_offset,
+				     vma->end - vma->start + 1, &curs);
+		else
+			xe_res_first_sg(xe_bo_get_sg(bo), vma->bo_offset,
+					vma->end - vma->start + 1, &curs);
+	} else {
+		curs.size = vma->end - vma->start + 1;
+	}
 



 	ret = xe_pt_walk_range(&pt->base, pt->level, vma->start, vma->end + 1,
 				&xe_walk.base);
@@ -967,7 +1000,7 @@ static void xe_pt_commit_locks_assert(struct xe_vma *vma)
 



 	if (xe_vma_is_userptr(vma))
 		lockdep_assert_held_read(&vm->userptr.notifier_lock);
-	else
+	else if (!xe_vma_is_null(vma))
 		dma_resv_assert_held(vma->bo->ttm.base.resv);
 



 	dma_resv_assert_held(&vm->resv);
@@ -1330,7 +1363,7 @@ __xe_pt_bind_vma(struct xe_tile *tile, struct xe_vma *vma, struct xe_engine *e,
 				   DMA_RESV_USAGE_KERNEL :
 				   DMA_RESV_USAGE_BOOKKEEP);
 



-		if (!xe_vma_is_userptr(vma) && !vma->bo->vm)
+		if (!xe_vma_has_no_bo(vma) && !vma->bo->vm)
 			dma_resv_add_fence(vma->bo->ttm.base.resv, fence,
 					   DMA_RESV_USAGE_BOOKKEEP);
 		xe_pt_commit_bind(vma, entries, num_entries, rebind,
@@ -1647,7 +1680,7 @@ __xe_pt_unbind_vma(struct xe_tile *tile, struct xe_vma *vma, struct xe_engine *e
 				   DMA_RESV_USAGE_BOOKKEEP);
 



 		/* This fence will be installed by caller when doing eviction */
-		if (!xe_vma_is_userptr(vma) && !vma->bo->vm)
+		if (!xe_vma_has_no_bo(vma) && !vma->bo->vm)
 			dma_resv_add_fence(vma->bo->ttm.base.resv, fence,
 					   DMA_RESV_USAGE_BOOKKEEP);
 		xe_pt_commit_unbind(vma, entries, num_entries,
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 94fc9c330235..f7629db275f9 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -590,7 +590,7 @@ static void preempt_rebind_work_func(struct work_struct *w)
 		goto out_unlock;
 



 	list_for_each_entry(vma, &vm->rebind_list, rebind_link) {
-		if (xe_vma_is_userptr(vma) || vma->destroyed)
+		if (xe_vma_has_no_bo(vma) || vma->destroyed)
 			continue;
 



 		err = xe_bo_validate(vma->bo, vm, false);
@@ -843,6 +843,7 @@ static struct xe_vma *xe_vma_create(struct xe_vm *vm,
 				    u64 bo_offset_or_userptr,
 				    u64 start, u64 end,
 				    bool read_only,
+				    bool is_null,
 				    u64 tile_mask)
 {
 	struct xe_vma *vma;
@@ -868,8 +869,11 @@ static struct xe_vma *xe_vma_create(struct xe_vm *vm,
 	vma->vm = vm;
 	vma->start = start;
 	vma->end = end;
+	vma->pte_flags = 0;
 	if (read_only)
-		vma->pte_flags = XE_PTE_FLAG_READ_ONLY;
+		vma->pte_flags |= XE_PTE_FLAG_READ_ONLY;
+	if (is_null)
+		vma->pte_flags |= XE_PTE_FLAG_NULL;
 



 	if (tile_mask) {
 		vma->tile_mask = tile_mask;
@@ -886,23 +890,26 @@ static struct xe_vma *xe_vma_create(struct xe_vm *vm,
 		vma->bo_offset = bo_offset_or_userptr;
 		vma->bo = xe_bo_get(bo);
 		list_add_tail(&vma->bo_link, &bo->vmas);
-	} else /* userptr */ {
-		u64 size = end - start + 1;
-		int err;
+	} else /* userptr or null */ {
+		if (!is_null) {
+			u64 size = end - start + 1;
+			int err;
 



-		vma->userptr.ptr = bo_offset_or_userptr;
+			vma->userptr.ptr = bo_offset_or_userptr;
 



-		err = mmu_interval_notifier_insert(&vma->userptr.notifier,
-						   current->mm,
-						   vma->userptr.ptr, size,
-						   &vma_userptr_notifier_ops);
-		if (err) {
-			kfree(vma);
-			vma = ERR_PTR(err);
-			return vma;
+			err = mmu_interval_notifier_insert(&vma->userptr.notifier,
+							   current->mm,
+							   vma->userptr.ptr, size,
+							   &vma_userptr_notifier_ops);
+			if (err) {
+				kfree(vma);
+				vma = ERR_PTR(err);
+				return vma;
+			}
+
+			vma->userptr.notifier_seq = LONG_MAX;
 		}
 



-		vma->userptr.notifier_seq = LONG_MAX;
 		xe_vm_get(vm);
 	}
 



@@ -942,6 +949,8 @@ static void xe_vma_destroy_late(struct xe_vma *vma)
 		 */
 		mmu_interval_notifier_remove(&vma->userptr.notifier);
 		xe_vm_put(vm);
+	} else if (xe_vma_is_null(vma)) {
+		xe_vm_put(vm);
 	} else {
 		xe_bo_put(vma->bo);
 	}
@@ -1024,7 +1033,7 @@ static void xe_vma_destroy(struct xe_vma *vma, struct dma_fence *fence)
 		list_del_init(&vma->userptr.invalidate_link);
 		spin_unlock(&vm->userptr.invalidated_lock);
 		list_del(&vma->userptr_link);
-	} else {
+	} else if (!xe_vma_is_null(vma)) {
 		xe_bo_assert_held(vma->bo);
 		list_del(&vma->bo_link);
 



@@ -1391,7 +1400,7 @@ void xe_vm_close_and_put(struct xe_vm *vm)
 	while (vm->vmas.rb_node) {
 		struct xe_vma *vma = to_xe_vma(vm->vmas.rb_node);
 



-		if (xe_vma_is_userptr(vma)) {
+		if (xe_vma_has_no_bo(vma)) {
 			down_read(&vm->userptr.notifier_lock);
 			vma->destroyed = true;
 			up_read(&vm->userptr.notifier_lock);
@@ -1400,7 +1409,7 @@ void xe_vm_close_and_put(struct xe_vm *vm)
 		rb_erase(&vma->vm_node, &vm->vmas);
 



 		/* easy case, remove from VMA? */
-		if (xe_vma_is_userptr(vma) || vma->bo->vm) {
+		if (xe_vma_has_no_bo(vma) || vma->bo->vm) {
 			xe_vma_destroy(vma, NULL);
 			continue;
 		}
@@ -2034,7 +2043,7 @@ static int xe_vm_prefetch(struct xe_vm *vm, struct xe_vma *vma,
 



 	XE_BUG_ON(region > ARRAY_SIZE(region_to_mem_type));
 



-	if (!xe_vma_is_userptr(vma)) {
+	if (!xe_vma_has_no_bo(vma)) {
 		err = xe_bo_migrate(vma->bo, region_to_mem_type[region]);
 		if (err)
 			return err;
@@ -2643,6 +2652,8 @@ static struct xe_vma *vm_unbind_lookup_vmas(struct xe_vm *vm,
 					  lookup->start - 1,
 					  (first->pte_flags &
 					   XE_PTE_FLAG_READ_ONLY),
+					  (first->pte_flags &
+					   XE_PTE_FLAG_NULL),
 					  first->tile_mask);
 		if (first->bo)
 			xe_bo_unlock(first->bo, &ww);
@@ -2675,6 +2686,7 @@ static struct xe_vma *vm_unbind_lookup_vmas(struct xe_vm *vm,
 					 last->end,
 					 (last->pte_flags &
 					  XE_PTE_FLAG_READ_ONLY),
+					 (last->pte_flags & XE_PTE_FLAG_NULL),
 					 last->tile_mask);
 		if (last->bo)
 			xe_bo_unlock(last->bo, &ww);
@@ -2742,7 +2754,7 @@ static struct xe_vma *vm_prefetch_lookup_vmas(struct xe_vm *vm,
 		      *next;
 	struct rb_node *node;
 



-	if (!xe_vma_is_userptr(vma)) {
+	if (!xe_vma_has_no_bo(vma)) {
 		if (!xe_bo_can_migrate(vma->bo, region_to_mem_type[region]))
 			return ERR_PTR(-EINVAL);
 	}
@@ -2751,7 +2763,7 @@ static struct xe_vma *vm_prefetch_lookup_vmas(struct xe_vm *vm,
 	while ((node = rb_next(node))) {
 		if (!xe_vma_cmp_vma_cb(lookup, node)) {
 			__vma = to_xe_vma(node);
-			if (!xe_vma_is_userptr(__vma)) {
+			if (!xe_vma_has_no_bo(__vma)) {
 				if (!xe_bo_can_migrate(__vma->bo, region_to_mem_type[region]))
 					goto flush_list;
 			}
@@ -2765,7 +2777,7 @@ static struct xe_vma *vm_prefetch_lookup_vmas(struct xe_vm *vm,
 	while ((node = rb_prev(node))) {
 		if (!xe_vma_cmp_vma_cb(lookup, node)) {
 			__vma = to_xe_vma(node);
-			if (!xe_vma_is_userptr(__vma)) {
+			if (!xe_vma_has_no_bo(__vma)) {
 				if (!xe_bo_can_migrate(__vma->bo, region_to_mem_type[region]))
 					goto flush_list;
 			}
@@ -2824,21 +2836,23 @@ static struct xe_vma *vm_bind_ioctl_lookup_vma(struct xe_vm *vm,
 



 	switch (VM_BIND_OP(op)) {
 	case XE_VM_BIND_OP_MAP:
-		XE_BUG_ON(!bo);
-
-		err = xe_bo_lock(bo, &ww, 0, true);
-		if (err)
-			return ERR_PTR(err);
+		if (bo) {
+			err = xe_bo_lock(bo, &ww, 0, true);
+			if (err)
+				return ERR_PTR(err);
+		}
 		vma = xe_vma_create(vm, bo, bo_offset_or_userptr, addr,
 				    addr + range - 1,
 				    op & XE_VM_BIND_FLAG_READONLY,
+				    op & XE_VM_BIND_FLAG_NULL,
 				    tile_mask);
-		xe_bo_unlock(bo, &ww);
+		if (bo)
+			xe_bo_unlock(bo, &ww);
 		if (!vma)
 			return ERR_PTR(-ENOMEM);
 



 		xe_vm_insert_vma(vm, vma);
-		if (!bo->vm) {
+		if (bo && !bo->vm) {
 			vm_insert_extobj(vm, vma);
 			err = add_preempt_fences(vm, bo);
 			if (err) {
@@ -2872,6 +2886,7 @@ static struct xe_vma *vm_bind_ioctl_lookup_vma(struct xe_vm *vm,
 		vma = xe_vma_create(vm, NULL, bo_offset_or_userptr, addr,
 				    addr + range - 1,
 				    op & XE_VM_BIND_FLAG_READONLY,
+				    op & XE_VM_BIND_FLAG_NULL,
 				    tile_mask);
 		if (!vma)
 			return ERR_PTR(-ENOMEM);
@@ -2897,11 +2912,12 @@ static struct xe_vma *vm_bind_ioctl_lookup_vma(struct xe_vm *vm,
 #ifdef TEST_VM_ASYNC_OPS_ERROR
 #define SUPPORTED_FLAGS	\
 	(FORCE_ASYNC_OP_ERROR | XE_VM_BIND_FLAG_ASYNC | \
-	 XE_VM_BIND_FLAG_READONLY | XE_VM_BIND_FLAG_IMMEDIATE | 0xffff)
+	 XE_VM_BIND_FLAG_READONLY | XE_VM_BIND_FLAG_IMMEDIATE | \
+	 XE_VM_BIND_FLAG_NULL | 0xffff)
 #else
 #define SUPPORTED_FLAGS	\
 	(XE_VM_BIND_FLAG_ASYNC | XE_VM_BIND_FLAG_READONLY | \
-	 XE_VM_BIND_FLAG_IMMEDIATE | 0xffff)
+	 XE_VM_BIND_FLAG_IMMEDIATE | XE_VM_BIND_FLAG_NULL | 0xffff)
 #endif
 #define XE_64K_PAGE_MASK 0xffffull
 



@@ -2949,6 +2965,7 @@ static int vm_bind_ioctl_check_args(struct xe_device *xe,
 		u32 obj = (*bind_ops)[i].obj;
 		u64 obj_offset = (*bind_ops)[i].obj_offset;
 		u32 region = (*bind_ops)[i].region;
+		bool is_null = op &  XE_VM_BIND_FLAG_NULL;
 



 		if (XE_IOCTL_ERR(xe, (*bind_ops)[i].pad) ||
 		    XE_IOCTL_ERR(xe, (*bind_ops)[i].reserved[0] ||
@@ -2982,8 +2999,13 @@ static int vm_bind_ioctl_check_args(struct xe_device *xe,
 		if (XE_IOCTL_ERR(xe, VM_BIND_OP(op) >
 				 XE_VM_BIND_OP_PREFETCH) ||
 		    XE_IOCTL_ERR(xe, op & ~SUPPORTED_FLAGS) ||
+		    XE_IOCTL_ERR(xe, obj && is_null) ||
+		    XE_IOCTL_ERR(xe, obj_offset && is_null) ||
+		    XE_IOCTL_ERR(xe, VM_BIND_OP(op) != XE_VM_BIND_OP_MAP &&
+				 is_null) ||
 		    XE_IOCTL_ERR(xe, !obj &&
-				 VM_BIND_OP(op) == XE_VM_BIND_OP_MAP) ||
+				 VM_BIND_OP(op) == XE_VM_BIND_OP_MAP &&
+				 !is_null) ||
 		    XE_IOCTL_ERR(xe, !obj &&
 				 VM_BIND_OP(op) == XE_VM_BIND_OP_UNMAP_ALL) ||
 		    XE_IOCTL_ERR(xe, addr &&
@@ -3389,6 +3411,7 @@ int xe_vm_invalidate_vma(struct xe_vma *vma)
 	int ret;
 



 	XE_BUG_ON(!xe_vm_in_fault_mode(vma->vm));
+	XE_WARN_ON(xe_vma_is_null(vma));
 	trace_xe_vma_usm_invalidate(vma);
 



 	/* Check that we don't race with page-table updates */
@@ -3451,8 +3474,11 @@ int xe_analyze_vm(struct drm_printer *p, struct xe_vm *vm, int gt_id)
 	for (node = rb_first(&vm->vmas); node; node = rb_next(node)) {
 		struct xe_vma *vma = to_xe_vma(node);
 		bool is_userptr = xe_vma_is_userptr(vma);
+		bool is_null = xe_vma_is_null(vma);
 



-		if (is_userptr) {
+		if (is_null) {
+			addr = 0;
+		} else if (is_userptr) {
 			struct xe_res_cursor cur;
 



 			xe_res_first_sg(vma->userptr.sg, 0, XE_PAGE_SIZE,
@@ -3463,7 +3489,8 @@ int xe_analyze_vm(struct drm_printer *p, struct xe_vm *vm, int gt_id)
 		}
 		drm_printf(p, " [%016llx-%016llx] S:0x%016llx A:%016llx %s\n",
 			   vma->start, vma->end, vma->end - vma->start + 1ull,
-			   addr, is_userptr ? "USR" : is_vram ? "VRAM" : "SYS");
+			   addr, is_null ? "NULL" : is_userptr ? "USR" :
+			   is_vram ? "VRAM" : "SYS");
 	}
 	up_read(&vm->lock);
 



diff --git a/drivers/gpu/drm/xe/xe_vm.h b/drivers/gpu/drm/xe/xe_vm.h
index 372f26153209..38731e200813 100644
--- a/drivers/gpu/drm/xe/xe_vm.h
+++ b/drivers/gpu/drm/xe/xe_vm.h
@@ -115,11 +115,21 @@ static inline void xe_vm_reactivate_rebind(struct xe_vm *vm)
 	}
 }
 



-static inline bool xe_vma_is_userptr(struct xe_vma *vma)
+static inline bool xe_vma_is_null(struct xe_vma *vma)
+{
+	return vma->pte_flags & XE_PTE_FLAG_NULL;
+}
+
+static inline bool xe_vma_has_no_bo(struct xe_vma *vma)
 {
 	return !vma->bo;
 }
 



+static inline bool xe_vma_is_userptr(struct xe_vma *vma)
+{
+	return xe_vma_has_no_bo(vma) && !xe_vma_is_null(vma);
+}
+
 int xe_vma_userptr_pin_pages(struct xe_vma *vma);
 



 int xe_vma_userptr_check_repin(struct xe_vma *vma);
diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
index 6daddd29d416..f775bafe4619 100644
--- a/drivers/gpu/drm/xe/xe_vm_types.h
+++ b/drivers/gpu/drm/xe/xe_vm_types.h
@@ -31,6 +31,7 @@ struct xe_vma {
 	u64 end;
 	/** @pte_flags: pte flags for this VMA */
 #define XE_PTE_FLAG_READ_ONLY		BIT(0)
+#define XE_PTE_FLAG_NULL		BIT(1)
 	u32 pte_flags;
 



 	/** @bo: BO if not a userptr, must be NULL is userptr */
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 0ebc50beb5e5..39a1ce89732f 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -456,6 +456,14 @@ struct drm_xe_vm_bind_op {
 	 * than differing the MAP to the page fault handler.
 	 */
 #define XE_VM_BIND_FLAG_IMMEDIATE	(0x1 << 18)
+	/*
+	 * When the NULL flag is set, the page tables are setup with a special
+	 * bit which indicates writes are dropped and all reads return zero.  In
+	 * the future, the NULL flags will only be valid for XE_VM_BIND_OP_MAP
+	 * operations, the BO handle MBZ, and the BO offset MBZ. This flag is
+	 * intended to implement VK sparse bindings.
+	 */
+#define XE_VM_BIND_FLAG_NULL		(0x1 << 19)
 



 	/** @reserved: Reserved */
 	__u64 reserved[2];



More information about the Intel-xe mailing list