]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: VMX: make MSR bitmaps per-VCPU
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Jun 2018 09:04:24 +0000 (12:04 +0300)
committerBrian Maly <brian.maly@oracle.com>
Tue, 8 Jan 2019 16:11:57 +0000 (11:11 -0500)
commitb3bd557498bff191933d0481b609fdff0caa9ead
treeaa7bc6f02b8839d0b85450339372b9456d43afd3
parent8dd66ca98dfc03f7921ce5bf5926ce2d95507d84
KVM: VMX: make MSR bitmaps per-VCPU

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>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry-picked from 904e14fb7cb96401a7dc803ca2863fd5ba32ffe6)

Orabug: 28069548

Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
arch/x86/kvm/vmx.c
Contextual - different content. Also vmx_enable_intercept_for_msr was already
in UEK4 as part of commit 8d14695f9542e9e0195d6e41ddaa52c32322adf5. We just
changed the signature.

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kvm/vmx.c