commit 5b61412afb6674b51f83ee0de2df0a455643d5be Author: Greg Kroah-Hartman Date: Sat Oct 21 17:55:07 2017 +0200 Linux 4.13.9 commit 77b446aa2ba607b6c25d730236b57592aa80166b Author: Stephen Hemminger Date: Sun Jun 25 12:30:28 2017 -0700 vmbus: more host signalling avoidance commit 03bad714a1619c0074eb44d6f217c505fe27030f upstream. Don't signal host if it has disabled interrupts for that ring buffer. Check the feature bit to see if host supports pending send size flag. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 27ba39f28808d6e983ad028da15952f29918a6c4 Author: Stephen Hemminger Date: Sun Jun 25 12:30:27 2017 -0700 vmbus: eliminate duplicate cached index commit 05d00bc94ac27d220d8a78e365d7fa3a26dcca17 upstream. Don't need cached read index anymore now that packet iterator is used. The iterator has the original read index until the visible read_index is updated. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit df95afa5960b806835f2fa4d167a828d9329ba87 Author: Stephen Hemminger Date: Sun Jun 25 12:30:26 2017 -0700 vmbus: refactor hv_signal_on_read commit 8dd45f2ab005a1f3301296059b23b03ec3dbf79b upstream. The function hv_signal_on_read was defined in hyperv.h and only used in one place in ring_buffer code. Clearer to just move it inline there. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 52baff877117a180a23fc2692e03f2e716859724 Author: Stephen Hemminger Date: Sun Jun 25 12:30:24 2017 -0700 vmbus: simplify hv_ringbuffer_read commit 4226ff69a3dff78bead7d9a270423cd21f8d40b8 upstream. With new iterator functions (and the double mapping) the ring buffer read function can be greatly simplified. Signed-off-by: Stephen Hemminger Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman commit 0cd8b4745ce2576daade5343dd270d36c3547a72 Author: K. Y. Srinivasan Date: Fri Sep 29 21:09:36 2017 -0700 Drivers: hv: vmbus: Fix bugs in rescind handling commit 192b2d78722ffea188e5ec6ae5d55010dce05a4b upstream. This patch addresses the following bugs in the current rescind handling code: 1. Fixes a race condition where we may be invoking hv_process_channel_removal() on an already freed channel. 2. Prevents indefinite wait when rescinding sub-channels by correctly setting the probe_complete state. I would like to thank Dexuan for patiently reviewing earlier versions of this patch and identifying many of the issues fixed here. Greg, please apply this to 4.14-final. Fixes: '54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling")' Signed-off-by: K. Y. Srinivasan Reviewed-by: Dexuan Cui Signed-off-by: Greg Kroah-Hartman commit 6b32d45bd59982751beb8220e442b40b2706647f Author: K. Y. Srinivasan Date: Fri Aug 11 10:03:59 2017 -0700 Drivers: hv: vmbus: Fix rescind handling issues commit 6f3d791f300618caf82a2be0c27456edd76d5164 upstream. This patch handles the following issues that were observed when we are handling racing channel offer message and rescind message for the same offer: 1. Since the host does not respond to messages on a rescinded channel, in the current code, we could be indefinitely blocked on the vmbus_open() call. 2. When a rescinded channel is being closed, if there is a pending interrupt on the channel, we could end up freeing the channel that the interrupt handler would run on. Signed-off-by: K. Y. Srinivasan Reviewed-by: Dexuan Cui Tested-by: Dexuan Cui Signed-off-by: Greg Kroah-Hartman commit 53d1c2535ce014ceea27c5c34739e32dec2cc6d9 Author: Alex Manoussakis Date: Thu Oct 5 13:41:20 2017 -0400 HID: hid-elecom: extend to fix descriptor for HUGE trackball commit a0933a456ff83a3b5ffa3a1903e0b8de4a56adf5 upstream. In addition to DEFT, Elecom introduced a larger trackball called HUGE, in both wired (M-HT1URBK) and wireless (M-HT1DRBK) versions. It has the same buttons and behavior as the DEFT. This patch adds the two relevant USB IDs to enable operation of the three Fn buttons on the top of the device. Cc: Diego Elio Petteno Signed-off-by: Alex Manoussakis Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman commit a258a35a9930d410b7550cea90f9bae9d03ce339 Author: Will Deacon Date: Fri Oct 13 15:58:25 2017 -0700 mm: page_vma_mapped: ensure pmd is loaded with READ_ONCE outside of lock commit a7b100953aa33a5bbdc3e5e7f2241b9c0704606e upstream. Loading the pmd without holding the pmd_lock exposes us to races with concurrent updaters of the page tables but, worse still, it also allows the compiler to cache the pmd value in a register and reuse it later on, even if we've performed a READ_ONCE in between and seen a more recent value. In the case of page_vma_mapped_walk, this leads to the following crash when the pmd loaded for the initial pmd_trans_huge check is all zeroes and a subsequent valid table entry is loaded by check_pmd. We then proceed into map_pte, but the compiler re-uses the zero entry inside pte_offset_map, resulting in a junk pointer being installed in pvmw->pte: PC is at check_pte+0x20/0x170 LR is at page_vma_mapped_walk+0x2e0/0x540 [...] Process doio (pid: 2463, stack limit = 0xffff00000f2e8000) Call trace: check_pte+0x20/0x170 page_vma_mapped_walk+0x2e0/0x540 page_mkclean_one+0xac/0x278 rmap_walk_file+0xf0/0x238 rmap_walk+0x64/0xa0 page_mkclean+0x90/0xa8 clear_page_dirty_for_io+0x84/0x2a8 mpage_submit_page+0x34/0x98 mpage_process_page_bufs+0x164/0x170 mpage_prepare_extent_to_map+0x134/0x2b8 ext4_writepages+0x484/0xe30 do_writepages+0x44/0xe8 __filemap_fdatawrite_range+0xbc/0x110 file_write_and_wait_range+0x48/0xd8 ext4_sync_file+0x80/0x4b8 vfs_fsync_range+0x64/0xc0 SyS_msync+0x194/0x1e8 This patch fixes the problem by ensuring that READ_ONCE is used before the initial checks on the pmd, and this value is subsequently used when checking whether or not the pmd is present. pmd_check is removed and the pmd_present check is inlined directly. Link: http://lkml.kernel.org/r/1507222630-5839-1-git-send-email-will.deacon@arm.com Fixes: f27176cfc363 ("mm: convert page_mkclean_one() to use page_vma_mapped_walk()") Signed-off-by: Will Deacon Tested-by: Yury Norov Tested-by: Richard Ruigrok Acked-by: Kirill A. Shutemov Cc: "Paul E. McKenney" Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [will: backport to 4.13.y] Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman commit 74b6b98867585d00ff469432847f99766a0edd74 Author: Mark Rutland Date: Fri Oct 6 19:38:22 2017 +0100 perf pmu: Unbreak perf record for arm/arm64 with events with explicit PMU commit 66ec11919a0f96e936bb731fdbc2851316077d26 upstream. Currently, perf record is broken on arm/arm64 systems when the PMU is specified explicitly as part of the event, e.g. $ ./perf record -e armv8_cortex_a53/cpu_cycles/u true In such cases, perf record fails to open events unless perf_event_paranoid is set to -1, even if the PMU in question supports mode exclusion. Further, even when perf_event_paranoid is toggled, no samples are recorded. This is an unintended side effect of commit: e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring) ... which assumes that if a PMU has an associated cpu_map, it is an uncore PMU, and forces events for such PMUs to be system-wide. This is not true for arm/arm64 systems, which can have heterogeneous CPUs. To account for this, multiple CPU PMUs are exposed, each with a "cpus" field under sysfs, which the perf tool parses into a cpu_map. ARM PMUs do not have a "cpumask" file, and only have a "cpus" file. For the gory details as to why, see commit: 7e3fcffe95544010 ("perf pmu: Support alternative sysfs cpumask") Given all of this, we can instead identify uncore PMUs by explicitly checking for a "cpumask" file, and restore arm/arm64 PMU support back to a working state. This patch does so, adding a new perf_pmu::is_uncore field, and splitting the existing cpumask parsing so that it can be reused. Signed-off-by: Mark Rutland Tested-by Will Deacon Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring) Link: http://lkml.kernel.org/r/1507315102-5942-1-git-send-email-mark.rutland@arm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman commit 92737d3030d42f652680d7f8b7d1741669677741 Author: Paolo Bonzini Date: Tue Oct 10 12:12:57 2017 +0200 x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on hypervisors commit cc6afe2240298049585e86b1ade85efc8a7f225d upstream. Commit 594a30fb1242 ("x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature", 2017-08-30) was also about silencing the warning on VirtualBox; however, KVM does expose the TSC deadline timer, and it's virtualized so that it is immune from CPU errata. Therefore, booting 4.13 with "-cpu Haswell" shows this in the logs: [ 0.000000] [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0xb2 (or later) Even if you had a hypervisor that does _not_ virtualize the TSC deadline and rather exposes the hardware one, it should be the hypervisors task to update microcode and possibly hide the flag from CPUID. So just hide the message when running on _any_ hypervisor, not just those that do not support the TSC deadline timer. The older check still makes sense, so keep it. Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata") Signed-off-by: Paolo Bonzini Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Hans de Goede Cc: kvm@vger.kernel.org Link: https://lkml.kernel.org/r/1507630377-54471-1-git-send-email-pbonzini@redhat.com Signed-off-by: Greg Kroah-Hartman commit 73b866d89bf7c9a895d5445faad03fa3d56c8af8 Author: Hans de Goede Date: Wed Aug 30 12:58:11 2017 +0200 x86/apic: Silence "FW_BUG TSC_DEADLINE disabled due to Errata" on CPUs without the feature commit 594a30fb12424717a41c62323d2a8bf167dbccad upstream. When booting 4.13 on a VirtualBox VM on a Skylake host the following error shows up in the logs: [ 0.000000] [Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0xb2 (or later) This is caused by apic_check_deadline_errata() only checking CPU model and not the X86_FEATURE_TSC_DEADLINE_TIMER flag (which VirtualBox does NOT export to the guest), combined with VirtualBox not exporting the micro-code version to the guest. This commit adds a check for X86_FEATURE_TSC_DEADLINE_TIMER to apic_check_deadline_errata(), silencing this error on VirtualBox VMs. Signed-off-by: Hans de Goede Acked-by: Thomas Gleixner Cc: Frank Mehnert Cc: Linus Torvalds Cc: Michael Thayer Cc: Michal Necasek Cc: Peter Zijlstra Fixes: bd9240a18e ("x86/apic: Add TSC_DEADLINE quirk due to errata") Link: http://lkml.kernel.org/r/20170830105811.27539-1-hdegoede@redhat.com Signed-off-by: Ingo Molnar Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman