1. 09 6月, 2020 1 次提交
  2. 07 5月, 2020 1 次提交
  3. 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
  4. 16 4月, 2020 4 次提交
  5. 26 3月, 2020 1 次提交
  6. 18 3月, 2020 1 次提交
  7. 17 3月, 2020 12 次提交
  8. 25 2月, 2020 4 次提交
  9. 13 2月, 2020 2 次提交
  10. 31 1月, 2020 1 次提交
  11. 14 1月, 2020 1 次提交
  12. 13 11月, 2019 1 次提交
    • V
      selftests: kvm: fix build with glibc >= 2.30 · e37f9f13
      Vitaly Kuznetsov 提交于
      Glibc-2.30 gained gettid() wrapper, selftests fail to compile:
      
      lib/assert.c:58:14: error: static declaration of ‘gettid’ follows non-static declaration
         58 | static pid_t gettid(void)
            |              ^~~~~~
      In file included from /usr/include/unistd.h:1170,
                       from include/test_util.h:18,
                       from lib/assert.c:10:
      /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
         34 | extern __pid_t gettid (void) __THROW;
            |                ^~~~~~
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e37f9f13
  13. 22 10月, 2019 2 次提交
  14. 28 9月, 2019 1 次提交
  15. 27 9月, 2019 1 次提交
  16. 25 9月, 2019 1 次提交
    • V
      KVM: selftests: fix ucall on x86 · 90a48843
      Vitaly Kuznetsov 提交于
      After commit e8bb4755eea2("KVM: selftests: Split ucall.c into architecture
      specific files") selftests which use ucall on x86 started segfaulting and
      apparently it's gcc to blame: it "optimizes" ucall() function throwing away
      va_start/va_end part because it thinks the structure is not being used.
      Previously, it couldn't do that because the there was also MMIO version and
      the decision which particular implementation to use was done at runtime.
      
      With older gccs it's possible to solve the problem by adding 'volatile'
      to 'struct ucall' but at least with gcc-8.3 this trick doesn't work.
      
      'memory' clobber seems to do the job.
      Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      90a48843
  17. 24 9月, 2019 3 次提交
    • P
      KVM: selftests: Remove duplicate guest mode handling · 52200d0d
      Peter Xu 提交于
      Remove the duplication code in run_test() of dirty_log_test because
      after some reordering of functions now we can directly use the outcome
      of vm_create().
      
      Meanwhile, with the new VM_MODE_PXXV48_4K, we can safely revert
      b442324b too where we stick the x86_64 PA width to 39 bits for
      dirty_log_test.
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      52200d0d
    • P
      KVM: selftests: Introduce VM_MODE_PXXV48_4K · 567a9f1e
      Peter Xu 提交于
      The naming VM_MODE_P52V48_4K is explicit but unclear when used on
      x86_64 machines, because x86_64 machines are having various physical
      address width rather than some static values.  Here's some examples:
      
        - Intel Xeon E3-1220:  36 bits
        - Intel Core i7-8650:  39 bits
        - AMD   EPYC 7251:     48 bits
      
      All of them are using 48 bits linear address width but with totally
      different physical address width (and most of the old machines should
      be less than 52 bits).
      
      Let's create a new guest mode called VM_MODE_PXXV48_4K for current
      x86_64 tests and make it as the default to replace the old naming of
      VM_MODE_P52V48_4K because it shows more clearly that the PA width is
      not really a constant.  Meanwhile we also stop assuming all the x86
      machines are having 52 bits PA width but instead we fetch the real
      vm->pa_bits from CPUID 0x80000008 during runtime.
      
      We currently make this exclusively used by x86_64 but no other arch.
      
      As a slight touch up, moving DEBUG macro from dirty_log_test.c to
      kvm_util.h so lib can use it too.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      567a9f1e
    • P
      KVM: selftests: Move vm type into _vm_create() internally · 12c386b2
      Peter Xu 提交于
      Rather than passing the vm type from the top level to the end of vm
      creation, let's simply keep that as an internal of kvm_vm struct and
      decide the type in _vm_create().  Several reasons for doing this:
      
      - The vm type is only decided by physical address width and currently
        only used in aarch64, so we've got enough information as long as
        we're passing vm_guest_mode into _vm_create(),
      
      - This removes a loop dependency between the vm->type and creation of
        vms.  That's why now we need to parse vm_guest_mode twice sometimes,
        once in run_test() and then again in _vm_create().  The follow up
        patches will move on to clean up that as well so we can have a
        single place to decide guest machine types and so.
      
      Note that this patch will slightly change the behavior of aarch64
      tests in that previously most vm_create() callers will directly pass
      in type==0 into _vm_create() but now the type will depend on
      vm_guest_mode, however it shouldn't affect any user because all
      vm_create() users of aarch64 will be using VM_MODE_DEFAULT guest
      mode (which is VM_MODE_P40V48_4K) so at last type will still be zero.
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      12c386b2
  18. 21 8月, 2019 1 次提交
  19. 15 8月, 2019 1 次提交