KVM: x86: introduce num_emulated_msrs
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 May 2015 10:08:55 +0000 (12:08 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 25 Sep 2018 22:47:35 +0000 (23:47 +0100)
commite23ada68e9428ef5f711e84d58b1c76465990918
tree7a65d3cb32e75d84b00dbea3c1ccd1c420c20924
parent98d050e1d1688c3e971fa148ba9e5023cdae3345
KVM: x86: introduce num_emulated_msrs

commit 62ef68bb4d00f1a662e487f3fc44ce8521c416aa upstream.

We will want to filter away MSR_IA32_SMBASE from the emulated_msrs if
the host CPU does not support SMM virtualization.  Introduce the
logic to do that, and also move paravirt MSRs to emulated_msrs for
simplicity and to get rid of KVM_SAVE_MSRS_BEGIN.

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/kvm/x86.c