KVM: x86: hyper-v: Fine-grained access check to Hyper-V hypercalls and MSRs
Status from this message: Queued, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest30 patches 1 replyApplied
- v130 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Rebase to kvm/next.
Patches in v2 Applied
Reviews trailers per patch
1 of 30 patches has a Reviewed-by or Acked-by.
| Patch | Wei Liu |
|---|---|
| 1/30 | A-b |
| 2/30 | |
| 3/30 | |
| 4/30 | |
| 5/30 | |
| 6/30 | |
| 7/30 | |
| 8/30 | |
| 9/30 | |
| 10/30 | |
| 11/30 | |
| 12/30 | |
| 13/30 | |
| 14/30 | |
| 15/30 | |
| 16/30 | |
| 17/30 | |
| 18/30 | |
| 19/30 | |
| 20/30 | |
| 21/30 | |
| 22/30 | |
| 23/30 | |
| 24/30 | |
| 25/30 | |
| 26/30 | |
| 27/30 | |
| 28/30 | |
| 29/30 | |
| 30/30 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 00/30] KVM: x86: hyper-v: Fine-grained access check to Hyper-V hypercalls and MSRs
Changes since v1:
- Rebase to kvm/next.
Original description:
Currently, all implemented Hyper-V features (MSRs and hypercalls) are available unconditionally to all Hyper-V enabled guests. This is not ideal as KVM userspace may decide to provide only a subset of the currently implemented features to emulate an older Hyper-V version, to reduce attack surface,... Implement checks against guest visible CPUIDs for all currently implemented MSRs and hypercalls.
Vitaly Kuznetsov (30):
asm-generic/hyperv: add HV_STATUS_ACCESS_DENIED definition
KVM: x86: hyper-v: Introduce KVM_CAP_HYPERV_ENFORCE_CPUID
KVM: x86: hyper-v: Cache guest CPUID leaves determining features
availability
KVM: x86: hyper-v: Prepare to check access to Hyper-V MSRs
KVM: x86: hyper-v: Honor HV_MSR_HYPERCALL_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_VP_RUNTIME_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_TIME_REF_COUNT_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_VP_INDEX_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_RESET_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_REFERENCE_TSC_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_SYNIC_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_SYNTIMER_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_MSR_APIC_ACCESS_AVAILABLE privilege bit
KVM: x86: hyper-v: Honor HV_ACCESS_FREQUENCY_MSRS privilege bit
KVM: x86: hyper-v: Honor HV_ACCESS_REENLIGHTENMENT privilege bit
KVM: x86: hyper-v: Honor HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE
privilege bit
KVM: x86: hyper-v: Honor HV_FEATURE_DEBUG_MSRS_AVAILABLE privilege bit
KVM: x86: hyper-v: Inverse the default in hv_check_msr_access()
KVM: x86: hyper-v: Honor HV_STIMER_DIRECT_MODE_AVAILABLE privilege bit
KVM: x86: hyper-v: Prepare to check access to Hyper-V hypercalls
KVM: x86: hyper-v: Check access to HVCALL_NOTIFY_LONG_SPIN_WAIT
hypercall
KVM: x86: hyper-v: Honor HV_POST_MESSAGES privilege bit
KVM: x86: hyper-v: Honor HV_SIGNAL_EVENTS privilege bit
KVM: x86: hyper-v: Honor HV_DEBUGGING privilege bit
KVM: x86: hyper-v: Honor HV_X64_REMOTE_TLB_FLUSH_RECOMMENDED bit
KVM: x86: hyper-v: Honor HV_X64_CLUSTER_IPI_RECOMMENDED bit
KVM: x86: hyper-v: Honor HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED bit
KVM: selftests: move Hyper-V MSR definitions to hyperv.h
KVM: selftests: Move evmcs.h to x86_64/
KVM: selftests: Introduce hyperv_features test
Documentation/virt/kvm/api.rst | 11 +
arch/x86/include/asm/kvm_host.h | 9 +
arch/x86/kvm/hyperv.c | 216 +++++-
arch/x86/kvm/hyperv.h | 1 +
arch/x86/kvm/x86.c | 4 +
include/asm-generic/hyperv-tlfs.h | 1 +
include/uapi/linux/kvm.h | 1 +
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 1 +
.../kvm/include/{ => x86_64}/evmcs.h | 2 +-
.../selftests/kvm/include/x86_64/hyperv.h | 185 +++++
.../selftests/kvm/x86_64/hyperv_clock.c | 8 +-
.../selftests/kvm/x86_64/hyperv_features.c | 649 ++++++++++++++++++
13 files changed, 1071 insertions(+), 18 deletions(-)
rename tools/testing/selftests/kvm/include/{ => x86_64}/evmcs.h (99%)
create mode 100644 tools/testing/selftests/kvm/include/x86_64/hyperv.h
create mode 100644 tools/testing/selftests/kvm/x86_64/hyperv_features.cSignature · 1 line
2.31.1