Skip to content
  1. Feb 10, 2018
  2. Feb 03, 2018
  3. Feb 01, 2018
  4. Jan 31, 2018
    • Radim Krčmář's avatar
      Merge tag 'kvm-arm-for-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm · e5317539
      Radim Krčmář authored
      KVM/ARM Changes for v4.16
      
      The changes for this version include icache invalidation optimizations
      (improving VM startup time), support for forwarded level-triggered
      interrupts (improved performance for timers and passthrough platform
      devices), a small fix for power-management notifiers, and some cosmetic
      changes.
      e5317539
    • Radim Krčmář's avatar
      810f4600
    • Thomas Gleixner's avatar
      x86/kvm: Make it compile on 32bit and with HYPYERVISOR_GUEST=n · 5fa4ec9c
      Thomas Gleixner authored
      The reenlightment support for hyperv slapped a direct reference to
      x86_hyper_type into the kvm code which results in the following build
      failure when CONFIG_HYPERVISOR_GUEST=n:
      
      arch/x86/kvm/x86.c:6259:6: error: ‘x86_hyper_type’ undeclared (first use in this function)
      arch/x86/kvm/x86.c:6259:6: note: each undeclared identifier is reported only once for each function it appears in
      
      Use the proper helper function to cure that.
      
      The 32bit compile fails because of:
      
      arch/x86/kvm/x86.c:5936:13: warning: ‘kvm_hyperv_tsc_notifier’ defined but not used [-Wunused-function]
      
      which is a real trainwreck engineering artwork. The callsite is wrapped
      into #ifdef CONFIG_X86_64, but the function itself has the #ifdef inside
      the function body. Make the function itself wrapped into the ifdef to cure
      that.
      
      Qualiteee....
      
      Fixes: 0092e434
      
       ("x86/kvm: Support Hyper-V reenlightenment")
      Reported-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      5fa4ec9c
    • Christoffer Dall's avatar
      KVM: arm/arm64: Fixup userspace irqchip static key optimization · cd15d205
      Christoffer Dall authored
      
      
      When I introduced a static key to avoid work in the critical path for
      userspace irqchips which is very rarely used, I accidentally messed up
      my logic and used && where I should have used ||, because the point was
      to short-circuit the evaluation in case userspace irqchips weren't even
      in use.
      
      This fixes an issue when running in-kernel irqchip VMs alongside
      userspace irqchip VMs.
      
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Fixes: c44c232ee2d3 ("KVM: arm/arm64: Avoid work when userspace iqchips are not used")
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      cd15d205
    • Christoffer Dall's avatar
      KVM: arm/arm64: Fix userspace_irqchip_in_use counting · f1d7231c
      Christoffer Dall authored
      
      
      We were not decrementing the static key count in the right location.
      kvm_arch_vcpu_destroy() is only called to clean up after a failed
      VCPU create attempt, whereas kvm_arch_vcpu_free() is called on teardown
      of the VM as well.  Move the static key decrement call to
      kvm_arch_vcpu_free().
      
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      f1d7231c
    • Christoffer Dall's avatar
      KVM: arm/arm64: Fix incorrect timer_is_pending logic · 13e59ece
      Christoffer Dall authored
      
      
      After the recently introduced support for level-triggered mapped
      interrupt, I accidentally left the VCPU thread busily going back and
      forward between the guest and the hypervisor whenever the guest was
      blocking, because I would always incorrectly report that a timer
      interrupt was pending.
      
      This is because the timer->irq.level field is not valid for mapped
      interrupts, where we offload the level state to the hardware, and as a
      result this field is always true.
      
      Luckily the problem can be relatively easily solved by not checking the
      cached signal state of either timer in kvm_timer_should_fire() but
      instead compute the timer state on the fly, which we do already if the
      cached signal state wasn't high.  In fact, the only reason for checking
      the cached signal state was a tiny optimization which would only be
      potentially faster when the polling loop detects a pending timer
      interrupt, which is quite unlikely.
      
      Instead of duplicating the logic from kvm_arch_timer_handler(), we
      enlighten kvm_timer_should_fire() to report something valid when the
      timer state is loaded onto the hardware.  We can then call this from
      kvm_arch_timer_handler() as well and avoid the call to
      __timer_snapshot_state() in kvm_arch_timer_get_input_level().
      
      Reported-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Tested-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Reviewed-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
      13e59ece
    • Cornelia Huck's avatar
      MAINTAINERS: update KVM/s390 maintainers · cd74ff94
      Cornelia Huck authored
      
      
      As I have neither too much time nor access to the architecture
      documentation anymore, let's switch my status from maintainer to
      reviewer. Janosch will step in as second maintainer.
      
      Acked-by: default avatarJanosch Frank <frankja@linux.vnet.ibm.com>
      Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
      cd74ff94
    • Cornelia Huck's avatar
    • Cornelia Huck's avatar
    • Vitaly Kuznetsov's avatar
      x86/kvm: Support Hyper-V reenlightenment · 0092e434
      Vitaly Kuznetsov authored
      
      
      When running nested KVM on Hyper-V guests its required to update
      masterclocks for all guests when L1 migrates to a host with different TSC
      frequency.
      
      Implement the procedure in the following way:
        - Pause all guests.
        - Tell the host (Hyper-V) to stop emulating TSC accesses.
        - Update the gtod copy, recompute clocks.
        - Unpause all guests.
      
      This is somewhat similar to cpufreq but there are two important differences:
       - TSC emulation can only be disabled globally (on all CPUs)
       - The new TSC frequency is not known until emulation is turned off so
         there is no way to 'prepare' for the event upfront.
      
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      Link: https://lkml.kernel.org/r/20180124132337.30138-8-vkuznets@redhat.com
      0092e434
    • Vitaly Kuznetsov's avatar
      x86/kvm: Pass stable clocksource to guests when running nested on Hyper-V · b0c39dc6
      Vitaly Kuznetsov authored
      
      
      Currently, KVM is able to work in 'masterclock' mode passing
      PVCLOCK_TSC_STABLE_BIT to guests when the clocksource which is used on the
      host is TSC.
      
      When running nested on Hyper-V the guest normally uses a different one: TSC
      page which is resistant to TSC frequency changes on events like L1
      migration. Add support for it in KVM.
      
      The only non-trivial change is in vgettsc(): when updating the gtod copy
      both the clock readout and tsc value have to be updated now.
      
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      Link: https://lkml.kernel.org/r/20180124132337.30138-7-vkuznets@redhat.com
      b0c39dc6
    • Vitaly Kuznetsov's avatar
      x86/irq: Count Hyper-V reenlightenment interrupts · 51d4e5da
      Vitaly Kuznetsov authored
      
      
      Hyper-V reenlightenment interrupts arrive when the VM is migrated, While
      they are not interesting in general it's important when L2 nested guests
      are running.
      
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      Link: https://lkml.kernel.org/r/20180124132337.30138-6-vkuznets@redhat.com
      51d4e5da
    • Vitaly Kuznetsov's avatar
      x86/hyperv: Redirect reenlightment notifications on CPU offlining · e7c4e36c
      Vitaly Kuznetsov authored
      
      
      It is very unlikely for CPUs to get offlined when running on Hyper-V as
      there is a protection in the vmbus module which prevents it when the guest
      has any VMBus devices assigned. This, however, may change in future if an
      option to reassign an already active channel will be added. It is also
      possible to run without any Hyper-V devices or to have a CPU with no
      assigned channels.
      
      Reassign reenlightenment notifications to some other active CPU when the
      CPU which is assigned to them goes offline.
      
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      Link: https://lkml.kernel.org/r/20180124132337.30138-5-vkuznets@redhat.com
      e7c4e36c
    • Vitaly Kuznetsov's avatar
      x86/hyperv: Reenlightenment notifications support · 93286261
      Vitaly Kuznetsov authored
      
      
      Hyper-V supports Live Migration notification. This is supposed to be used
      in conjunction with TSC emulation: when a VM is migrated to a host with
      different TSC frequency for some short period the host emulates the
      accesses to TSC and sends an interrupt to notify about the event. When the
      guest is done updating everything it can disable TSC emulation and
      everything will start working fast again.
      
      These notifications weren't required until now as Hyper-V guests are not
      supposed to use TSC as a clocksource: in Linux the TSC is even marked as
      unstable on boot. Guests normally use 'tsc page' clocksource and host
      updates its values on migrations automatically.
      
      Things change when with nested virtualization: even when the PV
      clocksources (kvm-clock or tsc page) are passed through to the nested
      guests the TSC frequency and frequency changes need to be know..
      
      Hyper-V Top Level Functional Specification (as of v5.0b) wrongly specifies
      EAX:BIT(12) of CPUID:0x40000009 as the feature identification bit. The
      right one to check is EAX:BIT(13) of CPUID:0x40000003. I was assured that
      the fix in on the way.
      
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      Link: https://lkml.kernel.org/r/20180124132337.30138-4-vkuznets@redhat.com
      93286261
    • Vitaly Kuznetsov's avatar
      x86/hyperv: Add a function to read both TSC and TSC page value simulateneously · e2768eaa
      Vitaly Kuznetsov authored
      
      
      This is going to be used from KVM code where both TSC and TSC page value
      are needed.
      
      Nothing is supposed to use the function when Hyper-V code is compiled out,
      just BUG().
      
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      Link: https://lkml.kernel.org/r/20180124132337.30138-3-vkuznets@redhat.com
      e2768eaa
    • Vitaly Kuznetsov's avatar
      x86/hyperv: Check for required priviliges in hyperv_init() · 89a8f6d4
      Vitaly Kuznetsov authored
      
      
      In hyperv_init() its presumed that it always has access to VP index and
      hypercall MSRs while according to the specification it should be checked if
      it's allowed to access the corresponding MSRs before accessing them.
      
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: kvm@vger.kernel.org
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
      Cc: Roman Kagan <rkagan@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: devel@linuxdriverproject.org
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Cathy Avery <cavery@redhat.com>
      Cc: Mohammed Gamal <mmorsy@redhat.com>
      Link: https://lkml.kernel.org/r/20180124132337.30138-2-vkuznets@redhat.com
      89a8f6d4
    • Linus Torvalds's avatar
      Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 72906f38
      Linus Torvalds authored
      Pull x86 hyperv update from Ingo Molnar:
       "Enable PCID support on Hyper-V guests"
      
      * 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/hyperv: Stop suppressing X86_FEATURE_PCID
      72906f38
    • Linus Torvalds's avatar
      Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3ccabd6d
      Linus Torvalds authored
      Pull x86 cleanups from Ingo Molnar:
       "Misc cleanups"
      
      * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Remove unused IOMMU_STRESS Kconfig
        x86/extable: Mark exception handler functions visible
        x86/timer: Don't inline __const_udelay
        x86/headers: Remove duplicate #includes
      3ccabd6d
    • Linus Torvalds's avatar
      Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5289d300
      Linus Torvalds authored
      Pull x86 apic cleanup from Ingo Molnar:
       "A single change simplifying the APIC code bit"
      
      * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/apic: Remove local var in flat_send_IPI_allbutself()
      5289d300
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · af8c5e2d
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
       "The main changes in this cycle were:
      
         - Implement frequency/CPU invariance and OPP selection for
           SCHED_DEADLINE (Juri Lelli)
      
         - Tweak the task migration logic for better multi-tasking
           workload scalability (Mel Gorman)
      
         - Misc cleanups, fixes and improvements"
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/deadline: Make bandwidth enforcement scale-invariant
        sched/cpufreq: Move arch_scale_{freq,cpu}_capacity() outside of #ifdef CONFIG_SMP
        sched/cpufreq: Remove arch_scale_freq_capacity()'s 'sd' parameter
        sched/cpufreq: Always consider all CPUs when deciding next freq
        sched/cpufreq: Split utilization signals
        sched/cpufreq: Change the worker kthread to SCHED_DEADLINE
        sched/deadline: Move CPU frequency selection triggering points
        sched/cpufreq: Use the DEADLINE utilization signal
        sched/deadline: Implement "runtime overrun signal" support
        sched/fair: Only immediately migrate tasks due to interrupts if prev and target CPUs share cache
        sched/fair: Correct obsolete comment about cpufreq_update_util()
        sched/fair: Remove impossible condition from find_idlest_group_cpu()
        sched/cpufreq: Don't pass flags to sugov_set_iowait_boost()
        sched/cpufreq: Initialize sg_cpu->flags to 0
        sched/fair: Consider RT/IRQ pressure in capacity_spare_wake()
        sched/fair: Use 'unsigned long' for utilization, consistently
        sched/core: Rework and clarify prepare_lock_switch()
        sched/fair: Remove unused 'curr' parameter from wakeup_gran
        sched/headers: Constify object_is_on_stack()
      af8c5e2d
    • Linus Torvalds's avatar
      Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a1c75e17
      Linus Torvalds authored
      Pull x86 RAS updates from Ingo Molnar:
      
       - various AMD SMCA error parsing/reporting improvements (Yazen Ghannam)
      
       - extend Intel CMCI error reporting to more cases (Xie XiuQi)
      
      * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/MCE: Make correctable error detection look at the Deferred bit
        x86/MCE: Report only DRAM ECC as memory errors on AMD systems
        x86/MCE/AMD: Define a function to get SMCA bank type
        x86/mce/AMD: Don't set DEF_INT_TYPE in MSR_CU_DEF_ERR on SMCA systems
        x86/MCE: Extend table to report action optional errors through CMCI too
      a1c75e17
    • Linus Torvalds's avatar
      Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d8b91dde
      Linus Torvalds authored
      Pull perf updates from Ingo Molnar:
       "Kernel side changes:
      
         - Clean up the x86 instruction decoder (Masami Hiramatsu)
      
         - Add new uprobes optimization for PUSH instructions on x86 (Yonghong
           Song)
      
         - Add MSR_IA32_THERM_STATUS to the MSR events (Stephane Eranian)
      
         - Fix misc bugs, update documentation, plus various cleanups (Jiri
           Olsa)
      
        There's a large number of tooling side improvements:
      
         - Intel-PT/BTS improvements (Adrian Hunter)
      
         - Numerous 'perf trace' improvements (Arnaldo Carvalho de Melo)
      
         - Introduce an errno code to string facility (Hendrik Brueckner)
      
         - Various build system improvements (Jiri Olsa)
      
         - Add support for CoreSight trace decoding by making the perf tools
           use the external openCSD (Mathieu Poirier, Tor Jeremiassen)
      
         - Add ARM Statistical Profiling Extensions (SPE) support (Kim
           Phillips)
      
         - libtraceevent updates (Steven Rostedt)
      
         - Intel vendor event JSON updates (Andi Kleen)
      
         - Introduce 'perf report --mmaps' and 'perf report --tasks' to show
           info present in 'perf.data' (Jiri Olsa, Arnaldo Carvalho de Melo)
      
         - Add infrastructure to record first and last sample time to the
           perf.data file header, so that when processing all samples in a
           'perf record' session, such as when doing build-id processing, or
           when specifically requesting that that info be recorded, use that
           in 'perf report --time', that also got support for percent slices
           in addition to absolute ones.
      
           I.e. now it is possible to ask for the samples in the 10%-20% time
           slice of a perf.data file (Jin Yao)
      
         - Allow system wide 'perf stat --per-thread', sorting the result (Jin
           Yao)
      
           E.g.:
      
            [root@jouet ~]# perf stat --per-thread --metrics IPC
            ^C
             Performance counter stats for 'system wide':
      
                        make-22229  23,012,094,032  inst_retired.any   #  0.8 IPC
                         cc1-22419     692,027,497  inst_retired.any   #  0.8 IPC
                         gcc-22418     328,231,855  inst_retired.any   #  0.9 IPC
                         cc1-22509     220,853,647  inst_retired.any   #  0.8 IPC
                         gcc-22486     199,874,810  inst_retired.any   #  1.0 IPC
                          as-22466     177,896,365  inst_retired.any   #  0.9 IPC
                         cc1-22465     150,732,374  inst_retired.any   #  0.8 IPC
                         gcc-22508     112,555,593  inst_retired.any   #  0.9 IPC
                         cc1-22487     108,964,079  inst_retired.any   #  0.7 IPC
             qemu-system-x86-2697       21,330,550  inst_retired.any   #  0.3 IPC
             systemd-journal-551        20,642,951  inst_retired.any   #  0.4 IPC
             docker-containe-17651       9,552,892  inst_retired.any   #  0.5 IPC
             dockerd-current-9809        7,528,586  inst_retired.any   #  0.5 IPC
                        make-22153  12,504,194,380  inst_retired.any   #  0.8 IPC
                     python2-22429  12,081,290,954  inst_retired.any   #  0.8 IPC
            <SNIP>
                     python2-22429  15,026,328,103  cpu_clk_unhalted.thread
                         cc1-22419     826,660,193  cpu_clk_unhalted.thread
                         gcc-22418     365,321,295  cpu_clk_unhalted.thread
                         cc1-22509     279,169,362  cpu_clk_unhalted.thread
                         gcc-22486     210,156,950  cpu_clk_unhalted.thread
            <SNIP>
      
                 5.638075538 seconds time elapsed
      
           [root@jouet ~]#
      
         - Improve shell auto-completion of perf events (Jin Yao)
      
         - 'perf probe' improvements (Masami Hiramatsu)
      
         - Improve PMU infrastructure to support amp64's ThunderX2
           implementation defined core events (Ganapatrao Kulkarni)
      
         - Various annotation related improvements and fixes (Thomas Richter)
      
         - Clarify usage of 'overwrite' and 'backward' in the evlist/mmap
           code, removing the 'overwrite' parameter from several functions as
           it was always used it as 'false' (Wang Nan)
      
         - Fix/improve 'perf record' reverse recording support (Wang Nan)
      
         - Improve command line options documentation (Sihyeon Jang)
      
         - Optimize sample parsing for ordering events, where we don't need to
           parse all the PERF_SAMPLE_ bits, just the ones leading to the
           timestamp needed to reorder events (Jiri Olsa)
      
         - Generalize the annotation code to support other source information
           besides objdump/DWARF obtained ones, starting with python scripts,
           that will is slated to be merged soon (Jiri Olsa)
      
         - ... and a lot more that I failed to list, see the shortlog and
           changelog for details"
      
      * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (262 commits)
        perf trace beauty flock: Move to separate object file
        perf evlist: Remove fcntl.h from evlist.h
        perf trace beauty futex: Beautify FUTEX_BITSET_MATCH_ANY
        perf trace: Do not print from time delta for interrupted syscall lines
        perf trace: Add --print-sample
        perf bpf: Remove misplaced __maybe_unused attribute
        MAINTAINERS: Adding entry for CoreSight trace decoding
        perf tools: Add mechanic to synthesise CoreSight trace packets
        perf tools: Add full support for CoreSight trace decoding
        pert tools: Add queue management functionality
        perf tools: Add functionality to communicate with the openCSD decoder
        perf tools: Add support for decoding CoreSight trace data
        perf tools: Add decoder mechanic to support dumping trace data
        perf tools: Add processing of coresight metadata
        perf tools: Add initial entry point for decoder CoreSight traces
        perf tools: Integrating the CoreSight decoding library
        perf vendor events intel: Update IvyTown files to V20
        perf vendor events intel: Update IvyBridge files to V20
        perf vendor events intel: Update BroadwellDE events to V7
        perf vendor events intel: Update SkylakeX events to V1.06
        ...
      d8b91dde
    • Linus Torvalds's avatar
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5e7481a2
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "The main changes relate to making lock_is_held() et al (and external
        wrappers of them) work on const data types - this requires const
        propagation through the depths of lockdep.
      
        This removes a number of ugly type hacks the external helpers used"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lockdep: Convert some users to const
        lockdep: Make lockdep checking constant
        lockdep: Assign lock keys on registration
      5e7481a2
    • Linus Torvalds's avatar
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b8dbf730
      Linus Torvalds authored
      Pull EFI updates from Ingo Molnar:
       "The biggest change in this cycle was the addition of ARM CPER error
        decoding when printing EFI errors into the kernel log.
      
        There are also misc smaller updates: documentation update, cleanups
        and an EFI memory map permissions quirk"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/efi: Clarify that reset attack mitigation needs appropriate userspace
        efi: Parse ARM error information value
        efi: Move ARM CPER code to new file
        efi: Use PTR_ERR_OR_ZERO()
        arm64/efi: Ignore EFI_MEMORY_XP attribute if RP and/or WP are set
        efi/capsule-loader: Fix pr_err() string to end with newline
      b8dbf730
    • Linus Torvalds's avatar
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d7727946
      Linus Torvalds authored
      Pull RCU updates from Ingo Molnar:
       "The main RCU changes in this cycle were:
      
         - Updates to use cond_resched() instead of cond_resched_rcu_qs()
           where feasible (currently everywhere except in kernel/rcu and in
           kernel/torture.c). Also a couple of fixes to avoid sending IPIs to
           offline CPUs.
      
         - Updates to simplify RCU's dyntick-idle handling.
      
         - Updates to remove almost all uses of smp_read_barrier_depends() and
           read_barrier_depends().
      
         - Torture-test updates.
      
         - Miscellaneous fixes"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (72 commits)
        torture: Save a line in stutter_wait(): while -> for
        torture: Eliminate torture_runnable and perf_runnable
        torture: Make stutter less vulnerable to compilers and races
        locking/locktorture: Fix num reader/writer corner cases
        locking/locktorture: Fix rwsem reader_delay
        torture: Place all torture-test modules in one MAINTAINERS group
        rcutorture/kvm-build.sh: Skip build directory check
        rcutorture: Simplify functions.sh include path
        rcutorture: Simplify logging
        rcutorture/kvm-recheck-*: Improve result directory readability check
        rcutorture/kvm.sh: Support execution from any directory
        rcutorture/kvm.sh: Use consistent help text for --qemu-args
        rcutorture/kvm.sh: Remove unused variable, `alldone`
        rcutorture: Remove unused script, config2frag.sh
        rcutorture/configinit: Fix build directory error message
        rcutorture: Preempt RCU-preempt readers more vigorously
        torture: Reduce #ifdefs for preempt_schedule()
        rcu: Remove have_rcu_nocb_mask from tree_plugin.h
        rcu: Add comment giving debug strategy for double call_rcu()
        tracing, rcu: Hide trace event rcu_nocb_wake when not used
        ...
      d7727946
    • Linus Torvalds's avatar
      Merge branch 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c1488798
      Linus Torvalds authored
      Pull STRICT_DEVMEM default from Ingo Molnar:
       "Make CONFIG_STRICT_DEVMEM default-y on x86 and arm64 as well, to
        follow the distro status quo"
      
      * 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Kconfig: Make STRICT_DEVMEM default-y on x86 and arm64
      c1488798
    • Radim Krčmář's avatar
      Merge tag 'kvm-s390-next-4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux · 92ea2b33
      Radim Krčmář authored
      KVM: s390: Fixes and features for 4.16 part 2
      
      - exitless interrupts for emulated devices (Michael Mueller)
      - cleanup of cpuflag handling (David Hildenbrand)
      - kvm stat counter improvements (Christian Borntraeger)
      - vsie improvements (David Hildenbrand)
      - mm cleanup (Janosch Frank)
      92ea2b33
  5. Jan 30, 2018
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6304672b
      Linus Torvalds authored
      Pull x86/pti updates from Thomas Gleixner:
       "Another set of melted spectrum related changes:
      
         - Code simplifications and cleanups for RSB and retpolines.
      
         - Make the indirect calls in KVM speculation safe.
      
         - Whitelist CPUs which are known not to speculate from Meltdown and
           prepare for the new CPUID flag which tells the kernel that a CPU is
           not affected.
      
         - A less rigorous variant of the module retpoline check which merily
           warns when a non-retpoline protected module is loaded and reflects
           that fact in the sysfs file.
      
         - Prepare for Indirect Branch Prediction Barrier support.
      
         - Prepare for exposure of the Speculation Control MSRs to guests, so
           guest OSes which depend on those "features" can use them. Includes
           a blacklist of the broken microcodes. The actual exposure of the
           MSRs through KVM is still being worked on"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/speculation: Simplify indirect_branch_prediction_barrier()
        x86/retpoline: Simplify vmexit_fill_RSB()
        x86/cpufeatures: Clean up Spectre v2 related CPUID flags
        x86/cpu/bugs: Make retpoline module warning conditional
        x86/bugs: Drop one "mitigation" from dmesg
        x86/nospec: Fix header guards names
        x86/alternative: Print unadorned pointers
        x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) support
        x86/cpufeature: Blacklist SPEC_CTRL/PRED_CMD on early Spectre v2 microcodes
        x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown
        x86/msr: Add definitions for new speculation control MSRs
        x86/cpufeatures: Add AMD feature bits for Speculation Control
        x86/cpufeatures: Add Intel feature bits for Speculation Control
        x86/cpufeatures: Add CPUID_7_EDX CPUID leaf
        module/retpoline: Warn about missing retpoline in module
        KVM: VMX: Make indirect call speculation safe
        KVM: x86: Make indirect calls in emulator speculation safe
      6304672b
    • Linus Torvalds's avatar
      Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 94263352
      Linus Torvalds authored
      Pull x86 mm update from Thomas Gleixner:
       "A single patch which excludes the GART aperture from vmcore as
        accessing that area from a dump kernel can crash the kernel.
      
        Not necessarily the nicest way to fix this, but curing this from
        ground up requires a more thorough rewrite of the whole kexec/kdump
        magic"
      
      * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/gart: Exclude GART aperture from vmcore
      94263352
    • Linus Torvalds's avatar
      Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 36c289e7
      Linus Torvalds authored
      Pull x86 timer updates from Thomas Gleixner:
       "A small set of updates for x86 specific timers:
      
         - Mark TSC invariant on a subset of Centaur CPUs
      
         - Allow TSC calibration without PIT on mobile platforms which lack
           legacy devices"
      
      * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/centaur: Mark TSC invariant
        x86/tsc: Introduce early tsc clocksource
        x86/time: Unconditionally register legacy timer interrupt
        x86/tsc: Allow TSC calibration without PIT
      36c289e7