1. 16 1月, 2021 1 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 38c53947
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        647daca2 ("KVM: SVM: Add support for booting APs in an SEV-ES guest")
      
      That don't cause any tooling change, just silences this perf build
      warning:
      
        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 <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      38c53947
  2. 24 12月, 2020 1 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 288807fc
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        fb04a1ed ("KVM: X86: Implement ring-based dirty memory tracking")
      
      That result in these change in tooling:
      
        $ tools/perf/trace/beauty/kvm_ioctl.sh > before
        $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h
        $ cp arch/x86/include/uapi/asm/kvm.h tools/arch/x86/include/uapi/asm/kvm.h
        $ tools/perf/trace/beauty/kvm_ioctl.sh > after
        $ diff -u before after
        --- before	2020-12-21 11:55:45.229737066 -0300
        +++ after	2020-12-21 11:55:56.379983393 -0300
        @@ -90,6 +90,7 @@
         	[0xc0] = "CLEAR_DIRTY_LOG",
         	[0xc1] = "GET_SUPPORTED_HV_CPUID",
         	[0xc6] = "X86_SET_MSR_FILTER",
        +	[0xc7] = "RESET_DIRTY_RINGS",
         	[0xe0] = "CREATE_DEVICE",
         	[0xe1] = "SET_DEVICE_ATTR",
         	[0xe2] = "GET_DEVICE_ATTR",
        $
      
      Now one can use that string in filters when tracing ioctls, etc.
      
      And silences this perf build warning:
      
        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/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 <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Xu <peterx@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      288807fc
  3. 03 11月, 2020 1 次提交
    • A
      tools kvm headers: Update KVM headers from the kernel sources · aa04899a
      Arnaldo Carvalho de Melo 提交于
      Some should cause changes in tooling, like the one adding LAST_EXCP, but
      the way it is structured end up not making that happen.
      
      The new SVM_EXIT_INVPCID should get used by arch/x86/util/kvm-stat.c,
      in the svm_exit_reasons table.
      
      The tools/perf/trace/beauty part has scripts to catch changes and
      automagically create tables, like tools/perf/trace/beauty/kvm_ioctl.sh,
      but changes are needed to make tools/perf/arch/x86/util/kvm-stat.c catch
      those automatically.
      
      These were handled by the existing scripts:
      
        $ 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	2020-11-03 08:43:52.910728608 -0300
        +++ after	2020-11-03 08:44:04.273959984 -0300
        @@ -89,6 +89,7 @@
         	[0xbf] = "SET_NESTED_STATE",
         	[0xc0] = "CLEAR_DIRTY_LOG",
         	[0xc1] = "GET_SUPPORTED_HV_CPUID",
        +	[0xc6] = "X86_SET_MSR_FILTER",
         	[0xe0] = "CREATE_DEVICE",
         	[0xe1] = "SET_DEVICE_ATTR",
         	[0xe2] = "GET_DEVICE_ATTR",
        $
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before
        $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h
        $
        $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after
        $ diff -u before after
        --- before	2020-11-03 08:45:55.522225198 -0300
        +++ after	2020-11-03 08:46:12.881578666 -0300
        @@ -37,4 +37,5 @@
         	[0x71] = "VDPA_GET_STATUS",
         	[0x73] = "VDPA_GET_CONFIG",
         	[0x76] = "VDPA_GET_VRING_NUM",
        +	[0x78] = "VDPA_GET_IOVA_RANGE",
         };
        $
      
      This addresses these perf build warnings:
      
        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/s390/include/uapi/asm/sie.h' differs from latest version at 'arch/s390/include/uapi/asm/sie.h'
        diff -u tools/arch/s390/include/uapi/asm/sie.h arch/s390/include/uapi/asm/sie.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/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
        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/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h'
        diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      aa04899a
  4. 15 9月, 2020 1 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 8d761d2c
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        15e9e35c ("KVM: MIPS: Change the definition of kvm type")
        004a0124 ("arm64/x86: KVM: Introduce steal-time cap")
      
      That do not result in any change in tooling, as the additions are not
      being used in any table generator.
      
      This silences these perf build warning:
      
        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 <adrian.hunter@intel.com>
      Cc: Andrew Jones <drjones@redhat.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8d761d2c
  5. 12 8月, 2020 1 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · 6016e034
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        3edd6839 ("KVM: x86: Add a capability for GUEST_MAXPHYADDR < HOST_MAXPHYADDR support")
        1aa561b1 ("kvm: x86: Add "last CPU" to some KVM_EXIT information")
        23a60f83 ("s390/kvm: diagnose 0x318 sync and reset")
      
      That do not result in any change in tooling, as the additions are not
      being used in any table generator.
      
      This silences these perf build warning:
      
        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 <adrian.hunter@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Collin Walling <walling@linux.ibm.com>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mohammed Gamal <mgamal@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6016e034
  6. 09 6月, 2020 1 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · dd76c302
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        f97f5a56 ("x86/kvm/hyper-v: Add support for synthetic debugger interface")
        850448f3 ("KVM: nVMX: Fix VMX preemption timer migration")
        2c4c4132 ("KVM: x86: Print symbolic names of VMX VM-Exit flags in traces")
        cc440cda ("KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE")
        f7d31e65 ("x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit")
        72de5fa4 ("KVM: x86: announce KVM_FEATURE_ASYNC_PF_INT")
        acd05785 ("kvm: add capability for halt polling")
        3ecad8c2 ("docs: fix broken references for ReST files that moved around")
      
      That do not result in any change in tooling, as the additions are not
      being used in any table generator.
      
      This silences these perf build warning:
      
        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/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/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 Matlack <dmatlack@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Jon Doron <arilou@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Shier <pshier@google.com>
      Cc: Sean Christopherson <sean.j.christopherson@intel.com>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      dd76c302
  7. 21 4月, 2020 1 次提交
  8. 14 4月, 2020 1 次提交
    • A
      tools headers kvm: Sync linux/kvm.h with the kernel sources · b8fc2280
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        9a5788c6 ("KVM: PPC: Book3S HV: Add a capability for enabling secure guests")
        3c9bd400 ("KVM: x86: enable dirty log gradually in small chunks")
        13da9ae1 ("KVM: s390: protvirt: introduce and enable KVM_CAP_S390_PROTECTED")
        e0d2773d ("KVM: s390: protvirt: UV calls in support of diag308 0, 1")
        19e12277 ("KVM: S390: protvirt: Introduce instruction data area bounce buffer")
        29b40f10 ("KVM: s390: protvirt: Add initial vm and cpu lifecycle handling")
      
      So far we're ignoring those arch specific ioctls, we need to revisit
      this at some time to have arch specific tables, etc:
      
        $ grep S390 tools/perf/trace/beauty/kvm_ioctl.sh
            egrep -v " ((ARM|PPC|S390)_|[GS]ET_(DEBUGREGS|PIT2|XSAVE|TSC_KHZ)|CREATE_SPAPR_TCE_64)" | \
        $
      
      This addresses these tools/perf build warnings:
      
        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
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Janosch Frank <frankja@linux.ibm.com>
      Cc: Jay Zhou <jianjay.zhou@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b8fc2280
  9. 12 2月, 2020 1 次提交
    • A
      tools headers kvm: Sync linux/kvm.h with the kernel sources · 2a8d017d
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        7de3f142 ("KVM: s390: Add new reset vcpu API")
      
      So far we're ignoring those arch specific ioctls, we need to revisit
      this at some time to have arch specific tables, etc:
      
        $ grep S390 tools/perf/trace/beauty/kvm_ioctl.sh
        	egrep -v " ((ARM|PPC|S390)_|[GS]ET_(DEBUGREGS|PIT2|XSAVE|TSC_KHZ)|CREATE_SPAPR_TCE_64)" | \
        $
      
      This addresses these tools/perf build warnings:
      
        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
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Janosch Frank <frankja@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2a8d017d
  10. 11 12月, 2019 1 次提交
    • A
      tools headers kvm: Sync linux/kvm.h with the kernel sources · b4442688
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        22945688 ("KVM: PPC: Book3S HV: Support reset of secure guest")
      
      No tools changes are caused by this, as the only defines so far used
      from these files are for syscall arg pretty printing are:
      
        $ grep KVM tools/perf/trace/beauty/*.sh
        tools/perf/trace/beauty/kvm_ioctl.sh:regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
        $
      
      This addresses these tools/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
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Bharata B Rao <bharata@linux.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Link: https://lkml.kernel.org/n/tip-bdbe4x02johhul05a03o27zj@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b4442688
  11. 02 12月, 2019 1 次提交
    • A
      tools headers kvm: Sync kvm headers with the kernel sources · 1fc3d0ee
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes from:
      
        14edff88 Merge tag 'kvmarm-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
        a4b28f5c Merge remote-tracking branch 'kvmarm/kvm-arm64/stolen-time' into kvmarm-master/next
        58772e9a ("KVM: arm64: Provide VCPU attributes for stolen time")
        da345174 ("KVM: arm/arm64: Allow user injection of external data aborts")
        c726200d ("KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace")
        efe5ddca ("KVM: PPC: Book3S HV: XIVE: Allow userspace to set the # of VPs")
      
      No tools changes are caused by this, as the only defines so far used
      from these files are for syscall arg pretty printing are:
      
        $ grep KVM tools/perf/trace/beauty/*.sh
        tools/perf/trace/beauty/kvm_ioctl.sh:regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
        $
      
      Some are also include by:
      
        tools/perf/arch/x86/util/kvm-stat.c
        tools/perf/arch/powerpc/util/kvm-stat.c
      
      This addresses these tools/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/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
        diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/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: Christoffer Dall <christoffer.dall@arm.com>
      Cc: Fabiano Rosas <farosas@linux.ibm.com>
      Cc: Greg Kurz <groug@kaod.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Steven Price <steven.price@arm.com>
      Link: https://lkml.kernel.org/n/tip-qrjdudhq25mk5bfnhveofbm4@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1fc3d0ee
  12. 15 10月, 2019 1 次提交
    • A
      tools headers kvm: Sync kvm.h headers with the kernel sources · 8daf1fb7
      Arnaldo Carvalho de Melo 提交于
      To pick the changes in:
      
        344c6c80 ("KVM/Hyper-V: Add new KVM capability KVM_CAP_HYPERV_DIRECT_TLBFLUSH")
        dee04eee ("KVM: RISC-V: Add KVM_REG_RISCV for ONE_REG interface")
      
      These trigger the rebuild of this object:
      
        CC       /tmp/build/perf/trace/beauty/ioctl.o
      
      But do not result in any change in tooling, as the additions are not
      being used in any table generatator.
      
      This silences this perf build warning:
      
        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 <adrian.hunter@intel.com>
      Cc: Anup Patel <Anup.Patel@wdc.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Tianyu Lan <Tianyu.Lan@microsoft.com>
      Link: https://lkml.kernel.org/n/tip-d1v48a0qfoe98u5v9tn3mu5u@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8daf1fb7
  13. 01 10月, 2019 1 次提交
    • 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
  14. 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
  15. 24 7月, 2019 1 次提交
  16. 05 6月, 2019 1 次提交
  17. 28 5月, 2019 1 次提交
    • A
      tools headers UAPI: Sync kvm.h headers with the kernel sources · a7350998
      Arnaldo Carvalho de Melo 提交于
        dd53f610 ("Merge tag 'kvmarm-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD")
        59c5c58c ("Merge tag 'kvm-ppc-next-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD")
        d7547c55 ("KVM: Introduce KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2")
        6520ca64 ("KVM: PPC: Book3S HV: XIVE: Add a mapping for the source ESB pages")
        39e9af3d ("KVM: PPC: Book3S HV: XIVE: Add a TIMA mapping")
        e4945b9d ("KVM: PPC: Book3S HV: XIVE: Add get/set accessors for the VP XIVE state")
        e6714bd1 ("KVM: PPC: Book3S HV: XIVE: Add a control to dirty the XIVE EQ pages")
        7b46b616 ("KVM: PPC: Book3S HV: XIVE: Add a control to sync the sources")
        5ca80647 ("KVM: PPC: Book3S HV: XIVE: Add a global reset control")
        13ce3297 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration")
        e8676ce5 ("KVM: PPC: Book3S HV: XIVE: Add a control to configure a source")
        4131f83c ("KVM: PPC: Book3S HV: XIVE: add a control to initialize a source")
        eacc56bb ("KVM: PPC: Book3S HV: XIVE: Introduce a new capability KVM_CAP_PPC_IRQ_XIVE")
        90c73795 ("KVM: PPC: Book3S HV: Add a new KVM device for the XIVE native exploitation mode")
        4f45b90e ("KVM: s390: add deflate conversion facilty to cpu model")
        a243c16d ("KVM: arm64: Add capability to advertise ptrauth for guest")
        a22fa321 ("KVM: arm64: Add userspace flag to enable pointer authentication")
        4bd774e5 ("KVM: arm64/sve: Simplify KVM_REG_ARM64_SVE_VLS array sizing")
        8ae6efdd ("KVM: arm64/sve: Clean up UAPI register ID definitions")
        173aec2d ("KVM: s390: add enhanced sort facilty to cpu model")
        555f3d03 ("KVM: arm64: Add a capability to advertise SVE support")
        9033bba4 ("KVM: arm64/sve: Add pseudo-register for the guest's vector lengths")
        7dd32a0d ("KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl")
        e1c9c983 ("KVM: arm64/sve: Add SVE support to register access ioctl interface")
        2b953ea3 ("KVM: Allow 2048-bit register access via ioctl interface")
      
      None entails changes in tooling, the closest to that were some new arch
      specific ioctls, that are still not handled by the tools/perf/trace/beauty/
      library, that needs to create per-arch tables to convert ioctl cmd->string (and
      back).
      
      From a quick look the arch specific kvm-stat.c files at:
      
        $ ls -1 tools/perf/arch/*/util/kvm-stat.c
        tools/perf/arch/powerpc/util/kvm-stat.c
        tools/perf/arch/s390/util/kvm-stat.c
        tools/perf/arch/x86/util/kvm-stat.c
        $
      
      Are not affected.
      
      This silences these perf building warnings:
      
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h'
        diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
        Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
        diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'
        diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
        Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h'
        diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Cédric Le Goater <clg@kaod.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Dave Martin <Dave.Martin@arm.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: Paul Mackerras <paulus@ozlabs.org>
      Cc: Peter Xu <peterx@redhat.com>
      Link: https://lkml.kernel.org/n/tip-3msmqjenlmb7eygcdnmlqaq1@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a7350998
  18. 04 1月, 2019 1 次提交
    • A
      tools headers uapi: Sync linux/kvm.h with the kernel sources · 558517c5
      Arnaldo Carvalho de Melo 提交于
      To get the changes from these csets:
      
        2bc39970 ("x86/kvm/hyper-v: Introduce KVM_GET_SUPPORTED_HV_CPUID")
        2a31b9db ("kvm: introduce manual dirty log reprotect")
      
      That results in these new KVM IOCTLs being supported in 'perf trace'
      when beautifying the cmd ioctl syscall argument:
      
        $ 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-01-04 11:44:23.506605301 -0300
        +++ after	2019-01-04 11:44:36.878730583 -0300
        @@ -86,6 +86,8 @@
              [0xbd] = "HYPERV_EVENTFD",
              [0xbe] = "GET_NESTED_STATE",
              [0xbf] = "SET_NESTED_STATE",
        +     [0xc0] = "CLEAR_DIRTY_LOG",
        +     [0xc1] = "GET_SUPPORTED_HV_CPUID",
              [0xe0] = "CREATE_DEVICE",
              [0xe1] = "SET_DEVICE_ATTR",
              [0xe2] = "GET_DEVICE_ATTR",
        $
      
      At some point we should be able to do something:
      
        # perf trace -e ioctl(cmd == KVM_CLEAR_DIRTY_LOG)
      
      And have just those ioctls, optionally with callchains, etc.
      
      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>
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Link: https://lkml.kernel.org/n/tip-konm3iigl2os6ritt7d2bori@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      558517c5
  19. 31 10月, 2018 1 次提交
  20. 17 10月, 2018 1 次提交
  21. 08 10月, 2018 1 次提交
    • A
      tools headers uapi: Sync kvm.h copy · 25fe15e5
      Arnaldo Carvalho de Melo 提交于
      To pick up the changes introduced in:
      
        6fbbde9a ("KVM: x86: Control guest reads of MSR_PLATFORM_INFO")
      
      That is not yet used in tools such as 'perf trace'.
      
      The type of the change in this file, a simple integer parameter to the
      KVM_CHECK_EXTENSION ioctl should be easier to implement tho, adding to
      the libbeauty TODO list.
      
      This silences this perf build warning:
      
        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 <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Drew Schmitt <dasch@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-67h1bio5bihi1q6dy7hgwwx8@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      25fe15e5
  22. 12 9月, 2018 1 次提交
    • A
      tools headers uapi: Update tools's copies of kvm headers · 0210c156
      Arnaldo Carvalho de Melo 提交于
      To get the changes in:
      
      	a4499382 ("KVM: s390: Add huge page enablement control")
      	8fcc4b59 ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE")
      	be26b3a7 ("arm64: KVM: export the capability to set guest SError syndrome")
      	b7b27fac ("arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS")
      	b0960b95 ("KVM: arm: Add 32bit get/set events support")
      	a3da7b4a ("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 <adrian.hunter@intel.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cohuck@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Dongjiu Geng <gengdongjiu@huawei.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Janosch Frank <frankja@linux.ibm.com>
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-2vvwh2o19orn56di0ksrtgzr@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0210c156
  23. 26 6月, 2018 1 次提交
    • I
      tools/headers: Pick up latest kernel ABIs · 32fdbd90
      Ingo Molnar 提交于
      Sync KVM ABI additions and x86 CPU features additions - neither of which
      has any impact on the tooling build.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      32fdbd90
  24. 12 6月, 2018 1 次提交
  25. 08 5月, 2018 1 次提交
  26. 17 4月, 2018 1 次提交
    • I
      tools/headers: Synchronize kernel ABI headers, v4.17-rc1 · e2f73a18
      Ingo Molnar 提交于
      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:
      
      	d5a00528: syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()
      	5ac9efa3: syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention
      	ebeb8c82: 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: NIngo Molnar <mingo@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Potapenko <glider@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
      Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Robbins <brianrob@microsoft.com>
      Cc: Clark Williams <williams@redhat.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Dmitriy Vyukov <dvyukov@google.com> <dvyukov@google.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Jesper Dangaard Brouer <brouer@redhat.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kim Phillips <kim.phillips@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Li Zhijian <lizhijian@cn.fujitsu.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin Liška <mliska@suse.cz>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Matthias Kaehlcke <mka@chromium.org>
      Cc: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Sandipan Das <sandipan@linux.vnet.ibm.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Takuya Yamamoto <tkydevel@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: William Cohen <wcohen@redhat.com>
      Cc: Yonghong Song <yhs@fb.com>
      Link: http://lkml.kernel.org/r/20180416064024.ofjtrz5yuu3ykhvl@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e2f73a18
  27. 17 3月, 2018 1 次提交
    • W
      KVM: X86: Provide a capability to disable MWAIT intercepts · 4d5422ce
      Wanpeng Li 提交于
      Allowing a guest to execute MWAIT without interception enables a guest
      to put a (physical) CPU into a power saving state, where it takes
      longer to return from than what may be desired by the host.
      
      Don't give a guest that power over a host by default. (Especially,
      since nothing prevents a guest from using MWAIT even when it is not
      advertised via CPUID.)
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Jan H. Schönherr <jschoenh@amazon.de>
      Signed-off-by: NWanpeng Li <wanpengli@tencent.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4d5422ce
  28. 05 3月, 2018 1 次提交
    • A
      tools headers: Sync copy of kvm UAPI headers · d976a6e9
      Arnaldo Carvalho de Melo 提交于
      In 801e459a ("KVM: x86: Add a framework for supporting MSR-based
      features") a new ioctl was introduced, which with this sync of the kvm
      UAPI headers, makes 'perf trace' know about it:
      
        $ cd /tmp/build/perf/trace/beauty/generated/ioctl/
        $ diff -u kvm_ioctl_array.c.old kvm_ioctl_array.c
        --- /tmp/kvm_ioctl_array.c	2018-03-05 11:55:38.409145056 -0300
        +++ /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c	2018-03-05 11:56:17.456153501 -0300
        @@ -6,6 +6,7 @@
       	[0x04] = "GET_VCPU_MMAP_SIZE",
       	[0x05] = "GET_SUPPORTED_CPUID",
       	[0x09] = "GET_EMULATED_CPUID",
        +	[0x0a] = "GET_MSR_FEATURE_INDEX_LIST",
       	[0x40] = "SET_MEMORY_REGION",
       	[0x41] = "CREATE_VCPU",
       	[0x42] = "GET_DIRTY_LOG",
      
      So when using 'perf trace -e ioctl' that will appear along with the
      others, like in this excerpt of a system wide session:
      
        14.556 ( 0.006 ms): CPU 0/KVM/16077 ioctl(fd: 19<anon_inode:kvm-vcpu:0>, cmd: KVM_RUN) = 0
        14.565 ( 0.006 ms): CPU 0/KVM/16077 ioctl(fd: 19<anon_inode:kvm-vcpu:0>, cmd: KVM_RUN) = 0
        14.573 (         ): CPU 0/KVM/16077 ioctl(fd: 19<anon_inode:kvm-vcpu:0>, cmd: KVM_RUN) ...
        34.075 ( 0.016 ms): gnome-shell/2192 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_BUSY, arg: 0x7ffe4e73e850) = 0
        40.549 ( 0.012 ms): gnome-shell/2192 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_BUSY, arg: 0x7ffe4e73ece0) = 0
        40.625 ( 0.005 ms): gnome-shell/2192 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_BUSY, arg: 0x7ffe4e73e940) = 0
        40.632 ( 0.003 ms): gnome-shell/2192 ioctl(fd: 8</dev/dri/card0>, cmd: DRM_I915_GEM_MADVISE, arg: 0x7ffe4e73e9b0) = 0
      
      This also silences the perf build header copy drift verifier:
      
        make: Entering directory '/home/acme/git/perf/tools/perf'
          BUILD:   Doing 'make -j4' parallel build
        Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.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: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-h31oz5g0mt1dh2s2ajq6o6no@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d976a6e9
  29. 15 2月, 2018 1 次提交
    • I
      tools/headers: Synchronize kernel ABI headers, v4.16-rc1 · f091f1d6
      Ingo Molnar 提交于
      Sync the following tooling headers with the latest kernel version:
      
        tools/arch/powerpc/include/uapi/asm/kvm.h
        tools/arch/x86/include/asm/cpufeatures.h
        tools/include/uapi/drm/i915_drm.h
        tools/include/uapi/linux/if_link.h
        tools/include/uapi/linux/kvm.h
      
      All the changes are new ABI additions which don't impact their use
      in existing tooling.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      f091f1d6
  30. 03 2月, 2018 1 次提交
    • A
      tools headers: Sync {tools/,}arch/powerpc/include/uapi/asm/kvm.h · 1b8f5160
      Arnaldo Carvalho de Melo 提交于
      The changes in the 3214d01f ("KVM: PPC: Book3S: Provide information
      about hardware/firmware CVE workarounds") commit right now will not
      produce any change in the tools, but that is because we still need to
      improve tools/perf/trace/beauty/kvm_ioctl.sh to build per arch string
      tables, so that we avoid assigning multiple times to the same command
      string entry, i.e. multiple defines, for different arches, have the same
      value, causing this:
      
        In file included from trace/beauty/ioctl.c:82:0:
        /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c: In function ‘ioctl__scnprintf_kvm_cmd’:
        /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c:76:11: error: initialized field overwritten [-Werror=override-init]
        /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c:88:11: note: (near initialization for ‘kvm_ioctl_cmds[165]’)
        /tmp/build/perf/trace/beauty/generated/ioctl/kvm_ioctl_array.c:90:11: error: initialized field overwritten [-Werror=override-init]
          [0xa6] = "PPC_GET_SMMU_INFO",
                   ^~~~~~~~~~~~~~~~~~~
      
      So the onlye effect of updating the tools/ copy of ppc's kvm.h header
      is 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'
        Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
      
      At some point we should do what we did for the errno tables and create
      per-arch string translation tables for the KVM ioctl commands for the
      architectures supporting KVM, such as s/390, PowerPC, x86_64 and ARM.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@ozlabs.org>
      Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-jmcf78tqiudgn46zqfw2tgt2@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1b8f5160
  31. 15 12月, 2017 1 次提交
    • I
      tools/headers: Synchronize kernel <-> tooling headers · 643e345c
      Ingo Molnar 提交于
      Two kernel headers got modified recently, which are used by tooling as well:
      
       tools/include/uapi/linux/kvm.h
       arch/x86/include/asm/cpufeatures.h
      
      None of those changes have an effect on tooling, so do a plain copy.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      643e345c
  32. 29 11月, 2017 1 次提交
  33. 04 11月, 2017 1 次提交
    • I
      tools/headers: Synchronize kernel ABI headers · fb7df12d
      Ingo Molnar 提交于
      After the SPDX license tags were added a number of tooling headers got out of
      sync with their kernel variants, generating lots of build warnings.
      
      Sync them:
      
       - tools/arch/x86/include/asm/disabled-features.h,
         tools/arch/x86/include/asm/required-features.h,
         tools/include/linux/hash.h:
      
           Remove the SPDX tag where the kernel version does not have it.
      
       - tools/include/asm-generic/bitops/__fls.h,
         tools/include/asm-generic/bitops/arch_hweight.h,
         tools/include/asm-generic/bitops/const_hweight.h,
         tools/include/asm-generic/bitops/fls.h,
         tools/include/asm-generic/bitops/fls64.h,
         tools/include/uapi/asm-generic/ioctls.h,
         tools/include/uapi/asm-generic/mman-common.h,
         tools/include/uapi/sound/asound.h,
         tools/include/uapi/linux/kvm.h,
         tools/include/uapi/linux/perf_event.h,
         tools/include/uapi/linux/sched.h,
         tools/include/uapi/linux/vhost.h,
         tools/include/uapi/sound/asound.h:
      
           Add the SPDX tag of the respective kernel header.
      
       - tools/include/uapi/linux/bpf_common.h,
         tools/include/uapi/linux/fcntl.h,
         tools/include/uapi/linux/hw_breakpoint.h,
         tools/include/uapi/linux/mman.h,
         tools/include/uapi/linux/stat.h,
      
           Change the tag to the kernel header version:
      
             -/* SPDX-License-Identifier: GPL-2.0 */
             +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
      
      Also sync other header details:
      
       - include/uapi/sound/asound.h:
      
           Fix pointless end of line whitespace noise the header grew in this cycle.
      
       - tools/arch/x86/lib/memcpy_64.S:
      
           Sync the code and add tools/include/asm/export.h with dummy wrappers
           to support building the kernel side code in a tooling header environment.
      
       - tools/include/uapi/asm-generic/mman.h,
         tools/include/uapi/linux/bpf.h:
      
           Sync other details that don't impact tooling's use of the ABIs.
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      fb7df12d
  34. 25 9月, 2017 1 次提交
    • I
      tools include: Sync kernel ABI headers with tooling headers · 549a3976
      Ingo Molnar 提交于
      Time for a sync with ABI/uapi headers with the upcoming v4.14 kernel.
      
      None of the ABI changes require any source code level changes to our
      existing in-kernel tooling code:
      
        - tools/arch/s390/include/uapi/asm/kvm.h:
      
            New KVM_S390_VM_TOD_EXT ABI, not used by in-kernel tooling.
      
        - tools/arch/x86/include/asm/cpufeatures.h:
          tools/arch/x86/include/asm/disabled-features.h:
      
            New PCID, SME and VGIF x86 CPU feature bits defined.
      
        - tools/include/asm-generic/hugetlb_encode.h:
          tools/include/uapi/asm-generic/mman-common.h:
          tools/include/uapi/linux/mman.h:
      
            Two new madvise() flags, plus a hugetlb system call mmap flags
            restructuring/extension changes.
      
        - tools/include/uapi/drm/drm.h:
          tools/include/uapi/drm/i915_drm.h:
      
            New drm_syncobj_create flags definitions, new drm_syncobj_wait
            and drm_syncobj_array ABIs. DRM_I915_PERF_* calls and a new
            I915_PARAM_HAS_EXEC_FENCE_ARRAY ABI for the Intel driver.
      
        - tools/include/uapi/linux/bpf.h:
      
            New bpf_sock fields (::mark and ::priority), new XDP_REDIRECT
            action, new kvm_ppc_smmu_info fields (::data_keys, instr_keys)
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Taeung Song <treeze.taeung@gmail.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: Yao Jin <yao.jin@linux.intel.com>
      Link: http://lkml.kernel.org/r/20170913073823.lxmi4c7ejqlfabjx@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      549a3976
  35. 02 8月, 2017 1 次提交
  36. 14 7月, 2017 1 次提交
    • R
      kvm: x86: hyperv: make VP_INDEX managed by userspace · d3457c87
      Roman Kagan 提交于
      Hyper-V identifies vCPUs by Virtual Processor Index, which can be
      queried via HV_X64_MSR_VP_INDEX msr.  It is defined by the spec as a
      sequential number which can't exceed the maximum number of vCPUs per VM.
      APIC ids can be sparse and thus aren't a valid replacement for VP
      indices.
      
      Current KVM uses its internal vcpu index as VP_INDEX.  However, to make
      it predictable and persistent across VM migrations, the userspace has to
      control the value of VP_INDEX.
      
      This patch achieves that, by storing vp_index explicitly on vcpu, and
      allowing HV_X64_MSR_VP_INDEX to be set from the host side.  For
      compatibility it's initialized to KVM vcpu index.  Also a few variables
      are renamed to make clear distinction betweed this Hyper-V vp_index and
      KVM vcpu_id (== APIC id).  Besides, a new capability,
      KVM_CAP_HYPERV_VP_INDEX, is added to allow the userspace to skip
      attempting msr writes where unsupported, to avoid spamming error logs.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      d3457c87
  37. 13 7月, 2017 2 次提交
    • R
      kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 · efc479e6
      Roman Kagan 提交于
      There is a flaw in the Hyper-V SynIC implementation in KVM: when message
      page or event flags page is enabled by setting the corresponding msr,
      KVM zeroes it out.  This is problematic because on migration the
      corresponding MSRs are loaded on the destination, so the content of
      those pages is lost.
      
      This went unnoticed so far because the only user of those pages was
      in-KVM hyperv synic timers, which could continue working despite that
      zeroing.
      
      Newer QEMU uses those pages for Hyper-V VMBus implementation, and
      zeroing them breaks the migration.
      
      Besides, in newer QEMU the content of those pages is fully managed by
      QEMU, so zeroing them is undesirable even when writing the MSRs from the
      guest side.
      
      To support this new scheme, introduce a new capability,
      KVM_CAP_HYPERV_SYNIC2, which, when enabled, makes sure that the synic
      pages aren't zeroed out in KVM.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      efc479e6
    • G
      KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition · 949c0336
      Gleb Fotengauer-Malinovskiy 提交于
      In case of KVM_S390_GET_CMMA_BITS, the kernel does not only read struct
      kvm_s390_cmma_log passed from userspace (which constitutes _IOC_WRITE),
      it also writes back a return value (which constitutes _IOC_READ) making
      this an _IOWR ioctl instead of _IOW.
      
      Fixes: 4036e387 ("KVM: s390: ioctls to get and set guest storage attributes")
      Signed-off-by: NGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      949c0336
  38. 22 6月, 2017 2 次提交