1. 09 6月, 2020 1 次提交
  2. 08 6月, 2020 2 次提交
    • V
      KVM: selftests: fix vmx_preemption_timer_test build with GCC10 · 75ad6e80
      Vitaly Kuznetsov 提交于
      GCC10 fails to build vmx_preemption_timer_test:
      
      gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99
      -fno-stack-protector -fno-PIE -I../../../../tools/include
       -I../../../../tools/arch/x86/include -I../../../../usr/include/
       -Iinclude -Ix86_64 -Iinclude/x86_64 -I..  -pthread  -no-pie
       x86_64/evmcs_test.c ./linux/tools/testing/selftests/kselftest_harness.h
       ./linux/tools/testing/selftests/kselftest.h
       ./linux/tools/testing/selftests/kvm/libkvm.a
       -o ./linux/tools/testing/selftests/kvm/x86_64/evmcs_test
      /usr/bin/ld: ./linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):
       ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:603:
       multiple definition of `ctrl_exit_rev'; /tmp/ccMQpvNt.o:
       ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:603:
       first defined here
      /usr/bin/ld: ./linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):
       ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:602:
       multiple definition of `ctrl_pin_rev'; /tmp/ccMQpvNt.o:
       ./linux/tools/testing/selftests/kvm/include/x86_64/vmx.h:602:
       first defined here
       ...
      
      ctrl_exit_rev/ctrl_pin_rev/basic variables are only used in
      vmx_preemption_timer_test.c, just move them there.
      
      Fixes: 8d7fbf01 ("KVM: selftests: VMX preemption timer migration test")
      Reported-by: NMarcelo Bandeira Condotta <mcondotta@redhat.com>
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Message-Id: <20200608112346.593513-2-vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      75ad6e80
    • V
      KVM: selftests: Add x86_64/debug_regs to .gitignore · 5ae1452f
      Vitaly Kuznetsov 提交于
      Add x86_64/debug_regs to .gitignore.
      Reported-by: NMarcelo Bandeira Condotta <mcondotta@redhat.com>
      Fixes: 449aa906 ("KVM: selftests: Add KVM_SET_GUEST_DEBUG test")
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Message-Id: <20200608112346.593513-1-vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5ae1452f
  3. 05 6月, 2020 1 次提交
    • V
      KVM: selftests: Fix build with "make ARCH=x86_64" · b80db73d
      Vitaly Kuznetsov 提交于
      Marcelo reports that kvm selftests fail to build with
      "make ARCH=x86_64":
      
      gcc -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99
       -fno-stack-protector -fno-PIE -I../../../../tools/include
       -I../../../../tools/arch/x86_64/include  -I../../../../usr/include/
       -Iinclude -Ilib -Iinclude/x86_64 -I.. -c lib/kvm_util.c
       -o /var/tmp/20200604202744-bin/lib/kvm_util.o
      
      In file included from lib/kvm_util.c:11:
      include/x86_64/processor.h:14:10: fatal error: asm/msr-index.h: No such
       file or directory
      
       #include <asm/msr-index.h>
                ^~~~~~~~~~~~~~~~~
      compilation terminated.
      
      "make ARCH=x86", however, works. The problem is that arch specific headers
      for x86_64 live in 'tools/arch/x86/include', not in
      'tools/arch/x86_64/include'.
      
      Fixes: 66d69e08 ("selftests: fix kvm relocatable native/cross builds and installs")
      Reported-by: NMarcelo Bandeira Condotta <mcondotta@redhat.com>
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Message-Id: <20200605142028.550068-1-vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b80db73d
  4. 01 6月, 2020 6 次提交
  5. 08 5月, 2020 1 次提交
    • P
      KVM: VMX: pass correct DR6 for GD userspace exit · 45981ded
      Paolo Bonzini 提交于
      When KVM_EXIT_DEBUG is raised for the disabled-breakpoints case (DR7.GD),
      DR6 was incorrectly copied from the value in the VM.  Instead,
      DR6.BD should be set in order to catch this case.
      
      On AMD this does not need any special code because the processor triggers
      a #DB exception that is intercepted.  However, the testcase would fail
      without the previous patch because both DR6.BS and DR6.BD would be set.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      45981ded
  6. 07 5月, 2020 1 次提交
  7. 06 5月, 2020 1 次提交
    • P
      KVM: selftests: Fix build for evmcs.h · 8ffdaf91
      Peter Xu 提交于
      I got this error when building kvm selftests:
      
      /usr/bin/ld: /home/xz/git/linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:222: multiple definition of `current_evmcs'; /tmp/cco1G48P.o:/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:222: first defined here
      /usr/bin/ld: /home/xz/git/linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:223: multiple definition of `current_vp_assist'; /tmp/cco1G48P.o:/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:223: first defined here
      
      I think it's because evmcs.h is included both in a test file and a lib file so
      the structs have multiple declarations when linking.  After all it's not a good
      habit to declare structs in the header files.
      
      Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <20200504220607.99627-1-peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8ffdaf91
  8. 01 5月, 2020 1 次提交
    • S
      selftests: fix kvm relocatable native/cross builds and installs · 66d69e08
      Shuah Khan 提交于
      kvm test Makefile doesn't fully support cross-builds and installs.
      UNAME_M = $(shell uname -m) variable is used to define the target
      programs and libraries to be built from arch specific sources in
      sub-directories.
      
      For cross-builds to work, UNAME_M has to map to ARCH and arch specific
      directories and targets in this Makefile.
      
      UNAME_M variable to used to run the compiles pointing to the right arch
      directories and build the right targets for these supported architectures.
      
      TEST_GEN_PROGS and LIBKVM are set using UNAME_M variable.
      LINUX_TOOL_ARCH_INCLUDE is set using ARCH variable.
      
      x86_64 targets are named to include x86_64 as a suffix and directories
      for includes are in x86_64 sub-directory. s390x and aarch64 follow the
      same convention. "uname -m" doesn't result in the correct mapping for
      s390x and aarch64. Fix it to set UNAME_M correctly for s390x and aarch64
      cross-builds.
      
      In addition, Makefile doesn't create arch sub-directories in the case of
      relocatable builds and test programs under s390x and x86_64 directories
      fail to build. This is a problem for native and cross-builds. Fix it to
      create all necessary directories keying off of TEST_GEN_PROGS.
      
      The following use-cases work with this change:
      
      Native x86_64:
      make O=/tmp/kselftest -C tools/testing/selftests TARGETS=kvm install \
       INSTALL_PATH=$HOME/x86_64
      
      arm64 cross-build:
      make O=$HOME/arm64_build/ ARCH=arm64 HOSTCC=gcc \
      	CROSS_COMPILE=aarch64-linux-gnu- defconfig
      
      make O=$HOME/arm64_build/ ARCH=arm64 HOSTCC=gcc \
      	CROSS_COMPILE=aarch64-linux-gnu- all
      
      make kselftest-install TARGETS=kvm O=$HOME/arm64_build ARCH=arm64 \
      	HOSTCC=gcc CROSS_COMPILE=aarch64-linux-gnu-
      
      s390x cross-build:
      make O=$HOME/s390x_build/ ARCH=s390 HOSTCC=gcc \
      	CROSS_COMPILE=s390x-linux-gnu- defconfig
      
      make O=$HOME/s390x_build/ ARCH=s390 HOSTCC=gcc \
      	CROSS_COMPILE=s390x-linux-gnu- all
      
      make kselftest-install TARGETS=kvm O=$HOME/s390x_build/ ARCH=s390 \
      	HOSTCC=gcc CROSS_COMPILE=s390x-linux-gnu- all
      
      No regressions in the following use-cases:
      make -C tools/testing/selftests TARGETS=kvm
      make kselftest-all TARGETS=kvm
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      66d69e08
  9. 21 4月, 2020 1 次提交
  10. 16 4月, 2020 10 次提交
  11. 26 3月, 2020 1 次提交
  12. 25 3月, 2020 1 次提交
  13. 18 3月, 2020 1 次提交
  14. 17 3月, 2020 12 次提交