Skip to contentSkip to conversation

IGT: Couldn't map MMIO region

Bug 93199 [email protected] 1 participant 6 messages Mar 29, 2017 – Aug 31, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=93199

Jari Tahvanainen <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

          Component|DRM/Intel                   |IGT
           Assignee|[email protected] |[email protected]
                   |sktop.org                   |.org
         QA Contact|[email protected] |
                   |sktop.org                   |
             Status|REOPENED                    |NEEDINFO

--- Comment #23 from Jari Tahvanainen <[email protected]> --- Moving this from DRM/Intel to IGT, since it seems to be problem with that. Sean, Jonathan, Dimitry and Rami - please check if this problem is still valid with the latest igt.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=93199

--- Comment #24 from [email protected] ---
(In reply to Jari Tahvanainen from comment #23)

Quoted 3 lines

Moving this from DRM/Intel to IGT, since it seems to be problem with that. Sean, Jonathan, Dimitry and Rami - please check if this problem is still valid with the latest igt.

I've found i have the same issue, running as root:

root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# intel_gpu_top 
(intel_gpu_top:6971) intel-mmio-CRITICAL: Test assertion failure function
intel_mmio_use_pci_bar, file ../../lib/intel_mmio.c:145:
(intel_gpu_top:6971) intel-mmio-CRITICAL: Failed assertion: !(error != 0)
(intel_gpu_top:6971) intel-mmio-CRITICAL: Last errno: 1, Operation not
permitted
(intel_gpu_top:6971) intel-mmio-CRITICAL: Couldn't map MMIO region
Stack trace:
  #0 [_init+0x7369]
  #1 [_init+0x4fd0]
  #2 [_init+0x98e]
  #3 [__libc_start_main+0xf1]
  #4 [_init+0x1752]
  #5 [<unknown>+0x1752]
Test (null) failed.
**** DEBUG ****
(intel_gpu_top:6971) intel-chipset-DEBUG: Test requirement passed: pci_dev
(intel_gpu_top:6971) intel-mmio-CRITICAL: Test assertion failure function
intel_mmio_use_pci_bar, file ../../lib/intel_mmio.c:145:
(intel_gpu_top:6971) intel-mmio-CRITICAL: Failed assertion: !(error != 0)
(intel_gpu_top:6971) intel-mmio-CRITICAL: Last errno: 1, Operation not
permitted
(intel_gpu_top:6971) intel-mmio-CRITICAL: Couldn't map MMIO region
****  END  ****
FAIL (-1.000s)

strace shows failure on opening resource0:
open("/sys/bus/pci/devices/0000:00:02.0/resource", O_RDONLY|O_CLOEXEC) = 4 read(4, "0x00000000e0000000 0x00000000e0f"..., 512) = 512
close(4) = 0
open("/sys/bus/pci/devices/0000:00:02.0/resource0", O_RDWR|O_CLOEXEC) = 4 mmap(NULL, 2097152, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = -1 EPERM (Operation not permitted)
close(4) = 0
write(2, "(intel_gpu_top:7094) intel-mmio-"..., 131(intel_gpu_top:7094)
intel-mmio-CRITICAL: Test assertion failure function intel_mmio_use_pci_bar, file ../../lib/intel_mmio.c:145:
) = 131
write(2, "(intel_gpu_top:7094) intel-mmio-"..., 74(intel_gpu_top:7094)
intel-mmio-CRITICAL: Failed assertion: !(error != 0)
) = 74
write(2, "(intel_gpu_top:7094) intel-mmio-"..., 81(intel_gpu_top:7094)
intel-mmio-CRITICAL: Last errno: 1, Operation not permitted
) = 81
write(2, "(intel_gpu_top:7094) intel-mmio-"..., 67(intel_gpu_top:7094)
intel-mmio-CRITICAL: Couldn't map MMIO region
) = 67

checking if readable with cat:

root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# cat resource
0x00000000e0000000 0x00000000e0ffffff 0x0000000000140204
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x00000000c0000000 0x00000000dfffffff 0x000000000014220c
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x000000000000e000 0x000000000000e03f 0x0000000000040101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x00000000000c0000 0x00000000000dffff 0x0000000000000212
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# cat resource0
cat: resource0: Input/output error
root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# cat resource2
cat: resource2: Input/output error
root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# cat resource2_wc
cat: resource2_wc: Input/output error
root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# cat resource4
cat: resource4: Invalid argument
root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# ls -la resource*
-r--r--r-- 1 root root      4096 okt  2 22:38 resource
-rw------- 1 root root  16777216 okt  2 22:30 resource0
-rw------- 1 root root 536870912 okt  2 22:38 resource2
-rw------- 1 root root 536870912 okt  2 22:38 resource2_wc
-rw------- 1 root root        64 okt  2 22:38 resource4
root@oskar-ThinkPad-X270:/sys/bus/pci/devices/0000:00:02.0# uname -a
Linux oskar-ThinkPad-X270 4.10.0-35-generic #39-Ubuntu SMP Wed Sep 13 07:46:59
UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

I wonder if it could be related to secure_boot?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=93199

--- Comment #25 from [email protected] ---
Forgot to mention this is ubuntu 17.04 and i intel-gpu-tools are version 1.17-1

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=93199

--- Comment #26 from Christian Kellner <[email protected]> --- Just stumbled into the same issue, disabled secure boot, and the issue disappeared. Now I am having a different issue, but I think it is just my version being too old.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=93199

Jani Nikula <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |NOTOURBUG
             Status|NEEDINFO                    |RESOLVED

--- Comment #27 from Jani Nikula <[email protected]> --- Based on an IRC chat with Joonas and Dave, looks like this is indeed kernel lockdown on UEFI secure boot doing its magic. The kernel lockdown patches haven't been merged upstream, so you should not be able to reproduce this on kernel.org upstream kernels. Please file your bugs against your distro if this remains an issue for you.

See e.g. https://mjg59.dreamwidth.org/50577.html for background.

Sorry it took us so long to get this; we're obviously not running non-upstream kernels with lockdown enabled.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=93199

Jani Nikula <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel