From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9921DA04DB; Mon, 30 Nov 2020 15:41:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 331414F9A; Mon, 30 Nov 2020 15:41:42 +0100 (CET) Received: from inbox.dpdk.org (xvm-172-178.dc0.ghst.net [95.142.172.178]) by dpdk.org (Postfix) with ESMTP id EB31A4C99 for ; Mon, 30 Nov 2020 15:41:40 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id BCA83A04DC; Mon, 30 Nov 2020 15:41:39 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Mon, 30 Nov 2020 14:41:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: core X-Bugzilla-Version: 19.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: luca.boccassi@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 585] Direct PCI access violation with VFIO and lockdown mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D585 Bug ID: 585 Summary: Direct PCI access violation with VFIO and lockdown mode Product: DPDK Version: 19.11 Hardware: ARM OS: Linux Status: UNCONFIRMED Severity: normal Priority: Normal Component: core Assignee: dev@dpdk.org Reporter: luca.boccassi@gmail.com Target Milestone: --- With DPDK 19.11 on an arm64 platform using vfio-pci, we are getting errors = on initialization when kernel lockdown mode is enabled. Lockdown restricts dir= ect PCI access, but intentionally allows vfio as it's mediated access. On x86 t= his works fine, no illegal accesses are reported, and it seems to be a problem = only on arm64. [ 2.687022] vfio-pci 0008:01:00.1: vfio_ecap_init: hiding ecap 0x0@0x250= =20=20=20=20=20 [ 3.391535] vfio-pci 0000:01:00.1: enabling device (0000 -> 0002)=20=20= =20=20=20=20=20=20=20=20=20=20 [ 3.507258] Lockdown: dpdk-app: direct PCI access is restricted; see man kernel_lockdown.7=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507263] ------------[ cut here ]------------=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507264] pci_write_config: /devices/platform/48000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.1=20=20= =20=20=20=20=20=20=20=20=20=20 [ 3.507303] WARNING: CPU: 4 PID: 1473 at /drivers/pci/pci-sysfs.c:765 pci_write_config+0x1bc/0x1c4=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507304] Modules linked in: bnxt_en pcie_iproc_platform pcie_iproc=20= =20=20=20=20=20=20=20 [ 3.507312] CPU: 4 PID: 1473 Comm: dpdk-app Not tainted 5.4.72 #1=20=20= =20=20=20=20=20=20=20=20=20=20 [ 3.507313] Hardware name: Overlake (DT)=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 [ 3.507315] pstate: 60400005 (nZCv daif +PAN -UAO)=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507316] pc : pci_write_config+0x1bc/0x1c4=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507318] lr : pci_write_config+0x1bc/0x1c4=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507318] sp : ffff8000113ebcb0=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 [ 3.507320] x29: ffff8000113ebcf0 x28: ffff0008e3758000=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507321] x27: 0000000000000000 x26: 0000000000000000=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507323] x25: 0000000056000000 x24: ffffd539ba59a000=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507325] x23: ffff0008e5ad90b0 x22: 0000000000000002=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507326] x21: 00000000ffffffff x20: 0000000000000004=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507327] x19: ffff0008d8594a00 x18: 0000000000000000=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507329] x17: 0000000000000078 x16: 0000000000015f24=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507330] x15: 0000000000000022 x14: 0000000000000068=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507332] x13: 000000000000a144 x12: 0000000000000000=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507333] x11: 0000000000000001 x10: 0000000000000007=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507334] x9 : 31c97f42d035aa00 x8 : 31c97f42d035aa00=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507336] x7 : 0000000000000000 x6 : ffffd539ba5aa81e=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507337] x5 : 0000000000000000 x4 : 0000000000000004=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507339] x3 : 000000000000312e x2 : fffffffffffffe24=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507340] x1 : 0000000000000000 x0 : 0000000000000056=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507342] Call trace:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 [ 3.507343] pci_write_config+0x1bc/0x1c4=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 [ 3.507351] sysfs_kf_bin_write+0x6c/0x94 [ 3.507353] kernfs_fop_write+0x1d4/0x2b0 [ 3.507355] __vfs_write+0x54/0x198 [ 3.507356] vfs_write+0xcc/0x18c [ 3.507358] __arm64_sys_pwrite64+0x80/0xc0 [ 3.507362] el0_svc_handler+0xe0/0x140 [ 3.507364] el0_svc+0x8/0x208 [ 3.507365] ---[ end trace 116c21626a554aca ]--- --=20 You are receiving this mail because: You are the assignee for the bug.=