Skip to content

Commit

Permalink
KVM: VMX: make MSR bitmaps per-VCPU
Browse files Browse the repository at this point in the history
(cherry picked from commit 904e14f)

Place the MSR bitmap in struct loaded_vmcs, and update it in place
every time the x2apic or APICv state can change.  This is rare and
the loop can handle 64 MSRs per iteration, in a similar fashion as
nested_vmx_prepare_msr_bitmap.

This prepares for choosing, on a per-VM basis, whether to intercept
the SPEC_CTRL and PRED_CMD MSRs.

Cc: stable@vger.kernel.org       # prereq for Spectre mitigation
Suggested-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Paolo Bonzini authored and Greg Kroah-Hartman committed Feb 13, 2018
1 parent ff546f9 commit 6236b78
Showing 1 changed file with 114 additions and 200 deletions.
Loading

0 comments on commit 6236b78

Please sign in to comment.