1. 20 1月, 2022 3 次提交
  2. 18 1月, 2022 1 次提交
  3. 15 1月, 2022 3 次提交
  4. 10 12月, 2021 1 次提交
  5. 22 10月, 2021 1 次提交
    • M
      KVM: selftests: set CPUID before setting sregs in vcpu creation · 413eaa4e
      Michael Roth 提交于
      Recent kernels have checks to ensure the GPA values in special-purpose
      registers like CR3 are within the maximum physical address range and
      don't overlap with anything in the upper/reserved range. In the case of
      SEV kselftest guests booting directly into 64-bit mode, CR3 needs to be
      initialized to the GPA of the page table root, with the encryption bit
      set. The kernel accounts for this encryption bit by removing it from
      reserved bit range when the guest advertises the bit position via
      KVM_SET_CPUID*, but kselftests currently call KVM_SET_SREGS as part of
      vm_vcpu_add_default(), before KVM_SET_CPUID*.
      
      As a result, KVM_SET_SREGS will return an error in these cases.
      Address this by moving vcpu_set_cpuid() (which calls KVM_SET_CPUID*)
      ahead of vcpu_setup() (which calls KVM_SET_SREGS).
      
      While there, address a typo in the assertion that triggers when
      KVM_SET_SREGS fails.
      Suggested-by: NSean Christopherson <seanjc@google.com>
      Signed-off-by: NMichael Roth <michael.roth@amd.com>
      Message-Id: <20211006203617.13045-1-michael.roth@amd.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NNathan Tempelman <natet@google.com>
      413eaa4e
  6. 25 6月, 2021 1 次提交
  7. 24 6月, 2021 10 次提交
  8. 14 6月, 2021 2 次提交
  9. 27 5月, 2021 1 次提交
    • D
      KVM: selftests: Print a message if /dev/kvm is missing · 2aab4b35
      David Matlack 提交于
      If a KVM selftest is run on a machine without /dev/kvm, it will exit
      silently. Make it easy to tell what's happening by printing an error
      message.
      
      Opportunistically consolidate all codepaths that open /dev/kvm into a
      single function so they all print the same message.
      
      This slightly changes the semantics of vm_is_unrestricted_guest() by
      changing a TEST_ASSERT() to exit(KSFT_SKIP). However
      vm_is_unrestricted_guest() is only called in one place
      (x86_64/mmio_warning_test.c) and that is to determine if the test should
      be skipped or not.
      Signed-off-by: NDavid Matlack <dmatlack@google.com>
      Message-Id: <20210511202120.1371800-1-dmatlack@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2aab4b35
  10. 16 2月, 2021 1 次提交
  11. 09 2月, 2021 2 次提交
  12. 04 2月, 2021 2 次提交
  13. 15 11月, 2020 1 次提交
  14. 08 11月, 2020 3 次提交
  15. 17 3月, 2020 2 次提交
  16. 22 10月, 2019 1 次提交
  17. 28 9月, 2019 1 次提交
  18. 24 9月, 2019 1 次提交
    • 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
  19. 21 8月, 2019 1 次提交
  20. 19 6月, 2019 2 次提交