<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/hwtracing/intel_th, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/hwtracing/intel_th?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/hwtracing/intel_th?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-03-24T12:45:24Z</updated>
<entry>
<title>intel_th: msu: Make stopping the trace optional</title>
<updated>2020-03-24T12:45:24Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2020-03-19T08:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8622dfefb6ac333c58d354331d1bf78a2927ce51'/>
<id>urn:sha1:8622dfefb6ac333c58d354331d1bf78a2927ce51</id>
<content type='text'>
Some use cases prefer to keep collecting the trace data into the last
available window while the other windows are being offloaded instead of
stopping the trace. In this scenario, the window switch happens
automatically when the next window becomes available again.

Add an option to allow this and a sysfs attribute to enable it.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200319085152.52183-1-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.6-rc7 into char-misc-next</title>
<updated>2020-03-23T06:59:38Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2020-03-23T06:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=baca54d956f77be9abc487bcdddf7a2a1fbbda1b'/>
<id>urn:sha1:baca54d956f77be9abc487bcdddf7a2a1fbbda1b</id>
<content type='text'>
We need the char/misc driver fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: pci: Add Elkhart Lake CPU support</title>
<updated>2020-03-18T10:32:56Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2020-03-17T06:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=add492d2e9446a77ede9bb43699ec85ca8fc1aba'/>
<id>urn:sha1:add492d2e9446a77ede9bb43699ec85ca8fc1aba</id>
<content type='text'>
This adds support for the Trace Hub in Elkhart Lake CPU.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200317062215.15598-7-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Fix user-visible error codes</title>
<updated>2020-03-18T10:32:56Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2020-03-17T06:22:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ce666be89a8a09c5924ff08fc32e119f974bdab6'/>
<id>urn:sha1:ce666be89a8a09c5924ff08fc32e119f974bdab6</id>
<content type='text'>
There are a few places in the driver that end up returning ENOTSUPP to
the user, replace those with EINVAL.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Fixes: ba82664c134ef ("intel_th: Add Memory Storage Unit driver")
Cc: stable@vger.kernel.org # v4.4+
Link: https://lore.kernel.org/r/20200317062215.15598-6-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: msu: Fix the unexpected state warning</title>
<updated>2020-03-18T10:32:56Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2020-03-17T06:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=885f123554bbdc1807ca25a374be6e9b3bddf4de'/>
<id>urn:sha1:885f123554bbdc1807ca25a374be6e9b3bddf4de</id>
<content type='text'>
The unexpected state warning should only warn on illegal state
transitions. Fix that.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Fixes: 615c164da0eb4 ("intel_th: msu: Introduce buffer interface")
Cc: stable@vger.kernel.org # v5.4+
Link: https://lore.kernel.org/r/20200317062215.15598-5-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Disallow multi mode on devices where it's broken</title>
<updated>2020-03-18T10:28:22Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2020-03-17T06:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=397c7729665a3b07a7b4ce7215173df8e9112809'/>
<id>urn:sha1:397c7729665a3b07a7b4ce7215173df8e9112809</id>
<content type='text'>
Some versions of Intel TH have an issue that prevents the multi mode of
MSU from working correctly, resulting in no trace data and potentially
stuck MSU pipeline.

Disable multi mode on such devices.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200317062215.15598-2-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: msu: Fix window switching without windows</title>
<updated>2019-12-17T14:45:59Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-12-17T11:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=05b686b573cfb35a227c30787083a6631ff0f0c9'/>
<id>urn:sha1:05b686b573cfb35a227c30787083a6631ff0f0c9</id>
<content type='text'>
Commit 6cac7866c2741 ("intel_th: msu: Add a sysfs attribute to trigger
window switch") adds a NULL pointer dereference in the case when there are
no windows allocated:

&gt; BUG: kernel NULL pointer dereference, address: 0000000000000000
&gt; #PF: supervisor read access in kernel mode
&gt; #PF: error_code(0x0000) - not-present page
&gt; PGD 0 P4D 0
&gt; Oops: 0000 1 SMP
&gt; CPU: 5 PID: 1110 Comm: bash Not tainted 5.5.0-rc1+ #1
&gt; RIP: 0010:msc_win_switch+0xa/0x80 [intel_th_msu]
&gt; Call Trace:
&gt; ? win_switch_store+0x9b/0xc0 [intel_th_msu]
&gt; dev_attr_store+0x17/0x30
&gt; sysfs_kf_write+0x3e/0x50
&gt; kernfs_fop_write+0xda/0x1b0
&gt; __vfs_write+0x1b/0x40
&gt; vfs_write+0xb9/0x1a0
&gt; ksys_write+0x67/0xe0
&gt; __x64_sys_write+0x1a/0x20
&gt; do_syscall_64+0x57/0x1d0
&gt; entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fix that by disallowing window switching with multiwindow buffers without
windows.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Fixes: 6cac7866c274 ("intel_th: msu: Add a sysfs attribute to trigger window switch")
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reported-by: Ammy Yi &lt;ammy.yi@intel.com&gt;
Tested-by: Ammy Yi &lt;ammy.yi@intel.com&gt;
Cc: stable@vger.kernel.org # v5.2+
Link: https://lore.kernel.org/r/20191217115527.74383-5-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: Fix freeing IRQs</title>
<updated>2019-12-17T14:45:58Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-12-17T11:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=ab832e38e4f0f45b16c3633714d868b7ec6b33b4'/>
<id>urn:sha1:ab832e38e4f0f45b16c3633714d868b7ec6b33b4</id>
<content type='text'>
Commit aac8da65174a ("intel_th: msu: Start handling IRQs") implicitly
relies on the use of devm_request_irq() to subsequently free the irqs on
device removal, but in case of the pci_free_irq_vectors() API, the
handlers need to be freed before it is called. Therefore, at the moment
the driver's remove path trips a BUG_ON(irq_has_action()):

&gt; kernel BUG at drivers/pci/msi.c:375!
&gt; invalid opcode: 0000 1 SMP
&gt; CPU: 2 PID: 818 Comm: rmmod Not tainted 5.5.0-rc1+ #1
&gt; RIP: 0010:free_msi_irqs+0x67/0x1c0
&gt; pci_disable_msi+0x116/0x150
&gt; pci_free_irq_vectors+0x1b/0x20
&gt; intel_th_pci_remove+0x22/0x30 [intel_th_pci]
&gt; pci_device_remove+0x3e/0xb0
&gt; device_release_driver_internal+0xf0/0x1c0
&gt; driver_detach+0x4c/0x8f
&gt; bus_remove_driver+0x5c/0xd0
&gt; driver_unregister+0x31/0x50
&gt; pci_unregister_driver+0x40/0x90
&gt; intel_th_pci_driver_exit+0x10/0xad6 [intel_th_pci]
&gt; __x64_sys_delete_module+0x147/0x290
&gt; ? exit_to_usermode_loop+0xd7/0x120
&gt; do_syscall_64+0x57/0x1b0
&gt; entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fix this by explicitly freeing irqs before freeing the vectors. We keep
using the devm_* variants because they are still useful in early error
paths.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Fixes: aac8da65174a ("intel_th: msu: Start handling IRQs")
Reported-by: Ammy Yi &lt;ammy.yi@intel.com&gt;
Tested-by: Ammy Yi &lt;ammy.yi@intel.com&gt;
Cc: stable@vger.kernel.org # v5.2+
Link: https://lore.kernel.org/r/20191217115527.74383-4-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: pci: Add Elkhart Lake SOC support</title>
<updated>2019-12-17T14:45:57Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-12-17T11:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=88385866bab8d5e18c7f45d1023052c783572e03'/>
<id>urn:sha1:88385866bab8d5e18c7f45d1023052c783572e03</id>
<content type='text'>
This adds support for Intel Trace Hub in Elkhart Lake.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191217115527.74383-3-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>intel_th: pci: Add Comet Lake PCH-V support</title>
<updated>2019-12-17T14:45:57Z</updated>
<author>
<name>Alexander Shishkin</name>
<email>alexander.shishkin@linux.intel.com</email>
</author>
<published>2019-12-17T11:55:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e4de2a5d51f97a6e720a1c0911f93e2d8c2f1c08'/>
<id>urn:sha1:e4de2a5d51f97a6e720a1c0911f93e2d8c2f1c08</id>
<content type='text'>
This adds Intel(R) Trace Hub PCI ID for Comet Lake PCH-V.

Signed-off-by: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20191217115527.74383-2-alexander.shishkin@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
