1. 27 5月, 2021 7 次提交
  2. 07 5月, 2021 2 次提交
  3. 26 4月, 2021 1 次提交
  4. 20 4月, 2021 6 次提交
  5. 07 4月, 2021 1 次提交
  6. 06 4月, 2021 1 次提交
  7. 19 3月, 2021 2 次提交
  8. 03 3月, 2021 1 次提交
  9. 16 2月, 2021 1 次提交
  10. 11 2月, 2021 1 次提交
    • R
      KVM: selftests: Add operand to vmsave/vmload/vmrun in svm.c · 47bc726f
      Ricardo Koller 提交于
      Building the KVM selftests with LLVM's integrated assembler fails with:
      
        $ CFLAGS=-fintegrated-as make -C tools/testing/selftests/kvm CC=clang
        lib/x86_64/svm.c:77:16: error: too few operands for instruction
                asm volatile ("vmsave\n\t" : : "a" (vmcb_gpa) : "memory");
                              ^
        <inline asm>:1:2: note: instantiated into assembly here
                vmsave
                ^
        lib/x86_64/svm.c:134:3: error: too few operands for instruction
                        "vmload\n\t"
                        ^
        <inline asm>:1:2: note: instantiated into assembly here
                vmload
                ^
      This is because LLVM IAS does not currently support calling vmsave,
      vmload, or vmload without an explicit %rax operand.
      
      Add an explicit operand to vmsave, vmload, and vmrum in svm.c. Fixing
      this was suggested by Sean Christopherson.
      
      Tested: building without this error in clang 11. The following patch
      (not queued yet) needs to be applied to solve the other remaining error:
      "selftests: kvm: remove reassignment of non-absolute variables".
      Suggested-by: NSean Christopherson <seanjc@google.com>
      Link: https://lore.kernel.org/kvm/X+Df2oQczVBmwEzi@google.com/Reviewed-by: NJim Mattson <jmattson@google.com>
      Signed-off-by: NRicardo Koller <ricarkol@google.com>
      Message-Id: <20210210031719.769837-1-ricarkol@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      47bc726f
  11. 09 2月, 2021 2 次提交
  12. 04 2月, 2021 6 次提交
  13. 08 1月, 2021 3 次提交
  14. 12 12月, 2020 1 次提交
    • A
      selftests: kvm: Test MSR exiting to userspace · 3cea1891
      Aaron Lewis 提交于
      Add a selftest to test that when the ioctl KVM_X86_SET_MSR_FILTER is
      called with an MSR list, those MSRs exit to userspace.
      
      This test uses 3 MSRs to test this:
        1. MSR_IA32_XSS, an MSR the kernel knows about.
        2. MSR_IA32_FLUSH_CMD, an MSR the kernel does not know about.
        3. MSR_NON_EXISTENT, an MSR invented in this test for the purposes of
           passing a fake MSR from the guest to userspace.  KVM just acts as a
           pass through.
      
      Userspace is also able to inject a #GP.  This is demonstrated when
      MSR_IA32_XSS and MSR_IA32_FLUSH_CMD are misused in the test.  When this
      happens a #GP is initiated in userspace to be thrown in the guest which is
      handled gracefully by the exception handling framework introduced earlier
      in this series.
      
      Tests for the generic instruction emulator were also added.  For this to
      work the module parameter kvm.force_emulation_prefix=1 has to be enabled.
      If it isn't enabled the tests will be skipped.
      
      A test was also added to ensure the MSR permission bitmap is being set
      correctly by executing reads and writes of MSR_FS_BASE and MSR_GS_BASE
      in the guest while alternating which MSR userspace should intercept.  If
      the permission bitmap is being set correctly only one of the MSRs should
      be coming through at a time, and the guest should be able to read and
      write the other one directly.
      Signed-off-by: NAaron Lewis <aaronlewis@google.com>
      Reviewed-by: NAlexander Graf <graf@amazon.com>
      Message-Id: <20201012194716.3950330-5-aaronlewis@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3cea1891
  15. 10 12月, 2020 1 次提交
  16. 17 11月, 2020 1 次提交
  17. 15 11月, 2020 3 次提交