Some fixes and a test for KVM_CAP_ENFORCE_PV_CPUID
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | selftests: kvm: add tsc_msrs_test binary to gitignoretools/ | +1 | 0 replies | |
| 2/6 | Documentation: kvm: fix ordering of msr filter, pv documentationDocumentation/ | +2 | 0 replies | |
| 3/6 | kvm: x86: reads of restricted pv msrs should also result in #GParch/ | +34 | 0 replies | |
| 4/6 | kvm: x86: ensure pv_cpuid.features is initialized when enabling caparch/ arch/ arch/ | +19 | 0 replies | |
| 5/6 | kvm: x86: request masterclock update any time guest uses different msrarch/ | +1 | 1 reply | |
| 6/6 | selftests: kvm: test enforcement of paravirtual cpuid featurestools/ tools/ tools/ +4 more | +307 | 0 replies |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Peter Shier | Aaron Lewis |
|---|---|---|
| 1/6 | ||
| 2/6 | R-b | |
| 3/6 | R-b | |
| 4/6 | R-b | |
| 5/6 | R-b | |
| 6/6 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] Some fixes and a test for KVM_CAP_ENFORCE_PV_CPUID
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/[email protected]
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
Signature · 1 line
2.29.0.rc2.309.g374f81d7ae-goog