Vaibhav Jain
c9debbd1a5
cxl: Disable prefault_mode in Radix mode
...
commit b6c84ba22f upstream.
Currently we see a kernel-oops reported on Power-9 while attaching a
context to an AFU, with radix-mode and sysfs attr 'prefault_mode' set
to anything other than 'none'. The backtrace of the oops is of this
form:
Unable to handle kernel paging request for data at address 0x00000080
Faulting instruction address: 0xc00800000bcf3b20
cpu 0x1: Vector: 300 (Data Access) at [c00000037f003800]
pc: c00800000bcf3b20: cxl_load_segment+0x178/0x290 [cxl]
lr: c00800000bcf39f0: cxl_load_segment+0x48/0x290 [cxl]
sp: c00000037f003a80
msr: 9000000000009033
dar: 80
dsisr: 40000000
current = 0xc00000037f280000
paca = 0xc0000003ffffe600 softe: 3 irq_happened: 0x01
pid = 3529, comm = afp_no_int
<snip>
cxl_prefault+0xfc/0x248 [cxl]
process_element_entry_psl9+0xd8/0x1a0 [cxl]
cxl_attach_dedicated_process_psl9+0x44/0x130 [cxl]
native_attach_process+0xc0/0x130 [cxl]
afu_ioctl+0x3f4/0x5e0 [cxl]
do_vfs_ioctl+0xdc/0x890
ksys_ioctl+0x68/0xf0
sys_ioctl+0x40/0xa0
system_call+0x58/0x6c
The issue is caused as on Power-8 the AFU attr 'prefault_mode' was
used to improve initial storage fault performance by prefaulting
process segments. However on Power-9 with radix mode we don't have
Storage-Segments that we can prefault. Also prefaulting process Pages
will be too costly and fine-grained.
Hence, since the prefaulting mechanism doesn't makes sense of
radix-mode, this patch updates prefault_mode_store() to not allow any
other value apart from CXL_PREFAULT_NONE when radix mode is enabled.
Fixes: f24be42aab ("cxl: Add psl9 specific code")
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com >
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com >
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com >
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-07-03 11:24:51 +02:00
..
2016-07-08 21:52:36 +02:00
2016-05-04 11:44:15 +01:00
2017-02-15 09:51:28 -05:00
2015-06-25 17:00:38 -07:00
2015-10-04 20:28:58 +01:00
2014-05-14 09:39:51 -05:00
2014-01-29 16:22:40 -08:00
2014-01-29 16:22:40 -08:00
2014-01-29 16:22:40 -08:00
2014-01-29 16:22:40 -08:00
2014-11-06 16:18:19 -06:00
2015-07-31 09:02:06 -05:00
2014-01-29 16:22:40 -08:00
2014-11-05 13:37:17 -06:00
2014-01-29 16:22:40 -08:00
2014-01-29 16:22:40 -08:00
2014-01-29 16:22:40 -08:00
2015-03-10 15:33:41 -05:00
2017-08-15 14:18:56 +03:00
2014-01-29 16:22:40 -08:00
2015-12-15 09:12:41 -06:00
2014-01-29 16:22:40 -08:00
2015-12-20 19:40:45 -08:00
2017-06-19 09:22:47 +03:00
2017-06-19 09:22:47 +03:00
2014-08-20 14:04:42 -05:00
2016-05-31 11:12:58 +03:00
2013-12-18 16:51:15 -08:00
2010-08-03 09:49:07 -04:00
2011-10-24 16:52:39 +02:00
2012-03-27 20:54:52 +02:00
2012-05-16 15:05:45 +10:00
2009-04-13 15:04:33 -07:00
2015-06-25 17:00:38 -07:00
2011-07-18 12:29:40 -04:00
2016-02-09 11:09:52 +01:00
2017-06-21 14:37:12 -04:00
2017-08-28 22:09:43 +10:00
2009-12-04 15:39:55 +01:00
2017-09-06 17:27:30 -07:00
2013-02-12 13:07:22 -08:00
2015-05-06 10:28:39 -04:00
2017-04-08 11:25:38 -06:00
2013-03-23 16:11:31 -07:00
2015-04-15 12:10:17 -04:00
2012-06-05 09:13:48 +02:00
2017-09-06 17:27:25 -07:00
2013-06-21 00:13:15 +02:00
2015-02-10 10:23:15 +00:00
2011-08-05 13:32:40 +02:00
2016-05-01 14:12:14 -07:00
2015-10-17 22:03:00 -07:00
2016-05-01 14:12:14 -07:00
2014-11-26 19:27:28 -08:00
2016-05-03 14:59:30 -07:00
2016-05-03 14:59:30 -07:00
2011-03-31 11:26:23 -03:00
2015-01-21 13:24:33 -03:00
2013-05-29 16:11:40 +03:00
2016-04-28 07:51:59 -06:00
2014-10-07 16:58:06 +11:00
2015-06-22 10:35:05 -06:00
2017-06-09 11:52:09 +02:00
2016-12-08 21:00:08 +01:00
2012-04-23 14:23:32 +03:00
2017-02-01 12:44:23 +01:00
2011-07-25 20:57:14 -07:00
2010-08-09 20:45:10 -07:00
2012-05-20 17:27:01 +02:00
2018-03-28 18:24:49 +02:00
2014-08-07 11:44:45 +01:00
2016-11-13 13:07:17 +00:00
2015-09-23 20:23:18 +01:00
2017-04-08 17:26:03 +01:00
2017-01-28 18:24:57 +00:00
2015-09-23 20:23:26 +01:00
2017-03-05 11:22:56 +00:00
2016-10-25 18:20:05 +01:00
2016-11-13 13:07:15 +00:00
2017-01-28 16:38:33 +00:00
2013-08-03 18:40:31 +01:00
2013-08-03 18:40:32 +01:00
2014-08-26 18:37:50 +01:00
2016-05-04 11:11:30 +01:00
2015-09-23 20:23:19 +01:00
2015-12-19 15:08:00 +00:00
2016-10-23 19:33:55 +01:00
2012-06-15 14:39:18 -07:00
2016-11-13 13:07:33 +00:00
2017-09-04 14:49:30 +01:00
2016-02-21 20:22:23 +00:00
2017-05-07 14:39:17 +01:00
2013-02-10 17:42:43 +00:00
2016-11-13 11:40:26 +00:00
2017-09-25 19:49:21 +01:00
2017-06-11 15:59:05 +01:00
2015-08-16 10:51:23 +01:00
2016-02-24 20:52:55 +00:00
2015-10-04 20:28:58 +01:00
2015-10-04 20:28:58 +01:00
2015-10-04 20:28:58 +01:00
2015-10-04 20:28:58 +01:00
2016-05-03 15:07:35 -07:00
2014-02-12 19:08:49 -05:00
2011-03-22 04:53:09 -03:00
2015-09-20 19:30:10 -07:00
2017-05-08 19:03:25 -07:00
2011-08-08 11:40:17 +02:00
2011-09-18 01:48:37 -07:00
2015-05-06 08:03:19 +02:00
2014-07-08 15:31:26 -07:00
2016-08-24 23:49:17 +02:00
2012-02-08 22:53:58 +02:00
2017-08-28 16:21:32 +02:00
2008-09-17 16:54:35 +01:00
2015-12-01 14:58:18 -08:00
2012-07-20 23:10:28 +02:00
2017-08-28 11:43:39 +02:00
2016-11-17 09:18:43 -07:00
2008-11-12 17:17:18 -08:00
2012-04-01 14:33:40 -07:00
2012-02-15 14:48:01 -08:00
2012-07-20 23:10:28 +02:00
2012-05-29 16:22:29 -07:00
2013-02-21 17:22:19 -08:00
2018-07-03 11:24:51 +02:00
2013-06-03 20:20:29 +09:00
2017-01-31 16:57:05 +09:00
2012-09-05 12:18:11 -07:00
2016-11-10 17:03:35 +01:00
2015-10-07 18:07:20 +01:00
2015-12-23 10:35:11 -05:00
2014-07-04 12:35:59 +02:00
2014-07-04 12:35:59 +02:00
2014-07-04 12:35:59 +02:00
2009-08-28 15:21:12 -04:00
2017-01-29 19:59:42 +01:00
2012-05-29 16:22:32 -07:00
2015-03-09 17:16:28 -07:00
2016-08-29 15:06:32 +02:00
2016-09-27 12:20:17 +02:00
2014-07-03 11:14:11 -07:00
2016-10-31 04:00:09 -06:00
2016-08-30 14:45:50 +02:00
2017-07-13 10:54:45 -07:00
2017-06-03 19:29:26 +09:00
2017-05-26 14:37:41 -04:00
2016-06-30 10:29:43 +02:00
2015-12-06 22:52:18 -05:00
2012-11-15 20:47:26 +01:00
2015-05-06 08:03:20 +02:00
2015-12-16 00:21:40 +08:00
2017-06-06 21:14:13 -04:00
2017-03-25 20:03:35 -07:00
2015-03-18 14:55:18 -04:00
2014-05-26 01:02:20 -04:00
2016-08-17 14:15:58 +02:00
2017-06-08 13:05:28 +02:00
2013-10-17 00:36:06 +02:00
2016-06-10 16:01:40 +02:00
2017-01-30 12:15:12 -02:00
2016-03-05 08:22:03 -03:00
2012-09-10 11:25:10 +08:00
2017-11-03 09:02:30 -07:00
2016-10-30 21:05:47 +01:00
2014-03-15 10:19:07 -07:00
2015-06-02 08:03:25 -07:00
2016-05-03 14:59:30 -07:00
2015-10-04 20:28:58 +01:00
2017-04-12 12:23:37 -05:00
2017-06-03 18:02:58 +09:00
2014-09-23 22:05:26 -07:00
2013-06-24 16:19:03 -07:00
2015-12-27 16:55:57 +01:00
2015-06-25 17:00:36 -07:00
2008-07-21 21:54:40 -07:00
2012-02-15 14:48:01 -08:00
2017-01-19 10:29:40 +01:00
2012-10-06 15:52:16 -04:00
2013-03-21 22:45:15 +01:00
2014-10-09 22:25:52 -04:00
2011-03-15 13:48:01 -04:00
2013-05-12 14:14:09 +02:00
2010-08-10 14:35:42 -07:00
2012-01-09 18:12:17 +00:00
2012-06-20 10:02:54 +02:00
2017-10-31 18:35:40 +01:00
2013-01-25 21:51:32 +01:00
2013-01-25 21:51:32 +01:00
2013-01-25 21:51:32 +01:00
2013-01-25 21:51:32 +01:00
2013-04-11 22:41:48 +02:00
2013-01-24 12:49:59 +01:00
2013-01-24 12:49:59 +01:00
2013-01-24 12:50:09 +01:00
2012-02-10 11:42:25 -08:00
2013-06-21 00:13:15 +02:00
2018-05-22 18:54:02 +02:00
2016-11-01 09:27:33 -07:00
2012-07-19 15:51:39 -04:00
2017-07-17 17:26:15 +02:00
2014-07-09 14:14:27 -07:00
2015-02-23 16:17:32 +01:00
2015-09-30 21:28:10 +02:00
2014-07-29 11:24:47 +02:00
2016-09-26 15:39:56 +02:00
2011-11-23 14:50:38 +01:00
2016-04-28 07:51:59 -06:00
2010-05-12 15:18:59 +02:00
2011-04-04 17:51:47 -07:00
2013-01-31 16:39:32 +01:00
2013-10-30 14:13:29 +01:00
2015-01-08 13:53:51 -08:00
2013-07-10 15:42:48 -04:00
2014-08-01 16:02:34 +01:00
2015-10-19 01:01:20 +02:00
2015-02-06 18:33:55 -08:00
2015-11-09 17:17:27 -08:00
2014-07-17 14:36:01 +02:00
2016-03-23 10:05:37 -07:00
2015-05-11 10:38:23 -07:00
2016-08-05 13:39:19 +02:00
2013-06-04 15:58:43 -04:00
2013-06-04 15:58:35 -04:00
2017-04-13 03:51:47 +02:00
2015-06-25 09:06:57 +02:00
2015-06-25 09:06:56 +02:00
2015-05-27 15:40:20 +01:00
2015-04-30 22:15:04 +01:00
2013-12-21 15:29:36 +00:00
2011-04-29 18:09:34 -07:00
2011-04-29 18:09:34 -07:00
2009-02-18 15:37:56 -08:00
2017-06-30 09:16:51 -05:00
2017-08-10 22:39:53 +10:00
2017-08-10 22:40:01 +10:00
2016-02-09 17:37:39 -08:00
2010-05-27 12:46:20 -04:00
2008-09-02 19:21:40 -07:00
2012-08-17 09:54:17 -04:00
2017-08-21 15:55:07 -07:00
2014-08-08 15:57:21 -07:00
2014-07-15 08:09:06 +10:00
2017-06-15 08:50:37 +02:00
2016-05-16 11:14:29 -04:00
2013-12-29 13:09:07 +00:00
2011-04-19 16:45:51 -07:00
2017-01-23 11:48:16 +00:00
2016-09-14 15:28:15 +02:00
2017-03-08 09:36:21 +01:00
2008-07-24 10:47:17 -07:00
2008-07-24 10:47:17 -07:00
2013-02-23 17:50:19 -08:00
2017-10-13 16:18:33 -07:00
2016-10-24 08:12:35 -02:00
2008-02-07 08:42:17 -08:00
2014-01-23 16:37:03 -08:00
2009-12-16 12:20:00 +01:00
2014-03-31 14:52:43 +10:30
2008-04-18 08:56:07 -07:00
2011-04-04 17:51:47 -07:00
2012-07-28 00:11:49 -04:00
2011-01-24 14:56:37 +01:00
2014-05-24 00:58:44 +02:00
2017-04-14 09:26:37 +08:00
2014-04-24 12:56:35 -07:00
2015-04-07 20:57:32 -07:00
2010-02-28 19:30:57 +01:00
2017-01-02 10:42:33 +05:30
2017-01-02 10:42:33 +05:30
2016-04-07 21:13:02 +02:00
2017-05-15 12:06:09 +03:00
2011-02-04 12:41:20 -08:00
2013-02-24 14:49:53 -08:00
2016-11-18 18:19:15 +05:30
2017-04-11 10:58:25 +03:00
2016-12-05 17:22:27 +00:00
2013-12-06 14:46:32 -06:00
2014-07-16 21:17:41 +02:00
2015-06-01 16:08:24 +05:30
2016-04-28 12:28:08 -07:00
2017-10-04 17:11:53 -07:00
2009-06-18 13:04:04 -07:00
2012-12-03 11:11:51 +01:00
2015-12-08 14:50:12 +01:00
2014-07-17 18:23:35 -07:00
2017-05-27 11:51:36 +02:00
2008-09-17 16:54:35 +01:00