KVM: x86: pass host_initiated to functions that read MSRs
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Apr 2015 13:30:38 +0000 (15:30 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Jun 2015 14:01:00 +0000 (16:01 +0200)
commit609e36d372ad9329269e4a1467bd35311893d1d6
treea355bb4b5642026120615fdf28b297fbe631a4b4
parent62ef68bb4d00f1a662e487f3fc44ce8521c416aa
KVM: x86: pass host_initiated to functions that read MSRs

SMBASE is only readable from SMM for the VCPU, but it must be always
accessible if userspace is accessing it.  Thus, all functions that
read MSRs are changed to accept a struct msr_data; the host_initiated
and index fields are pre-initialized, while the data field is filled
on return.

Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c