summaryrefslogtreecommitdiff
path: root/net/can
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-11-09 01:30:44 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 14:03:48 +0100
commit9f9d6d391ff5f8a3a4f6a0547fe8ed78dc4d8f15 (patch)
tree60b9e76a1d1756e52c81226853dbc7d4dacbd27d /net/can
parentbd37419f4fde95bf08d31588b80f69b99ac07b3f (diff)
KVM: nVMX: Query current VMCS when determining if MSR bitmaps are in use
commit 7dfbc624eb5726367900c8d86deff50836240361 upstream. Check the current VMCS controls to determine if an MSR write will be intercepted due to MSR bitmaps being disabled. In the nested VMX case, KVM will disable MSR bitmaps in vmcs02 if they're disabled in vmcs12 or if KVM can't map L1's bitmaps for whatever reason. Note, the bad behavior is relatively benign in the current code base as KVM sets all bits in vmcs02's MSR bitmap by default, clears bits if and only if L0 KVM also disables interception of an MSR, and only uses the buggy helper for MSR_IA32_SPEC_CTRL. Because KVM explicitly tests WRMSR before disabling interception of MSR_IA32_SPEC_CTRL, the flawed check will only result in KVM reading MSR_IA32_SPEC_CTRL from hardware when it isn't strictly necessary. Tag the fix for stable in case a future fix wants to use msr_write_intercepted(), in which case a buggy implementation in older kernels could prove subtly problematic. Fixes: d28b387fb74d ("KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20211109013047.2041518-2-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/can')
0 files changed, 0 insertions, 0 deletions