24 Feb, 2020

1 commit

  • [ Upstream commit 8b7e20a7ba54836076ff35a28349dabea4cec48f ]

    Add TEST opcode to Group3-2 reg=001b as same as Group3-1 does.

    Commit

    12a78d43de76 ("x86/decoder: Add new TEST instruction pattern")

    added a TEST opcode assignment to f6 XX/001/XXX (Group 3-1), but did
    not add f7 XX/001/XXX (Group 3-2).

    Actually, this TEST opcode variant (ModRM.reg /1) is not described in
    the Intel SDM Vol2 but in AMD64 Architecture Programmer's Manual Vol.3,
    Appendix A.2 Table A-6. ModRM.reg Extensions for the Primary Opcode Map.

    Without this fix, Randy found a warning by insn_decoder_test related
    to this issue as below.

    HOSTCC arch/x86/tools/insn_decoder_test
    HOSTCC arch/x86/tools/insn_sanity
    TEST posttest
    arch/x86/tools/insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this.
    arch/x86/tools/insn_decoder_test: warning: ffffffff81000bf1: f7 0b 00 01 08 00 testl $0x80100,(%rbx)
    arch/x86/tools/insn_decoder_test: warning: objdump says 6 bytes, but insn_get_length() says 2
    arch/x86/tools/insn_decoder_test: warning: Decoded and checked 11913894 instructions with 1 failures
    TEST posttest
    arch/x86/tools/insn_sanity: Success: decoded and checked 1000000 random instructions with 0 errors (seed:0x871ce29c)

    To fix this error, add the TEST opcode according to AMD64 APM Vol.3.

    [ bp: Massage commit message. ]

    Reported-by: Randy Dunlap
    Signed-off-by: Masami Hiramatsu
    Signed-off-by: Borislav Petkov
    Acked-by: Randy Dunlap
    Tested-by: Randy Dunlap
    Link: https://lkml.kernel.org/r/157966631413.9580.10311036595431878351.stgit@devnote2
    Signed-off-by: Sasha Levin

    Masami Hiramatsu
     

31 Dec, 2019

1 commit

  • [ Upstream commit b980be189c9badba50634671e2303e92bf28e35a ]

    Add to the opcode map the following instructions:
    cldemote
    tpause
    umonitor
    umwait
    movdiri
    movdir64b
    enqcmd
    enqcmds
    encls
    enclu
    enclv
    pconfig
    wbnoinvd

    For information about the instructions, refer Intel SDM May 2019
    (325462-070US) and Intel Architecture Instruction Set Extensions
    May 2019 (319433-037).

    The instruction decoding can be tested using the perf tools'
    "x86 instruction decoder - new instructions" test as folllows:

    $ perf test -v "new " 2>&1 | grep -i cldemote
    Decoded ok: 0f 1c 00 cldemote (%eax)
    Decoded ok: 0f 1c 05 78 56 34 12 cldemote 0x12345678
    Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%eax,%ecx,8)
    Decoded ok: 0f 1c 00 cldemote (%rax)
    Decoded ok: 41 0f 1c 00 cldemote (%r8)
    Decoded ok: 0f 1c 04 25 78 56 34 12 cldemote 0x12345678
    Decoded ok: 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%rax,%rcx,8)
    Decoded ok: 41 0f 1c 84 c8 78 56 34 12 cldemote 0x12345678(%r8,%rcx,8)
    $ perf test -v "new " 2>&1 | grep -i tpause
    Decoded ok: 66 0f ae f3 tpause %ebx
    Decoded ok: 66 0f ae f3 tpause %ebx
    Decoded ok: 66 41 0f ae f0 tpause %r8d
    $ perf test -v "new " 2>&1 | grep -i umonitor
    Decoded ok: 67 f3 0f ae f0 umonitor %ax
    Decoded ok: f3 0f ae f0 umonitor %eax
    Decoded ok: 67 f3 0f ae f0 umonitor %eax
    Decoded ok: f3 0f ae f0 umonitor %rax
    Decoded ok: 67 f3 41 0f ae f0 umonitor %r8d
    $ perf test -v "new " 2>&1 | grep -i umwait
    Decoded ok: f2 0f ae f0 umwait %eax
    Decoded ok: f2 0f ae f0 umwait %eax
    Decoded ok: f2 41 0f ae f0 umwait %r8d
    $ perf test -v "new " 2>&1 | grep -i movdiri
    Decoded ok: 0f 38 f9 03 movdiri %eax,(%ebx)
    Decoded ok: 0f 38 f9 88 78 56 34 12 movdiri %ecx,0x12345678(%eax)
    Decoded ok: 48 0f 38 f9 03 movdiri %rax,(%rbx)
    Decoded ok: 48 0f 38 f9 88 78 56 34 12 movdiri %rcx,0x12345678(%rax)
    $ perf test -v "new " 2>&1 | grep -i movdir64b
    Decoded ok: 66 0f 38 f8 18 movdir64b (%eax),%ebx
    Decoded ok: 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%eax),%ecx
    Decoded ok: 67 66 0f 38 f8 1c movdir64b (%si),%bx
    Decoded ok: 67 66 0f 38 f8 8c 34 12 movdir64b 0x1234(%si),%cx
    Decoded ok: 66 0f 38 f8 18 movdir64b (%rax),%rbx
    Decoded ok: 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%rax),%rcx
    Decoded ok: 67 66 0f 38 f8 18 movdir64b (%eax),%ebx
    Decoded ok: 67 66 0f 38 f8 88 78 56 34 12 movdir64b 0x12345678(%eax),%ecx
    $ perf test -v "new " 2>&1 | grep -i enqcmd
    Decoded ok: f2 0f 38 f8 18 enqcmd (%eax),%ebx
    Decoded ok: f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%eax),%ecx
    Decoded ok: 67 f2 0f 38 f8 1c enqcmd (%si),%bx
    Decoded ok: 67 f2 0f 38 f8 8c 34 12 enqcmd 0x1234(%si),%cx
    Decoded ok: f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    Decoded ok: 67 f3 0f 38 f8 1c enqcmds (%si),%bx
    Decoded ok: 67 f3 0f 38 f8 8c 34 12 enqcmds 0x1234(%si),%cx
    Decoded ok: f2 0f 38 f8 18 enqcmd (%rax),%rbx
    Decoded ok: f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%rax),%rcx
    Decoded ok: 67 f2 0f 38 f8 18 enqcmd (%eax),%ebx
    Decoded ok: 67 f2 0f 38 f8 88 78 56 34 12 enqcmd 0x12345678(%eax),%ecx
    Decoded ok: f3 0f 38 f8 18 enqcmds (%rax),%rbx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%rax),%rcx
    Decoded ok: 67 f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: 67 f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    $ perf test -v "new " 2>&1 | grep -i enqcmds
    Decoded ok: f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    Decoded ok: 67 f3 0f 38 f8 1c enqcmds (%si),%bx
    Decoded ok: 67 f3 0f 38 f8 8c 34 12 enqcmds 0x1234(%si),%cx
    Decoded ok: f3 0f 38 f8 18 enqcmds (%rax),%rbx
    Decoded ok: f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%rax),%rcx
    Decoded ok: 67 f3 0f 38 f8 18 enqcmds (%eax),%ebx
    Decoded ok: 67 f3 0f 38 f8 88 78 56 34 12 enqcmds 0x12345678(%eax),%ecx
    $ perf test -v "new " 2>&1 | grep -i encls
    Decoded ok: 0f 01 cf encls
    Decoded ok: 0f 01 cf encls
    $ perf test -v "new " 2>&1 | grep -i enclu
    Decoded ok: 0f 01 d7 enclu
    Decoded ok: 0f 01 d7 enclu
    $ perf test -v "new " 2>&1 | grep -i enclv
    Decoded ok: 0f 01 c0 enclv
    Decoded ok: 0f 01 c0 enclv
    $ perf test -v "new " 2>&1 | grep -i pconfig
    Decoded ok: 0f 01 c5 pconfig
    Decoded ok: 0f 01 c5 pconfig
    $ perf test -v "new " 2>&1 | grep -i wbnoinvd
    Decoded ok: f3 0f 09 wbnoinvd
    Decoded ok: f3 0f 09 wbnoinvd

    Signed-off-by: Adrian Hunter
    Reviewed-by: Andi Kleen
    Acked-by: Masami Hiramatsu
    Cc: Borislav Petkov
    Cc: H. Peter Anvin
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: x86@kernel.org
    Link: http://lore.kernel.org/lkml/20191115135447.6519-3-adrian.hunter@intel.com
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Sasha Levin

    Adrian Hunter
     

29 Nov, 2019

1 commit

  • commit 700c1018b86d0d4b3f1f2d459708c0cdf42b521d upstream.

    gawk 5.0.1 generates the following regexp warnings:

    GEN /home/sasha/torvalds/tools/objtool/arch/x86/lib/inat-tables.c
    awk: ../arch/x86/tools/gen-insn-attr-x86.awk:260: warning: regexp escape sequence `\:' is not a known regexp operator
    awk: ../arch/x86/tools/gen-insn-attr-x86.awk:350: (FILENAME=../arch/x86/lib/x86-opcode-map.txt FNR=41) warning: regexp escape sequence `\&' is not a known regexp operator

    Ealier versions of gawk are not known to generate these warnings. The
    gawk manual referenced below does not list characters ':' and '&' as
    needing escaping, so 'unescape' them. See

    https://www.gnu.org/software/gawk/manual/html_node/Escape-Sequences.html

    for more info.

    Running diff on the output generated by the script before and after
    applying the patch reported no differences.

    [ bp: Massage commit message. ]

    [ Caught the respective tools header discrepancy. ]
    Reported-by: kbuild test robot
    Signed-off-by: Alexander Kapshuk
    Signed-off-by: Borislav Petkov
    Acked-by: Masami Hiramatsu
    Cc: "H. Peter Anvin"
    Cc: "Peter Zijlstra (Intel)"
    Cc: Arnaldo Carvalho de Melo
    Cc: Ingo Molnar
    Cc: Josh Poimboeuf
    Cc: Thomas Gleixner
    Cc: x86-ml
    Link: https://lkml.kernel.org/r/20190924044659.3785-1-alexander.kapshuk@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Kapshuk
     

15 Oct, 2019

2 commits

  • To pick the changes in:

    0cb8410b90e7 ("kvm: svm: Intercept RDPRU")

    That trigger a rebuild in too in tooling:

    CC /tmp/build/perf/arch/x86/util/kvm-stat.o

    But this time around no changes in tooling results, as SVM_EXIT_RDPRU
    wasn't added to SVM_EXIT_REASONS, that is used in kvm-stat.c.

    And addresses this perf build warnings:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/svm.h' differs from latest version at 'arch/x86/include/uapi/asm/svm.h'
    diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h

    Cc: Adrian Hunter
    Cc: Jim Mattson
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Link: https://lkml.kernel.org/n/tip-pqzkt1hmfpqph3ts8i6zzmim@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick the changes in:

    bf653b78f960 ("KVM: vmx: Introduce handle_unexpected_vmexit and handle WAITPKG vmexit")

    That trigger these changes in tooling:

    CC /tmp/build/perf/arch/x86/util/kvm-stat.o
    INSTALL GTK UI
    DESCEND plugins
    make[3]: Nothing to be done for '/tmp/build/perf/plugins/libtraceevent-dynamic-list'.
    INSTALL trace_plugins
    LD /tmp/build/perf/arch/x86/util/perf-in.o
    LD /tmp/build/perf/arch/x86/perf-in.o
    LD /tmp/build/perf/arch/perf-in.o
    LD /tmp/build/perf/perf-in.o
    LINK /tmp/build/perf/perf

    And this is not just because that header is included, kvm-stat.c
    uses the VMX_EXIT_REASONS define and it got changed by the above cset.

    And addresses this perf build warnings:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
    diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Tao Xu
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-gr1eel0hckmi5l3p2ewdpfxh@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

01 Oct, 2019

1 commit

  • To pick the changes in:

    200824f55eef ("KVM: s390: Disallow invalid bits in kvm_valid_regs and kvm_dirty_regs")
    4a53d99dd0c2 ("KVM: VMX: Introduce exit reason for receiving INIT signal on guest-mode")
    7396d337cfad ("KVM: x86: Return to userspace with internal error on unexpected exit reason")
    92f35b751c71 ("KVM: arm/arm64: vgic: Allow more than 256 vcpus for KVM_IRQ_LINE")

    None of them trigger any changes in tooling, this time this is just to silence
    these perf build warnings:

    Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
    diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
    diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h
    Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
    diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h

    Cc: Adrian Hunter
    Cc: Janosch Frank
    Cc: Jiri Olsa
    Cc: Liran Alon
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Thomas Huth
    Link: https://lkml.kernel.org/n/tip-akuugvvjxte26kzv23zp5d2z@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

21 Sep, 2019

2 commits

  • To pick up the changes from:

    b4dd4f6e3648 ("x86/vmware: Add a header file for hypercall definitions")
    f36cf386e3fe ("x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS")
    be261ffce6f1 ("x86: Remove X86_FEATURE_MFENCE_RDTSC")
    018ebca8bd70 ("x86/cpufeatures: Enable a new AVX512 CPU feature")

    These don't cause any changes in tooling, just silences this perf build
    warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

    To clarify, updating those files cause these bits of tools/perf to rebuild:

    CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
    CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o
    INSTALL GTK UI
    LD /tmp/build/perf/bench/perf-in.o

    Those use just:

    $ grep FEATURE tools/arch/x86/lib/mem*.S
    tools/arch/x86/lib/memcpy_64.S: ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \
    tools/arch/x86/lib/memcpy_64.S: "jmp memcpy_erms", X86_FEATURE_ERMS
    tools/arch/x86/lib/memset_64.S: ALTERNATIVE_2 "jmp memset_orig", "", X86_FEATURE_REP_GOOD, \
    tools/arch/x86/lib/memset_64.S: "jmp memset_erms", X86_FEATURE_ERMS
    $

    I.e. none of the feature defines added/removed by the patches above.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Gayatri Kammela
    Cc: Jiri Olsa
    Cc: Josh Poimboeuf
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Cc: Thomas Hellstrom
    Link: https://lkml.kernel.org/n/tip-pq63abgknsaeov23p80d8gjv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick up the change in:

    45e29d119e99 ("x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long")

    That doesn't trigger any changes in tooling and silences this perf build
    warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/unistd.h' differs from latest version at 'arch/x86/include/uapi/asm/unistd.h'
    diff -u tools/arch/x86/include/uapi/asm/unistd.h arch/x86/include/uapi/asm/unistd.h

    Cc: Adrian Hunter
    Cc: Andy Lutomirski
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

17 Sep, 2019

2 commits

  • Pull x86 cpu-feature updates from Ingo Molnar:

    - Rework the Intel model names symbols/macros, which were decades of
    ad-hoc extensions and added random noise. It's now a coherent, easy
    to follow nomenclature.

    - Add new Intel CPU model IDs:
    - "Tiger Lake" desktop and mobile models
    - "Elkhart Lake" model ID
    - and the "Lightning Mountain" variant of Airmont, plus support code

    - Add the new AVX512_VP2INTERSECT instruction to cpufeatures

    - Remove Intel MPX user-visible APIs and the self-tests, because the
    toolchain (gcc) is not supporting it going forward. This is the
    first, lowest-risk phase of MPX removal.

    - Remove X86_FEATURE_MFENCE_RDTSC

    - Various smaller cleanups and fixes

    * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
    x86/cpu: Update init data for new Airmont CPU model
    x86/cpu: Add new Airmont variant to Intel family
    x86/cpu: Add Elkhart Lake to Intel family
    x86/cpu: Add Tiger Lake to Intel family
    x86: Correct misc typos
    x86/intel: Add common OPTDIFFs
    x86/intel: Aggregate microserver naming
    x86/intel: Aggregate big core graphics naming
    x86/intel: Aggregate big core mobile naming
    x86/intel: Aggregate big core client naming
    x86/cpufeature: Explain the macro duplication
    x86/ftrace: Remove mcount() declaration
    x86/PCI: Remove superfluous returns from void functions
    x86/msr-index: Move AMD MSRs where they belong
    x86/cpu: Use constant definitions for CPU models
    lib: Remove redundant ftrace flag removal
    x86/crash: Remove unnecessary comparison
    x86/bitops: Use __builtin_constant_p() directly instead of IS_IMMEDIATE()
    x86: Remove X86_FEATURE_MFENCE_RDTSC
    x86/mpx: Remove MPX APIs
    ...

    Linus Torvalds
     
  • Pull perf updates from Ingo Molnar:
    "Kernel side changes:

    - Improved kbprobes robustness

    - Intel PEBS support for PT hardware tracing

    - Other Intel PT improvements: high order pages memory footprint
    reduction and various related cleanups

    - Misc cleanups

    The perf tooling side has been very busy in this cycle, with over 300
    commits. This is an incomplete high-level summary of the many
    improvements done by over 30 developers:

    - Lots of updates to the following tools:

    'perf c2c'
    'perf config'
    'perf record'
    'perf report'
    'perf script'
    'perf test'
    'perf top'
    'perf trace'

    - Updates to libperf and libtraceevent, and a consolidation of the
    proliferation of x86 instruction decoder libraries.

    - Vendor event updates for Intel and PowerPC CPUs,

    - Updates to hardware tracing tooling for ARM and Intel CPUs,

    - ... and lots of other changes and cleanups - see the shortlog and
    Git log for details"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (322 commits)
    kprobes: Prohibit probing on BUG() and WARN() address
    perf/x86: Make more stuff static
    x86, perf: Fix the dependency of the x86 insn decoder selftest
    objtool: Ignore intentional differences for the x86 insn decoder
    objtool: Update sync-check.sh from perf's check-headers.sh
    perf build: Ignore intentional differences for the x86 insn decoder
    perf intel-pt: Use shared x86 insn decoder
    perf intel-pt: Remove inat.c from build dependency list
    perf: Update .gitignore file
    objtool: Move x86 insn decoder to a common location
    perf metricgroup: Support multiple events for metricgroup
    perf metricgroup: Scale the metric result
    perf pmu: Change convert_scale from static to global
    perf symbols: Move mem_info and branch_info out of symbol.h
    perf auxtrace: Uninline functions that touch perf_session
    perf tools: Remove needless evlist.h include directives
    perf tools: Remove needless evlist.h include directives
    perf tools: Remove needless thread_map.h include directives
    perf tools: Remove needless thread.h include directives
    perf tools: Remove needless map.h include directives
    ...

    Linus Torvalds
     

05 Sep, 2019

1 commit

  • This patch adds support for DWARF register mappings and libdw registers
    initialization, which is used by perf callchain analyzing when
    --call-graph=dwarf is given.

    Signed-off-by: Mao Han
    Cc: Paul Walmsley
    Cc: Greentime Hu
    Cc: Palmer Dabbelt
    Cc: linux-riscv
    Cc: Christoph Hellwig
    Cc: Guo Ren
    Tested-by: Greentime Hu
    Signed-off-by: Paul Walmsley

    Mao Han
     

01 Sep, 2019

2 commits

  • Now that there's a common version of the decoder for all tools, use it
    instead of the local copy.

    Also use perf's check-headers.sh script to diff the decoder files to
    make sure they remain in sync with the kernel version. Objtool has a
    similar check.

    Committer notes:

    Had to keep this all pointing explicitely to x86 headers/files, i.e.
    instead of asm/isnn.h we had to use ../include/asm/insn.h when the files
    were in differemt dirs, or just replace "" with "foo.h".

    This way we continue to be able to process perf.data files with Intel PT
    traces in distros other than x86.

    Also fixed up the awk script paths to use $(srcdir)/tools/arch instead
    or relative directories so that we keep detached tarballs (make help |
    grep perf) working.

    For now the include lines in these headers are being ignored so as not
    to flag false reports of kernel/tools out of sync.

    Signed-off-by: Josh Poimboeuf
    Reviewed-by: Masami Hiramatsu
    Acked-by: Peter Zijlstra (Intel)
    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: x86@kernel.org
    Link: http://lore.kernel.org/lkml/8a37e615d2880f039505d693d1e068a009358a2b.1567118001.git.jpoimboe@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Josh Poimboeuf
     
  • The kernel tree has three identical copies of the x86 instruction
    decoder. Two of them are in the tools subdir.

    The tools subdir is supposed to be completely standalone and separate
    from the kernel. So having at least one copy of the kernel decoder in
    the tools subdir is unavoidable. However, we don't need *two* of them.

    Move objtool's copy of the decoder to a shared location, so that perf
    will also be able to use it.

    Signed-off-by: Josh Poimboeuf
    Reviewed-by: Masami Hiramatsu
    Acked-by: Peter Zijlstra (Intel)
    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: x86@kernel.org
    Link: http://lore.kernel.org/lkml/55b486b88f6bcd0c9a2a04b34f964860c8390ca8.1567118001.git.jpoimboe@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Josh Poimboeuf
     

26 Aug, 2019

1 commit


20 Aug, 2019

1 commit

  • To pick up the changes in:

    f36cf386e3fe ("x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS")
    18ec54fdd6d1 ("x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations")

    That don't affect anything in tools/.

    This silences this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Josh Poimboeuf
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Link: https://lkml.kernel.org/n/tip-860dq1qie2cpnfghlpcnxrzr@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

29 Jul, 2019

1 commit

  • To pick up the changes from:

    8aa3c927ec10 ("mm/mmap: move common defines to mman-common.h")
    22fcea6f85f2 ("mm: move MAP_SYNC to asm-generic/mman-common.h")
    0bf5f9492389 ("mm: fix the MAP_UNINITIALIZED flag")

    To address the following perf build warnings:

    Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h'
    diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h
    Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman.h' differs from latest version at 'include/uapi/asm-generic/mman.h'
    diff -u tools/include/uapi/asm-generic/mman.h include/uapi/asm-generic/mman.h

    That ends up just moving a bit the auto-generated code->string tables:

    $ tools/perf/trace/beauty/mmap_flags.sh > before
    $ cp include/uapi/asm-generic/mman.h tools/include/uapi/asm-generic/mman.h
    $ cp include/uapi/asm-generic/mman-common.h tools/include/uapi/asm-generic/mman-common.h
    $ tools/perf/trace/beauty/mmap_flags.sh > after
    $ diff -u before after
    --- before 2019-07-26 12:45:02.948335904 -0300
    +++ after 2019-07-26 12:48:05.342893539 -0300
    @@ -4,15 +4,15 @@
    [ilog2(0x02) + 1] = "PRIVATE",
    [ilog2(0x10) + 1] = "FIXED",
    [ilog2(0x20) + 1] = "ANONYMOUS",
    + [ilog2(0x008000) + 1] = "POPULATE",
    + [ilog2(0x010000) + 1] = "NONBLOCK",
    + [ilog2(0x020000) + 1] = "STACK",
    + [ilog2(0x040000) + 1] = "HUGETLB",
    + [ilog2(0x080000) + 1] = "SYNC",
    [ilog2(0x100000) + 1] = "FIXED_NOREPLACE",
    [ilog2(0x0100) + 1] = "GROWSDOWN",
    [ilog2(0x0800) + 1] = "DENYWRITE",
    [ilog2(0x1000) + 1] = "EXECUTABLE",
    [ilog2(0x2000) + 1] = "LOCKED",
    [ilog2(0x4000) + 1] = "NORESERVE",
    - [ilog2(0x8000) + 1] = "POPULATE",
    - [ilog2(0x10000) + 1] = "NONBLOCK",
    - [ilog2(0x20000) + 1] = "STACK",
    - [ilog2(0x40000) + 1] = "HUGETLB",
    - [ilog2(0x80000) + 1] = "SYNC",
    };
    $

    Cc: Adrian Hunter
    Cc: Aneesh Kumar K.V
    Cc: Christoph Hellwig
    Cc: Jiri Olsa
    Cc: Luis Cláudio Gonçalves
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-fzqvzni9megaurmsp0k4vy27@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

26 Jul, 2019

1 commit

  • Picking the changes from:

    66bb8a065f5a ("KVM: x86: PMU Event Filter")
    f087a02941fe ("KVM: nVMX: Stash L1's CR3 in vmcs01.GUEST_CR3 on nested entry w/o EPT")
    99adb567632b ("KVM: arm/arm64: Add save/restore support for firmware workaround state")

    Silencing this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h'
    diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h
    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
    diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
    diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h

    Now 'perf trace' and other code that might use the tools/perf/trace/beauty autogenerated
    tables will be able to translate this new ioctl code into a string:

    $ tools/perf/trace/beauty/kvm_ioctl.sh > before
    $
    $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h
    $ tools/perf/trace/beauty/kvm_ioctl.sh > after
    $ diff -u before after
    --- before 2019-07-26 12:32:47.959220236 -0300
    +++ after 2019-07-26 12:33:05.766464871 -0300
    @@ -79,6 +79,7 @@
    [0xac] = "SET_ONE_REG",
    [0xad] = "KVMCLOCK_CTRL",
    [0xb0] = "GET_REG_LIST",
    + [0xb2] = "SET_PMU_EVENT_FILTER",
    [0xb7] = "SMI",
    [0xba] = "MEMORY_ENCRYPT_OP",
    [0xbb] = "MEMORY_ENCRYPT_REG_REGION",
    $

    Cc: Adrian Hunter
    Cc: Andre Przywara
    Cc: Brendan Gregg
    Cc: Eric Hankland
    Cc: Jiri Olsa
    Cc: Luis Cláudio Gonçalves
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Sean Christopherson
    Link: https://lkml.kernel.org/n/tip-py1gcmt6rboehlwg6zvagfg2@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

22 Jul, 2019

1 commit

  • AMD and Intel both have serializing lfence (X86_FEATURE_LFENCE_RDTSC).
    They've both had it for a long time, and AMD has had it enabled in Linux
    since Spectre v1 was announced.

    Back then, there was a proposal to remove the serializing mfence feature
    bit (X86_FEATURE_MFENCE_RDTSC), since both AMD and Intel have
    serializing lfence. At the time, it was (ahem) speculated that some
    hypervisors might not yet support its removal, so it remained for the
    time being.

    Now a year-and-a-half later, it should be safe to remove.

    I asked Andrew Cooper about whether it's still needed:

    So if you're virtualised, you've got no choice in the matter.  lfence
    is either dispatch-serialising or not on AMD, and you won't be able to
    change it.

    Furthermore, you can't accurately tell what state the bit is in, because
    the MSR might not be virtualised at all, or may not reflect the true
    state in hardware.  Worse still, attempting to set the bit may not be
    successful even if there isn't a fault for doing so.

    Xen sets the DE_CFG bit unconditionally, as does Linux by the looks of
    things (see MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT).  ISTR other hypervisor
    vendors saying the same, but I don't have any information to hand.

    If you are running under a hypervisor which has been updated, then
    lfence will almost certainly be dispatch-serialising in practice, and
    you'll almost certainly see the bit already set in DE_CFG.  If you're
    running under a hypervisor which hasn't been patched since Spectre,
    you've already lost in many more ways.

    I'd argue that X86_FEATURE_MFENCE_RDTSC is not worth keeping.

    So remove it. This will reduce some code rot, and also make it easier
    to hook barrier_nospec() up to a cmdline disable for performance
    raisins, without having to need an alternative_3() macro.

    Signed-off-by: Josh Poimboeuf
    Signed-off-by: Thomas Gleixner
    Link: https://lkml.kernel.org/r/d990aa51e40063acb9888e8c1b688e41355a9588.1562255067.git.jpoimboe@redhat.com

    Josh Poimboeuf
     

09 Jul, 2019

1 commit

  • To pick up the changes in:

    6dbbf5ec9e1e ("x86/cpufeatures: Enumerate user wait instructions")
    b302e4b176d0 ("x86/cpufeatures: Enumerate the new AVX512 BFLOAT16 instructions")
    acec0ce081de ("x86/cpufeatures: Combine word 11 and 12 into a new scattered features word")
    cbb99c0f5887 ("x86/cpufeatures: Add FDP_EXCPTN_ONLY and ZERO_FCS_FDS")

    That don't affect anything in tools/.

    This silences this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

    Cc: Aaron Lewis
    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Fenghua Yu
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Link: https://lkml.kernel.org/n/tip-y60wnyg2fuxi0hx7icruo9po@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

07 Jul, 2019

1 commit

  • To pick up the changes from:

    41040cf7c5f0 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")
    6ca00dfafda7 ("KVM: x86: Modify struct kvm_nested_state to have explicit fields for data")

    None entail changes in tooling.

    This silences these tools/perf build warnings:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
    diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h

    Cc: Adrian Hunter
    Cc: Dave Martin
    Cc: Jiri Olsa
    Cc: Liran Alon
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Will Deacon
    Link: https://lkml.kernel.org/n/tip-1cdbq5ulr4d6cx3iv2ye5wdv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

29 Jun, 2019

1 commit

  • Pull perf fixes from Ingo Molnar:
    "Various fixes, most of them related to bugs perf fuzzing found in the
    x86 code"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/regs: Use PERF_REG_EXTENDED_MASK
    perf/x86: Remove pmu->pebs_no_xmm_regs
    perf/x86: Clean up PEBS_XMM_REGS
    perf/x86/regs: Check reserved bits
    perf/x86: Disable extended registers for non-supported PMUs
    perf/ioctl: Add check for the sample_period value
    perf/core: Fix perf_sample_regs_user() mm check

    Linus Torvalds
     

25 Jun, 2019

1 commit

  • Use the macro defined in kernel ABI header to replace the local name.

    No functional change.

    Signed-off-by: Kan Liang
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Alexander Shishkin
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Link: https://lkml.kernel.org/r/1559081314-9714-5-git-send-email-kan.liang@linux.intel.com
    Signed-off-by: Ingo Molnar

    Kan Liang
     

22 Jun, 2019

1 commit

  • Pull still more SPDX updates from Greg KH:
    "Another round of SPDX updates for 5.2-rc6

    Here is what I am guessing is going to be the last "big" SPDX update
    for 5.2. It contains all of the remaining GPLv2 and GPLv2+ updates
    that were "easy" to determine by pattern matching. The ones after this
    are going to be a bit more difficult and the people on the spdx list
    will be discussing them on a case-by-case basis now.

    Another 5000+ files are fixed up, so our overall totals are:
    Files checked: 64545
    Files with SPDX: 45529

    Compared to the 5.1 kernel which was:
    Files checked: 63848
    Files with SPDX: 22576

    This is a huge improvement.

    Also, we deleted another 20000 lines of boilerplate license crud,
    always nice to see in a diffstat"

    * tag 'spdx-5.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (65 commits)
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 507
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 506
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 503
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 502
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 501
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 498
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 497
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 496
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 495
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 491
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 490
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 489
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 488
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 487
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 486
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 485
    ...

    Linus Torvalds
     

21 Jun, 2019

1 commit

  • Pull kvm fixes from Paolo Bonzini:
    "Fixes for ARM and x86, plus selftest patches and nicer structs for
    nested state save/restore"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: nVMX: reorganize initial steps of vmx_set_nested_state
    KVM: arm/arm64: Fix emulated ptimer irq injection
    tests: kvm: Check for a kernel warning
    kvm: tests: Sort tests in the Makefile alphabetically
    KVM: x86/mmu: Allocate PAE root array when using SVM's 32-bit NPT
    KVM: x86: Modify struct kvm_nested_state to have explicit fields for data
    KVM: fix typo in documentation
    KVM: nVMX: use correct clean fields when copying from eVMCS
    KVM: arm/arm64: vgic: Fix kvm_device leak in vgic_its_destroy
    KVM: arm64: Filter out invalid core register IDs in KVM_GET_REG_LIST
    KVM: arm64: Implement vq_present() as a macro

    Linus Torvalds
     

19 Jun, 2019

2 commits

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not see http www gnu org
    licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 503 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Alexios Zavras
    Reviewed-by: Allison Randal
    Reviewed-by: Enrico Weigelt
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190602204653.811534538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Improve the KVM_{GET,SET}_NESTED_STATE structs by detailing the format
    of VMX nested state data in a struct.

    In order to avoid changing the ioctl values of
    KVM_{GET,SET}_NESTED_STATE, there is a need to preserve
    sizeof(struct kvm_nested_state). This is done by defining the data
    struct as "data.vmx[0]". It was the most elegant way I found to
    preserve struct size while still keeping struct readable and easy to
    maintain. It does have a misfortunate side-effect that now it has to be
    accessed as "data.vmx[0]" rather than just "data.vmx".

    Because we are already modifying these structs, I also modified the
    following:
    * Define the "format" field values as macros.
    * Rename vmcs_pa to vmcs12_pa for better readability.

    Signed-off-by: Liran Alon
    [Remove SVM stubs, add KVM_STATE_NESTED_VMX_VMCS12_SIZE. - Paolo]
    Reviewed-by: Liran Alon
    Signed-off-by: Paolo Bonzini

    Liran Alon
     

03 Jun, 2019

1 commit

  • Pull perf fixes from Ingo Molnar:
    "On the kernel side there's a bunch of ring-buffer ordering fixes for a
    reproducible bug, plus a PEBS constraints regression fix.

    Plus tooling fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    tools headers UAPI: Sync kvm.h headers with the kernel sources
    perf record: Fix s390 missing module symbol and warning for non-root users
    perf machine: Read also the end of the kernel
    perf test vmlinux-kallsyms: Ignore aliases to _etext when searching on kallsyms
    perf session: Add missing swap ops for namespace events
    perf namespace: Protect reading thread's namespace
    tools headers UAPI: Sync drm/drm.h with the kernel
    tools headers UAPI: Sync drm/i915_drm.h with the kernel
    tools headers UAPI: Sync linux/fs.h with the kernel
    tools headers UAPI: Sync linux/sched.h with the kernel
    tools arch x86: Sync asm/cpufeatures.h with the with the kernel
    tools include UAPI: Update copy of files related to new fspick, fsmount, fsconfig, fsopen, move_mount and open_tree syscalls
    perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel
    perf data: Fix 'strncat may truncate' build failure with recent gcc
    perf/ring-buffer: Use regular variables for nesting
    perf/ring-buffer: Always use {READ,WRITE}_ONCE() for rb->user_page data
    perf/ring_buffer: Add ordering to rb->nest increment
    perf/ring_buffer: Fix exposing a temporarily decreased data_head
    perf/x86/intel/ds: Fix EVENT vs. UEVENT PEBS constraints

    Linus Torvalds
     

28 May, 2019

2 commits

  • dd53f6102c30 ("Merge tag 'kvmarm-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD")
    59c5c58c5b93 ("Merge tag 'kvm-ppc-next-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD")
    d7547c55cbe7 ("KVM: Introduce KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2")
    6520ca64cde7 ("KVM: PPC: Book3S HV: XIVE: Add a mapping for the source ESB pages")
    39e9af3de5ca ("KVM: PPC: Book3S HV: XIVE: Add a TIMA mapping")
    e4945b9da52b ("KVM: PPC: Book3S HV: XIVE: Add get/set accessors for the VP XIVE state")
    e6714bd1671d ("KVM: PPC: Book3S HV: XIVE: Add a control to dirty the XIVE EQ pages")
    7b46b6169ab8 ("KVM: PPC: Book3S HV: XIVE: Add a control to sync the sources")
    5ca806474859 ("KVM: PPC: Book3S HV: XIVE: Add a global reset control")
    13ce3297c576 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration")
    e8676ce50e22 ("KVM: PPC: Book3S HV: XIVE: Add a control to configure a source")
    4131f83c3d64 ("KVM: PPC: Book3S HV: XIVE: add a control to initialize a source")
    eacc56bb9de3 ("KVM: PPC: Book3S HV: XIVE: Introduce a new capability KVM_CAP_PPC_IRQ_XIVE")
    90c73795afa2 ("KVM: PPC: Book3S HV: Add a new KVM device for the XIVE native exploitation mode")
    4f45b90e1c03 ("KVM: s390: add deflate conversion facilty to cpu model")
    a243c16d18be ("KVM: arm64: Add capability to advertise ptrauth for guest")
    a22fa321d13b ("KVM: arm64: Add userspace flag to enable pointer authentication")
    4bd774e57b29 ("KVM: arm64/sve: Simplify KVM_REG_ARM64_SVE_VLS array sizing")
    8ae6efdde451 ("KVM: arm64/sve: Clean up UAPI register ID definitions")
    173aec2d5a9f ("KVM: s390: add enhanced sort facilty to cpu model")
    555f3d03e7fb ("KVM: arm64: Add a capability to advertise SVE support")
    9033bba4b535 ("KVM: arm64/sve: Add pseudo-register for the guest's vector lengths")
    7dd32a0d0103 ("KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl")
    e1c9c98345b3 ("KVM: arm64/sve: Add SVE support to register access ioctl interface")
    2b953ea34812 ("KVM: Allow 2048-bit register access via ioctl interface")

    None entails changes in tooling, the closest to that were some new arch
    specific ioctls, that are still not handled by the tools/perf/trace/beauty/
    library, that needs to create per-arch tables to convert ioctl cmd->string (and
    back).

    From a quick look the arch specific kvm-stat.c files at:

    $ ls -1 tools/perf/arch/*/util/kvm-stat.c
    tools/perf/arch/powerpc/util/kvm-stat.c
    tools/perf/arch/s390/util/kvm-stat.c
    tools/perf/arch/x86/util/kvm-stat.c
    $

    Are not affected.

    This silences these perf building warnings:

    Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
    diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
    Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
    diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
    diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
    Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
    diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h

    Cc: Adrian Hunter
    Cc: Amit Daniel Kachhap
    Cc: Brendan Gregg
    Cc: Cédric Le Goater
    Cc: Christian Borntraeger
    Cc: Dave Martin
    Cc: Jiri Olsa
    Cc: Luis Cláudio Gonçalves
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Paul Mackerras
    Cc: Peter Xu
    Link: https://lkml.kernel.org/n/tip-3msmqjenlmb7eygcdnmlqaq1@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To pick up the changes in:

    ed5194c2732c ("x86/speculation/mds: Add basic bug infrastructure for MDS")
    e261f209c366 ("x86/speculation/mds: Add BUG_MSBDS_ONLY")

    That don't affect anything in tools/.

    This silences this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

    Cc: Adrian Hunter
    Cc: Andi Kleen
    Cc: Brendan Gregg
    Cc: Jiri Olsa
    Cc: Luis Cláudio Gonçalves
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Link: https://lkml.kernel.org/n/tip-jp1afecx3ql1jkuirpgkqfad@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
    initial scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 May, 2019

1 commit

  • Pull perf tooling updates from Ingo Molnar:
    "perf.data:

    - Streaming compression of perf ring buffer into
    PERF_RECORD_COMPRESSED user space records, resulting in ~3-5x
    perf.data file size reduction on variety of tested workloads what
    saves storage space on larger server systems where perf.data size
    can easily reach several tens or even hundreds of GiBs, especially
    when profiling with DWARF-based stacks and tracing of context
    switches.

    perf record:

    - Improve -user-regs/intr-regs suggestions to overcome errors

    perf annotate:

    - Remove hist__account_cycles() from callback, speeding up branch
    processing (perf record -b)

    perf stat:

    - Add a 'percore' event qualifier, e.g.: -e
    cpu/event=0,umask=0x3,percore=1/, that sums up the event counts for
    both hardware threads in a core.

    We can already do this with --per-core, but it's often useful to do
    this together with other metrics that are collected per hardware
    thread.

    I.e. now its possible to do this per-event, and have it mixed with
    other events not aggregated by core.

    arm64:

    - Map Brahma-B53 CPUID to cortex-a53 events.

    - Add Cortex-A57 and Cortex-A72 events.

    csky:

    - Add DWARF register mappings for libdw, allowing --call-graph=dwarf
    to work on the C-SKY arch.

    x86:

    - Add support for recording and printing XMM registers, available,
    for instance, on Icelake.

    - Add uncore_upi (Intel's "Ultra Path Interconnect" events) JSON
    support. UPI replaced the Intel QuickPath Interconnect (QPI) in
    Xeon Skylake-SP.

    Intel PT:

    - Fix instructions sampling rate.

    - Timestamp fixes.

    - Improve exported-sql-viewer GUI, allowing, for instance, to
    copy'n'paste the trees, useful for e-mailing"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (73 commits)
    perf stat: Support 'percore' event qualifier
    perf stat: Factor out aggregate counts printing
    perf tools: Add a 'percore' event qualifier
    perf docs: Add description for stderr
    perf intel-pt: Fix sample timestamp wrt non-taken branches
    perf intel-pt: Fix improved sample timestamp
    perf intel-pt: Fix instructions sampling rate
    perf regs x86: Add X86 specific arch__intr_reg_mask()
    perf parse-regs: Add generic support for arch__intr/user_reg_mask()
    perf parse-regs: Split parse_regs
    perf vendor events arm64: Add Cortex-A57 and Cortex-A72 events
    perf vendor events arm64: Map Brahma-B53 CPUID to cortex-a53 events
    perf vendor events arm64: Remove [[:xdigit:]] wildcard
    perf jevents: Remove unused variable
    perf test zstd: Fixup verbose mode output
    perf tests: Implement Zstd comp/decomp integration test
    perf inject: Enable COMPRESSED record decompression
    perf report: Implement perf.data record decompression
    perf record: Implement -z,--compression_level[=] option
    perf report: Add stub processing of compressed events for -D
    ...

    Linus Torvalds
     

18 May, 2019

2 commits

  • …ux/kernel/git/acme/linux into perf/core

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    perf.data:

    Alexey Budankov:

    - Streaming compression of perf ring buffer into PERF_RECORD_COMPRESSED
    user space records, resulting in ~3-5x perf.data file size reduction
    on variety of tested workloads what saves storage space on larger
    server systems where perf.data size can easily reach several tens or
    even hundreds of GiBs, especially when profiling with DWARF-based
    stacks and tracing of context switches.

    perf record:

    Arnaldo Carvalho de Melo

    - Improve -user-regs/intr-regs suggestions to overcome errors.

    perf annotate:

    Jin Yao:

    - Remove hist__account_cycles() from callback, speeding up branch processing
    (perf record -b).

    perf stat:

    - Add a 'percore' event qualifier, e.g.: -e cpu/event=0,umask=0x3,percore=1/,
    that sums up the event counts for both hardware threads in a core.

    We can already do this with --per-core, but it's often useful to do
    this together with other metrics that are collected per hardware thread.

    I.e. now its possible to do this per-event, and have it mixed with other
    events not aggregated by core.

    core libraries:

    Donald Yandt:

    - Check for errors when doing fgets(/proc/version).

    Jiri Olsa:

    - Speed up report for perf compiled with linbunwind.

    tools headers:

    Arnaldo Carvalho de Melo

    - Update memcpy_64.S, x86's kvm.h and pt_regs.h.

    arm64:

    Florian Fainelli:

    - Map Brahma-B53 CPUID to cortex-a53 events.

    - Add Cortex-A57 and Cortex-A72 events.

    csky:

    Mao Han:

    - Add DWARF register mappings for libdw, allowing --call-graph=dwarf to work
    on the C-SKY arch.

    x86:

    Andi Kleen/Kan Liang:

    - Add support for recording and printing XMM registers, available, for
    instance, on Icelake.

    Kan Liang:

    - Add uncore_upi (Intel's "Ultra Path Interconnect" events) JSON support.
    UPI replaced the Intel QuickPath Interconnect (QPI) in Xeon Skylake-SP.

    Intel PT:

    Adrian Hunter

    . Fix instructions sampling rate.

    . Timestamp fixes.

    . Improve exported-sql-viewer GUI, allowing, for instance, to copy'n'paste
    the trees, useful for e-mailing.

    Documentation:

    Thomas Richter:

    - Add description for 'perf --debug stderr=1', which redirects stderr to stdout.

    libtraceevent:

    Tzvetomir Stoyanov:

    - Add man pages for the various APIs.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Pull KVM updates from Paolo Bonzini:
    "ARM:
    - support for SVE and Pointer Authentication in guests
    - PMU improvements

    POWER:
    - support for direct access to the POWER9 XIVE interrupt controller
    - memory and performance optimizations

    x86:
    - support for accessing memory not backed by struct page
    - fixes and refactoring

    Generic:
    - dirty page tracking improvements"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (155 commits)
    kvm: fix compilation on aarch64
    Revert "KVM: nVMX: Expose RDPMC-exiting only when guest supports PMU"
    kvm: x86: Fix L1TF mitigation for shadow MMU
    KVM: nVMX: Disable intercept for FS/GS base MSRs in vmcs02 when possible
    KVM: PPC: Book3S: Remove useless checks in 'release' method of KVM device
    KVM: PPC: Book3S HV: XIVE: Fix spelling mistake "acessing" -> "accessing"
    KVM: PPC: Book3S HV: Make sure to load LPID for radix VCPUs
    kvm: nVMX: Set nested_run_pending in vmx_set_nested_state after checks complete
    tests: kvm: Add tests for KVM_SET_NESTED_STATE
    KVM: nVMX: KVM_SET_NESTED_STATE - Tear down old EVMCS state before setting new state
    tests: kvm: Add tests for KVM_CAP_MAX_VCPUS and KVM_CAP_MAX_CPU_ID
    tests: kvm: Add tests to .gitignore
    KVM: Introduce KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2
    KVM: Fix kvm_clear_dirty_log_protect off-by-(minus-)one
    KVM: Fix the bitmap range to copy during clear dirty
    KVM: arm64: Fix ptrauth ID register masking logic
    KVM: x86: use direct accessors for RIP and RSP
    KVM: VMX: Use accessors for GPRs outside of dedicated caching logic
    KVM: x86: Omit caching logic for always-available GPRs
    kvm, x86: Properly check whether a pfn is an MMIO or not
    ...

    Linus Torvalds
     

16 May, 2019

4 commits

  • To get the changes in:

    878068ea270e ("perf/x86: Support outputting XMM registers")

    That will be used in a followup patch to allow users to ask for some or
    all of those registers to be collected in certain contatexts.

    This silences the following perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/x86/include/uapi/asm/perf_regs.h'
    diff -u tools/arch/x86/include/uapi/asm/perf_regs.h arch/x86/include/uapi/asm/perf_regs.h

    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: https://lkml.kernel.org/n/tip-6pjnnrzqt3x3n2cd6br3wk7k@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To get the changes in:

    59073aaf6de0 ("kvm: x86: Add exception payload fields to kvm_vcpu_events")

    This silences the following perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h'
    diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h

    The changes in this file are in something not used at this time in any
    tools/perf/ tool.

    Cc: Adrian Hunter
    Cc: Jim Mattson
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Link: https://lkml.kernel.org/n/tip-6uh8tpraons0h22dmxgfyony@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To bring in the change made in this cset:

    b69656fa7ea2 ("x86/uaccess: Fix up the fixup")

    Silencing this perf build warning:

    Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
    diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S

    No changes in the tooling using this, that was just to ease some objtool
    return checking.

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: https://lkml.kernel.org/n/tip-j0mxgqkuibhw5qid9saaspdu@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • This patch add support for DWARF register mappings and libdw registers
    initialization, which is used by perf callchain analyzing when
    --call-graph=dwarf is given.

    Here is the elfutils csky backend patch set:

    https://sourceware.org/ml/elfutils-devel/2019-q2/msg00007.html

    Signed-off-by: Mao Han
    Cc: Alexander Shishkin
    Cc: Arnd Bergmann
    Cc: Jiri Olsa
    Cc: linux-arch@vger.kernel.org
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1555860794-10572-1-git-send-email-guoren@kernel.org
    Signed-off-by: Guo Ren
    Signed-off-by: Arnaldo Carvalho de Melo

    Mao Han
     

10 May, 2019

1 commit


09 May, 2019

1 commit

  • This patch add support for DWARF register mappings and libdw registers
    initialization, which is used by perf callchain analyzing, eg:

    perf record --call-graph=dwarf

    Here is elfutils csky backend patch set:
    https://sourceware.org/ml/elfutils-devel/2019-q2/msg00007.html

    Signed-off-by: Mao Han
    Signed-off-by: Guo Ren
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Arnd Bergmann

    Mao Han
     

08 May, 2019

1 commit

  • Pull networking updates from David Miller:
    "Highlights:

    1) Support AES128-CCM ciphers in kTLS, from Vakul Garg.

    2) Add fib_sync_mem to control the amount of dirty memory we allow to
    queue up between synchronize RCU calls, from David Ahern.

    3) Make flow classifier more lockless, from Vlad Buslov.

    4) Add PHY downshift support to aquantia driver, from Heiner
    Kallweit.

    5) Add SKB cache for TCP rx and tx, from Eric Dumazet. This reduces
    contention on SLAB spinlocks in heavy RPC workloads.

    6) Partial GSO offload support in XFRM, from Boris Pismenny.

    7) Add fast link down support to ethtool, from Heiner Kallweit.

    8) Use siphash for IP ID generator, from Eric Dumazet.

    9) Pull nexthops even further out from ipv4/ipv6 routes and FIB
    entries, from David Ahern.

    10) Move skb->xmit_more into a per-cpu variable, from Florian
    Westphal.

    11) Improve eBPF verifier speed and increase maximum program size,
    from Alexei Starovoitov.

    12) Eliminate per-bucket spinlocks in rhashtable, and instead use bit
    spinlocks. From Neil Brown.

    13) Allow tunneling with GUE encap in ipvs, from Jacky Hu.

    14) Improve link partner cap detection in generic PHY code, from
    Heiner Kallweit.

    15) Add layer 2 encap support to bpf_skb_adjust_room(), from Alan
    Maguire.

    16) Remove SKB list implementation assumptions in SCTP, your's truly.

    17) Various cleanups, optimizations, and simplifications in r8169
    driver. From Heiner Kallweit.

    18) Add memory accounting on TX and RX path of SCTP, from Xin Long.

    19) Switch PHY drivers over to use dynamic featue detection, from
    Heiner Kallweit.

    20) Support flow steering without masking in dpaa2-eth, from Ioana
    Ciocoi.

    21) Implement ndo_get_devlink_port in netdevsim driver, from Jiri
    Pirko.

    22) Increase the strict parsing of current and future netlink
    attributes, also export such policies to userspace. From Johannes
    Berg.

    23) Allow DSA tag drivers to be modular, from Andrew Lunn.

    24) Remove legacy DSA probing support, also from Andrew Lunn.

    25) Allow ll_temac driver to be used on non-x86 platforms, from Esben
    Haabendal.

    26) Add a generic tracepoint for TX queue timeouts to ease debugging,
    from Cong Wang.

    27) More indirect call optimizations, from Paolo Abeni"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1763 commits)
    cxgb4: Fix error path in cxgb4_init_module
    net: phy: improve pause mode reporting in phy_print_status
    dt-bindings: net: Fix a typo in the phy-mode list for ethernet bindings
    net: macb: Change interrupt and napi enable order in open
    net: ll_temac: Improve error message on error IRQ
    net/sched: remove block pointer from common offload structure
    net: ethernet: support of_get_mac_address new ERR_PTR error
    net: usb: smsc: fix warning reported by kbuild test robot
    staging: octeon-ethernet: Fix of_get_mac_address ERR_PTR check
    net: dsa: support of_get_mac_address new ERR_PTR error
    net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats
    vrf: sit mtu should not be updated when vrf netdev is the link
    net: dsa: Fix error cleanup path in dsa_init_module
    l2tp: Fix possible NULL pointer dereference
    taprio: add null check on sched_nest to avoid potential null pointer dereference
    net: mvpp2: cls: fix less than zero check on a u32 variable
    net_sched: sch_fq: handle non connected flows
    net_sched: sch_fq: do not assume EDT packets are ordered
    net: hns3: use devm_kcalloc when allocating desc_cb
    net: hns3: some cleanup for struct hns3_enet_ring
    ...

    Linus Torvalds