1. 27 2月, 2020 2 次提交
    • A
      tools headers UAPI: Update tools's copy of kvm.h headers · 0d6f94fd
      Arnaldo Carvalho de Melo 提交于
      Picking the changes from:
      
        5ef8acbd ("KVM: nVMX: Emulate MTF when performing instruction emulation")
      
      Silencing this 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
      
      No change in tooling ensues, just the x86 kvm tooling gets rebuilt as
      those headers are included in its build:
      
        $ cp arch/x86/include/uapi/asm/kvm.h tools/arch/x86/include/uapi/asm/kvm.h
        $ make -C tools/perf
        make: Entering directory '/home/acme/git/perf/tools/perf'
          BUILD:   Doing 'make -j12' parallel build
      
        Auto-detecting system features:
        ...                         dwarf: [ on  ]
        <SNIP>
        ...        disassembler-four-args: [ on  ]
      
          DESCEND  plugins
          CC       /tmp/build/perf/arch/x86/util/kvm-stat.o
        <SNIP>
          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
        <SNIP>
        $
      
      As it doesn't seem to be used there:
      
        $ grep STATE tools/perf/arch/x86/util/kvm-stat.c
        $
      
      And the 'perf trace' beautifier table generator isn't interested in
      these things:
      
        $ grep regex= tools/perf/trace/beauty/kvm_ioctl.sh
        regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
        $
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Oliver Upton <oupton@google.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0d6f94fd
    • A
      tools arch x86: Sync the msr-index.h copy with the kernel sources · d8e3ee2e
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from these csets:
      
        21b5ee59 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF")
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
        $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
        $ git diff
        diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h
        index ebe1685e92dd..d5e517d1c3dd 100644
        --- a/tools/arch/x86/include/asm/msr-index.h
        +++ b/tools/arch/x86/include/asm/msr-index.h
        @@ -512,6 +512,8 @@
         #define MSR_K7_HWCR                    0xc0010015
         #define MSR_K7_HWCR_SMMLOCK_BIT                0
         #define MSR_K7_HWCR_SMMLOCK            BIT_ULL(MSR_K7_HWCR_SMMLOCK_BIT)
        +#define MSR_K7_HWCR_IRPERF_EN_BIT      30
        +#define MSR_K7_HWCR_IRPERF_EN          BIT_ULL(MSR_K7_HWCR_IRPERF_EN_BIT)
         #define MSR_K7_FID_VID_CTL             0xc0010041
         #define MSR_K7_FID_VID_STATUS          0xc0010042
        $
      
      That don't result in any change in tooling:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
        $ diff -u before after
        $
      
      To silence this perf build warning:
      
        Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
        diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kim Phillips <kim.phillips@amd.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d8e3ee2e
  2. 12 2月, 2020 2 次提交
    • A
      tools arch x86: Sync asm/cpufeatures.h with the kernel sources · 71dd6528
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        85c17291 ("x86/cpufeatures: Add flag to track whether MSR IA32_FEAT_CTL is configured")
        f444a5ff ("x86/cpufeatures: Add support for fast short REP; MOVSB")
      
      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
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Sean Christopherson <sean.j.christopherson@intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      71dd6528
    • A
      tools headers x86: Sync disabled-features.h · 7636b586
      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:
      
        45fc24e8 ("x86/mpx: remove MPX from arch/x86")
      
      that didn't entail any functionality change in the tooling side.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7636b586
  3. 22 1月, 2020 1 次提交
    • M
      x86/decoder: Add TEST opcode to Group3-2 · 8b7e20a7
      Masami Hiramatsu 提交于
      Add TEST opcode to Group3-2 reg=001b as same as Group3-1 does.
      
      Commit
      
        12a78d43 ("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: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Tested-by: NRandy Dunlap <rdunlap@infradead.org>
      Link: https://lkml.kernel.org/r/157966631413.9580.10311036595431878351.stgit@devnote2
      8b7e20a7
  4. 14 1月, 2020 1 次提交
  5. 09 1月, 2020 1 次提交
  6. 03 12月, 2019 1 次提交
  7. 02 12月, 2019 2 次提交
    • A
      tools arch x86: Sync the msr-index.h copy with the kernel sources · 8122b047
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from these csets:
      
        3f3c8be9 Merge tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
        4e3f77d8 ("xen/mcelog: add PPIN to record when available")
        db4d30fb ("x86/bugs: Add ITLB_MULTIHIT bug infrastructure")
        1b42f017 ("x86/speculation/taa: Add mitigation for TSX Async Abort")
        c2955f27 ("x86/msr: Add the IA32_TSX_CTRL MSR")
      
      These are the changes in tooling that this udpate ensues:
      
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > /tmp/before
        $
        $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
        $
        $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > /tmp/after
        $ diff -u /tmp/before /tmp/after
        --- /tmp/before	2019-12-02 11:54:44.371035723 -0300
        +++ /tmp/after	2019-12-02 11:55:31.847859784 -0300
        @@ -48,6 +48,7 @@
         	[0x00000119] = "IA32_BBL_CR_CTL",
         	[0x0000011e] = "IA32_BBL_CR_CTL3",
         	[0x00000120] = "IDT_MCR_CTRL",
        +	[0x00000122] = "IA32_TSX_CTRL",
         	[0x00000140] = "MISC_FEATURES_ENABLES",
         	[0x00000174] = "IA32_SYSENTER_CS",
         	[0x00000175] = "IA32_SYSENTER_ESP",
        @@ -283,4 +284,6 @@
         	[0xc0010240 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTL",
         	[0xc0010241 - x86_AMD_V_KVM_MSRs_offset] = "F15H_NB_PERF_CTR",
         	[0xc0010280 - x86_AMD_V_KVM_MSRs_offset] = "F15H_PTSC",
        +	[0xc00102f0 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN_CTL",
        +	[0xc00102f1 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PPIN",
         };
        $
      
        CC       /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o
        LD       /tmp/build/perf/trace/beauty/tracepoints/perf-in.o
        LD       /tmp/build/perf/trace/beauty/perf-in.o
        LD       /tmp/build/perf/perf-in.o
      
      Now it is possible to use these strings when setting up filters for the msr:*
      tracepoints, like:
      
        # perf trace -e msr:* --filter=msr==IA32_TSX_CTRL
        ^C[root@quaco ~]#
      
      If we use an invalid operator we can check what is the filter that is put in
      place:
      
        # perf trace -e msr:* --filter=msr=IA32_TSX_CTRL
        Failed to set filter "(msr=0x122) && (common_pid != 25976 && common_pid != 25860)" on event msr:read_msr with 22 (Invalid argument)
      
      One can as well use -v to see the tracepoints and its filters:
      
        # perf trace -v -e msr:* --filter=msr==IA32_TSX_CTRL
        Using CPUID GenuineIntel-6-8E-A
        New filter for msr:read_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
        New filter for msr:write_msr: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
        New filter for msr:rdpmc: (msr==0x122) && (common_pid != 26110 && common_pid != 25860)
        mmap size 528384B
        ^C#
      
      Better than keep looking up those numbers, works with callchains as
      well, e.g. for something more common:
      
        # perf trace -e msr:*/max-stack=16/ --filter="msr==IA32_SPEC_CTRL" --max-events=2
             0.000 SCTP timer/6158 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6)
                                               do_trace_write_msr ([kernel.kallsyms])
                                               do_trace_write_msr ([kernel.kallsyms])
                                               __switch_to_xtra ([kernel.kallsyms])
                                               __switch_to ([kernel.kallsyms])
                                               __sched_text_start ([kernel.kallsyms])
                                               schedule ([kernel.kallsyms])
                                               schedule_hrtimeout_range_clock ([kernel.kallsyms])
                                               poll_schedule_timeout.constprop.0 ([kernel.kallsyms])
                                               do_select ([kernel.kallsyms])
                                               core_sys_select ([kernel.kallsyms])
                                               kern_select ([kernel.kallsyms])
                                               __x64_sys_select ([kernel.kallsyms])
                                               do_syscall_64 ([kernel.kallsyms])
                                               entry_SYSCALL_64 ([kernel.kallsyms])
                                               __select (/usr/lib64/libc-2.29.so)
                                               [0] ([unknown])
             0.024 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL)
                                               do_trace_write_msr ([kernel.kallsyms])
                                               do_trace_write_msr ([kernel.kallsyms])
                                               __switch_to_xtra ([kernel.kallsyms])
                                               __switch_to ([kernel.kallsyms])
                                               __sched_text_start ([kernel.kallsyms])
                                               schedule_idle ([kernel.kallsyms])
                                               do_idle ([kernel.kallsyms])
                                               cpu_startup_entry ([kernel.kallsyms])
                                               start_secondary ([kernel.kallsyms])
                                               [0x2000d4] ([kernel.kallsyms])
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jan Beulich <jbeulich@suse.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vineela Tummalapalli <vineela.tummalapalli@intel.com>
      Link: https://lkml.kernel.org/n/tip-n1xd78fpd5lxn4q1brqi2jl6@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8122b047
    • A
      perf bench: Update the copies of x86's mem{cpy,set}_64.S · bd5c6b81
      Arnaldo Carvalho de Melo 提交于
      And update linux/linkage.h, which requires in turn that we make these
      files switch from ENTRY()/ENDPROC() to SYM_FUNC_START()/SYM_FUNC_END():
      
        tools/perf/arch/arm64/tests/regs_load.S
        tools/perf/arch/arm/tests/regs_load.S
        tools/perf/arch/powerpc/tests/regs_load.S
        tools/perf/arch/x86/tests/regs_load.S
      
      We also need to switch SYM_FUNC_START_LOCAL() to SYM_FUNC_START() for
      the functions used directly by 'perf bench', and update
      tools/perf/check_headers.sh to ignore those changes when checking if the
      kernel original files drifted from the copies we carry.
      
      This is to get the changes from:
      
        6dcc5627 ("x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_*")
        ef1e0315 ("x86/asm: Make some functions local")
        e9b9d020 ("x86/asm: Annotate aliases")
      
      And address these tools/perf build warnings:
      
        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
        Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S'
        diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-tay3l8x8k11p7y3qcpqh9qh5@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bd5c6b81
  8. 26 11月, 2019 1 次提交
    • A
      x86/insn: Add some more Intel instructions to the opcode map · af4933c1
      Adrian Hunter 提交于
      Add to the opcode map the following instructions:
      
      	v4fmaddps
      	v4fmaddss
      	v4fnmaddps
      	v4fnmaddss
      	vaesdec
      	vaesdeclast
      	vaesenc
      	vaesenclast
      	vcvtne2ps2bf16
      	vcvtneps2bf16
      	vdpbf16ps
      	gf2p8affineinvqb
      	vgf2p8affineinvqb
      	gf2p8affineqb
      	vgf2p8affineqb
      	gf2p8mulb
      	vgf2p8mulb
      	vp2intersectd
      	vp2intersectq
      	vp4dpwssd
      	vp4dpwssds
      	vpclmulqdq
      	vpcompressb
      	vpcompressw
      	vpdpbusd
      	vpdpbusds
      	vpdpwssd
      	vpdpwssds
      	vpexpandb
      	vpexpandw
      	vpopcntb
      	vpopcntd
      	vpopcntq
      	vpopcntw
      	vpshldd
      	vpshldq
      	vpshldvd
      	vpshldvq
      	vpshldvw
      	vpshldw
      	vpshrdd
      	vpshrdq
      	vpshrdvd
      	vpshrdvq
      	vpshrdvw
      	vpshrdw
      	vpshufbitqmb
      
      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 e.g.
      
        $ perf test -v "new " 2>&1 | grep -i 'v4fmaddps'
        Decoded ok: 62 f2 7f 48 9a 20                   v4fmaddps (%eax),%zmm0,%zmm4
        Decoded ok: 62 f2 7f 48 9a a4 c8 78 56 34 12    v4fmaddps 0x12345678(%eax,%ecx,8),%zmm0,%zmm4
        Decoded ok: 62 f2 7f 48 9a 20                   v4fmaddps (%rax),%zmm0,%zmm4
        Decoded ok: 67 62 f2 7f 48 9a 20                v4fmaddps (%eax),%zmm0,%zmm4
        Decoded ok: 62 f2 7f 48 9a a4 c8 78 56 34 12    v4fmaddps 0x12345678(%rax,%rcx,8),%zmm0,%zmm4
        Decoded ok: 67 62 f2 7f 48 9a a4 c8 78 56 34 12 v4fmaddps 0x12345678(%eax,%ecx,8),%zmm0,%zmm4
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>
      Cc: x86@kernel.org
      Link: http://lore.kernel.org/lkml/20191125125044.31879-3-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      af4933c1
  9. 19 11月, 2019 1 次提交
    • A
      x86/insn: Add some Intel instructions to the opcode map · b980be18
      Adrian Hunter 提交于
      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: NAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86@kernel.org
      Link: http://lore.kernel.org/lkml/20191115135447.6519-3-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b980be18
  10. 07 11月, 2019 1 次提交
  11. 18 10月, 2019 1 次提交
  12. 16 10月, 2019 1 次提交
  13. 15 10月, 2019 2 次提交
    • A
      tools headers kvm: Sync kvm headers with the kernel sources · 7cb3a244
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
          0cb8410b ("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 <adrian.hunter@intel.com>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Link: https://lkml.kernel.org/n/tip-pqzkt1hmfpqph3ts8i6zzmim@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7cb3a244
    • A
      tools headers kvm: Sync kvm headers with the kernel sources · 7a12f514
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        bf653b78 ("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 <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Tao Xu <tao3.xu@intel.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-gr1eel0hckmi5l3p2ewdpfxh@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7a12f514
  14. 07 10月, 2019 1 次提交
  15. 01 10月, 2019 2 次提交
    • A
      x86/insn: Fix awk regexp warnings · 700c1018
      Alexander Kapshuk 提交于
      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: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NAlexander Kapshuk <alexander.kapshuk@gmail.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86-ml <x86@kernel.org>
      Link: https://lkml.kernel.org/r/20190924044659.3785-1-alexander.kapshuk@gmail.com
      700c1018
    • A
      tools headers kvm: Sync kvm headers with the kernel sources · b7ad6108
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        200824f5 ("KVM: s390: Disallow invalid bits in kvm_valid_regs and kvm_dirty_regs")
        4a53d99d ("KVM: VMX: Introduce exit reason for receiving INIT signal on guest-mode")
        7396d337 ("KVM: x86: Return to userspace with internal error on unexpected exit reason")
        92f35b75 ("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 <adrian.hunter@intel.com>
      Cc: Janosch Frank <frankja@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Liran Alon <liran.alon@oracle.com>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Thomas Huth <thuth@redhat.com>
      Link: https://lkml.kernel.org/n/tip-akuugvvjxte26kzv23zp5d2z@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b7ad6108
  16. 21 9月, 2019 2 次提交
    • A
      tools arch x86: Sync asm/cpufeatures.h with the kernel sources · 40f1c039
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        b4dd4f6e ("x86/vmware: Add a header file for hypercall definitions")
        f36cf386 ("x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS")
        be261ffc ("x86: Remove X86_FEATURE_MFENCE_RDTSC")
        018ebca8 ("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 <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Gayatri Kammela <gayatri.kammela@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Link: https://lkml.kernel.org/n/tip-pq63abgknsaeov23p80d8gjv@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      40f1c039
    • A
      tools arch x86 uapi: Synch asm/unistd.h with the kernel sources · 761830a0
      Arnaldo Carvalho de Melo 提交于
      To pick up the change in:
      
        45e29d11 ("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 <adrian.hunter@intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      761830a0
  17. 01 9月, 2019 2 次提交
  18. 20 8月, 2019 1 次提交
  19. 26 7月, 2019 1 次提交
    • A
      tools headers UAPI: Update tools's copy of kvm.h headers · e0d99c4d
      Arnaldo Carvalho de Melo 提交于
      Picking the changes from:
      
        66bb8a06 ("KVM: x86: PMU Event Filter")
        f087a029 ("KVM: nVMX: Stash L1's CR3 in vmcs01.GUEST_CR3 on nested entry w/o EPT")
        99adb567 ("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 <adrian.hunter@intel.com>
      Cc: Andre Przywara <andre.przywara@arm.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Eric Hankland <ehankland@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Sean Christopherson <sean.j.christopherson@intel.com>
      Link: https://lkml.kernel.org/n/tip-py1gcmt6rboehlwg6zvagfg2@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e0d99c4d
  20. 22 7月, 2019 1 次提交
    • J
      x86: Remove X86_FEATURE_MFENCE_RDTSC · be261ffc
      Josh Poimboeuf 提交于
      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: NJosh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/d990aa51e40063acb9888e8c1b688e41355a9588.1562255067.git.jpoimboe@redhat.com
      be261ffc
  21. 09 7月, 2019 1 次提交
    • A
      tools arch x86: Sync asm/cpufeatures.h with the with the kernel · 686cbe9e
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes in:
      
        6dbbf5ec ("x86/cpufeatures: Enumerate user wait instructions")
        b302e4b1 ("x86/cpufeatures: Enumerate the new AVX512 BFLOAT16 instructions")
        acec0ce0 ("x86/cpufeatures: Combine word 11 and 12 into a new scattered features word")
        cbb99c0f ("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 <aaronlewis@google.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/n/tip-y60wnyg2fuxi0hx7icruo9po@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      686cbe9e
  22. 07 7月, 2019 1 次提交
    • A
      tools arch kvm: Sync kvm headers with the kernel sources · c499d1f4
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        41040cf7 ("arm64/sve: Fix missing SVE/FPSIMD endianness conversions")
        6ca00dfa ("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 <adrian.hunter@intel.com>
      Cc: Dave Martin <Dave.Martin@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Liran Alon <liran.alon@oracle.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: https://lkml.kernel.org/n/tip-1cdbq5ulr4d6cx3iv2ye5wdv@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c499d1f4
  23. 25 6月, 2019 1 次提交
  24. 19 6月, 2019 1 次提交
    • L
      KVM: x86: Modify struct kvm_nested_state to have explicit fields for data · 6ca00dfa
      Liran Alon 提交于
      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: NLiran Alon <liran.alon@oracle.com>
      [Remove SVM stubs, add KVM_STATE_NESTED_VMX_VMCS12_SIZE. - Paolo]
      Reviewed-by: NLiran Alon <liran.alon@oracle.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6ca00dfa
  25. 28 5月, 2019 1 次提交
  26. 21 5月, 2019 1 次提交
  27. 16 5月, 2019 3 次提交
  28. 03 5月, 2019 1 次提交
    • A
      tools uapi x86: Sync vmx.h with the kernel · 24e45b49
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        2b27924b ("KVM: nVMX: always use early vmcs check when EPT is disabled")
      
      That causes this object in the tools/perf build process to be rebuilt:
      
        CC       /tmp/build/perf/arch/x86/util/kvm-stat.o
      
      But it isn't using VMX_ABORT_ prefixed constants, so no change in
      behaviour.
      
      This silences this perf build warning:
      
        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 <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Link: https://lkml.kernel.org/n/tip-bjbo3zc0r8i8oa0udpvftya6@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      24e45b49
  29. 12 4月, 2019 1 次提交
    • D
      tools: add smp_* barrier variants to include infrastructure · 6b7a2114
      Daniel Borkmann 提交于
      Add the definition for smp_rmb(), smp_wmb(), and smp_mb() to the
      tools include infrastructure: this patch adds the implementation
      for x86-64 and arm64, and have it fall back as currently is for
      other archs which do not have it implemented at this point. The
      x86-64 one uses lock + add combination for smp_mb() with address
      below red zone.
      
      This is on top of 09d62154 ("tools, perf: add and use optimized
      ring_buffer_{read_head, write_tail} helpers"), which didn't touch
      smp_* barrier implementations. Magnus recently rightfully reported
      however that the latter on x86-64 still wrongly falls back to sfence,
      lfence and mfence respectively, thus fix that for applications under
      tools making use of these to avoid such ugly surprises. The main
      header under tools (include/asm/barrier.h) will in that case not
      select the fallback implementation.
      Reported-by: NMagnus Karlsson <magnus.karlsson@intel.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      6b7a2114
  30. 29 3月, 2019 1 次提交
  31. 06 1月, 2019 1 次提交
    • M
      jump_label: move 'asm goto' support test to Kconfig · e9666d10
      Masahiro Yamada 提交于
      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: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      e9666d10