19 Jan, 2019

1 commit

  • Pull powerpc fixes from Michael Ellerman:
    "A couple of weeks of fixes.

    There's one fix for an oops on Power9 machines with Open CAPI
    adapters.

    And a fix for probable memory corruption in some of the new NPU code,
    caught by smatch though and not seen in the wild.

    Plus a few other minor fixes.

    There's one non-fix which is the perf_regs change. That was sent
    during the merge window but I accidentally only merged the first of
    two patches in the series. It's been in linux-next so hopefully
    doesn't conflict with anything in acme's tree.

    Thanks to: Alexey Kardashevskiy, Andrew Donnellan, Breno Leitao,
    Christian Lamparter, Christophe Leroy, Dan Carpenter, Frederic Barrat,
    Greg Kurz, Jason A. Donenfeld, Madhavan Srinivasan"

    * tag 'powerpc-5.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/syscalls: Fix syscall tracing
    powerpc/pseries: Fix build break due to pnv_npu2_init()
    powerpc/4xx/ocm: Fix fix for phys_addr_t printf warnings
    powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group()
    powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM
    powerpc/8xx: fix setting of pagetable for Abatron BDI debug tool.
    powerpc/powernv/npu: Allocate enough memory in pnv_try_setup_npu_table_group()
    powerpc/perf: Update perf_regs structure to include MMCRA

    Linus Torvalds
     

12 Jan, 2019

1 commit

  • Pull perf tooling updates from Ingo Molnar:
    "Tooling changes only: fixes and a few stray improvements.

    Most of the diffstat is dominated by a PowerPC related fix of system
    call trace output beautification that allows us to (again) use the
    UAPI header version and sync up with the kernel's version of PowerPC
    system call names in the arch/powerpc/kernel/syscalls/syscall.tbl
    header"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    tools headers powerpc: Remove unistd.h
    perf powerpc: Rework syscall table generation
    perf symbols: Add 'arch_cpu_idle' to the list of kernel idle symbols
    tools include uapi: Sync linux/if_link.h copy with the kernel sources
    tools include uapi: Sync linux/vhost.h with the kernel sources
    tools include uapi: Sync linux/fs.h copy with the kernel sources
    perf beauty: Switch from using uapi/linux/fs.h to uapi/linux/mount.h
    tools include uapi: Grab a copy of linux/mount.h
    perf top: Lift restriction on using callchains without "sym" in --sort
    tools lib traceevent: Remove tep_data_event_from_type() API
    tools lib traceevent: Rename tep_is_file_bigendian() to tep_file_bigendian()
    tools lib traceevent: Changed return logic of tep_register_event_handler() API
    tools lib traceevent: Changed return logic of trace_seq_printf() and trace_seq_vprintf() APIs
    tools lib traceevent: Rename struct cmdline to struct tep_cmdline
    tools lib traceevent: Initialize host_bigendian at tep_handle allocation
    tools lib traceevent: Introduce new libtracevent API: tep_override_comm()
    perf tests: Add a test for the ARM 32-bit [vectors] page
    perf tools: Make find_vdso_map() more modular
    perf trace: Fix alignment for [continued] lines
    perf trace: Fix ')' placement in "interrupted" syscall lines
    ...

    Linus Torvalds
     

10 Jan, 2019

1 commit

  • We use syscall.tbl to generate system call table on powerpc.

    The unistd.h copy is no longer required now. Remove it.

    Signed-off-by: Ravi Bangoria
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20190110094936.3132-2-ravi.bangoria@linux.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ravi Bangoria
     

08 Jan, 2019

2 commits

  • …nux/kernel/git/acme/linux into perf/urgent

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

    perf annotate:

    Ivan Krylov:

    - Pass filename to objdump via execl, fixing usage with filenames
    with special characters.

    perf report:

    Jin Yao:

    Fix wrong iteration count in --branch-history

    perf stat:

    Jin Yao:

    - Fix endless wait for child process

    perf test:

    Arnaldo Carvalho de Melo:

    - Use a fallback to get the pathname in vfs_getname in

    tools build:

    Jiri Olsa:

    - Allow overriding CFLAGS assignments.

    Misc:

    Arnaldo Carvalho de Melo:

    - Syncronize UAPI headers

    Mattias Jacobsson:

    - Remove redundant va_end() in strbuf_addv()

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

    Ingo Molnar
     
  • On each sample, Monitor Mode Control Register A (MMCRA) content is
    saved in pt_regs. MMCRA does not have a entry as-is in the pt_regs but
    instead, MMCRA content is saved in the "dsisr" register of pt_regs.

    Patch adds another entry to the perf_regs structure to include the
    "MMCRA" printing which internally maps to the "dsisr" of pt_regs.

    It also check for the MMCRA availability in the platform and present
    value accordingly

    mpe: This was the 2nd patch in a series with commit 333804dc3b7a
    ("powerpc/perf: Update perf_regs structure to include SIER") but I
    accidentally only merged the 1st patch, so merge this one now.

    Signed-off-by: Madhavan Srinivasan
    Signed-off-by: Michael Ellerman

    Madhavan Srinivasan
     

07 Jan, 2019

1 commit

  • The BPF library is not built on 64-bit RISC-V, as the BPF feature is
    not detected. Looking more in details, feature/test-bpf.c fails to build
    with the following error:

    | In file included from /tmp/linux-4.19.12/tools/include/uapi/asm/bitsperlong.h:17,
    | from /tmp/linux-4.19.12/tools/include/uapi/asm-generic/unistd.h:2,
    | from /usr/include/riscv64-linux-gnu/asm/unistd.h:1,
    | from test-bpf.c:2:
    | /tmp/linux-4.19.12/tools/include/asm-generic/bitsperlong.h:14:2: error: #error Inconsistent word size. Check asm/bitsperlong.h
    | #error Inconsistent word size. Check asm/bitsperlong.h
    | ^~~~~

    The UAPI from the tools directory is missing RISC-V support, therefore
    bitsperlong.h from asm-generic is used, defaulting to 32 bits.

    Fix that by adding tools/arch/riscv/include/uapi/asm/bitsperlong.h as
    a copy of arch/riscv/include/uapi/asm/bitsperlong.h and by updating
    tools/include/uapi/asm/bitsperlong.h.

    Signed-off-by: Aurelien Jarno
    Signed-off-by: Palmer Dabbelt

    Aurelien Jarno
     

06 Jan, 2019

1 commit

  • Currently, CONFIG_JUMP_LABEL just means "I _want_ to use jump label".

    The jump label is controlled by HAVE_JUMP_LABEL, which is defined
    like this:

    #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL)
    # define HAVE_JUMP_LABEL
    #endif

    We can improve this by testing 'asm goto' support in Kconfig, then
    make JUMP_LABEL depend on CC_HAS_ASM_GOTO.

    Ugly #ifdef HAVE_JUMP_LABEL will go away, and CONFIG_JUMP_LABEL will
    match to the real kernel capability.

    Signed-off-by: Masahiro Yamada
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Sedat Dilek

    Masahiro Yamada
     

04 Jan, 2019

2 commits

  • To get the changes from:

    a0aea130afeb ("KVM: x86: Add CPUID support for new instruction WBNOINVD")
    20c3a2c33e9f ("x86/speculation: Add support for STIBP always-on preferred mode")

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Robert Hoo
    Cc: Thomas Gleixner
    Cc: Thomas Lendacky
    Link: https://lkml.kernel.org/n/tip-aonti3bu9rhnqe5hlawbidcp@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To silence the following tools/perf build warning:

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

    Picking up the changes in dae0a1059300 ("x86/cpufeatures, x86/fault:
    Mark SMAP as disabled when configured out") that didn't entail any
    functionality change in the tooling side.

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

    Arnaldo Carvalho de Melo
     

28 Dec, 2018

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Notable changes:

    - Mitigations for Spectre v2 on some Freescale (NXP) CPUs.

    - A large series adding support for pass-through of Nvidia V100 GPUs
    to guests on Power9.

    - Another large series to enable hardware assistance for TLB table
    walk on MPC8xx CPUs.

    - Some preparatory changes to our DMA code, to make way for further
    cleanups from Christoph.

    - Several fixes for our Transactional Memory handling discovered by
    fuzzing the signal return path.

    - Support for generating our system call table(s) from a text file
    like other architectures.

    - A fix to our page fault handler so that instead of generating a
    WARN_ON_ONCE, user accesses of kernel addresses instead print a
    ratelimited and appropriately scary warning.

    - A cosmetic change to make our unhandled page fault messages more
    similar to other arches and also more compact and informative.

    - Freescale updates from Scott:
    "Highlights include elimination of legacy clock bindings use from
    dts files, an 83xx watchdog handler, fixes to old dts interrupt
    errors, and some minor cleanup."

    And many clean-ups, reworks and minor fixes etc.

    Thanks to: Alexandre Belloni, Alexey Kardashevskiy, Andrew Donnellan,
    Aneesh Kumar K.V, Arnd Bergmann, Benjamin Herrenschmidt, Breno Leitao,
    Christian Lamparter, Christophe Leroy, Christoph Hellwig, Daniel
    Axtens, Darren Stevens, David Gibson, Diana Craciun, Dmitry V. Levin,
    Firoz Khan, Geert Uytterhoeven, Greg Kurz, Gustavo Romero, Hari
    Bathini, Joel Stanley, Kees Cook, Madhavan Srinivasan, Mahesh
    Salgaonkar, Markus Elfring, Mathieu Malaterre, Michal Suchánek, Naveen
    N. Rao, Nick Desaulniers, Oliver O'Halloran, Paul Mackerras, Ram Pai,
    Ravi Bangoria, Rob Herring, Russell Currey, Sabyasachi Gupta, Sam
    Bobroff, Satheesh Rajendran, Scott Wood, Segher Boessenkool, Stephen
    Rothwell, Tang Yuantian, Thiago Jung Bauermann, Yangtao Li, Yuantian
    Tang, Yue Haibing"

    * tag 'powerpc-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (201 commits)
    Revert "powerpc/fsl_pci: simplify fsl_pci_dma_set_mask"
    powerpc/zImage: Also check for stdout-path
    powerpc: Fix HMIs on big-endian with CONFIG_RELOCATABLE=y
    macintosh: Use of_node_name_{eq, prefix} for node name comparisons
    ide: Use of_node_name_eq for node name comparisons
    powerpc: Use of_node_name_eq for node name comparisons
    powerpc/pseries/pmem: Convert to %pOFn instead of device_node.name
    powerpc/mm: Remove very old comment in hash-4k.h
    powerpc/pseries: Fix node leak in update_lmb_associativity_index()
    powerpc/configs/85xx: Enable CONFIG_DEBUG_KERNEL
    powerpc/dts/fsl: Fix dtc-flagged interrupt errors
    clk: qoriq: add more compatibles strings
    powerpc/fsl: Use new clockgen binding
    powerpc/83xx: handle machine check caused by watchdog timer
    powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved"
    powerpc/fsl_pci: simplify fsl_pci_dma_set_mask
    arch/powerpc/fsl_rmu: Use dma_zalloc_coherent
    vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver
    vfio_pci: Allow regions to add own capabilities
    vfio_pci: Allow mapping extra regions
    ...

    Linus Torvalds
     

20 Dec, 2018

1 commit

  • On each sample, Sample Instruction Event Register (SIER) content
    is saved in pt_regs. SIER does not have a entry as-is in the pt_regs
    but instead, SIER content is saved in the "dar" register of pt_regs.

    Patch adds another entry to the perf_regs structure to include the "SIER"
    printing which internally maps to the "dar" of pt_regs.

    It also check for the SIER availability in the platform and present
    value accordingly

    Signed-off-by: Madhavan Srinivasan
    Signed-off-by: Michael Ellerman

    Madhavan Srinivasan
     

19 Dec, 2018

1 commit


20 Nov, 2018

1 commit

  • To get the changes in the following csets:

    ace6485a0326 ("x86/cpufeatures: Enumerate MOVDIR64B instruction")
    33823f4d63f7 ("x86/cpufeatures: Enumerate MOVDIRI instruction")

    No tools were affected, copy it to silence this perf tool 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: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Cc: Fenghua Yu
    Link: https://lkml.kernel.org/n/tip-83kcyqa1qkxkhm1s7q3hbpel@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

01 Nov, 2018

1 commit

  • Cheers for reporting this. I managed to reproduce the build failure with
    gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1).

    The code in question is the arm64 versions of smp_load_acquire() and
    smp_store_release(). Unlike other architectures, these are not built
    around READ_ONCE() and WRITE_ONCE() since we have instructions we can
    use instead of fences. Bringing our macros up-to-date with those (i.e.
    tweaking the union initialisation and using the special "uXX_alias_t"
    types) appears to fix the issue for me.

    Committer notes:

    Testing it in the systems previously failing:

    # time dm android-ndk:r12b-arm \
    android-ndk:r15c-arm \
    debian:experimental-x-arm64 \
    ubuntu:14.04.4-x-linaro-arm64 \
    ubuntu:16.04-x-arm \
    ubuntu:16.04-x-arm64 \
    ubuntu:18.04-x-arm \
    ubuntu:18.04-x-arm64
    1 android-ndk:r12b-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
    2 android-ndk:r15c-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
    3 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 8.2.0-7) 8.2.0
    4 ubuntu:14.04.4-x-linaro-arm64 : Ok aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
    5 ubuntu:16.04-x-arm : Ok arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    6 ubuntu:16.04-x-arm64 : Ok aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
    7 ubuntu:18.04-x-arm : Ok arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0
    8 ubuntu:18.04-x-arm64 : Ok aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0

    Reported-by: Arnaldo Carvalho de Melo
    Signed-off-by: Will Deacon
    Tested-by: Arnaldo Carvalho de Melo
    Tested-by: Daniel Borkmann
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20181031174408.GA27871@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Will Deacon
     

31 Oct, 2018

2 commits

  • For powerpc, s390, x86 and the main uapi linux/kvm.h header, none of
    them entail changes in tooling.

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

    Arnaldo Carvalho de Melo
     
  • To get the changes in:

    82b355d161c9 ("y2038: Remove newstat family from default syscall set")

    Which will make the syscall table used by 'perf trace' for arm64 to be
    updated from the changes in that patch.

    This silences these perf build warnings:

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

    Cc: Kim Phillips
    Cc: Arnd Bergmann
    Cc: Geert Uytterhoeven
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-3euy7c4yy5mvnp5bm16t9vqg@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

26 Oct, 2018

1 commit

  • Pull KVM updates from Radim Krčmář:
    "ARM:
    - Improved guest IPA space support (32 to 52 bits)

    - RAS event delivery for 32bit

    - PMU fixes

    - Guest entry hardening

    - Various cleanups

    - Port of dirty_log_test selftest

    PPC:
    - Nested HV KVM support for radix guests on POWER9. The performance
    is much better than with PR KVM. Migration and arbitrary level of
    nesting is supported.

    - Disable nested HV-KVM on early POWER9 chips that need a particular
    hardware bug workaround

    - One VM per core mode to prevent potential data leaks

    - PCI pass-through optimization

    - merge ppc-kvm topic branch and kvm-ppc-fixes to get a better base

    s390:
    - Initial version of AP crypto virtualization via vfio-mdev

    - Improvement for vfio-ap

    - Set the host program identifier

    - Optimize page table locking

    x86:
    - Enable nested virtualization by default

    - Implement Hyper-V IPI hypercalls

    - Improve #PF and #DB handling

    - Allow guests to use Enlightened VMCS

    - Add migration selftests for VMCS and Enlightened VMCS

    - Allow coalesced PIO accesses

    - Add an option to perform nested VMCS host state consistency check
    through hardware

    - Automatic tuning of lapic_timer_advance_ns

    - Many fixes, minor improvements, and cleanups"

    * tag 'kvm-4.20-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits)
    KVM/nVMX: Do not validate that posted_intr_desc_addr is page aligned
    Revert "kvm: x86: optimize dr6 restore"
    KVM: PPC: Optimize clearing TCEs for sparse tables
    x86/kvm/nVMX: tweak shadow fields
    selftests/kvm: add missing executables to .gitignore
    KVM: arm64: Safety check PSTATE when entering guest and handle IL
    KVM: PPC: Book3S HV: Don't use streamlined entry path on early POWER9 chips
    arm/arm64: KVM: Enable 32 bits kvm vcpu events support
    arm/arm64: KVM: Rename function kvm_arch_dev_ioctl_check_extension()
    KVM: arm64: Fix caching of host MDCR_EL2 value
    KVM: VMX: enable nested virtualization by default
    KVM/x86: Use 32bit xor to clear registers in svm.c
    kvm: x86: Introduce KVM_CAP_EXCEPTION_PAYLOAD
    kvm: vmx: Defer setting of DR6 until #DB delivery
    kvm: x86: Defer setting of CR2 until #PF delivery
    kvm: x86: Add payload operands to kvm_multiple_exception
    kvm: x86: Add exception payload fields to kvm_vcpu_events
    kvm: x86: Add has_payload and payload to kvm_queued_exception
    KVM: Documentation: Fix omission in struct kvm_vcpu_events
    KVM: selftests: add Enlightened VMCS test
    ...

    Linus Torvalds
     

22 Oct, 2018

1 commit

  • Daniel Borkmann says:

    ====================
    pull-request: bpf-next 2018-10-21

    The following pull-request contains BPF updates for your *net-next* tree.

    The main changes are:

    1) Implement two new kind of BPF maps, that is, queue and stack
    map along with new peek, push and pop operations, from Mauricio.

    2) Add support for MSG_PEEK flag when redirecting into an ingress
    psock sk_msg queue, and add a new helper bpf_msg_push_data() for
    insert data into the message, from John.

    3) Allow for BPF programs of type BPF_PROG_TYPE_CGROUP_SKB to use
    direct packet access for __skb_buff, from Song.

    4) Use more lightweight barriers for walking perf ring buffer for
    libbpf and perf tool as well. Also, various fixes and improvements
    from verifier side, from Daniel.

    5) Add per-symbol visibility for DSO in libbpf and hide by default
    global symbols such as netlink related functions, from Andrey.

    6) Two improvements to nfp's BPF offload to check vNIC capabilities
    in case prog is shared with multiple vNICs and to protect against
    mis-initializing atomic counters, from Jakub.

    7) Fix for bpftool to use 4 context mode for the nfp disassembler,
    also from Jakub.

    8) Fix a return value comparison in test_libbpf.sh and add several
    bpftool improvements in bash completion, documentation of bpf fs
    restrictions and batch mode summary print, from Quentin.

    9) Fix a file resource leak in BPF selftest's load_kallsyms()
    helper, from Peng.

    10) Fix an unused variable warning in map_lookup_and_delete_elem(),
    from Alexei.

    11) Fix bpf_skb_adjust_room() signature in BPF UAPI helper doc,
    from Nicolas.

    12) Add missing executables to .gitignore in BPF selftests, from Anders.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

20 Oct, 2018

1 commit

  • Currently, on x86-64, perf uses LFENCE and MFENCE (rmb() and mb(),
    respectively) when processing events from the perf ring buffer which
    is unnecessarily expensive as we can do more lightweight in particular
    given this is critical fast-path in perf.

    According to Peter rmb()/mb() were added back then via a94d342b9cb0
    ("tools/perf: Add required memory barriers") at a time where kernel
    still supported chips that needed it, but nowadays support for these
    has been ditched completely, therefore we can fix them up as well.

    While for x86-64, replacing rmb() and mb() with smp_*() variants would
    result in just a compiler barrier for the former and LOCK + ADD for
    the latter (__sync_synchronize() uses slower MFENCE by the way), Peter
    suggested we can use smp_{load_acquire,store_release}() instead for
    architectures where its implementation doesn't resolve in slower smp_mb().
    Thus, e.g. in x86-64 we would be able to avoid CPU barrier entirely due
    to TSO. For architectures where the latter needs to use smp_mb() e.g.
    on arm, we stick to cheaper smp_rmb() variant for fetching the head.

    This work adds helpers ring_buffer_read_head() and ring_buffer_write_tail()
    for tools infrastructure that either switches to smp_load_acquire() for
    architectures where it is cheaper or uses READ_ONCE() + smp_rmb() barrier
    for those where it's not in order to fetch the data_head from the perf
    control page, and it uses smp_store_release() to write the data_tail.
    Latter is smp_mb() + WRITE_ONCE() combination or a cheaper variant if
    architecture allows for it. Those that rely on smp_rmb() and smp_mb() can
    further improve performance in a follow up step by implementing the two
    under tools/arch/*/include/asm/barrier.h such that they don't have to
    fallback to rmb() and mb() in tools/include/asm/barrier.h.

    Switch perf to use ring_buffer_read_head() and ring_buffer_write_tail()
    so it can make use of the optimizations. Later, we convert libbpf as
    well to use the same helpers.

    Side note [0]: the topic has been raised of whether one could simply use
    the C11 gcc builtins [1] for the smp_load_acquire() and smp_store_release()
    instead:

    __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
    __atomic_store_n(ptr, val, __ATOMIC_RELEASE);

    Kernel and (presumably) tooling shipped along with the kernel has a
    minimum requirement of being able to build with gcc-4.6 and the latter
    does not have C11 builtins. While generally the C11 memory models don't
    align with the kernel's, the C11 load-acquire and store-release alone
    /could/ suffice, however. Issue is that this is implementation dependent
    on how the load-acquire and store-release is done by the compiler and
    the mapping of supported compilers must align to be compatible with the
    kernel's implementation, and thus needs to be verified/tracked on a
    case by case basis whether they match (unless an architecture uses them
    also from kernel side). The implementations for smp_load_acquire() and
    smp_store_release() in this patch have been adapted from the kernel side
    ones to have a concrete and compatible mapping in place.

    [0] http://patchwork.ozlabs.org/patch/985422/
    [1] https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

    Signed-off-by: Daniel Borkmann
    Acked-by: Peter Zijlstra (Intel)
    Cc: "Paul E. McKenney"
    Cc: Will Deacon
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Alexei Starovoitov

    Daniel Borkmann
     

18 Oct, 2018

1 commit

  • The per-VM capability KVM_CAP_EXCEPTION_PAYLOAD (to be introduced in a
    later commit) adds the following fields to struct kvm_vcpu_events:
    exception_has_payload, exception_payload, and exception.pending.

    With this capability set, all of the details of vcpu->arch.exception,
    including the payload for a pending exception, are reported to
    userspace in response to KVM_GET_VCPU_EVENTS.

    With this capability clear, the original ABI is preserved, and the
    exception.injected field is set for either pending or injected
    exceptions.

    When userspace calls KVM_SET_VCPU_EVENTS with
    KVM_CAP_EXCEPTION_PAYLOAD clear, exception.injected is no longer
    translated to exception.pending. KVM_SET_VCPU_EVENTS can now only
    establish a pending exception when KVM_CAP_EXCEPTION_PAYLOAD is set.

    Reported-by: Jim Mattson
    Suggested-by: Paolo Bonzini
    Signed-off-by: Jim Mattson
    Signed-off-by: Paolo Bonzini

    Jim Mattson
     

08 Oct, 2018

1 commit

  • To get the changes in:

    d1766202779e ("x86/kvm/lapic: always disable MMIO interface in x2APIC mode")

    That at this time will not generate changes in tools such as 'perf trace',
    that still needs more work in tools/perf/examples/bpf/augmented_syscalls.c
    to need such id -> string tables.

    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

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

    Arnaldo Carvalho de Melo
     

12 Sep, 2018

1 commit

  • To get the changes in:

    a449938297e5 ("KVM: s390: Add huge page enablement control")
    8fcc4b5923af ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE")
    be26b3a73413 ("arm64: KVM: export the capability to set guest SError syndrome")
    b7b27facc7b5 ("arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS")
    b0960b9569db ("KVM: arm: Add 32bit get/set events support")
    a3da7b4a3be5 ("KVM: s390: add etoken support for guests")

    This makes 'perf trace' automagically get aware of these new ioctls:

    $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h
    $ tools/perf/trace/beauty/kvm_ioctl.sh > /tmp/after
    $ diff -u /tmp/before /tmp/after
    --- /tmp/before 2018-09-11 11:18:29.173207586 -0300
    +++ /tmp/after 2018-09-11 11:18:38.488200446 -0300
    @@ -84,6 +84,8 @@
    [0xbb] = "MEMORY_ENCRYPT_REG_REGION",
    [0xbc] = "MEMORY_ENCRYPT_UNREG_REGION",
    [0xbd] = "HYPERV_EVENTFD",
    + [0xbe] = "GET_NESTED_STATE",
    + [0xbf] = "SET_NESTED_STATE",
    [0xe0] = "CREATE_DEVICE",
    [0xe1] = "SET_DEVICE_ATTR",
    [0xe2] = "G

    And cures the following warning during perf's build:

    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

    Cc: Adrian Hunter
    Cc: Christian Borntraeger
    Cc: Cornelia Huck
    Cc: David Ahern
    Cc: David Hildenbrand
    Cc: Dongjiu Geng
    Cc: Eduardo Habkost
    Cc: James Morse
    Cc: Janosch Frank
    Cc: Jim Mattson
    Cc: Jiri Olsa
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Paolo Bonzini
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-2vvwh2o19orn56di0ksrtgzr@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

27 Aug, 2018

1 commit

  • Pull perf updates from Thomas Gleixner:
    "Kernel:
    - Improve kallsyms coverage
    - Add x86 entry trampolines to kcore
    - Fix ARM SPE handling
    - Correct PPC event post processing

    Tools:
    - Make the build system more robust
    - Small fixes and enhancements all over the place
    - Update kernel ABI header copies
    - Preparatory work for converting libtraceevnt to a shared library
    - License cleanups"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits)
    tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'
    tools arch x86: Update tools's copy of cpufeatures.h
    perf python: Fix pyrf_evlist__read_on_cpu() interface
    perf mmap: Store real cpu number in 'struct perf_mmap'
    perf tools: Remove ext from struct kmod_path
    perf tools: Add gzip_is_compressed function
    perf tools: Add lzma_is_compressed function
    perf tools: Add is_compressed callback to compressions array
    perf tools: Move the temp file processing into decompress_kmodule
    perf tools: Use compression id in decompress_kmodule()
    perf tools: Store compression id into struct dso
    perf tools: Add compression id into 'struct kmod_path'
    perf tools: Make is_supported_compression() static
    perf tools: Make decompress_to_file() function static
    perf tools: Get rid of dso__needs_decompress() call in __open_dso()
    perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble()
    perf tools: Get rid of dso__needs_decompress() call in read_object_code()
    tools lib traceevent: Change to SPDX License format
    perf llvm: Allow passing options to llc in addition to clang
    perf parser: Improve error message for PMU address filters
    ...

    Linus Torvalds
     

20 Aug, 2018

2 commits

  • To bring in the change made in this cset:

    Fixes: a7bea8308933 ("x86/asm/64: Use 32-bit XOR to zero registers")

    CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
    LD /tmp/build/perf/bench/perf-in.o
    LD /tmp/build/perf/perf-in.o
    LINK /tmp/build/perf/perf

    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

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jan Beulich
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-sad22dudoz71qr3tsnlqtkia@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • To get the changes in the following csets:

    301d328a6f8b ("x86/cpufeatures: Add EPT_AD feature bit")
    706d51681d63 ("x86/speculation: Support Enhanced IBRS on future CPUs")

    No tools were affected, copy it to silence this perf tool 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: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Feiner
    Cc: Sai Praneeth
    Cc: Thomas Gleixner
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-bvs8wgd5wp4lz9f0xf1iug5r@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

15 Aug, 2018

1 commit

  • Merge L1 Terminal Fault fixes from Thomas Gleixner:
    "L1TF, aka L1 Terminal Fault, is yet another speculative hardware
    engineering trainwreck. It's a hardware vulnerability which allows
    unprivileged speculative access to data which is available in the
    Level 1 Data Cache when the page table entry controlling the virtual
    address, which is used for the access, has the Present bit cleared or
    other reserved bits set.

    If an instruction accesses a virtual address for which the relevant
    page table entry (PTE) has the Present bit cleared or other reserved
    bits set, then speculative execution ignores the invalid PTE and loads
    the referenced data if it is present in the Level 1 Data Cache, as if
    the page referenced by the address bits in the PTE was still present
    and accessible.

    While this is a purely speculative mechanism and the instruction will
    raise a page fault when it is retired eventually, the pure act of
    loading the data and making it available to other speculative
    instructions opens up the opportunity for side channel attacks to
    unprivileged malicious code, similar to the Meltdown attack.

    While Meltdown breaks the user space to kernel space protection, L1TF
    allows to attack any physical memory address in the system and the
    attack works across all protection domains. It allows an attack of SGX
    and also works from inside virtual machines because the speculation
    bypasses the extended page table (EPT) protection mechanism.

    The assoicated CVEs are: CVE-2018-3615, CVE-2018-3620, CVE-2018-3646

    The mitigations provided by this pull request include:

    - Host side protection by inverting the upper address bits of a non
    present page table entry so the entry points to uncacheable memory.

    - Hypervisor protection by flushing L1 Data Cache on VMENTER.

    - SMT (HyperThreading) control knobs, which allow to 'turn off' SMT
    by offlining the sibling CPU threads. The knobs are available on
    the kernel command line and at runtime via sysfs

    - Control knobs for the hypervisor mitigation, related to L1D flush
    and SMT control. The knobs are available on the kernel command line
    and at runtime via sysfs

    - Extensive documentation about L1TF including various degrees of
    mitigations.

    Thanks to all people who have contributed to this in various ways -
    patches, review, testing, backporting - and the fruitful, sometimes
    heated, but at the end constructive discussions.

    There is work in progress to provide other forms of mitigations, which
    might be less horrible performance wise for a particular kind of
    workloads, but this is not yet ready for consumption due to their
    complexity and limitations"

    * 'l1tf-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (75 commits)
    x86/microcode: Allow late microcode loading with SMT disabled
    tools headers: Synchronise x86 cpufeatures.h for L1TF additions
    x86/mm/kmmio: Make the tracer robust against L1TF
    x86/mm/pat: Make set_memory_np() L1TF safe
    x86/speculation/l1tf: Make pmd/pud_mknotpresent() invert
    x86/speculation/l1tf: Invert all not present mappings
    cpu/hotplug: Fix SMT supported evaluation
    KVM: VMX: Tell the nested hypervisor to skip L1D flush on vmentry
    x86/speculation: Use ARCH_CAPABILITIES to skip L1D flush on vmentry
    x86/speculation: Simplify sysfs report of VMX L1TF vulnerability
    Documentation/l1tf: Remove Yonah processors from not vulnerable list
    x86/KVM/VMX: Don't set l1tf_flush_l1d from vmx_handle_external_intr()
    x86/irq: Let interrupt handlers set kvm_cpu_l1tf_flush_l1d
    x86: Don't include linux/irq.h from asm/hardirq.h
    x86/KVM/VMX: Introduce per-host-cpu analogue of l1tf_flush_l1d
    x86/irq: Demote irq_cpustat_t::__softirq_pending to u16
    x86/KVM/VMX: Move the l1tf_flush_l1d test to vmx_l1d_flush()
    x86/KVM/VMX: Replace 'vmx_l1d_flush_always' with 'vmx_l1d_flush_cond'
    x86/KVM/VMX: Don't set l1tf_flush_l1d to true from vmx_l1d_flush()
    cpu/hotplug: detect SMT disabled by BIOS
    ...

    Linus Torvalds
     

14 Aug, 2018

1 commit

  • Pull parisc updates from Helge Deller:

    - parisc now uses the generic dma_noncoherent_ops implementation
    (Christoph Hellwig)

    - further memory barrier and spinlock improvements (John David Anglin)

    - prepare removal of current_text_addr() functions (Nick Desaulniers)

    - improve kernel stack unwinding on parisc (me)

    - drop ENOTSUP which was defined on parisc only (me)

    * 'parisc-4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix and improve kernel stack unwinding
    parisc: Remove unnecessary barriers from spinlock.h
    parisc: Remove ordered stores from syscall.S
    parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions
    parisc: Add HAVE_REGS_AND_STACK_ACCESS_API feature
    parisc: Drop architecture-specific ENOTSUP define
    parisc: use generic dma_noncoherent_ops
    parisc: always use flush_kernel_dcache_range for DMA cache maintainance
    parisc: merge pcx_dma_ops and pcxl_dma_ops

    Linus Torvalds
     

13 Aug, 2018

1 commit

  • parisc is the only Linux architecture which has defined a value for ENOTSUP.
    All other architectures #define ENOTSUP as EOPNOTSUPP in their libc headers.

    Having an own value for ENOTSUP which is different than EOPNOTSUPP often gives
    problems with userspace programs which expect both to be the same. One such
    example is a build error in the libuv package, as can be seen in
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900237.

    Since we dropped HP-UX support, there is no real benefit in keeping an own
    value for ENOTSUP. This patch drops the parisc value for ENOTSUP from the
    kernel sources. glibc needs no patch, it reuses the exported headers.

    Signed-off-by: Helge Deller

    Helge Deller
     

09 Aug, 2018

1 commit


02 Aug, 2018

1 commit


30 Jul, 2018

2 commits

  • To cope with the changes in:

    12c89130a56a ("x86/asm/memcpy_mcsafe: Add write-protection-fault handling")
    60622d68227d ("x86/asm/memcpy_mcsafe: Return bytes remaining")
    bd131544aa7e ("x86/asm/memcpy_mcsafe: Add labels for __memcpy_mcsafe() write fault handling")
    da7bc9c57eb0 ("x86/asm/memcpy_mcsafe: Remove loop unrolling")

    This needed introducing a file with a copy of the mcsafe_handle_tail()
    function, that is used in the new memcpy_64.S file, as well as a dummy
    mcsafe_test.h header.

    Testing it:

    $ nm ~/bin/perf | grep mcsafe
    0000000000484130 T mcsafe_handle_tail
    0000000000484300 T __memcpy_mcsafe
    $
    $ perf bench mem memcpy
    # Running 'mem/memcpy' benchmark:
    # function 'default' (Default memcpy() provided by glibc)
    # Copying 1MB bytes ...

    44.389205 GB/sec
    # function 'x86-64-unrolled' (unrolled memcpy() in arch/x86/lib/memcpy_64.S)
    # Copying 1MB bytes ...

    22.710756 GB/sec
    # function 'x86-64-movsq' (movsq-based memcpy() in arch/x86/lib/memcpy_64.S)
    # Copying 1MB bytes ...

    42.459239 GB/sec
    # function 'x86-64-movsb' (movsb-based memcpy() in arch/x86/lib/memcpy_64.S)
    # Copying 1MB bytes ...

    42.459239 GB/sec
    $

    This silences this perf tools 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'

    Cc: Adrian Hunter
    Cc: Dan Williams
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Mika Penttilä
    Cc: Namhyung Kim
    Cc: Tony Luck
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-igdpciheradk3gb3qqal52d0@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The new 'io_pgetevents' syscall was wired up in PowerPC in the following
    cset:

    b2f82565f2ca ("powerpc: Wire up io_pgetevents")

    Update tools/arch/powerpc/ copy of the asm/unistd.h file so that 'perf
    trace' on PowerPC gets it in its syscall table.

    This elliminated the following perf build warning:

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

    Cc: Alexander Shishkin
    Cc: Breno Leitao
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Ravi Bangoria
    Cc: Thomas Richter
    Link: https://lkml.kernel.org/n/tip-9uvu7tz4ud3bxxfyxwryuz47@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

25 Jul, 2018

1 commit

  • Will be used for generating the syscall id/string translation table.

    The arm64 unistd.h file simply #includes the asm-generic/unistd.h, so,
    since we will want to know whether either change, we grab both:

    arch/arm64/include/uapi/asm/unistd.h

    and

    include/uapi/asm-generic/unistd.h

    Signed-off-by: Kim Phillips
    Cc: Alexander Shishkin
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Ravi Bangoria
    Cc: Thomas Richter
    Link: http://lkml.kernel.org/r/20180706163434.1b64ffbcc0284fb79982f53b@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Kim Phillips
     

26 Jun, 2018

1 commit

  • Sync KVM ABI additions and x86 CPU features additions - neither of which
    has any impact on the tooling build.

    Cc: Arnaldo Carvalho de Melo
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Cc: Jiri Olsa
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

25 Jun, 2018

1 commit

  • This updates the tools/perf/ copy of the powerpc file used to generate
    the syscall table file used to make 'perf trace' become aware of the new
    'rseq' syscall, no matter in which system it gets built, i.e. older
    systems where the syscalls are not available in the running kernel (via
    tracefs) or in the system headers will still be aware of these
    syscalls/.

    From this commit:

    bb862b021d75 ("powerpc: Wire up restartable sequences system call")

    Silencing this tools/perf build warning:

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

    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Boqun Feng
    Cc: David Ahern
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Mathieu Desnoyers
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Ravi Bangoria
    Cc: Thomas Gleixner
    Cc: Thomas Richter
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-adtgz6u3apd76tghiu9w0k19@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

02 Jun, 2018

1 commit

  • To pick up changes found in these csets:

    11fb0683493b x86/speculation: Add virtualized speculative store bypass disable support
    d1035d971829 x86/cpufeatures: Add FEATURE_ZEN
    52817587e706 x86/cpufeatures: Disentangle SSBD enumeration
    7eb8956a7fec x86/cpufeatures: Disentangle MSR_SPEC_CTRL enumeration from IBRS
    e7c587da1252 x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP
    9f65fb29374e x86/bugs: Rename _RDS to _SSBD
    764f3c21588a x86/bugs/AMD: Add support to disable RDS on Fam[15,16,17]h if requested
    24f7fc83b920 x86/bugs: Provide boot parameters for the spec_store_bypass_disable mitigation
    0cc5fa00b0a8 x86/cpufeatures: Add X86_FEATURE_RDS
    c456442cd3a5 x86/bugs: Expose /sys/../spec_store_bypass

    The usage of this file in tools doesn't use the newly added X86_FEATURE_
    defines:

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

    Silencing 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'

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Konrad Rzeszutek Wilk
    Cc: Namhyung Kim
    Cc: Thomas Gleixner
    Cc: Tom Lendacky
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-mrwyauyov8c7s048abg26khg@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

08 May, 2018

2 commits

  • To sync with the changes made in 85bd0ba1ff98 ("arm/arm64: KVM: Add PSCI
    version selection API"), that do not cause any changes in the tools,
    just to silence the 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'
    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'

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Marc Zyngier
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-7u37pv09xtvet1ll27840w73@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The 912413057395 ("x86/cpufeatures: Enumerate cldemote instruction")
    doesn't requires changes in the tools, just copy it to silence this
    warning:

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

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Fenghua Yu
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-1vo20y5z2drlujfpltjudwk8@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

17 Apr, 2018

1 commit

  • Sync the following tooling headers with the latest kernel version:

    tools/arch/arm/include/uapi/asm/kvm.h
    - New ABI: KVM_REG_ARM_*

    tools/arch/x86/include/asm/required-features.h
    - Removal of NEED_LA57 dependency

    tools/arch/x86/include/uapi/asm/kvm.h
    - New KVM ABI: KVM_SYNC_X86_*

    tools/include/uapi/asm-generic/mman-common.h
    - New ABI: MAP_FIXED_NOREPLACE flag

    tools/include/uapi/linux/bpf.h
    - New ABI: BPF_F_SEQ_NUMBER functions

    tools/include/uapi/linux/if_link.h
    - New ABI: IFLA tun and rmnet support

    tools/include/uapi/linux/kvm.h
    - New ABI: hyperv eventfd and CONN_ID_MASK support plus header cleanups

    tools/include/uapi/sound/asound.h
    - New ABI: SNDRV_PCM_FORMAT_FIRST PCM format specifier

    tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
    - The x86 system call table description changed due to the ptregs changes and the renames, in:

    d5a00528b58c: syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()
    5ac9efa3c50d: syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention
    ebeb8c82ffaf: syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32

    Also fix the x86 syscall table warning:

    -Warning: Kernel ABI header at 'tools/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
    +Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'

    None of these changes impact existing tooling code, so we only have to copy the kernel version.

    Signed-off-by: Ingo Molnar
    Cc: Adrian Hunter
    Cc: Alexander Potapenko
    Cc: Alexander Shishkin
    Cc: Alexei Starovoitov
    Cc: Alexey Budankov
    Cc: Andi Kleen
    Cc: Andrey Ryabinin
    Cc: Andy Lutomirski
    Cc: Arnd Bergmann
    Cc: Brian Robbins
    Cc: Clark Williams
    Cc: Daniel Borkmann
    Cc: David Ahern
    Cc: Dmitriy Vyukov
    Cc: Heiko Carstens
    Cc: Hendrik Brueckner
    Cc: Jesper Dangaard Brouer
    Cc: Jin Yao
    Cc: Jiri Olsa
    Cc: Josh Poimboeuf
    Cc: Kan Liang
    Cc: Kim Phillips
    Cc: Linus Torvalds
    Cc: Li Zhijian
    Cc: Mark Rutland
    Cc: Martin Liška
    Cc: Martin Schwidefsky
    Cc: Matthias Kaehlcke
    Cc: Miguel Bernal Marin
    Cc: Namhyung Kim
    Cc: Naveen N. Rao
    Cc: Peter Zijlstra
    Cc: Ravi Bangoria
    Cc: Sandipan Das
    Cc: Stephane Eranian
    Cc: Stephen Rothwell
    Cc: Takuya Yamamoto
    Cc: Thomas Gleixner
    Cc: Thomas Richter
    Cc: Wang Nan
    Cc: William Cohen
    Cc: Yonghong Song
    Link: http://lkml.kernel.org/r/20180416064024.ofjtrz5yuu3ykhvl@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

04 Apr, 2018

1 commit

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

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

    - Show only failing syscalls with 'perf trace --failure' (Arnaldo Carvalho de Melo)

    e.g: See what 'openat' syscalls are failing:

    # perf trace --failure -e openat
    762.323 ( 0.007 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video2) = -1 ENOENT No such file or directory
    <SNIP N /dev/videoN open attempts... sigh, where is that improvised camera lid?!? >
    790.228 ( 0.008 ms): VideoCapture/4566 openat(dfd: CWD, filename: /dev/video63) = -1 ENOENT No such file or directory
    ^C#

    - Show information about the event (freq, nr_samples, total period/nr_events) in
    the annotate --tui and --stdio2 'perf annotate' output, similar to the
    first line in the 'perf report --tui', but just for the samples for a
    the annotated symbol (Arnaldo Carvalho de Melo)

    - Introduce 'perf version --build-options' to show what features were
    linked, aliased as well as a shorter 'perf -vv' (Jin Yao)

    - Add a "dso_size" sort order (Kim Phillips)

    - Remove redundant ')' in the tracepoint output in 'perf trace' (Changbin Du)

    - Synchronize x86's cpufeatures.h, no effect on toolss (Arnaldo Carvalho de Melo)

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

    Ingo Molnar