KVM: nVMX: Disallow access to vmcs12 fields that aren't supported by "hardware"
Status from this message: Applied to kvm-x86 vmx, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 3 repliesApplied
- v34 patches 5 repliesSuperseded
- v22 patches 6 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 1 patch | 4 replies | Superseded |
Changes in v4 from the cover letter
- Filter out read-only fields too. [Xiaoyao]
- Actually test the code.
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | KVM: nVMX: Setup VMX MSRs on loading CPU during nested_vmx_hardware_setup()arch/ arch/ | +2 | 0 replies | |
| 2/4 | KVM: VMX: Add a wrapper around ROL16() to get a vmcs12 from a field encodingarch/ arch/ arch/ +2 more | +6 | 0 replies | |
| 3/4 | KVM: nVMX: Disallow access to vmcs12 fields that aren't supported by "hardware"arch/ arch/ arch/ +1 more | +92 | 1 reply | |
| 4/4 | KVM: nVMX: Remove explicit filtering of GUEST_INTR_STATUS from shadow VMCS fieldsarch/ | +4 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Xiaoyao Li | Chao Gao | Xin Li |
|---|---|---|---|
| 1/4 | R-b | ||
| 2/4 | R-b | ||
| 3/4 | R-b | R-b | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v4 0/4] KVM: nVMX: Disallow access to vmcs12 fields that aren't supported by "hardware"
Disallow accesses to vmcs12 fields that are defined by KVM, but are unsupported in the current incarnation of KVM, e.g. due to lack of hardware support for the underlying VMCS fields.
The primary motivation is to avoid having to carry the same logic for shadowed VMCS fields, which can't play nice with unsupported fields since VMREAD/VMWRITE will fail when attempting to transfer state between vmcs12 and the shadow VMCS.
v4:
- Filter out read-only fields too. [Xiaoyao]
- Actually test the code.
v3:
- https://lore.kernel.org/all/[email protected]
- Collect reviews. [Xin, Chao]
- Actually filter out vmcs12 fields when configuring shadow VMCS. [Chao]
- Move VMX MSR configuration into nested_vmx_hardware_setup().
- Add ENC_TO_VMCS12_IDX. [Xiaoyao]
- Use a Xiaoyao's crazy double ROL16 math. :-) [Xiaoyao, obviously]
v2:
- https://lore.kernel.org/all/[email protected]
- Name the array of KVM-defined fields kvm_supported_vmcs12_field_offsets, e.g. so that it's no confused with what's supported by hardware. [Xin]
- Combine encodings in switch statements for fields shared fate. [Xin]
- Drop the extern declaration of supported_vmcs12_field_offsets. [Chao]
- Handle GUEST_INTR_STATUS in cpu_has_vmcs12_field() and add a patch to drop the custom handling from init_vmcs_shadow_fields(). [Chao]
v1: https://lore.kernel.org/all/[email protected]
Sean Christopherson (4):
KVM: nVMX: Setup VMX MSRs on loading CPU during
nested_vmx_hardware_setup()
KVM: VMX: Add a wrapper around ROL16() to get a vmcs12 from a field
encoding
KVM: nVMX: Disallow access to vmcs12 fields that aren't supported by
"hardware"
KVM: nVMX: Remove explicit filtering of GUEST_INTR_STATUS from shadow
VMCS fields
arch/x86/kvm/vmx/hyperv_evmcs.c | 2 +- arch/x86/kvm/vmx/hyperv_evmcs.h | 2 +- arch/x86/kvm/vmx/nested.c | 31 ++++++++------ arch/x86/kvm/vmx/vmcs.h | 9 ++++ arch/x86/kvm/vmx/vmcs12.c | 74 +++++++++++++++++++++++++++++++-- arch/x86/kvm/vmx/vmcs12.h | 8 ++-- arch/x86/kvm/vmx/vmx.c | 2 - 7 files changed, 104 insertions(+), 24 deletions(-)
base-commit: acdc5446135932ca974b82d9d9a17762c7a82493
Signature · 1 line
2.52.0.457.g6b5491de43-goog