kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Some fixes and a test for KVM_CAP_ENFORCE_PV_CPUID
@ 2020-10-27 23:10 Oliver Upton
  2020-10-27 23:10 ` [PATCH 1/6] selftests: kvm: add tsc_msrs_test binary to gitignore Oliver Upton
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Oliver Upton @ 2020-10-27 23:10 UTC (permalink / raw)
  To: kvm; +Cc: Paolo Bonzini, Sean Christopherson, Oliver Upton

Patches 1-2 address some small issues with documentation and the kvm selftests,
unrelated to the overall intent of this series.

Patch 3 applies the same PV MSR filtering mechanism to guest reads of KVM
paravirt msrs.

Patch 4 makes enabling KVM_CAP_ENFORCE_PV_FEATURE_CPUID idempotent with regards
to when userspace sets the guest's CPUID, ensuring that the cached copy of
KVM_CPUID_FEATURES.EAX is always current.

Patch 5 fixes a regression introduced with KVM_CAP_ENFORCE_PV_CPUID, wherein
the kvm masterclock isn't updated every time the guest uses a different system
time msr than before.

Lastly, Patch 6 introduces a test for the overall paravirtual restriction
mechanism, verifying that guests GP when touching MSRs they shouldn't and
get -KVM_ENOSYS when using restricted kvm hypercalls. Please note that this test
is dependent upon patches 1-3 of Aaron's userspace MSR test, which add support
for guest handling of the IDT in KVM selftests [1].

This series (along with Aaron's aforementioned changes) applies to
commit 77377064c3a9 ("KVM: ioapic: break infinite recursion on lazy
EOI").

[1] http://lore.kernel.org/r/20201012194716.3950330-1-aaronlewis@google.com

Oliver Upton (6):
  selftests: kvm: add tsc_msrs_test binary to gitignore
  Documentation: kvm: fix ordering of msr filter, pv documentation
  kvm: x86: reads of restricted pv msrs should also result in #GP
  kvm: x86: ensure pv_cpuid.features is initialized when enabling cap
  kvm: x86: request masterclock update any time guest uses different msr
  selftests: kvm: test enforcement of paravirtual cpuid features

 Documentation/virt/kvm/api.rst                |   4 +-
 arch/x86/kvm/cpuid.c                          |  23 +-
 arch/x86/kvm/cpuid.h                          |   1 +
 arch/x86/kvm/x86.c                            |  38 ++-
 tools/testing/selftests/kvm/.gitignore        |   2 +
 tools/testing/selftests/kvm/Makefile          |   1 +
 .../testing/selftests/kvm/include/kvm_util.h  |   2 +
 .../selftests/kvm/include/x86_64/processor.h  |  12 +
 tools/testing/selftests/kvm/lib/kvm_util.c    |  28 +++
 .../selftests/kvm/lib/x86_64/processor.c      |  29 +++
 .../selftests/kvm/x86_64/kvm_pv_test.c        | 234 ++++++++++++++++++
 11 files changed, 364 insertions(+), 10 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86_64/kvm_pv_test.c

-- 
2.29.0.rc2.309.g374f81d7ae-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-06 12:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 23:10 [PATCH 0/6] Some fixes and a test for KVM_CAP_ENFORCE_PV_CPUID Oliver Upton
2020-10-27 23:10 ` [PATCH 1/6] selftests: kvm: add tsc_msrs_test binary to gitignore Oliver Upton
2020-10-27 23:10 ` [PATCH 2/6] Documentation: kvm: fix ordering of msr filter, pv documentation Oliver Upton
2020-10-27 23:10 ` [PATCH 3/6] kvm: x86: reads of restricted pv msrs should also result in #GP Oliver Upton
2020-10-27 23:10 ` [PATCH 4/6] kvm: x86: ensure pv_cpuid.features is initialized when enabling cap Oliver Upton
2020-10-27 23:10 ` [PATCH 5/6] kvm: x86: request masterclock update any time guest uses different msr Oliver Upton
2020-11-06 12:43   ` Paolo Bonzini
2020-10-27 23:10 ` [PATCH 6/6] selftests: kvm: test enforcement of paravirtual cpuid features Oliver Upton
2020-11-03  7:50 ` [PATCH 0/6] Some fixes and a test for KVM_CAP_ENFORCE_PV_CPUID Oliver Upton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).